summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-19 11:58:09 +0000
committerGerrit Code Review <review@openstack.org>2017-06-19 11:58:09 +0000
commit52084ee4f1dc4784d7bb70a4e15d2c7904ef0a66 (patch)
tree63c73f93ca0416c0145bc7148cff81b0dd9e2a7b
parent7c928d9d90264bda2130274ba93ea67fa71d999f (diff)
parent50df32ceec6e3b5c26669d773527ba4ff7a6477e (diff)
Merge "Use parenthesis instead of backslashes in share folder"
-rw-r--r--manila/share/drivers/huawei/v3/helper.py6
-rw-r--r--manila/share/drivers/netapp/dataontap/client/api.py36
-rw-r--r--manila/share/drivers/netapp/dataontap/client/client_cmode.py6
-rw-r--r--manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py8
-rw-r--r--manila/share/drivers/netapp/dataontap/cluster_mode/lib_single_svm.py8
-rw-r--r--manila/share/drivers/zfssa/restclient.py4
6 files changed, 34 insertions, 34 deletions
diff --git a/manila/share/drivers/huawei/v3/helper.py b/manila/share/drivers/huawei/v3/helper.py
index ff8c78d..5c3dc05 100644
--- a/manila/share/drivers/huawei/v3/helper.py
+++ b/manila/share/drivers/huawei/v3/helper.py
@@ -79,9 +79,9 @@ class RestHelper(object):
79 except Exception as err: 79 except Exception as err:
80 LOG.error('\nBad response from server: %(url)s.' 80 LOG.error('\nBad response from server: %(url)s.'
81 ' Error: %(err)s', {'url': url, 'err': err}) 81 ' Error: %(err)s', {'url': url, 'err': err})
82 res = '{"error":{"code":%s,' \ 82 res = ('{"error":{"code":%s,'
83 '"description":"Connect server error"}}' \ 83 '"description":"Connect server error"}}'
84 % constants.ERROR_CONNECT_TO_SERVER 84 % constants.ERROR_CONNECT_TO_SERVER)
85 85
86 try: 86 try:
87 result = jsonutils.loads(res) 87 result = jsonutils.loads(res)
diff --git a/manila/share/drivers/netapp/dataontap/client/api.py b/manila/share/drivers/netapp/dataontap/client/api.py
index 10e0a67..3c44196 100644
--- a/manila/share/drivers/netapp/dataontap/client/api.py
+++ b/manila/share/drivers/netapp/dataontap/client/api.py
@@ -149,8 +149,8 @@ class NaServer(object):
149 try: 149 try:
150 self._api_major_version = int(major) 150 self._api_major_version = int(major)
151 self._api_minor_version = int(minor) 151 self._api_minor_version = int(minor)
152 self._api_version = six.text_type(major) + "." + \ 152 self._api_version = (six.text_type(major) + "." +
153 six.text_type(minor) 153 six.text_type(minor))
154 except ValueError: 154 except ValueError:
155 raise ValueError('Major and minor versions must be integers') 155 raise ValueError('Major and minor versions must be integers')
156 self._refresh_conn = True 156 self._refresh_conn = True
@@ -228,8 +228,8 @@ class NaServer(object):
228 if self._trace: 228 if self._trace:
229 LOG.debug("Request: %s", request_element.to_string(pretty=True)) 229 LOG.debug("Request: %s", request_element.to_string(pretty=True))
230 230
231 if not hasattr(self, '_opener') or not self._opener \ 231 if (not hasattr(self, '_opener') or not self._opener
232 or self._refresh_conn: 232 or self._refresh_conn):
233 self._build_opener() 233 self._build_opener()
234 try: 234 try:
235 if hasattr(self, '_timeout'): 235 if hasattr(self, '_timeout'):
@@ -262,15 +262,15 @@ class NaServer(object):
262 result = self.invoke_elem(na_element, enable_tunneling) 262 result = self.invoke_elem(na_element, enable_tunneling)
263 if result.has_attr('status') and result.get_attr('status') == 'passed': 263 if result.has_attr('status') and result.get_attr('status') == 'passed':
264 return result 264 return result
265 code = result.get_attr('errno')\ 265 code = (result.get_attr('errno')
266 or result.get_child_content('errorno')\ 266 or result.get_child_content('errorno')
267 or 'ESTATUSFAILED' 267 or 'ESTATUSFAILED')
268 if code == ESIS_CLONE_NOT_LICENSED: 268 if code == ESIS_CLONE_NOT_LICENSED:
269 msg = 'Clone operation failed: FlexClone not licensed.' 269 msg = 'Clone operation failed: FlexClone not licensed.'
270 else: 270 else:
271 msg = result.get_attr('reason')\ 271 msg = (result.get_attr('reason')
272 or result.get_child_content('reason')\ 272 or result.get_child_content('reason')
273 or 'Execution status is failed due to unknown reason' 273 or 'Execution status is failed due to unknown reason')
274 raise NaApiError(code, msg) 274 raise NaApiError(code, msg)
275 275
276 def _create_request(self, na_element, enable_tunneling=False): 276 def _create_request(self, na_element, enable_tunneling=False):
@@ -291,19 +291,19 @@ class NaServer(object):
291 def _enable_tunnel_request(self, netapp_elem): 291 def _enable_tunnel_request(self, netapp_elem):
292 """Enables vserver or vfiler tunneling.""" 292 """Enables vserver or vfiler tunneling."""
293 if hasattr(self, '_vfiler') and self._vfiler: 293 if hasattr(self, '_vfiler') and self._vfiler:
294 if hasattr(self, '_api_major_version') and \ 294 if (hasattr(self, '_api_major_version') and
295 hasattr(self, '_api_minor_version') and \ 295 hasattr(self, '_api_minor_version') and
296 self._api_major_version >= 1 and \ 296 self._api_major_version >= 1 and
297 self._api_minor_version >= 7: 297 self._api_minor_version >= 7):
298 netapp_elem.add_attr('vfiler', self._vfiler) 298 netapp_elem.add_attr('vfiler', self._vfiler)
299 else: 299 else:
300 raise ValueError('ontapi version has to be atleast 1.7' 300 raise ValueError('ontapi version has to be atleast 1.7'
301 ' to send request to vfiler') 301 ' to send request to vfiler')
302 if hasattr(self, '_vserver') and self._vserver: 302 if hasattr(self, '_vserver') and self._vserver:
303 if hasattr(self, '_api_major_version') and \ 303 if (hasattr(self, '_api_major_version') and
304 hasattr(self, '_api_minor_version') and \ 304 hasattr(self, '_api_minor_version') and
305 self._api_major_version >= 1 and \ 305 self._api_major_version >= 1 and
306 self._api_minor_version >= 15: 306 self._api_minor_version >= 15):
307 netapp_elem.add_attr('vfiler', self._vserver) 307 netapp_elem.add_attr('vfiler', self._vserver)
308 else: 308 else:
309 raise ValueError('ontapi version has to be atleast 1.15' 309 raise ValueError('ontapi version has to be atleast 1.15'
diff --git a/manila/share/drivers/netapp/dataontap/client/client_cmode.py b/manila/share/drivers/netapp/dataontap/client/client_cmode.py
index 1cb447e..6522fec 100644
--- a/manila/share/drivers/netapp/dataontap/client/client_cmode.py
+++ b/manila/share/drivers/netapp/dataontap/client/client_cmode.py
@@ -1368,9 +1368,9 @@ class NetAppCmodeClient(client_base.NetAppBaseClient):
1368 @na_utils.trace 1368 @na_utils.trace
1369 def _get_kerberos_service_principal_name(self, security_service, 1369 def _get_kerberos_service_principal_name(self, security_service,
1370 vserver_name): 1370 vserver_name):
1371 return 'nfs/' + vserver_name.replace('_', '-') + '.' + \ 1371 return ('nfs/' + vserver_name.replace('_', '-') + '.' +
1372 security_service['domain'] + '@' + \ 1372 security_service['domain'] + '@' +
1373 security_service['domain'].upper() 1373 security_service['domain'].upper())
1374 1374
1375 @na_utils.trace 1375 @na_utils.trace
1376 def configure_dns(self, security_service): 1376 def configure_dns(self, security_service):
diff --git a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py
index 7dafd81..9906537 100644
--- a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py
+++ b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py
@@ -63,8 +63,8 @@ class NetAppCmodeMultiSVMFileStorageLibrary(
63 'netapp_aggregate_name_search_pattern is set correctly.') 63 'netapp_aggregate_name_search_pattern is set correctly.')
64 raise exception.NetAppException(msg) 64 raise exception.NetAppException(msg)
65 65
66 super(NetAppCmodeMultiSVMFileStorageLibrary, self).\ 66 (super(NetAppCmodeMultiSVMFileStorageLibrary, self).
67 check_for_setup_error() 67 check_for_setup_error())
68 68
69 @na_utils.trace 69 @na_utils.trace
70 def _get_vserver(self, share_server=None): 70 def _get_vserver(self, share_server=None):
@@ -102,8 +102,8 @@ class NetAppCmodeMultiSVMFileStorageLibrary(
102 self._client.prune_deleted_nfs_export_policies() 102 self._client.prune_deleted_nfs_export_policies()
103 self._client.prune_deleted_snapshots() 103 self._client.prune_deleted_snapshots()
104 104
105 super(NetAppCmodeMultiSVMFileStorageLibrary, self).\ 105 (super(NetAppCmodeMultiSVMFileStorageLibrary, self).
106 _handle_housekeeping_tasks() 106 _handle_housekeeping_tasks())
107 107
108 @na_utils.trace 108 @na_utils.trace
109 def _find_matching_aggregates(self): 109 def _find_matching_aggregates(self):
diff --git a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_single_svm.py b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_single_svm.py
index af6b896..aca78f2 100644
--- a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_single_svm.py
+++ b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_single_svm.py
@@ -79,8 +79,8 @@ class NetAppCmodeSingleSVMFileStorageLibrary(
79 else 'Vserver') 79 else 'Vserver')
80 LOG.info(msg % msg_args) 80 LOG.info(msg % msg_args)
81 81
82 super(NetAppCmodeSingleSVMFileStorageLibrary, self).\ 82 (super(NetAppCmodeSingleSVMFileStorageLibrary, self).
83 check_for_setup_error() 83 check_for_setup_error())
84 84
85 @na_utils.trace 85 @na_utils.trace
86 def _get_vserver(self, share_server=None): 86 def _get_vserver(self, share_server=None):
@@ -115,8 +115,8 @@ class NetAppCmodeSingleSVMFileStorageLibrary(
115 vserver_client.prune_deleted_nfs_export_policies() 115 vserver_client.prune_deleted_nfs_export_policies()
116 vserver_client.prune_deleted_snapshots() 116 vserver_client.prune_deleted_snapshots()
117 117
118 super(NetAppCmodeSingleSVMFileStorageLibrary, self).\ 118 (super(NetAppCmodeSingleSVMFileStorageLibrary, self).
119 _handle_housekeeping_tasks() 119 _handle_housekeeping_tasks())
120 120
121 @na_utils.trace 121 @na_utils.trace
122 def _find_matching_aggregates(self): 122 def _find_matching_aggregates(self):
diff --git a/manila/share/drivers/zfssa/restclient.py b/manila/share/drivers/zfssa/restclient.py
index 47e8013..df1bc14 100644
--- a/manila/share/drivers/zfssa/restclient.py
+++ b/manila/share/drivers/zfssa/restclient.py
@@ -181,8 +181,8 @@ class RestClientURL(object): # pylint: disable=R0902
181 result = self.post("/access/v1") 181 result = self.post("/access/v1")
182 del self.headers['authorization'] 182 del self.headers['authorization']
183 if result.status == http_client.CREATED: 183 if result.status == http_client.CREATED:
184 self.headers['x-auth-session'] = \ 184 self.headers['x-auth-session'] = (
185 result.get_header('x-auth-session') 185 result.get_header('x-auth-session'))
186 self.do_logout = True 186 self.do_logout = True
187 log_debug_msg(self, ('ZFSSA version: %s') 187 log_debug_msg(self, ('ZFSSA version: %s')
188 % result.get_header('x-zfssa-version')) 188 % result.get_header('x-zfssa-version'))