Bug 888138 - SAM Cli : Applying default custom info keynames to all existing org failed
SAM Cli : Applying default custom info keynames to all existing org failed
Status: CLOSED WORKSFORME
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.2
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Adam Price
Og Maciel
:
Depends On:
Blocks: sam13-tracker
  Show dependency treegraph
 
Reported: 2012-12-17 23:12 EST by Tazim Kolhar
Modified: 2016-04-25 20:54 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-15 15:43:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Tazim Kolhar 2012-12-17 23:12:27 EST
Description of problem:
Added default custom info keynames for a Organisation
tried applying default custom info keys to the existing Org 
it failed


Version-Release number of selected component (if applicable):

# rpm -qa | grep katello
katello-selinux-1.2.1-1h.el6_3.noarch
katello-cli-1.2.4-4h.el6_3.noarch
katello-headpin-1.2.6-6h.el6_3.noarch
katello-certs-tools-1.2.1-1h.el6_3.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-configure-1.2.3-1h.el6_3.noarch
katello-common-1.2.6-6h.el6_3.noarch
katello-headpin-all-1.2.6-6h.el6_3.noarch
katello-glue-candlepin-1.2.6-6h.el6_3.noarch
katello-cli-common-1.2.4-4h.el6_3.noarch

How reproducible:
# yum install -y katello-headpin-all
# katello-configure --deployment=sam

Steps to Reproduce:
1.# headpin -u admin -p admin org info --name ACME_Corporation
--------------------------------------------------------------------------------
                            Organization Information
--------------------------------------------------------------------------------

Id                       : 1
Name                     : ACME_Corporation
Description:
    ACME_Corporation Organization
Available Service Levels:
    
Default System Info Keys:
    [ test_msg ]


2.# headpin -u admin -p admin org apply_default_system_info --name ACME_Corporation
No default custom info keys to apply in Org [ ACME_Corporation ]


  
Actual results:
unable to detect the default custon info keys.

Expected results:
the default custom info keys should be applied.

Additional info:
Comment 1 Adam Price 2013-01-02 15:15:26 EST
Tazim, you have to add default system info to an org before you can apply them to existing systems.

example:
1. I have 4 existing systems within org 'acme'
2. I want all my systems in org 'acme' to have a custom info key of 'asset-tag'
3. I add 'asset-tag' to org 'acme'
    $ katello org add_default_system_info --name=acme --keyname="asset-tag"
4. I then apply this custom info to all existing systems
    $ katello org apply_default_system_info --name=acme
Comment 2 Adam Price 2013-01-15 15:14:31 EST
works4me
Comment 3 Og Maciel 2013-01-15 15:40:48 EST
sam> org list
---------------------------------------------------------------------------------------------------------------------
                                                  Organization List

Id Name             Label                                Description                   
---------------------------------------------------------------------------------------------------------------------
5  SAM QE           SAM_QE                                                             
2  São Paulo        9b8f7e32-b818-4d49-854a-7cf3abf1b3fb                               
1  ACME_Corporation ACME_Corporation                     ACME_Corporation Organization 
sam> org add_default_system_info --name 'São Paulo' --keyname 'asset-tag'
Successfully added default custom info key [ asset-tag ] to Org [ São Paulo ]
sam> org apply_default_system_info --name 'São Paulo'
Successfully applied default custom info keys to [ 5 ] systems in Org [ São Paulo ]
sam>
Comment 4 Og Maciel 2013-01-15 15:43:36 EST
Works for me with the following build:
* candlepin-0.7.23-1.el6_3.noarch
* candlepin-tomcat6-0.7.23-1.el6_3.noarch
* elasticsearch-0.19.9-5.el6_3.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.2.1-1h.el6_3.noarch
* katello-cli-1.2.1-11h.el6_3.noarch
* katello-cli-common-1.2.1-11h.el6_3.noarch
* katello-common-1.2.1-12h.el6_3.noarch
* katello-configure-1.2.3-1h.el6_3.noarch
* katello-glue-candlepin-1.2.1-12h.el6_3.noarch
* katello-headpin-1.2.1-12h.el6_3.noarch
* katello-headpin-all-1.2.1-12h.el6_3.noarch
* katello-selinux-1.2.1-2h.el6_3.noarch
* thumbslug-0.0.28-1.el6_3.noarch
* thumbslug-selinux-0.0.28-1.el6_3.noarch

Note You need to log in before you can comment on or make changes to this bug.