Bug 852498 - error handling for repo create with empty repo-id
Summary: error handling for repo create with empty repo-id
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 2.0.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 40
Assignee: Jay Dobies
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-28 17:47 UTC by Preethi Thomas
Modified: 2013-09-09 16:35 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-09 17:07:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2012-08-28 17:47:20 UTC
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 14:52:29 UTC
Fixed recently and should be in the current QE build.

Comment 2 Preethi Thomas 2012-09-26 20:17:10 UTC
[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 17:07:14 UTC
Pulp v2.0 released


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