Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1206679 - Need to be able to manage docker registries in the API/CLI
Need to be able to manage docker registries in the API/CLI
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity high (vote)
: 6.1.2
: Unused
Assigned To: David Davis
Og Maciel
http://projects.theforeman.org/issues...
: Triaged
: 1209997 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-27 14:28 EDT by David Davis
Modified: 2017-02-23 15:13 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-15 03:21:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 9754 None None None 2016-04-22 10:58 EDT
Red Hat Product Errata RHBA-2015:1786 normal SHIPPED_LIVE Satellite 6.1.2 bug fix update 2015-09-15 07:20:04 EDT

  None (edit)
Description David Davis 2015-03-27 14:28:52 EDT
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 Product and Program Management 2015-03-27 14:43:18 EDT
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 16:04:35 EDT
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 18:18:28 EDT
*** Bug 1209997 has been marked as a duplicate of this bug. ***
Comment 6 Elyézer Rezende 2015-07-14 21:11:07 EDT
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 11:41:08 EDT
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 03:55:41 EDT
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 14:10:17 EDT
Merged downstream commit f83894c6c61fc193e9f1fe0becdaddeda6fd4bb0

https://gitlab.sat.lab.tlv.redhat.com/satellite6/foreman-docker/commit/f83894c6c61fc193e9f1fe0becdaddeda6fd4bb0
Comment 12 Og Maciel 2015-09-02 14:50:36 EDT
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 14:52:10 EDT
Verified on Sat6.1.2-SNAP1 as per previous comment.
Comment 14 Oleksandr Shtaier 2015-09-02 15:25:38 EDT
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 03:21:47 EDT
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.