The sushy.connector Module

The sushy.connector Module

class sushy.connector.Connector(url, username=None, password=None, verify=True)

Bases: object

close()

Close this connector and the associated HTTP session.

get(path='', data=None, headers=None)

HTTP GET method.

Parameters:
  • path – Optional sub-URI path to the resource.
  • data – Optional JSON data.
  • headers – Optional dictionary of headers.
Returns:

The response object from the requests library.

Raises:

ConnectionError

Raises:

HTTPError

patch(path='', data=None, headers=None)

HTTP PATCH method.

Parameters:
  • path – Optional sub-URI path to the resource.
  • data – Optional JSON data.
  • headers – Optional dictionary of headers.
Returns:

The response object from the requests library.

Raises:

ConnectionError

Raises:

HTTPError

post(path='', data=None, headers=None)

HTTP POST method.

Parameters:
  • path – Optional sub-URI path to the resource.
  • data – Optional JSON data.
  • headers – Optional dictionary of headers.
Returns:

The response object from the requests library.

Raises:

ConnectionError

Raises:

HTTPError

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.