Bug 838678 - Needs error handling when running repo operations with empty repo id
Needs error handling when running repo operations 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 39
Assigned To: Jay Dobies
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-09 14:55 EDT by Preethi Thomas
Modified: 2013-09-09 12:30 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-09 12:08:01 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-07-09 14:55:00 EDT
Description of problem:
If run repo delete with --repo-id="" client side error occurs

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


How reproducible:


Steps to Reproduce:

[root@preethi-el6-pulp ~]# pulp-admin repo delete --repo-id ""
An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.

1.
2.
3.
  
Actual results:


Expected results:


Additional info:

2012-07-09 14:49:25,502 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/client/extensions/core.py", line 470, in run
    Cli.run(self, args)
  File "/usr/lib/python2.6/site-packages/okaara/cli.py", line 790, in run
    exit_code = command_or_section.execute(remaining_args)
  File "/usr/lib/python2.6/site-packages/okaara/cli.py", line 166, in execute
    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.6/site-packages/pulp/bindings/repository.py", line 83, in delete
    return self.server.DELETE(path)
  File "/usr/lib/python2.6/site-packages/pulp/bindings/server.py", line 78, in DELETE
    return self._request('DELETE', path, body=body)
  File "/usr/lib/python2.6/site-packages/pulp/bindings/server.py", line 111, in _request
    self._handle_exceptions(response_code, response_body)
  File "/usr/lib/python2.6/site-packages/pulp/bindings/server.py", line 127, in _handle_exceptions
    raise exceptions.PulpServerException(response_body)
  File "/usr/lib/python2.6/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 Preethi Thomas 2012-07-09 15:11:14 EDT
[root@preethi-el6-pulp ~]# pulp-admin repo publish  run --repo-id=
+----------------------------------------------------------------------+
                        Publishing Repository []
+----------------------------------------------------------------------+

An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.

[root@preethi-el6-pulp ~]# 


[root@preethi-el6-pulp ~]# pulp-admin repo sync run --repo-id=
+----------------------------------------------------------------------+
                      Synchronizing Repository []
+----------------------------------------------------------------------+

An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.
Comment 2 Jay Dobies 2012-09-04 15:29:51 EDT
commit 40aace95d55ab079d43688d59d58c663a7f50e31
Author: Jay Dobies <jason.dobies@redhat.com>
Date:   Tue Sep 4 15:28:57 2012 -0400

    838678 - Add Pulp convention of '' meaning None

platform/src/pulp/client/extensions/extensions.py
Comment 3 Jeff Ortel 2012-09-06 16:05:43 EDT
merged.
Comment 4 Jeff Ortel 2012-09-11 09:31:28 EDT
build: 0.327
Comment 5 Preethi Thomas 2012-09-27 12:52:05 EDT
[root@pulp-master ~]# rpm -q pulp-rpm-server
pulp-rpm-server-0.0.328-1.fc17.noarch
[root@pulp-master ~]# 


[root@pulp-master ~]# pulp-admin repo publish  run --repo-id=
Command: run
Description: triggers an immediate publish of a repository

Available Arguments:

  --repo-id - (required) identifies the repository to publish
  --bg      - if specified, the CLI process will end but the publish will
              continue on the server; the progress can be later displayed using
              the status command

The following options are required but were not specified:
  --repo-id
[root@pulp-master ~]# 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 ~]#
Comment 6 Preethi Thomas 2013-01-09 12:08:01 EST
Pulp v2.0 released

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