Bug 973907 - Allow passing org name with dot to other katello cli api's e.g. environment, system
Summary: Allow passing org name with dot to other katello cli api's e.g. environment, ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Christine Fouant
QA Contact: Sachin Ghai
URL:
Whiteboard:
: 987386 (view as bug list)
Depends On:
Blocks: sam20-tracker
TreeView+ depends on / blocked
 
Reported: 2013-06-13 05:53 UTC by Sachin Ghai
Modified: 2019-09-26 17:43 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-02 14:07:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sachin Ghai 2013-06-13 05:53:58 UTC
Description of problem:
When a organization has dot in its name and when we use the same org with other katello cli api's, we get 'Resource not found'.

for ex:
katello> environment list --org "foo.bar"
Resource not found on the server

katello> environment create --org "foo.bar" --name test --prior Library
Resource not found on the server

katello> product list --org foo.bar
Resource not found on the server

katello> system list --org foo.bar
Resource not found on the server

Bugzilla (970644) fixed the similar issue for just provider listing.

I think this issue hits other areas too, So It would be great if it fixed all other affected areas for ex environment, system and product


Version-Release number of selected component (if applicable):
* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.8.9-1.el6_4.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.8.9-1.el6_4.noarch
* candlepin-tomcat6-0.8.9-1.el6_4.noarch
* elasticsearch-0.19.9-8.el6sat.noarch
* foreman-1.1.10004-1.noarch
* foreman-installer-puppet-concat-0-2.d776701.git.0.21ef926.el6sat.noarch
* foreman-installer-puppet-dhcp-0-5.3a4a13c.el6sat.noarch
* foreman-installer-puppet-dns-0-7.fcae203.el6sat.noarch
* foreman-installer-puppet-foreman-0-6.568c5c4.el6sat.noarch
* foreman-installer-puppet-foreman_proxy-0-8.bd1e35d.el6sat.noarch
* foreman-installer-puppet-puppet-0-3.ab46748.el6sat.noarch
* foreman-installer-puppet-tftp-0-5.ea6c5e5.el6sat.noarch
* foreman-installer-puppet-xinetd-0-50a267b8.git.0.44aca6a.el6sat.noarch
* foreman-postgresql-1.1.10004-1.noarch
* foreman-proxy-1.1.10003-1.el6sat.noarch
* foreman-proxy-installer-1.0.1-8.f5ae2cd.el6sat.noarch
* katello-1.4.2-10.el6sat.noarch
* katello-all-1.4.2-10.el6sat.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.4.2-2.el6sat.noarch
* katello-cli-1.4.2-7.el6sat.noarch
* katello-cli-common-1.4.2-7.el6sat.noarch
* katello-common-1.4.2-10.el6sat.noarch
* katello-configure-1.4.3-14.el6sat.noarch
* katello-configure-foreman-1.4.3-14.el6sat.noarch
* katello-foreman-all-1.4.2-10.el6sat.noarch
* katello-glue-candlepin-1.4.2-10.el6sat.noarch
* katello-glue-elasticsearch-1.4.2-10.el6sat.noarch
* katello-glue-pulp-1.4.2-10.el6sat.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.4.3-3.el6sat.noarch
* openldap-2.4.23-31.el6.x86_64
* pulp-rpm-plugins-2.1.1-1.el6sat.noarch
* pulp-selinux-2.1.1-1.el6sat.noarch
* pulp-server-2.1.1-1.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-ldap_fluff-0.2.2-1.el6sat.noarch
* ruby193-rubygem-net-ldap-0.3.1-2.el6sat.noarch
* signo-0.0.16-1.el6sat.noarch
* signo-katello-0.0.16-1.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
ex:
1. katello> org create --name foo.bar
2. katello> environment list --org "foo.bar"
3. katello> environment create --org "foo.bar" --name test --prior Library
4. katello> product list --org foo.bar
5. katello> system list --org foo.bar

Actual results:
Resource not found on the server

Expected results:
User should be able to perform all operation with the org having dot in its name.

Additional info:

Comment 1 RHEL Program Management 2013-06-13 06:03:37 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Ales Dujicek 2013-08-01 11:15:35 UTC
*** Bug 987386 has been marked as a duplicate of this bug. ***

