ironic.drivers.modules.inspect_utils module

ironic.drivers.modules.inspect_utils module

ironic.drivers.modules.inspect_utils.clean_up_swift_entries(task)[source]

Delete swift entries containing introspection data.

Delete swift entries related to the node in task.node containing introspection data. The entries are inspector_data-<task.node.uuid>-inventory for hardware inventory and similar for -plugin containing the rest of the introspection data.

Parameters:

task – A TaskManager instance.

ironic.drivers.modules.inspect_utils.create_ports_if_not_exist(task, macs)[source]

Create ironic ports from MAC addresses data dict.

Creates ironic ports from MAC addresses data returned with inspection or as requested by operator. Helper argument to detect the MAC address get_mac_address defaults to ‘value’ part of MAC address dict key-value pair.

Parameters:
  • task – A TaskManager instance.

  • macs – A sequence of MAC addresses.

ironic.drivers.modules.inspect_utils.get_introspection_data(node, context)[source]

Get introspection data.

Retrieve the introspection data for a node. Either from database or swift as configured.

Parameters:
  • node_id – the Ironic node that the required data is about

  • context – an admin context

Returns:

dictionary with inventory and plugin_data fields

ironic.drivers.modules.inspect_utils.store_introspection_data(node, introspection_data, context)[source]

Store introspection data.

Store the introspection data for a node. Either to database or swift as configured.

Parameters:
  • node – the Ironic node that the introspection data is about

  • introspection_data – the data to store

  • context – an admin context

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.