sushy.connector Module¶sushy.connector.Connector(url, username=None, password=None, verify=True)¶Bases: object
close()¶Close this connector and the associated HTTP session.
delete(path='', data=None, headers=None, **extra_session_req_kwargs)¶HTTP DELETE method.
path – Optional sub-URI path to the resource.
data – Optional JSON data.
headers – Optional dictionary of headers.
extra_session_req_kwargs – Optional keyword argument to pass requests library arguments which would pass on to requests session object.
The response object from the requests library.
ConnectionError
HTTPError
get(path='', data=None, headers=None, **extra_session_req_kwargs)¶HTTP GET method.
path – Optional sub-URI path to the resource.
data – Optional JSON data.
headers – Optional dictionary of headers.
extra_session_req_kwargs – Optional keyword argument to pass requests library arguments which would pass on to requests session object.
The response object from the requests library.
ConnectionError
HTTPError
patch(path='', data=None, headers=None, **extra_session_req_kwargs)¶HTTP PATCH method.
path – Optional sub-URI path to the resource.
data – Optional JSON data.
headers – Optional dictionary of headers.
extra_session_req_kwargs – Optional keyword argument to pass requests library arguments which would pass on to requests session object.
The response object from the requests library.
ConnectionError
HTTPError
post(path='', data=None, headers=None, **extra_session_req_kwargs)¶HTTP POST method.
path – Optional sub-URI path to the resource.
data – Optional JSON data.
headers – Optional dictionary of headers.
extra_session_req_kwargs – Optional keyword argument to pass requests library arguments which would pass on to requests session object.
The response object from the requests library.
ConnectionError
HTTPError
put(path='', data=None, headers=None, **extra_session_req_kwargs)¶HTTP PUT method.
path – Optional sub-URI path to the resource.
data – Optional JSON data.
headers – Optional dictionary of headers.
extra_session_req_kwargs – Optional keyword argument to pass requests library arguments which would pass on to requests session object.
The response object from the requests library.
ConnectionError
HTTPError
set_auth(auth)¶Sets the authentication mechanism for our connector.
set_http_basic_auth(username, password)¶Sets the http basic authentication information.
set_http_session_auth(session_auth_token)¶Sets the session authentication information.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.