Bug 1479391

Summary: POST/PUT /docker/api/v2/registries does not return organization/location
Product: Red Hat Satellite Reporter: Stanislav Tkachenko <stkachen>
Component: Container ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: bbuckingham, bkearney, dlobatog, sgraessl
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-29 10:12:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stanislav Tkachenko 2017-08-08 13:30:39 UTC
Description of problem:
It is possible to specify organization ids when creating registry, but response does not contain any information about organizations.

However, this information is present in response for GET request.

2017-08-08 14:24:53 - nailgun.client - DEBUG - Making HTTP POST request to https://sat6.com/docker/api/v2/registries with options {'verify': False, 'auth': ('admin', 'changeme'), 'headers': {'content-type': 'application/json'}}, no params and data {"registry": {"url": "https://registry.access.redhat.com", "organization_ids": [26], "name": "wEdKQQB"}}.

2017-08-08 14:24:56 - nailgun.client - DEBUG - Received HTTP 201 response: {"id":12,"url":"https://registry.access.redhat.com","name":"wEdKQQB","description":null,"created_at":"2017-08-08T12:24:55.649Z","updated_at":"2017-08-08T12:24:55.649Z","username":null,"password":null}


Version-Release number of selected component (if applicable):
Satellite 6.3 Snap 10:
* satellite-6.3.0-16.0.beta.el7sat.noarch
* katello-3.4.4-2.el7sat.noarch
* foreman-1.15.2-1.el7sat.noarch
* tfm-rubygem-foreman_docker-3.1.0-1.fm1_15.el7sat.noarch


How reproducible:
Always

Steps to Reproduce:
1. % curl -s -H "Content-Type: application/json"  -X POST  \
     -k -u $USER:$PASS \
     -d '{"registry": {"name": "123", "organization_ids": [1], "url": "https://registry.access.redhat.com"}}' \
     $SAT_URL/docker/api/v2/registries | jq
2. 
3.

Actual results:
Organizations information is missing from POST response.

Expected results:
Organizations information should be present in POST response.

Additional info:

Comment 1 Stanislav Tkachenko 2017-08-08 13:58:25 UTC
Same for location, actually.

Comment 2 Brad Buckingham 2017-08-08 19:17:33 UTC
Daniel, thoughts on this one?  Is it a valid issue and feasible to address?

Comment 3 Daniel Lobato Garcia 2017-08-29 10:04:07 UTC
Stanislav, what version of the foreman-docker plugin are you using? You can check this on Administer > About.

Since https://github.com/theforeman/foreman-docker/commit/c1cbf3bd157d557241a524c39823ed7aff148248 we should have this available.

Comment 4 RHEL Program Management 2017-08-29 10:12:51 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

Comment 5 Stanislav Tkachenko 2017-08-30 08:15:12 UTC
(In reply to Daniel Lobato Garcia from comment #3)
> Stanislav, what version of the foreman-docker plugin are you using? You can
> check this on Administer > About.
> 
> Since
> https://github.com/theforeman/foreman-docker/commit/
> c1cbf3bd157d557241a524c39823ed7aff148248 we should have this available.

It works for GET but this bug was about POST/PUT. Ok, if WONTFIX then WONTFIX.