Project

General

Profile

Bug #25096

@RbdTasks decorator don't support optional query_params

Added by Tiago Melo almost 3 years ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
General
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I found this problem in the following code:

@RbdTask('trash/purge', ['{pool_name}'], 2.0)
@RESTController.Collection('POST', query_params=['pool_name'])
def purge(self, pool_name=None):

I have a optional "pool_name" query_params and in some situations I don't want to sent the it the server.
It works well for the @RESTController and the method, but the @RbdTask decorator will throw an error because it always expects it to have a value.

History

#1 Updated by Ricardo Dias almost 3 years ago

  • Status changed from New to In Progress

#2 Updated by Ricardo Dias almost 3 years ago

  • Status changed from In Progress to Fix Under Review

#3 Updated by Kefu Chai almost 3 years ago

  • Status changed from Fix Under Review to Resolved

#4 Updated by Ernesto Puerta 2 months ago

  • Project changed from mgr to Dashboard
  • Category changed from dashboard/general to General

Also available in: Atom PDF