Bug 1654721

Summary: [Container Admin] hammer lifecycle-environment info doesn't show Registry-related fields
Product: Red Hat Satellite Reporter: Mirek Długosz <mzalewsk>
Component: Hammer - ContentAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: vijsingh
Severity: medium Docs Contact:
Priority: unspecified    
Version: UnspecifiedCC: akarsale, akofink, apatel, bkearney, dhlavacd, kgaikwad, mbacovsk, mhulan, mshira, mzalewsk, pcreech, rabajaj, vijsingh
Target Milestone: 6.5.0Keywords: Triaged
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: 2019-05-14 12:39:19 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:
Attachments:
Description Flags
GUI Screenshots none

Description Mirek Długosz 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