Bug 888138 - SAM Cli : Applying default custom info keynames to all existing org failed
Summary: SAM Cli : Applying default custom info keynames to all existing org failed
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Subscription Asset Manager
Classification: Retired
Component: katello
Version: 1.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Adam Price
QA Contact: Og Maciel
URL:
Whiteboard:
Depends On:
Blocks: sam13-tracker
TreeView+ depends on / blocked
 
Reported: 2012-12-18 04:12 UTC by Tazim Kolhar
Modified: 2016-04-26 00:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-15 20:43:36 UTC
Embargoed:


Attachments (Terms of Use)

Description Tazim Kolhar 2012-12-18 04:12:27 UTC
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 20:15:26 UTC
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 20:14:31 UTC
works4me

Comment 3 Og Maciel 2013-01-15 20:40:48 UTC
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 20:43:36 UTC
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.