Comment 4 Ales Dujicek 2013-08-01 11:39:31 UTC
character "/" in org name causes the same error:

katello> org create --name foo/bar 
Successfully created org [ foo/bar ]
katello> environment list --org "foo/bar" 
Resource not found on the server
katello> environment create --org "foo/bar" --name test --prior Library 
Resource not found on the server
katello> product list --org foo/bar 
Resource not found on the server
katello> system list --org foo/bar 
Resource not found on the server

Comment 5 Tom McKay 2013-08-06 11:05:38 UTC
The problem here is that the org name is being used as part of the url:

GET /katello/api/organizations/foo/bar/systems

Work around is to use the org label (which would be foo_bar by default).

Moving to future release as low priority.

Comment 6 Garik Khachikyan 2013-10-10 14:59:10 UTC
Please note: there is *NO* workaround in case of RHSM registration.

using org name (with dot) brings to the same "Resource not found on the server" and with the label (in --org <orgLabel> of RHSM register command) - just org not found from Sat6 side.

so no way registering a system to that org.

Comment 7 Christine Fouant 2014-05-22 19:54:38 UTC
Updated terminology to current process, and no longer receiving errors.  Below are tests reproduced and resultant output (checked for "/" character as well and no errors):

1. katello> organization create --name foo.bar
Organization created

2. katello> lifecycle-environment list --organization "foo.bar"
---|---------|------
ID | NAME    | PRIOR
---|---------|------
2  | Library |      
---|---------|------

3. katello> lifecycle-environment create --organization "foo.bar" --name test --prior Library
Environment created

4. katello> product list --organization foo.bar
No data.

5. katello> content-host list --organization foo.bar
No data.

Comment 9 Sachin Ghai 2014-05-28 09:08:26 UTC
Verified with latest snap sat6 beta snap6 -
(Satellite-6.0.3-RHEL-6-20140523.0)


Now I can use orgname with dot. I created an org foo.bar and added new environment under this org.

[root@dhcp20x-xx ~]# hammer organization create --name foo.bar
Organization created
[root@dhcp20x-xx ~]# hammer organization list
---|------------------|------------------|------------------------------
ID | NAME             | LABEL            | DESCRIPTION                  
---|------------------|------------------|------------------------------
1  | ACME_Corporation | ACME_Corporation | ACME_Corporation Organization
3  | foo.bar          | foo_bar          |                              
---|------------------|------------------|------------------------------


[root@dhcp20x-xx ~]# hammer lifecycle-environment list --organization "foo.bar"
---|---------|------
ID | NAME    | PRIOR
---|---------|------
5  | Library |      
---|---------|------

[root@dhcp20x-xx ~]# hammer lifecycle-environment create --organization "foo.bar" --name test --prior Library
Environment created


[root@dhcp20x-xx ~]# hammer lifecycle-environment list --organization "foo.bar"
---|---------|--------
ID | NAME    | PRIOR  
---|---------|--------
5  | Library |        
6  | test    | Library
---|---------|--------

[root@dhcp20x-xx ~]# hammer product list --organization foo.bar
No data.
[root@dhcp20x-xx ~]# hammer host-collection list --organization foo.bar
No data.
[root@dhcp20x-xx ~]# hammer content-host  list --organization foo.bar
No data.


verified with "/" char too.

[root@dhcp20x-xx ~]# hammer organization create --name foo/bar
Organization created

[root@dhcp20x-xx ~]# hammer organization list
---|------------------|------------------|------------------------------
ID | NAME             | LABEL            | DESCRIPTION                  
---|------------------|------------------|------------------------------
1  | ACME_Corporation | ACME_Corporation | ACME_Corporation Organization
4  | foo/bar          | foo_bar          |                              
---|------------------|------------------|------------------------------

[root@dhcp20x-xx ~]# hammer lifecycle-environment list --organization "foo/bar"
---|---------|------
ID | NAME    | PRIOR
---|---------|------
7  | Library |      
---|---------|------

Comment 10 Bryan Kearney 2014-07-02 14:07:50 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.


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