Merge "Use parenthesis instead of backslashes in API folder"
This commit is contained in:
commit
7c928d9d90
|
@ -120,8 +120,8 @@ class APIRouter(manila.api.openstack.APIRouter):
|
||||||
mapper.resource("limit", "limits",
|
mapper.resource("limit", "limits",
|
||||||
controller=self.resources['limits'])
|
controller=self.resources['limits'])
|
||||||
|
|
||||||
self.resources["security_services"] = \
|
self.resources["security_services"] = (
|
||||||
security_service.create_resource()
|
security_service.create_resource())
|
||||||
mapper.resource("security-service", "security-services",
|
mapper.resource("security-service", "security-services",
|
||||||
controller=self.resources['security_services'],
|
controller=self.resources['security_services'],
|
||||||
collection={'detail': 'GET'})
|
collection={'detail': 'GET'})
|
||||||
|
|
|
@ -272,8 +272,8 @@ class ShareMixin(object):
|
||||||
parent_share_net_id = parent_share.instance['share_network_id']
|
parent_share_net_id = parent_share.instance['share_network_id']
|
||||||
if share_network_id:
|
if share_network_id:
|
||||||
if share_network_id != parent_share_net_id:
|
if share_network_id != parent_share_net_id:
|
||||||
msg = "Share network ID should be the same as snapshot's" \
|
msg = ("Share network ID should be the same as snapshot's"
|
||||||
" parent share's or empty"
|
" parent share's or empty")
|
||||||
raise exc.HTTPBadRequest(explanation=msg)
|
raise exc.HTTPBadRequest(explanation=msg)
|
||||||
elif parent_share_net_id:
|
elif parent_share_net_id:
|
||||||
share_network_id = parent_share_net_id
|
share_network_id = parent_share_net_id
|
||||||
|
|
|
@ -207,10 +207,10 @@ class ShareNetworkController(wsgi.Controller):
|
||||||
if share_network['share_servers']:
|
if share_network['share_servers']:
|
||||||
for value in update_values:
|
for value in update_values:
|
||||||
if value not in ['name', 'description']:
|
if value not in ['name', 'description']:
|
||||||
msg = _("Cannot update share network %s. It is used by "
|
msg = (_("Cannot update share network %s. It is used by "
|
||||||
"share servers. Only 'name' and 'description' "
|
"share servers. Only 'name' and 'description' "
|
||||||
"fields are available for update")\
|
"fields are available for update") %
|
||||||
% share_network['id']
|
share_network['id'])
|
||||||
raise exc.HTTPForbidden(explanation=msg)
|
raise exc.HTTPForbidden(explanation=msg)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -143,8 +143,8 @@ class ShareTypesController(wsgi.Controller):
|
||||||
"""Creates a new share type."""
|
"""Creates a new share type."""
|
||||||
context = req.environ['manila.context']
|
context = req.environ['manila.context']
|
||||||
|
|
||||||
if not self.is_valid_body(body, 'share_type') and \
|
if (not self.is_valid_body(body, 'share_type') and
|
||||||
not self.is_valid_body(body, 'volume_type'):
|
not self.is_valid_body(body, 'volume_type')):
|
||||||
raise webob.exc.HTTPBadRequest()
|
raise webob.exc.HTTPBadRequest()
|
||||||
|
|
||||||
elif self.is_valid_body(body, 'share_type'):
|
elif self.is_valid_body(body, 'share_type'):
|
||||||
|
|
Loading…
Reference in New Issue