EMC VNX Driver: Fix typo issues
Fix typo issues in EMC VNX Driver. Change-Id: I420587d3360de25d906e520ba5ddf8ccbf646f2f
This commit is contained in:
parent
df03bbbd6d
commit
cc9ecde3bd
@ -279,7 +279,7 @@ class VNXStorageConnection(driver.StorageConnection):
|
|||||||
path,
|
path,
|
||||||
'true')
|
'true')
|
||||||
if constants.STATUS_OK != status:
|
if constants.STATUS_OK != status:
|
||||||
if self._XMLAPI_helper._is_mount_point_unexist_error(out):
|
if self._XMLAPI_helper._is_mount_point_nonexistent(out):
|
||||||
LOG.warn(_LW("Mount point %(path)s on %(vdm)s not found."),
|
LOG.warn(_LW("Mount point %(path)s on %(vdm)s not found."),
|
||||||
{'path': path, 'vdm': vdm_name})
|
{'path': path, 'vdm': vdm_name})
|
||||||
else:
|
else:
|
||||||
@ -566,11 +566,11 @@ class VNXStorageConnection(driver.StorageConnection):
|
|||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
with excutils.save_and_reraise_exception():
|
with excutils.save_and_reraise_exception():
|
||||||
LOG.error(_LE('Could not setup server. Reason: %s.'), ex)
|
LOG.error(_LE('Could not setup server. Reason: %s.'), ex)
|
||||||
server_details = self._contruct_backend_details(
|
server_details = self._construct_backend_details(
|
||||||
vdm_name, vdmRef, interface_info)
|
vdm_name, vdmRef, interface_info)
|
||||||
self.teardown_server(None, server_details, sec_services)
|
self.teardown_server(None, server_details, sec_services)
|
||||||
|
|
||||||
def _contruct_backend_details(self, vdm_name, vdmRef, interfaces):
|
def _construct_backend_details(self, vdm_name, vdmRef, interfaces):
|
||||||
vdm_id = vdmRef['id'] if vdmRef else ""
|
vdm_id = vdmRef['id'] if vdmRef else ""
|
||||||
if_number = len(interfaces)
|
if_number = len(interfaces)
|
||||||
cifs_if = interfaces[0]['ip'] if if_number > 0 else None
|
cifs_if = interfaces[0]['ip'] if if_number > 0 else None
|
||||||
|
@ -20,7 +20,7 @@ STATUS_ERROR = 'error'
|
|||||||
STATUS_NOT_FOUND = 'not_found'
|
STATUS_NOT_FOUND = 'not_found'
|
||||||
|
|
||||||
MSG_GENERAL_ERROR = "13690601492"
|
MSG_GENERAL_ERROR = "13690601492"
|
||||||
MSG_INVALID_VMD_ID = "14227341325"
|
MSG_INVALID_VDM_ID = "14227341325"
|
||||||
MSG_FILESYSTEM_NOT_FOUND = "18522112101"
|
MSG_FILESYSTEM_NOT_FOUND = "18522112101"
|
||||||
MSG_JOIN_DOMAIN_FAILED = '17986748527'
|
MSG_JOIN_DOMAIN_FAILED = '17986748527'
|
||||||
|
|
||||||
|
@ -47,10 +47,11 @@ class XMLAPIConnector(object):
|
|||||||
self.auth_url = 'https://' + self.storage_ip + '/Login'
|
self.auth_url = 'https://' + self.storage_ip + '/Login'
|
||||||
self._url = ('https://' + self.storage_ip
|
self._url = ('https://' + self.storage_ip
|
||||||
+ '/servlets/CelerraManagementServices')
|
+ '/servlets/CelerraManagementServices')
|
||||||
https_hander = url_request.HTTPSHandler()
|
https_handler = url_request.HTTPSHandler()
|
||||||
cookie_jar = cookielib.CookieJar()
|
cookie_jar = cookielib.CookieJar()
|
||||||
cookie_hander = url_request.HTTPCookieProcessor(cookie_jar)
|
cookie_handler = url_request.HTTPCookieProcessor(cookie_jar)
|
||||||
self.url_opener = url_request.build_opener(https_hander, cookie_hander)
|
self.url_opener = url_request.build_opener(https_handler,
|
||||||
|
cookie_handler)
|
||||||
self.do_setup()
|
self.do_setup()
|
||||||
|
|
||||||
def do_setup(self):
|
def do_setup(self):
|
||||||
@ -75,7 +76,7 @@ class XMLAPIConnector(object):
|
|||||||
string_parts.append(header)
|
string_parts.append(header)
|
||||||
|
|
||||||
if req.data:
|
if req.data:
|
||||||
string_parts.append(" -d '%s'" % (req.data))
|
string_parts.append(" -d '%s'" % req.data)
|
||||||
string_parts.append(' ' + req.get_full_url())
|
string_parts.append(' ' + req.get_full_url())
|
||||||
LOG.debug("\nREQ: %s\n", "".join(string_parts))
|
LOG.debug("\nREQ: %s\n", "".join(string_parts))
|
||||||
|
|
||||||
@ -523,11 +524,11 @@ class XMLAPIHelper(object):
|
|||||||
|
|
||||||
return status, data
|
return status, data
|
||||||
|
|
||||||
def _copy_properties(self, source, dist, properties):
|
def _copy_properties(self, source, dest, properties):
|
||||||
for key in properties:
|
for key in properties:
|
||||||
if key in source:
|
if key in source:
|
||||||
dist[key] = source[key]
|
dest[key] = source[key]
|
||||||
return dist
|
return dest
|
||||||
|
|
||||||
def send_request(self, req):
|
def send_request(self, req):
|
||||||
req_xml = constants.XML_HEADER + ET.tostring(req)
|
req_xml = constants.XML_HEADER + ET.tostring(req)
|
||||||
@ -547,14 +548,14 @@ class XMLAPIHelper(object):
|
|||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _is_mount_point_unexist_error(self, out):
|
def _is_mount_point_nonexistent(self, out):
|
||||||
if 'info' in out.keys():
|
if 'info' in out.keys():
|
||||||
for problem in out['info']:
|
for problem in out['info']:
|
||||||
if ((problem['messageCode'] == constants.MSG_GENERAL_ERROR
|
if ((problem['messageCode'] == constants.MSG_GENERAL_ERROR
|
||||||
and problem['message'].find("No such path or invalid "
|
and problem['message'].find("No such path or invalid "
|
||||||
"operation") != -1)
|
"operation") != -1)
|
||||||
or (problem['messageCode'] ==
|
or (problem['messageCode'] ==
|
||||||
constants.MSG_INVALID_VMD_ID)):
|
constants.MSG_INVALID_VDM_ID)):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user