Bug 756132 - Traceback when deleting filter through API
Summary: Traceback when deleting filter through API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 30
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-22 19:12 UTC by Preethi Thomas
Modified: 2015-03-23 01:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-24 20:15:50 UTC


Attachments (Terms of Use)

Description Preethi Thomas 2011-11-22 19:12:27 UTC
Description of problem:
Traceback when deleting filter through API

[root@preethi ~]# curl -k  -u admin:admin -X POST https://localhost/pulp/api/filters/blacklist/delete_filter/
"Traceback (most recent call last):\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py\", line 48, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py\", line 127, in _auth_decorator\n    value = method(self, *args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/filters.py\", line 120, in delete_filter\n    if data['force'] == 'true':\nKeyError: 'force'\n"[root@preethi ~]#

Version-Release number of selected component (if applicable):
[root@preethi ~]# rpm -q pulp
pulp-0.0.251-1.fc15.noarch
[root@preethi ~]#

Comment 1 Sayli Karmarkar 2011-11-29 07:14:31 UTC
Fixed.

$ curl -k  -u admin:admin -X POST https://localhost/pulp/api/filters/blacklist/delete_filter/
true

Comment 2 Jeff Ortel 2011-12-03 00:00:51 UTC
build: 0.254.

Comment 3 Preethi Thomas 2011-12-14 19:29:57 UTC
verified

[root@preethi ~]# rpm -q pulp
pulp-0.0.254-6.fc15.noarch

[root@preethi ~]# pulp-admin filter list
+------------------------------------------+
              Available Filters
+------------------------------------------+

Id           :               	pulp                     
Description  :               	pulp                     
Type         :               	blacklist                
Package List :               	['gofer']                


[root@preethi ~]#  curl -k  -u admin:admin -X POST
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
[root@preethi ~]# https://localhost/pulp/api/filters/blacklist/delete_filter/
-bash: https://localhost/pulp/api/filters/blacklist/delete_filter/: No such file or directory
[root@preethi ~]#  curl -k  -u admin:admin -X POST https://localhost/pulp/api/filters/pulp/delete_filter/
"Traceback (most recent call last):\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py\", line 48, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py\", line 127, in _auth_decorator\n    value = method(self, *args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/filters.py\", line 126, in delete_filter\n    api.delete(id, force)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/api/filter.py\", line 70, in delete\n    % (id, associated_repo_ids))\nPulpException: Filter [pulp] cannot be deleted because of it's association with following repos: [u'content-1']. You can use --force to force deletion of filter by removing it's association with repositories.\n"[root@preethi ~]# 
[root@preethi ~]# 

[root@preethi ~]# pulp-admin filter delete --id=pulp
error:  error: operation failed: PulpException: Filter [pulp] cannot be deleted because of it's association with following repos: [u'content-1']. You can use --force to force deletion of filter by removing it's association with repositories.
[root@preethi ~]#  curl -k  -u admin:admin -X POST https://localhost/pulp/api/filters/pulp/delete_filter/ --force
curl: option --force: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
[root@preethi ~]# 
[root@preethi ~]# pulp-admin filter delete --id=content-1
error:  error: operation failed: A filter with the id, content-1, does not exist
[root@preethi ~]# pulp-admin repo delete --id=content-1
Successful deleted repository [ content-1 ]

[root@preethi ~]#  curl -k  -u admin:admin -X POST https://localhost/pulp/api/filters/pulp/delete_filter/ 
true[root@preethi pulp-admin filter listNo filters available to list
[root@preethi ~]#

Comment 4 Preethi Thomas 2012-02-24 20:15:50 UTC
Pulp v1.0 is released
Closed Current Release.

Comment 5 Preethi Thomas 2012-02-24 20:17:24 UTC
Pulp v1.0 is released.


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