Description of problem: Register two systems with a same name to two environments of an org respectively. These system can't be unregistered by headpin cli. Version-Release number of selected component (if applicable): katello-cli-common-0.1.100-2.el6.noarch katello-cli-headpin-0.1.15-2.el6.noarch katello-headpin-0.1.140-3.el6.noarch katello-headpin-all-0.1.140-3.el6.noarch How reproducible: always Steps to Reproduce: 1.Register system1 to env1. # subscription-manager register --org=ACME_Corporation --environment=env1 --name=testsystem 2.Register system2 to env2. # subscription-manager register --org=ACME_Corporation --environment=env2 --name=testsystem 3.Check registered systems. # headpin -u admin -p admin system list --org=ACME_Corporation ---------------------------------------------------------- Systems List For Org [ ACME_Corporation ] Name ---------------------------------------------------------- testsystem testsystem 3.Unregister system1 from SAM by using headpin cli. # headpin -u admin -p admin system unregister --help Usage: headpin [options] Options: -h, --help show this help message and exit -g grep friendly output -v verbose, more structured output -d DELIMITER grep friendly output column delimiter --org=ORG organization name (required) --name=NAME system name (required) Actual results: There is no environment option. Expected results: Environment should be specified to decide which system will be unregistered. Additional info: # headpin -u admin -p admin system unregister --name=testsystem --org=ACME_Corporation Could not find System [ testsystem ] in Org [ ACME_Corporation ]
fixed in 9575569ba3736103cd8fdb5e1ef588c0cbba45af
VERIFIED with the build : [root@tyan-gt24-12 ~]# rpm -qa | grep katello katello-configure-0.3.1-2.el6_2.noarch katello-selinux-0.1.10-1.el6.noarch katello-cli-headpin-0.2.0-1.el6_2.noarch katello-candlepin-cert-key-pair-1.0-1.noarch katello-configure-upgrade-0.3.1-2.el6_2.noarch katello-cli-common-0.3.1-1.el6_2.noarch katello-glue-candlepin-0.3.0-2.el6_2.noarch katello-certs-tools-1.0.6-1.el6.noarch katello-headpin-0.2.4-3.el6_2.noarch katello-common-0.3.0-2.el6_2.noarch katello-headpin-all-0.2.4-3.el6_2.noarch Actual Results produced : [root@kvm-guest-04 ~]# rpm -ivh http://tyan-gt24-12.rhts.eng.bos.redhat.com/pub/candlepin-cert-consumer-tyan-gt24-12.rhts.eng.bos.redhat.com-1.0-1.noarch.rpm Retrieving http://tyan-gt24-12.rhts.eng.bos.redhat.com/pub/candlepin-cert-consumer-tyan-gt24-12.rhts.eng.bos.redhat.com-1.0-1.noarch.rpm Preparing... ########################################### [100%] 1:candlepin-cert-consumer########################################### [100%] [root@kvm-guest-04 ~]# subscription-manager register --user admin --password admin --org ACME_Corporation --environment DEV --autosubscribe The system has been registered with id: 5b546043-5a0d-46e0-a135-84b5783186e2 Installed Product Current Status: ProductName: Red Hat Enterprise Linux Server Status: Subscribed [root@tyan-gt24-12 ~]# headpin -u admin -p admin system list --org ACME_Corporation -------------------------------------------------------------------------------- Systems List For Org [ ACME_Corporation ] Name Ipv4 Address Service Level -------------------------------------------------------------------------------- kvm-guest-04.rhts.eng.bos.redhat.com None [root@tyan-gt24-12 ~]# headpin -u admin -p admin system unregister --help Usage: headpin [options] Options: -h, --help show this help message and exit -g grep friendly output -v verbose, more structured output -d DELIMITER column delimiter in grep friendly output, works only with option -g --org=ORG organization name (required) --name=NAME system name (required) --environment=ENVIRONMENT environment name eg: development Appropriate option provided to unregister the system is provided