Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1206679 - Need to be able to manage docker registries in the API/CLI
Summary: Need to be able to manage docker registries in the API/CLI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: David Davis
QA Contact: Og Maciel
URL: http://projects.theforeman.org/issues...
Whiteboard:
: 1209997 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-27 18:28 UTC by David Davis
Modified: 2019-06-13 21:25 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-15 07:21:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 9754 0 None None None 2016-04-22 14:58:46 UTC
Red Hat Product Errata RHBA-2015:1786 0 normal SHIPPED_LIVE Satellite 6.1.2 bug fix update 2015-09-15 11:20:04 UTC

Description David Davis 2015-03-27 18:28:52 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 RHEL Program Management 2015-03-27 18:43:18 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 Bryan Kearney 2015-06-23 20:04:35 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9754 has been closed
-------------
Daniel Lobato Garcia
https://github.com/theforeman/hammer_cli_foreman_docker/commit/d90090884c8ba5d8c3233fd0f6c6d830ea4289f3

Comment 5 David Davis 2015-07-08 22:18:28 UTC
*** Bug 1209997 has been marked as a duplicate of this bug. ***

Comment 6 Elyézer Rezende 2015-07-15 01:11:07 UTC
Failed on: Snap 12

Steps:

hammer> docker registry
Usage:
     docker registry [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    subcommand
 [ARG] ...                     subcommand arguments

Subcommands:
 create
 delete
 info
 list
 update

Options:
 -h, --help                    print help

hammer> docker registry create
Could not create the registry:
  Error: The server does not support such operation.

hammer> docker registry create --help
Usage:
     docker registry create [OPTIONS]

Options:
 -h, --help                    print help

hammer> docker registry list
Error: The server does not support such operation.

Even though the commands are available they are not working.

Comment 7 David Davis 2015-07-22 15:41:08 UTC
The reason for the failure in Comment 6 is that this commit needs to be merged downstream: http://git.io/vYLfp.

Comment 10 Oleksandr Shtaier 2015-08-17 07:55:41 UTC
Make sure to check that both CLI and API parts work properly in scope of the fix for that defect, because comments in the thread above are little bit confusing.
Thanks.

Comment 11 David Davis 2015-08-26 18:10:17 UTC
Merged downstream commit f83894c6c61fc193e9f1fe0becdaddeda6fd4bb0

https://gitlab.sat.lab.tlv.redhat.com/satellite6/foreman-docker/commit/f83894c6c61fc193e9f1fe0becdaddeda6fd4bb0

Comment 12 Og Maciel 2015-09-02 18:50:36 UTC
hammer> docker registry
Usage:
     docker registry [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    subcommand
 [ARG] ...                     subcommand arguments

Subcommands:
 create                        Create a docker registry
 delete                        Delete a docker registry
 info                          Show a docker registry
 list                          List all docker registries
 update                        Update a docker registry

Options:
 -h, --help                    print help
hammer> docker registry create
Could not create the registry:
  Missing arguments for 'name', 'url'
hammer> docker registry create --name="Red Hat Docker Registry" --url="https://registry.access.redhat.com"
Docker registry created
hammer> docker registry list
------------------------|-----------------------------------
NAME                    | URL
------------------------|-----------------------------------
Red Hat Docker Registry | https://registry.access.redhat.com
------------------------|-----------------------------------
hammer> docker registry info -h
Usage:
     docker registry info [OPTIONS]

Options:
 --id ID
 --name NAME                   Name to search by
 -h, --help                    print help
hammer> docker registry info --name='Red Hat Docker Registry'
Name:       Red Hat Docker Registry
URL:        https://registry.access.redhat.com
Created at: 2015/09/02 18:44:24
Updated at: 2015/09/02 18:44:24

hammer> docker registry update -h
Usage:
     docker registry update [OPTIONS]

Options:
 --description DESCRIPTION
 --id ID
 --name NAME                   Name to search by
 --new-name NEW_NAME
 --password PASSWORD
 --url URL
 --username USERNAME
 -h, --help                    print help
hammer> docker registry update --name='Red Hat Docker Registry' --description='Updated this field'
Docker registry updated
hammer> docker registry info --name='Red Hat Docker Registry'
Name:       Red Hat Docker Registry
URL:        https://registry.access.redhat.com
Created at: 2015/09/02 18:44:24
Updated at: 2015/09/02 18:47:19

hammer> docker registry update --name='Red Hat Docker Registry' --username='Updated this field'
Docker registry updated
hammer> docker registry info --name='Red Hat Docker Registry'
Name:       Red Hat Docker Registry
URL:        https://registry.access.redhat.com
Created at: 2015/09/02 18:44:24
Updated at: 2015/09/02 18:47:46

hammer> docker registry update --name='Red Hat Docker Registry' --url='http://localhost'
Docker registry updated
hammer> docker registry info --name='Red Hat Docker Registry'
Name:       Red Hat Docker Registry
URL:        http://localhost
Created at: 2015/09/02 18:44:24
Updated at: 2015/09/02 18:48:15

hammer> docker registry update --name='Red Hat Docker Registry' --new-name='RH'
Docker registry updated
hammer> docker registry info --name='Red Hat Docker Registry'
Error: registry not found
hammer> docker registry info --name='RH'
Name:       RH
URL:        http://localhost
Created at: 2015/09/02 18:44:24
Updated at: 2015/09/02 18:48:46

hammer> docker registry delete -h
Usage:
     docker registry delete [OPTIONS]

Options:
 --id ID
 --name NAME                   Name to search by
 -h, --help                    print help
hammer> docker registry delete --name='RH'
Docker registry deleted
hammer> docker registry list
-----|----
NAME | URL
-----|----
hammer> docker registry info --name='RH'
Error: registry not found

Comment 13 Og Maciel 2015-09-02 18:52:10 UTC
Verified on Sat6.1.2-SNAP1 as per previous comment.

Comment 14 Oleksandr Shtaier 2015-09-02 19:25:38 UTC
We can see next statements in API documentation added:

Registries 

Resource	                Description
---------------------------------------------------------------------------------
GET /docker/api/v2/registries	        List all docker registries
GET /docker/api/v2/registries/:id	Show a docker registry
POST /docker/api/v2/registries	        Create a docker registry
PUT /docker/api/v2/registries/:id	Update a docker registry
DELETE /docker/api/v2/registries/:id	Delete a docker registry

Also, we have already added some test cases for that functionality to test automation suite and all the tests passed successfully,

For above reasons, we can say 'Registry' related things works properly from API point of view too

Comment 16 errata-xmlrpc 2015-09-15 07:21:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2015:1786


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