Bug 1654721 - [Container Admin] hammer lifecycle-environment info doesn't show Registry-related fields
Summary: [Container Admin] hammer lifecycle-environment info doesn't show Registry-rel...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer - Content
Version: Unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: 6.5.0
Assignee: satellite6-bugs
QA Contact: vijsingh
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-29 14:14 UTC by Mirek Zalewski
Modified: 2019-11-05 22:40 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:39:19 UTC
Target Upstream Version:


Attachments (Terms of Use)
GUI Screenshots (273.33 KB, application/gzip)
2019-01-04 06:00 UTC, vijsingh
no flags Details


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 25583 None None None 2018-11-29 15:10:04 UTC
Github /Katello hammer-cli-katello pull 602 None None None 2018-11-29 15:41:25 UTC
Red Hat Product Errata RHSA-2019:1222 None None None 2019-05-14 12:39:27 UTC

Description Mirek Zalewski 2018-11-29 14:14:08 UTC
hammer lifecycle-environment info doesn't show Registry Name Pattern and Unauthenticated Pull fields.


Version-Release number of selected component (if applicable):
Satellite 6.5 snap 5
satellite-6.5.0-5.beta.el7sat.noarch
foreman-1.20.0-1.el7sat.noarch
katello-3.9.0-1.el7sat.noarch
tfm-rubygem-hammer_cli-0.15.1-1.el7sat.noarch
tfm-rubygem-hammer_cli_katello-0.15.0-1.el7sat.noarch



Steps to Reproduce:
1. `hammer lifecycle-environment info --id 1`


Actual results:
ID:                          1
Name:                        Library
Label:                       Library
Description:                 
Organization:                Default Organization
Library:                     true
Prior Lifecycle Environment:


Expected results:
ID:                          1
Name:                        Library
Label:                       Library
Description:                 
Organization:                Default Organization
Library:                     true
Prior Lifecycle Environment:
Unauthenticated pull:        false
Registry Name Pattern:       <%= organization.label %>-<%= lifecycle_environment.label %>-<%= content_view.label %>-<%= product.name %>-<%= repository.label %>

Comment 2 Brad Buckingham 2018-11-29 15:43:18 UTC
Moving to POST, since upstream PR is merged.

Comment 6 vijsingh 2019-01-04 05:59:05 UTC
Verified:

@Satellite 6.5.0 Snap 9.0

Steps:

++++++++++++++++++++++++++++++++++++

### Registry Name Pattern: Update

hammer> lifecycle-environment info --id 1
ID:                          1
Name:                        Library
Label:                       Library
Description:                 
Organization:                Default Organization
Library:                     true
Prior Lifecycle Environment: 
Unauthenticated Pull:        false
Registry Name Pattern:

hammer> lifecycle-environment update --id 1 --registry-name-pattern '<%= organization.label %>-<%= lifecycle_environment.label %>-<%= content_view.label %>-<%= product.name %>-<%= repository.label %>'
Environment updated.
hammer> lifecycle-environment info --id 1
ID:                          1
Name:                        Library
Label:                       Library
Description:                 
Organization:                Default Organization
Library:                     true
Prior Lifecycle Environment: 
Unauthenticated Pull:        false
Registry Name Pattern:       <%= organization.label %>-<%= lifecycle_environment.label %>-<%= content_view.label %>-<%= product.name %>-<%= repository.label %>


### Unauthenticated Pull Update to true

hammer> lifecycle-environment update --id 1 --registry-unauthenticated-pull true
Environment updated.
hammer> lifecycle-environment info --id 1
ID:                          1
Name:                        Library
Label:                       Library
Description:                 
Organization:                Default Organization
Library:                     true
Prior Lifecycle Environment: 
Unauthenticated Pull:        true
Registry Name Pattern:       <%= organization.label %>-<%= lifecycle_environment.label %>-<%= content_view.label %>-<%= product.name %>-<%= repository.label %>

hammer> 

### Unauthenticated Pull Update to false and 'Registry Name Pattern' to null

hammer> lifecycle-environment update --id 1 --registry-unauthenticated-pull false
Environment updated.
hammer> lifecycle-environment update --id 1 --registry-name-pattern ''
Environment updated.
hammer> lifecycle-environment info --id 1
ID:                          1
Name:                        Library
Label:                       Library
Description:                 
Organization:                Default Organization
Library:                     true
Prior Lifecycle Environment: 
Unauthenticated Pull:        false
Registry Name Pattern:

hammer> 

### 'Registry Name Pattern' try to update with invalid values

hammer> lifecycle-environment update --id 1 --registry-name-pattern '<%= organization.lab %>/<%= repository.docker_upstream %>'
Could not update environment:
  undefined method '#lab' for Katello::Validators::EnvironmentDockerRepositoriesValidator::SafeOpenStruct::Jail (Katello::Validators::EnvironmentDockerRepositoriesValidator::SafeOpenStruct)
hammer> 


++++++++++++++++++++++++++++++++++++

Observation:

- Able to update and remove 'Registry Name Pattern' values
- Able to update(true/false) 'Unauthenticated Pull'
- GUI screenshots are attached

Comment 7 vijsingh 2019-01-04 06:00:33 UTC
Created attachment 1518294 [details]
GUI Screenshots

Comment 8 vijsingh 2019-01-04 06:03:07 UTC
Observation:
 - 'Registry Name Pattern' update does not allow invalid values

Comment 12 errata-xmlrpc 2019-05-14 12:39:19 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/RHSA-2019:1222


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