Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 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