Bug 852498 - error handling for repo create with empty repo-id
error handling for repo create with empty repo-id
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
2.0.6
Unspecified Unspecified
unspecified Severity unspecified
: ---
: Sprint 40
Assigned To: Jay Dobies
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-28 13:47 EDT by Preethi Thomas
Modified: 2013-09-09 12:35 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-09 12:07:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Preethi Thomas 2012-08-28 13:47:20 EDT
Description of problem:

Needs to have error handling when you run repo delete on empty repo-id

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

[root@pulp-candidate ~]# rpm -q pulp-rpm-server
pulp-rpm-server-2.0.1-1.fc17.noarch
[root@pulp-candidate ~]# 

How reproducible:


Steps to Reproduce:
1. [root@pulp-candidate ~]# pulp-admin repo delete --repo-id=
An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.


2.
3.
  
Actual results:


Expected results:


Additional info:

2012-08-28 13:44:11,099 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 475, in run
    exit_code = Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 891, in run
    exit_code = command_or_section.execute(self.prompt, remaining_args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 184, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/pulp/admin/extensions/rpm_repo/pulp_cli.py", line 180, in delete
    response = self.context.server.repo.delete(repo_id)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/repository.py", line 87, in delete
    return self.server.DELETE(path)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 78, in DELETE
    return self._request('DELETE', path, body=body)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 134, in _request
    self._handle_exceptions(response_code, response_body)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 153, in _handle_exceptions
    raise exceptions.PulpServerException(response_body)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/exceptions.py", line 28, in __init__
    self.href = response_body.pop('_href', None)
AttributeError: 'str' object has no attribute 'pop'
Comment 1 Jay Dobies 2012-09-10 10:52:29 EDT
Fixed recently and should be in the current QE build.
Comment 2 Preethi Thomas 2012-09-26 16:17:10 EDT
[root@pulp-master scripts]# pulp-admin repo delete --repo-id=
Command: delete
Description: deletes a repository

Available Arguments:

  --repo-id - (required) identifies the repository to delete

The following options are required but were not specified:
  --repo-id
[root@pulp-master scripts]# 
[root@pulp-master scripts]# 
[root@pulp-master scripts]# pulp-admin repo delete --repo-id=""
Command: delete
Description: deletes a repository

Available Arguments:

  --repo-id - (required) identifies the repository to delete

The following options are required but were not specified:
  --repo-id
[root@pulp-master scripts]#
Comment 3 Preethi Thomas 2013-01-09 12:07:14 EST
Pulp v2.0 released

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