Merge "[placement] Unregister the Trait object"

This commit is contained in:
Jenkins 2017-09-18 13:07:27 +00:00 committed by Gerrit Code Review
commit d29e4e1ec5
2 changed files with 4 additions and 4 deletions

View File

@ -104,7 +104,7 @@ def put_trait(req):
'"CUSTOM_" and use following characters: "A"-"Z", "0"-"9" and '
'"_"'))
trait = objects.Trait(context)
trait = rp_obj.Trait(context)
trait.name = name
try:
@ -125,7 +125,7 @@ def get_trait(req):
name = util.wsgi_path_item(req.environ, 'name')
try:
objects.Trait.get_by_name(context, name)
rp_obj.Trait.get_by_name(context, name)
except exception.TraitNotFound as ex:
raise webob.exc.HTTPNotFound(
explanation=ex.format_message())
@ -142,7 +142,7 @@ def delete_trait(req):
name = util.wsgi_path_item(req.environ, 'name')
try:
trait = objects.Trait.get_by_name(context, name)
trait = rp_obj.Trait.get_by_name(context, name)
trait.destroy()
except exception.TraitNotFound as ex:
raise webob.exc.HTTPNotFound(

View File

@ -280,7 +280,7 @@ class SharedStorageFixture(APIFixture):
# Mark the shared storage pool as having inventory shared among any
# provider associated via aggregate
t = objects.Trait.get_by_name(
t = rp_obj.Trait.get_by_name(
self.context,
"MISC_SHARES_VIA_AGGREGATE",
)