openstack.baremetal.v1.Node

openstack.baremetal.v1.Node

The Node Class

The Node class inherits from Resource.

class openstack.baremetal.v1.node.Node(_synchronized=False, **attrs)

The base resource

Parameters:_synchronized (bool) – This is not intended to be used directly. See new() and existing().
chassis_id = None

The UUID of the chassis associated wit this node. Can be empty or None.

clean_step = None

The current clean step.

created_at = None

Timestamp at which the node was last updated.

driver = None

The name of the driver.

driver_info = None

All the metadata required by the driver to manage this node. List of fields varies between drivers, and can be retrieved from the openstack.baremetal.v1.driver.Driver resource.

driver_internal_info = None

Internal metadata set and stored by node’s driver. This is read-only.

extra = None

A set of one or more arbitrary metadata key and value pairs.

id = None

The UUID of the node resource.

instance_info = None

Information used to customize the deployed image, e.g. size of root partition, config drive in the form of base64 encoded string and other metadata.

instance_id = None

UUID of the nova instance associated with this node.

is_console_enabled = None

Whether console access is enabled on this node.

is_maintenance = None

Whether node is currently in “maintenance mode”. Nodes put into maintenance mode are removed from the available resource pool.

last_error = None

Any error from the most recent transaction that started but failed to finish.

A list of relative links, including self and bookmark links.

maintenance_reason = None

user settable description of the reason why the node was placed into maintenance mode.

name = None

Human readable identifier for the node. May be undefined. Certain words are reserved. Added in API microversion 1.5

network_interface = None

Network interface provider to use when plumbing the network connections for this node. Introduced in API microversion 1.20.

ports = None

Links to the collection of ports on this node.

port_groups = None

Links to the collection of portgroups on this node. Available since API microversion 1.24.

power_state = None

The current power state. Usually “power on” or “power off”, but may be “None” if service is unable to determine the power state.

properties = None

Physical characteristics of the node. Content populated by the service during inspection.

provision_state = None

The current provisioning state of the node.

raid_config = None

The current RAID configuration of the node.

reservation = None

The name of an service conductor host which is holding a lock on this node, if a lock is held.

resource_class = None

A string to be used by external schedulers to identify this node as a unit of a specific type of resource. Added in API microversion 1.21.

states = None

Links to the collection of states.

target_provision_state = None

The requested state if a provisioning action has been requested. For example, AVAILABLE, DEPLOYING, DEPLOYWAIT, DEPLOYING, ACTIVE etc.

target_power_state = None

The requested state during a state transition.

target_raid_config = None

The requested RAID configuration of the node which will be applied when the node next transitions through the CLEANING state.

updated_at = None

Timestamp at which the node was last updated.

set_provision_state(session, target, config_drive=None, clean_steps=None, rescue_password=None, wait=False, timeout=None)

Run an action modifying this node’s provision state.

This call is asynchronous, it will return success as soon as the Bare Metal service acknowledges the request.

Parameters:
  • session (Adapter) – The session to use for making this request.
  • target – Provisioning action, e.g. active, provide. See the Bare Metal service documentation for available actions.
  • config_drive – Config drive to pass to the node, only valid for active` and ``rebuild targets.
  • clean_steps – Clean steps to execute, only valid for clean target.
  • rescue_password – Password for the rescue operation, only valid for rescue target.
  • wait – Whether to wait for the target state to be reached.
  • timeout – Timeout (in seconds) to wait for the target state to be reached. If None, wait without timeout.
Returns:

This Node instance.

Raises:

ValueError if config_drive, clean_steps or rescue_password are provided with an invalid target.

wait_for_provision_state(session, expected_state, timeout=None, abort_on_failed_state=True)

Wait for the node to reach the expected state.

Parameters:
  • session (Adapter) – The session to use for making this request.
  • expected_state – The expected provisioning state to reach.
  • timeout – If wait is set to True, specifies how much (in seconds) to wait for the expected state to be reached. The value of None (the default) means no client-side timeout.
  • abort_on_failed_state – If True (the default), abort waiting if the node reaches a failure state which does not match the expected one. Note that the failure state for enroll -> manageable transition is enroll again.
Returns:

This Node instance.

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.