The ironic.drivers.modules.drac.client Module

Wrapper for pywsman.Client

class ironic.drivers.modules.drac.client.Client(drac_host, drac_port, drac_path, drac_protocol, drac_username, drac_password)[source]

Bases: object

wsman_enumerate(resource_uri, filter_query=None, filter_dialect='cql')[source]

Enumerates a remote WS-Man class.

Parameters:
  • resource_uri – URI of the resource.
  • filter_query – the query string.
  • filter_dialect – the filter dialect. Valid options are: ‘cql’ and ‘wql’. Defaults to ‘cql’.
Raises:

DracClientError on an error from pywsman library.

Raises:

DracInvalidFilterDialect if an invalid filter dialect was specified.

Returns:

an ElementTree object of the response received.

wsman_invoke(resource_uri, method, selectors=None, properties=None, expected_return=None)[source]

Invokes a remote WS-Man method.

Parameters:
  • resource_uri – URI of the resource.
  • method – name of the method to invoke.
  • selectors – dictionary of selectors.
  • properties – dictionary of properties.
  • expected_return – expected return value.
Raises:

DracClientError on an error from pywsman library.

Raises:

DracOperationFailed on error reported back by DRAC.

Raises:

DracUnexpectedReturnValue on return value mismatch.

Returns:

an ElementTree object of the response received.

This Page