Bug 1206679
| Summary: | Need to be able to manage docker registries in the API/CLI | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | David Davis <daviddavis> |
| Component: | API | Assignee: | David Davis <daviddavis> |
| Status: | CLOSED ERRATA | QA Contact: | Og Maciel <omaciel> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.1.0 | CC: | bbuckingham, bkearney, cwelton, dlobatog, mmccune, omaciel, oshtaier |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://projects.theforeman.org/issues/9754 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-09-15 07:21:47 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
David Davis
2015-03-27 18:28:52 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. 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 *** Bug 1209997 has been marked as a duplicate of this bug. *** 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.
The reason for the failure in Comment 6 is that this commit needs to be merged downstream: http://git.io/vYLfp. 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. Merged downstream commit f83894c6c61fc193e9f1fe0becdaddeda6fd4bb0 https://gitlab.sat.lab.tlv.redhat.com/satellite6/foreman-docker/commit/f83894c6c61fc193e9f1fe0becdaddeda6fd4bb0 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
Verified on Sat6.1.2-SNAP1 as per previous comment. 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 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 |