Refactored Watcher objects to use OVO
In this changeset, I modified all existing Watcher objects to now rely on oslo.versionedobjects as a base. Change-Id: I3c9b1ca6da529d128743b99020350f28926ea1a2 Partially-Implements: blueprint watcher-versioned-objects
This commit is contained in:
@@ -379,7 +379,7 @@ class ActionsController(rest.RestController):
|
||||
action_dict = action.as_dict()
|
||||
context = pecan.request.context
|
||||
new_action = objects.Action(context, **action_dict)
|
||||
new_action.create(context)
|
||||
new_action.create()
|
||||
|
||||
# Set the HTTP Location Header
|
||||
pecan.response.location = link.build_url('actions', new_action.uuid)
|
||||
|
||||
@@ -519,7 +519,7 @@ class AuditsController(rest.RestController):
|
||||
audit_dict = audit.as_dict()
|
||||
|
||||
new_audit = objects.Audit(context, **audit_dict)
|
||||
new_audit.create(context)
|
||||
new_audit.create()
|
||||
|
||||
# Set the HTTP Location Header
|
||||
pecan.response.location = link.build_url('audits', new_audit.uuid)
|
||||
|
||||
@@ -568,11 +568,11 @@ class AuditTemplatesController(rest.RestController):
|
||||
audit_template_dict = audit_template.as_dict()
|
||||
new_audit_template = objects.AuditTemplate(context,
|
||||
**audit_template_dict)
|
||||
new_audit_template.create(context)
|
||||
new_audit_template.create()
|
||||
|
||||
# Set the HTTP Location Header
|
||||
pecan.response.location = link.build_url('audit_templates',
|
||||
new_audit_template.uuid)
|
||||
pecan.response.location = link.build_url(
|
||||
'audit_templates', new_audit_template.uuid)
|
||||
return AuditTemplate.convert_with_links(new_audit_template)
|
||||
|
||||
@wsme.validate(types.uuid, [AuditTemplatePatchType])
|
||||
|
||||
Reference in New Issue
Block a user