summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-19 11:48:28 +0000
committerGerrit Code Review <review@openstack.org>2017-06-19 11:48:28 +0000
commit7c928d9d90264bda2130274ba93ea67fa71d999f (patch)
tree50ff3a26bdc642d5e2040d9b68f5d204c12e30e4
parentf7d3903ccb95430baa1101586772a8547de0bb30 (diff)
parentcffbc0d5aca2dc7d2b5305c329783394f98619fb (diff)
Merge "Use parenthesis instead of backslashes in API folder"
-rw-r--r--manila/api/v1/router.py4
-rw-r--r--manila/api/v1/shares.py4
-rw-r--r--manila/api/v2/share_networks.py8
-rw-r--r--manila/api/v2/share_types.py4
4 files changed, 10 insertions, 10 deletions
diff --git a/manila/api/v1/router.py b/manila/api/v1/router.py
index 0130ed0..4eaeed1 100644
--- a/manila/api/v1/router.py
+++ b/manila/api/v1/router.py
@@ -120,8 +120,8 @@ class APIRouter(manila.api.openstack.APIRouter):
120 mapper.resource("limit", "limits", 120 mapper.resource("limit", "limits",
121 controller=self.resources['limits']) 121 controller=self.resources['limits'])
122 122
123 self.resources["security_services"] = \ 123 self.resources["security_services"] = (
124 security_service.create_resource() 124 security_service.create_resource())
125 mapper.resource("security-service", "security-services", 125 mapper.resource("security-service", "security-services",
126 controller=self.resources['security_services'], 126 controller=self.resources['security_services'],
127 collection={'detail': 'GET'}) 127 collection={'detail': 'GET'})
diff --git a/manila/api/v1/shares.py b/manila/api/v1/shares.py
index c71c3fd..aa49416 100644
--- a/manila/api/v1/shares.py
+++ b/manila/api/v1/shares.py
@@ -272,8 +272,8 @@ class ShareMixin(object):
272 parent_share_net_id = parent_share.instance['share_network_id'] 272 parent_share_net_id = parent_share.instance['share_network_id']
273 if share_network_id: 273 if share_network_id:
274 if share_network_id != parent_share_net_id: 274 if share_network_id != parent_share_net_id:
275 msg = "Share network ID should be the same as snapshot's" \ 275 msg = ("Share network ID should be the same as snapshot's"
276 " parent share's or empty" 276 " parent share's or empty")
277 raise exc.HTTPBadRequest(explanation=msg) 277 raise exc.HTTPBadRequest(explanation=msg)
278 elif parent_share_net_id: 278 elif parent_share_net_id:
279 share_network_id = parent_share_net_id 279 share_network_id = parent_share_net_id
diff --git a/manila/api/v2/share_networks.py b/manila/api/v2/share_networks.py
index b734bad..c9956df 100644
--- a/manila/api/v2/share_networks.py
+++ b/manila/api/v2/share_networks.py
@@ -207,10 +207,10 @@ class ShareNetworkController(wsgi.Controller):
207 if share_network['share_servers']: 207 if share_network['share_servers']:
208 for value in update_values: 208 for value in update_values:
209 if value not in ['name', 'description']: 209 if value not in ['name', 'description']:
210 msg = _("Cannot update share network %s. It is used by " 210 msg = (_("Cannot update share network %s. It is used by "
211 "share servers. Only 'name' and 'description' " 211 "share servers. Only 'name' and 'description' "
212 "fields are available for update")\ 212 "fields are available for update") %
213 % share_network['id'] 213 share_network['id'])
214 raise exc.HTTPForbidden(explanation=msg) 214 raise exc.HTTPForbidden(explanation=msg)
215 215
216 try: 216 try:
diff --git a/manila/api/v2/share_types.py b/manila/api/v2/share_types.py
index e28a81b..80a243f 100644
--- a/manila/api/v2/share_types.py
+++ b/manila/api/v2/share_types.py
@@ -143,8 +143,8 @@ class ShareTypesController(wsgi.Controller):
143 """Creates a new share type.""" 143 """Creates a new share type."""
144 context = req.environ['manila.context'] 144 context = req.environ['manila.context']
145 145
146 if not self.is_valid_body(body, 'share_type') and \ 146 if (not self.is_valid_body(body, 'share_type') and
147 not self.is_valid_body(body, 'volume_type'): 147 not self.is_valid_body(body, 'volume_type')):
148 raise webob.exc.HTTPBadRequest() 148 raise webob.exc.HTTPBadRequest()
149 149
150 elif self.is_valid_body(body, 'share_type'): 150 elif self.is_valid_body(body, 'share_type'):