Bug 1397412 - KeyError: repo['name'] on list custom repository entitlements
Summary: KeyError: repo['name'] on list custom repository entitlements
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.0.0
Assignee: bizhang
QA Contact: Irina Gulina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-22 13:30 UTC by Irina Gulina
Modified: 2017-03-01 22:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-01 22:14:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0367 0 normal SHIPPED_LIVE Red Hat Update Infrastructure 3.0 Release 2017-03-02 03:05:22 UTC

Description Irina Gulina 2016-11-22 13:30:20 UTC
Description of problem:
'c - list custom repository entitlements' returns an unexpected error. 

Version-Release number of selected component (if applicable):
RHUI3 iso 20161115 RHEL6 and RHEL7

How reproducible:
always

Steps to Reproduce:
1. add an entitlement protected custom repo
2. list custom repository entitlements


Actual results:
rhui (repo) => c

Unique ID for the custom repository (alphanumerics, _, and - only):
protected_custom_repo1

Display name for the custom repository [protected_custom_repo1]:


Unique path at which the repository will be served [protected_custom_repo1]:


Algorithm to use when calculating the checksum values for repository metadata:

  1  - sha256 (default)
  2  - sha1 (RHEL 5)
Enter value (1-2) or 'b' to abort: 
Enter value (1-2) or 'b' to abort: 1

Should the repository require an entitlement certificate to access? (y/n)
y

Based on the repository's relative path, the suggested entitlement path is:
  protected_custom_repo1

Path that should be used when granting an entitlement for this repository. This
may use yum variable substitutions (e.g. $basearch) to group this together with
other repositories that share the entitlement [protected_custom_repo1]:


Should the repository require clients to perform a GPG check and
verify packages are signed by a GPG key? (y/n)
n

The following repository will be created:
  ID:              protected_custom_repo1
  Name:            protected_custom_repo1
  Path:            protected_custom_repo1
  Entitlement:     protected_custom_repo1
  GPG Check        No
  Red Hat GPG Key: No
Proceed? (y/n) y

Successfully created repository protected_custom_repo1

------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Entitlements Manager =-

   l   list Red Hat content certificate entitlements
   c   list custom repository entitlements
   u   upload a new or updated Red Hat content certificate

                                                   Connected: rhua.example.com
------------------------------------------------------------------------------
rhui (entitlements) => c

Custom Repository Entitlements

  For each entitlement URL listed, the corresponding repositories
  that are configured with that entitlement are listed.

  protected/protected_custom_repo1

An unexpected error has occurred during the last operation.
More information can be found in /root/.rhui/rhui.log.

2016-11-22 07:22:17,068 - Successfully connected to [rhua.example.com]
2016-11-22 07:23:52,230 - <type 'exceptions.KeyError'>
2016-11-22 07:23:52,231 - Unexpected error caught at the shell level
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/rhui/tools/shell.py", line 88, in safe_listen
    self.listen(clear=first_run)
  File "/usr/lib/python2.7/site-packages/rhui/tools/shell.py", line 127, in listen
    Shell.listen(self)
  File "/usr/lib/python2.7/site-packages/rhui/common/shell.py", line 186, in listen
    item.func(*args, **item.kwargs)
  File "/usr/lib/python2.7/site-packages/rhui/tools/screens/entitlements.py", line 68, in list_custom
    self.prompt.write('    - Name: ' + repo['name'])
KeyError: 'name'


Expected results:
no error

Comment 3 Irina Gulina 2016-11-23 13:51:09 UTC
iso 20161122: 

             -= Red Hat Update Infrastructure Management Tool =-


-= Entitlements Manager =-

   l   list Red Hat content certificate entitlements
   c   list custom repository entitlements
   u   upload a new or updated Red Hat content certificate

                                                   Connected: rhua.example.com
------------------------------------------------------------------------------
rhui (entitlements) => c

Custom Repository Entitlements

  For each entitlement URL listed, the corresponding repositories
  that are configured with that entitlement are listed.

  protected/protected_custom_repo1
      Name: protected_custom_repo1
      URL:  protected/protected_custom_repo1

  protected/protected_custom_repo2
      Name: protected_custom_repo2
      URL:  protected/protected_custom_repo2


------------------------------------------------------------------------------

Comment 4 errata-xmlrpc 2017-03-01 22:14:05 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/RHBA-2017:0367


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