Remove using of UUID field in POST methods of Watcher API
This patch set removes the possibility of using UUID field in POST methods of Watcher API. Closes-Bug: #1572625 Change-Id: I88a8aa5346e937e3e9409b55da3316cbe1ed832a
This commit is contained in:
@@ -119,7 +119,7 @@ class Action(base.APIBase):
|
||||
self.action_next_uuid = None
|
||||
# raise e
|
||||
|
||||
uuid = types.uuid
|
||||
uuid = wtypes.wsattr(types.uuid, readonly=True)
|
||||
"""Unique UUID for this action"""
|
||||
|
||||
action_plan_uuid = wsme.wsproperty(types.uuid, _get_action_plan_uuid,
|
||||
|
||||
@@ -143,7 +143,7 @@ class ActionPlan(base.APIBase):
|
||||
except exception.ActionNotFound:
|
||||
self._first_action_uuid = None
|
||||
|
||||
uuid = types.uuid
|
||||
uuid = wtypes.wsattr(types.uuid, readonly=True)
|
||||
"""Unique UUID for this action plan"""
|
||||
|
||||
first_action_uuid = wsme.wsproperty(
|
||||
|
||||
@@ -51,8 +51,6 @@ from watcher import objects
|
||||
|
||||
class AuditPostType(wtypes.Base):
|
||||
|
||||
uuid = wtypes.wsattr(types.uuid, mandatory=False)
|
||||
|
||||
audit_template_uuid = wtypes.wsattr(types.uuid, mandatory=True)
|
||||
|
||||
type = wtypes.wsattr(wtypes.text, mandatory=True)
|
||||
@@ -68,7 +66,6 @@ class AuditPostType(wtypes.Base):
|
||||
raise exception.AuditTypeNotFound(audit_type=self.type)
|
||||
|
||||
return Audit(
|
||||
uuid=self.uuid or utils.generate_uuid(),
|
||||
audit_template_id=self.audit_template_uuid,
|
||||
type=self.type,
|
||||
deadline=self.deadline)
|
||||
|
||||
@@ -95,7 +95,8 @@ class AuditTemplate(base.APIBase):
|
||||
between the internal object model and the API representation of an
|
||||
audit template.
|
||||
"""
|
||||
uuid = types.uuid
|
||||
|
||||
uuid = wtypes.wsattr(types.uuid, readonly=True)
|
||||
"""Unique UUID for this audit template"""
|
||||
|
||||
name = wtypes.text
|
||||
|
||||
Reference in New Issue
Block a user