You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
When I try to create the OneView client but my VM is paused, an OSError exception is raised instead of a HPOneViewException. The HPOneViewException should not cover this type of exception in this scenario? For treat this exception is only possible if I catch an OSError, but is seems odd for me since this also could be used as a HPOneViewException maybe.
Traceback (most recent call last):
File "one_view.py", line 89, in<module>
one_view = OneView(config)
File "one_view.py", line 12, in __init__
self.oneview_client = OneViewClient(config)
File "/usr/local/lib/python3.5/dist-packages/hpOneView/oneview_client.py", line 118, in __init__
self.__connection.login(config["credentials"])
File "/usr/local/lib/python3.5/dist-packages/hpOneView/connection.py", line 483, in login
self.validateVersion()
File "/usr/local/lib/python3.5/dist-packages/hpOneView/connection.py", line 79, in validateVersion
version = self.get(uri['version'])
File "/usr/local/lib/python3.5/dist-packages/hpOneView/connection.py", line 324, in get
resp, body = self.do_http('GET', uri, '')
File "/usr/local/lib/python3.5/dist-packages/hpOneView/connection.py", line 126, in do_http
conn.request(method, path, body, http_headers)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/usr/lib/python3.5/http/client.py", line 1252, in connect
super().connect()
File "/usr/lib/python3.5/http/client.py", line 849, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.5/socket.py", line 711, in create_connection
raise err
File "/usr/lib/python3.5/socket.py", line 702, in create_connection
sock.connect(sa)
OSError: [Errno 113] No route to host
The text was updated successfully, but these errors were encountered:
fgbulsoni
changed the title
HPOneViewException not raised when I try to create a connection with VM paused
HPOneViewException not raised when connection with paused VM fails
Aug 28, 2017
Seems like a valid request, possible solution in #310 .
Not every http error is being caught that way, as it is not impossible for those to happen in some other part of the code, but this should catch the errors coming from a first attempt at connecting to the appliance, usually timeout or no route to host.
Hi guys,
When I try to create the OneView client but my VM is paused, an OSError exception is raised instead of a HPOneViewException. The HPOneViewException should not cover this type of exception in this scenario? For treat this exception is only possible if I catch an OSError, but is seems odd for me since this also could be used as a HPOneViewException maybe.
Code example:
Result:
The text was updated successfully, but these errors were encountered: