Merge "Use parenthesis instead of backslashes in API folder"

This commit is contained in:
Jenkins 2017-06-19 11:48:28 +00:00 committed by Gerrit Code Review
commit 7c928d9d90
4 changed files with 10 additions and 10 deletions

View File

@ -120,8 +120,8 @@ class APIRouter(manila.api.openstack.APIRouter):
mapper.resource("limit", "limits",
controller=self.resources['limits'])
self.resources["security_services"] = \
security_service.create_resource()
self.resources["security_services"] = (
security_service.create_resource())
mapper.resource("security-service", "security-services",
controller=self.resources['security_services'],
collection={'detail': 'GET'})

View File

@ -272,8 +272,8 @@ class ShareMixin(object):
parent_share_net_id = parent_share.instance['share_network_id']
if share_network_id:
if share_network_id != parent_share_net_id:
msg = "Share network ID should be the same as snapshot's" \
" parent share's or empty"
msg = ("Share network ID should be the same as snapshot's"
" parent share's or empty")
raise exc.HTTPBadRequest(explanation=msg)
elif parent_share_net_id:
share_network_id = parent_share_net_id

View File

@ -207,10 +207,10 @@ class ShareNetworkController(wsgi.Controller):
if share_network['share_servers']:
for value in update_values:
if value not in ['name', 'description']:
msg = _("Cannot update share network %s. It is used by "
"share servers. Only 'name' and 'description' "
"fields are available for update")\
% share_network['id']
msg = (_("Cannot update share network %s. It is used by "
"share servers. Only 'name' and 'description' "
"fields are available for update") %
share_network['id'])
raise exc.HTTPForbidden(explanation=msg)
try:

View File

@ -143,8 +143,8 @@ class ShareTypesController(wsgi.Controller):
"""Creates a new share type."""
context = req.environ['manila.context']
if not self.is_valid_body(body, 'share_type') and \
not self.is_valid_body(body, 'volume_type'):
if (not self.is_valid_body(body, 'share_type') and
not self.is_valid_body(body, 'volume_type')):
raise webob.exc.HTTPBadRequest()
elif self.is_valid_body(body, 'share_type'):