Removed unused parameters from api controllers
In the Audit controller (watcher/api/controllers/v1/audit.py), we have an unused "audit_uuid" parameter in both get_all() and detail() Similarly, the Action Plan controller (watcher/api/controllers/v1/action_plan.py) has an unused "action_plan_uuid" parameter in both get_all() and detail(). I also removed them from the @wsme_pecan.wsexpose decorator Change-Id: I7f1edfd44dd95c9768249650e19b16fcbe916b89 Closes-Bug: #1534615
This commit is contained in:
@@ -284,9 +284,9 @@ class ActionPlansController(rest.RestController):
|
|||||||
sort_key=sort_key,
|
sort_key=sort_key,
|
||||||
sort_dir=sort_dir)
|
sort_dir=sort_dir)
|
||||||
|
|
||||||
@wsme_pecan.wsexpose(ActionPlanCollection, types.uuid, types.uuid,
|
@wsme_pecan.wsexpose(ActionPlanCollection, types.uuid, int, wtypes.text,
|
||||||
int, wtypes.text, wtypes.text, types.uuid)
|
wtypes.text, types.uuid)
|
||||||
def get_all(self, action_plan_uuid=None, marker=None, limit=None,
|
def get_all(self, marker=None, limit=None,
|
||||||
sort_key='id', sort_dir='asc', audit_uuid=None):
|
sort_key='id', sort_dir='asc', audit_uuid=None):
|
||||||
"""Retrieve a list of action plans.
|
"""Retrieve a list of action plans.
|
||||||
|
|
||||||
@@ -300,14 +300,12 @@ class ActionPlansController(rest.RestController):
|
|||||||
return self._get_action_plans_collection(
|
return self._get_action_plans_collection(
|
||||||
marker, limit, sort_key, sort_dir, audit_uuid=audit_uuid)
|
marker, limit, sort_key, sort_dir, audit_uuid=audit_uuid)
|
||||||
|
|
||||||
@wsme_pecan.wsexpose(ActionPlanCollection, types.uuid, types.uuid,
|
@wsme_pecan.wsexpose(ActionPlanCollection, types.uuid, int, wtypes.text,
|
||||||
int, wtypes.text, wtypes.text, types.uuid)
|
wtypes.text, types.uuid)
|
||||||
def detail(self, action_plan_uuid=None, marker=None, limit=None,
|
def detail(self, marker=None, limit=None,
|
||||||
sort_key='id', sort_dir='asc', audit_uuid=None):
|
sort_key='id', sort_dir='asc', audit_uuid=None):
|
||||||
"""Retrieve a list of action_plans with detail.
|
"""Retrieve a list of action_plans with detail.
|
||||||
|
|
||||||
:param action_plan_uuid: UUID of a action plan, to get only
|
|
||||||
action_plans for that action.
|
|
||||||
:param marker: pagination marker for large data sets.
|
:param marker: pagination marker for large data sets.
|
||||||
:param limit: maximum number of resources to return in a single result.
|
:param limit: maximum number of resources to return in a single result.
|
||||||
:param sort_key: column to sort results by. Default: id.
|
:param sort_key: column to sort results by. Default: id.
|
||||||
|
|||||||
@@ -292,10 +292,9 @@ class AuditsController(rest.RestController):
|
|||||||
sort_key=sort_key,
|
sort_key=sort_key,
|
||||||
sort_dir=sort_dir)
|
sort_dir=sort_dir)
|
||||||
|
|
||||||
@wsme_pecan.wsexpose(AuditCollection, types.uuid,
|
@wsme_pecan.wsexpose(AuditCollection, types.uuid, int, wtypes.text,
|
||||||
types.uuid, int, wtypes.text,
|
|
||||||
wtypes.text, wtypes.text)
|
wtypes.text, wtypes.text)
|
||||||
def get_all(self, audit_uuid=None, marker=None, limit=None,
|
def get_all(self, marker=None, limit=None,
|
||||||
sort_key='id', sort_dir='asc', audit_template=None):
|
sort_key='id', sort_dir='asc', audit_template=None):
|
||||||
"""Retrieve a list of audits.
|
"""Retrieve a list of audits.
|
||||||
|
|
||||||
@@ -310,13 +309,12 @@ class AuditsController(rest.RestController):
|
|||||||
sort_dir,
|
sort_dir,
|
||||||
audit_template=audit_template)
|
audit_template=audit_template)
|
||||||
|
|
||||||
@wsme_pecan.wsexpose(AuditCollection, types.uuid,
|
@wsme_pecan.wsexpose(AuditCollection, types.uuid, int, wtypes.text,
|
||||||
types.uuid, int, wtypes.text, wtypes.text)
|
wtypes.text)
|
||||||
def detail(self, audit_uuid=None, marker=None, limit=None,
|
def detail(self, marker=None, limit=None,
|
||||||
sort_key='id', sort_dir='asc'):
|
sort_key='id', sort_dir='asc'):
|
||||||
"""Retrieve a list of audits with detail.
|
"""Retrieve a list of audits with detail.
|
||||||
|
|
||||||
:param audit_uuid: UUID of a audit, to get only audits for that audit.
|
|
||||||
:param marker: pagination marker for large data sets.
|
:param marker: pagination marker for large data sets.
|
||||||
:param limit: maximum number of resources to return in a single result.
|
:param limit: maximum number of resources to return in a single result.
|
||||||
:param sort_key: column to sort results by. Default: id.
|
:param sort_key: column to sort results by. Default: id.
|
||||||
|
|||||||
Reference in New Issue
Block a user