ironic.drivers.modules.oneview.common.
ensure_server_profile
(task)[source]¶Checks if the node’s Server Hardware has a Server Profile associated.
Function to check if the Server Profile is applied to the Server Hardware.
Parameters: | task – a TaskManager instance containing the node to act on. |
---|---|
Raises: | OneViewError if failed to get server profile from OneView |
ironic.drivers.modules.oneview.common.
get_hponeview_client
()[source]¶Generate an instance of the hpOneView client.
Generates an instance of the hpOneView client using the hpOneView library.
Returns: | an instance of the OneViewClient |
---|---|
Raises: | InvalidParameterValue if mandatory information is missing on the node or on invalid input. |
Raises: | OneViewError if try a secure connection without CA certificate. |
ironic.drivers.modules.oneview.common.
get_ilorest_client
(server_hardware)[source]¶Generate an instance of the iLORest library client.
Param: | server_hardware: a server hardware uuid or uri |
---|---|
Returns: | an instance of the iLORest client |
Raises: | InvalidParameterValue if mandatory information is missing on the node or on invalid input. |
ironic.drivers.modules.oneview.common.
get_oneview_info
(node)[source]¶Gets OneView information from the node.
Param: | node: node object to get information from |
---|---|
Returns: | a dictionary containing: |
Parameters: |
|
Server_profile_template_uri: | |
the uri of the server profile template in OneView |
|
Raises: | OneViewInvalidNodeParameter if node capabilities are malformed |
ironic.drivers.modules.oneview.common.
node_has_server_profile
(func)[source]¶Checks if the node’s Server Hardware has a Server Profile associated.
Decorator to execute before the function execution if the Server Profile is applied to the Server Hardware.
Parameters: | func – a given decorated function. |
---|
ironic.drivers.modules.oneview.common.
validate_oneview_resources_compatibility
(task)[source]¶Validate if the node configuration is consistent with OneView.
This method calls hpOneView functions to validate if the node configuration is consistent with the OneView resources it represents, including serverHardwareUri, serverHardwareTypeUri, serverGroupUri serverProfileTemplateUri, enclosureGroupUri and node ports. If any validation fails, the driver will raise an appropriate OneViewError.
Parameters: | task – a TaskManager instance containing the node to act on. |
---|---|
Raises: | OneViewError if any validation fails. |
ironic.drivers.modules.oneview.common.
verify_node_info
(node)[source]¶Verifies if fields and namespaces of a node are valid.
Verifies if the ‘driver_info’ field and the ‘properties/capabilities’ namespace exist and are not empty.
Param: | node: node object to be verified |
---|---|
Raises: | InvalidParameterValue if required node capabilities and/or driver_info are malformed or missing |
Raises: | MissingParameterValue if required node capabilities and/or driver_info are missing |
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.