The Node
class inherits from Resource
.
openstack.baremetal.v1.node.
Node
(_synchronized=False, connection=None, **attrs)¶The base resource
Parameters: |
|
---|
allocation_id
¶The UUID of the allocation associated with this node. Added in API microversion 1.52.
chassis_id
¶The UUID of the chassis associated wit this node. Can be empty or None.
clean_step
¶The current clean step.
conductor_group
¶Conductor group this node is managed by. Added in API microversion 1.46.
created_at
¶Timestamp at which the node was last updated.
deploy_step
¶The current deploy step. Added in API microversion 1.44.
driver
¶The name of the driver.
driver_info
¶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
¶Internal metadata set and stored by node’s driver. This is read-only.
extra
¶A set of one or more arbitrary metadata key and value pairs.
fault
¶Fault type that caused the node to enter maintenance mode. Introduced in API microversion 1.42.
id
¶The UUID of the node resource.
instance_info
¶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
¶UUID of the nova instance associated with this node.
is_automated_clean_enabled
¶Override enabling of automated cleaning. Added in API microversion 1.47.
is_console_enabled
¶Whether console access is enabled on this node.
is_maintenance
¶Whether node is currently in “maintenance mode”. Nodes put into maintenance mode are removed from the available resource pool.
last_error
¶Any error from the most recent transaction that started but failed to finish.
links
¶A list of relative links, including self and bookmark links.
maintenance_reason
¶user settable description of the reason why the node was placed into maintenance mode.
name
¶Human readable identifier for the node. May be undefined. Certain words are reserved. Added in API microversion 1.5
ports
¶Links to the collection of ports on this node.
port_groups
¶Links to the collection of portgroups on this node. Available since API microversion 1.24.
power_state
¶The current power state. Usually “power on” or “power off”, but may be “None” if service is unable to determine the power state.
properties
¶Physical characteristics of the node. Content populated by the service during inspection.
provision_state
¶The current provisioning state of the node.
raid_config
¶The current RAID configuration of the node.
reservation
¶The name of an service conductor host which is holding a lock on this node, if a lock is held.
resource_class
¶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
¶Links to the collection of states.
target_provision_state
¶The requested state if a provisioning action has been requested. For
example, AVAILABLE
, DEPLOYING
, DEPLOYWAIT
, DEPLOYING
,
ACTIVE
etc.
target_power_state
¶The requested state during a state transition.
target_raid_config
¶The requested RAID configuration of the node which will be applied when the node next transitions through the CLEANING state.
traits
¶Traits of the node. Introduced in API microversion 1.37.
updated_at
¶Timestamp at which the node was last updated.
bios_interface
¶BIOS interface to use when setting BIOS properties of the node. Introduced in API microversion 1.40.
boot_interface
¶Boot interface to use when configuring boot of the node. Introduced in API microversion 1.31.
console_interface
¶Console interface to use when working with serial console. Introduced in API microversion 1.31.
deploy_interface
¶Deploy interface to use when deploying the node. Introduced in API microversion 1.31.
inspect_interface
¶Inspect interface to use when inspecting the node. Introduced in API microversion 1.31.
management_interface
¶Management interface to use for management actions on the node. Introduced in API microversion 1.31.
network_interface
¶Network interface provider to use when plumbing the network connections for this node. Introduced in API microversion 1.20.
power_interface
¶Power interface to use for power actions on the node. Introduced in API microversion 1.31.
raid_interface
¶RAID interface to use for configuring RAID on the node. Introduced in API microversion 1.31.
rescue_interface
¶Rescue interface to use for rescuing of the node. Introduced in API microversion 1.38.
storage_interface
¶Storage interface to use when attaching remote storage. Introduced in API microversion 1.33.
vendor_interface
¶Vendor interface to use for vendor-specific actions on the node. Introduced in API microversion 1.31.
create
(session, *args, **kwargs)¶Create a remote resource based on this instance.
The overridden version is capable of handling the populated
provision_state
field of one of three values: enroll
,
manageable
or available
. The default is currently
available
, since it’s the only state supported by all API versions.
Note that Bare Metal API 1.4 is required for manageable
and
1.11 is required for enroll
.
Parameters: | session (Adapter ) – The session to use for making this request. |
---|---|
Returns: | This Resource instance. |
Raises: | ValueError if the Node’s provision_state is not one of
None , enroll , manageable or available . |
Raises: | NotSupported if
the provision_state cannot be reached with any API version
supported by the server. |
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: |
|
---|---|
Returns: | This |
Raises: | ValueError if |
wait_for_provision_state
(session, expected_state, timeout=None, abort_on_failed_state=True)¶Wait for the node to reach the expected state.
Parameters: |
|
---|---|
Returns: | This |
wait_for_reservation
(session, timeout=None)¶Wait for a lock on the node to be released.
Bare metal nodes in ironic have a reservation lock that is used to represent that a conductor has locked the node while performing some sort of action, such as changing configuration as a result of a machine state change.
This lock can occur during power syncronization, and prevents updates to objects attached to the node, such as ports.
Note that nothing prevents a conductor from acquiring the lock again after this call returns, so it should be treated as best effort.
Returns immediately if there is no reservation on the node.
Parameters: |
|
---|---|
Returns: | This |
set_power_state
(session, target)¶Run an action modifying this node’s power state.
This call is asynchronous, it will return success as soon as the Bare Metal service acknowledges the request.
Parameters: |
|
---|
attach_vif
(session, vif_id, retry_on_conflict=True)¶Attach a VIF to the node.
The exact form of the VIF ID depends on the network interface used by the node. In the most common case it is a Network service port (NOT a Bare Metal port) ID. A VIF can only be attached to one node at a time.
Parameters: |
|
---|---|
Returns: |
|
Raises: |
|
detach_vif
(session, vif_id, ignore_missing=True)¶Detach a VIF from the node.
The exact form of the VIF ID depends on the network interface used by the node. In the most common case it is a Network service port (NOT a Bare Metal port) ID.
Parameters: |
|
---|---|
Returns: |
|
Raises: |
|
list_vifs
(session)¶List IDs of VIFs attached to the node.
The exact form of the VIF ID depends on the network interface used by the node. In the most common case it is a Network service port (NOT a Bare Metal port) ID.
Parameters: | session (Adapter ) – The session to use for making this request. |
---|---|
Returns: | List of VIF IDs as strings. |
Raises: | NotSupported if the server
does not support the VIF API. |
validate
(session, required=('boot', 'deploy', 'power'))¶Validate required information on a node.
Parameters: |
|
---|---|
Returns: | dict mapping interface names to |
Raises: |
|
The ValidationResult
class represents the result of a validation.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.