Bug 1404331

Summary: 'rhui-manager packages upload' should work only on custom repos
Product: Red Hat Update Infrastructure for Cloud Providers Reporter: Irina Gulina <igulina>
Component: ToolsAssignee: RHUI Bug List <rhui-bugs>
Status: CLOSED ERRATA QA Contact: Vratislav Hutsky <vhutsky>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.0.0CC: pcreech
Target Milestone: ---   
Target Release: ---   
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: 2017-03-01 22:14:46 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:

Description Irina Gulina 2016-12-13 15:41:57 UTC
Description of problem:
1. 'rhui-manager package upload' should not accept --repo_id of any repos but customs' only
2. replace
'--repo_id - id of the repository where the packages will be uploaded (required)' 
with 
--repo_id - id of the custom repository where the packages will be uploaded (required)


Version-Release number of selected component (if applicable):
20161206

How reproducible:
always

Steps to Reproduce:

>> rhui-manager packages upload --repo_id rhui-2.0-6Server-x86_64 --packages /tmp/zsh-5.0.2-25.el7.x86_64.rpm

Uploading /tmp/zsh-5.0.2-25.el7.x86_64.rpm...
An unexpected error has occurred during the last operation.
'checksumtype'

'checksumtype'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/rhui/tools/cli.py", line 65, in run
    Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/rhui/common/cli.py", line 272, in run
    command_or_section.execute(remaining_args)
  File "/usr/lib/python2.7/site-packages/rhui/common/cli.py", line 113, in execute
    self.method(**arg_dict)
  File "/usr/lib/python2.7/site-packages/rhui/tools/commands/packages.py", line 64, in upload
    self.pulp.upload([repo_id], rpm)
  File "/usr/lib/python2.7/site-packages/rhui/tools/pulp_api.py", line 884, in upload
    checksum_type = repo['notes']['checksumtype']

Comment 3 Irina Gulina 2016-12-14 16:43:05 UTC
ops, sorry I missed one more thing: 

'upload: uploads a package or directory of packages to a repository'
should be replaced with 
'upload: uploads a package or directory of packages to a custom repository'

#1 and 2 from BZ description was fixed in iso 20161213

>> rhui-manager packages upload --repo_id rhel-7-server-rhui-3-beta-source-rpms-x86_64 --packages /tmp/zsh-5.0.2-25.el7.x86_64.rpm
Please use a valid custom repository id.
>> rhui-manager packages upload --repo_id no_repo --packages /tmp/zsh-5.0.2-25.el7.x86_64.rpm
Please use a valid custom repository id.

--repo_id - id of the custom repository where the packages will be uploaded (required)

Comment 4 Irina Gulina 2016-12-15 18:04:37 UTC
iso 20161214

rhui-manager packages upload --help
Usage: rhui-manager [options]

Options:
  -h, --help            show this help message and exit
upload: uploads a package or directory of packages to a custom repository
    --repo_id - id of the custom repository where the packages will be uploaded (required)
    --packages - path to an .rpm file or directory of RPMs that will be uploaded (required)

Comment 5 errata-xmlrpc 2017-03-01 22:14:46 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