Merge "Port "Make flavors is_public option .." to v3 tree"
This commit is contained in:
4 changed files with 6 additions and 5 deletions
@@ -95,7 +95,7 @@ class FlavorAccessController(object):
authorize(context)
try:
flavor = flavors.get_flavor_by_flavor_id(flavor_id)
flavor = flavors.get_flavor_by_flavor_id(flavor_id, ctxt=context)
except exception.FlavorNotFound as e:
raise webob.exc.HTTPNotFound(explanation=e.format_message())
@@ -93,8 +93,9 @@ class FlavorsController(wsgi.Controller):
@wsgi.serializers(xml=FlavorTemplate)
def show(self, req, id):
"""Return data about the given flavor id."""
context = req.environ['nova.context']
try:
flavor = flavors.get_flavor_by_flavor_id(id)
flavor = flavors.get_flavor_by_flavor_id(id, ctxt=context)
req.cache_db_flavor(flavor)
except exception.FlavorNotFound as e:
raise webob.exc.HTTPNotFound(explanation=e.format_message())
@@ -68,7 +68,7 @@ def fake_get_flavor_access_by_flavor_id(flavorid):
return res
def fake_get_flavor_by_flavor_id(flavorid):
def fake_get_flavor_by_flavor_id(flavorid, ctxt=None):
return INSTANCE_TYPES[flavorid]
@@ -58,7 +58,7 @@ FAKE_FLAVORS = {
}
def fake_flavor_get_by_flavor_id(flavorid):
def fake_flavor_get_by_flavor_id(flavorid, ctxt=None):
return FAKE_FLAVORS['flavor %s' % flavorid]
@@ -98,7 +98,7 @@ def empty_get_all_flavors_sorted_list(context=None, inactive=False,
return []
def return_flavor_not_found(flavor_id):
def return_flavor_not_found(flavor_id, ctxt=None):
raise exception.FlavorNotFound(flavor_id=flavor_id)
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.