Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion delfin/drivers/hpe/hpe_3par/rest_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,22 @@ def login(self):
{"url": url, "reason": res.text})
if 'invalid username or password' in res.text:
raise exception.InvalidUsernameOrPassword()
elif 'maximum number of server connections' in res.text:
raise exception.StorageMaxUserCountException(res.text)
else:
raise exception.StorageBackendException(
six.text_type(res.text))
else:
LOG.error('Login Parameter error')

return access_session
except exception.DelfinException as e:
err_msg = "Login error: %s" % (e.msg)
LOG.error(err_msg)
raise e
except Exception as e:
LOG.error("Login error: %s", six.text_type(e))
raise e
raise exception.StorageBackendException(six.text_type(e))
finally:
self.session_lock.release()

Expand Down
2 changes: 1 addition & 1 deletion delfin/drivers/hpe/hpe_3par/ssh_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def exec_command(self, command):
raise NotImplementedError(re)
elif 'Too many local CLI connections' in re:
LOG.error("command %s failed: %s" % (command, re))
raise exception.StorageBackendException(re)
raise exception.StorageMaxUserCountException(re)
return re

def get_volumes(self):
Expand Down
6 changes: 5 additions & 1 deletion delfin/drivers/utils/rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ def do_call(self, url, data, method,
raise exception.InvalidIpOrPort()
elif 'Read timed out' in str(err):
raise exception.StorageBackendException(six.text_type(err))
elif 'ConnectionResetError(10054' in str(err):
raise exception.StorageMaxUserCountException(str(err))
elif 'maximum number of server connections' in str(err):
raise exception.StorageMaxUserCountException(str(err))
else:
raise exception.BadResponse()
raise exception.StorageBackendException(str(err))

return res