For details on how to use baremetal, see Using OpenStack Baremetal
The baremetal high-level interface is available through the baremetal
member of a Connection
object.
The baremetal
member will only be added if the service is detected.
openstack.baremetal.v1._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)nodes
(details=False, **query)Retrieve a generator of nodes.
Parameters: |
|
---|---|
Returns: | A generator of |
create_node
(**attrs)Create a new node from attributes.
Parameters: | attrs (dict) – Keyword arguments that will be used to create a
Node . |
---|---|
Returns: | The results of node creation. |
Return type: | Node . |
find_node
(name_or_id, ignore_missing=True)Find a single node.
Parameters: |
|
---|---|
Returns: | One |
get_node
(node, fields=None)Get a specific node.
Parameters: |
|
---|---|
Returns: | One |
Raises: |
|
update_node
(node, retry_on_conflict=True, **attrs)Update a node.
Parameters: |
|
---|---|
Returns: | The updated node. |
Return type: |
patch_node
(node, patch, reset_interfaces=None, retry_on_conflict=True)Apply a JSON patch to the node.
Parameters: |
|
---|
See Update Node for details.
Returns: | The updated node. |
---|---|
Return type: | Node |
set_node_provision_state
(node, target, config_drive=None, clean_steps=None, rescue_password=None, wait=False, timeout=None)Run an action modifying node’s provision state.
This call is asynchronous, it will return success as soon as the Bare Metal service acknowledges the request.
Parameters: |
|
---|---|
Returns: | The updated |
Raises: | ValueError if |
wait_for_nodes_provision_state
(nodes, expected_state, timeout=None, abort_on_failed_state=True, fail=True)Wait for the nodes to reach the expected state.
Parameters: |
|
---|---|
Returns: | If fail is |
Raises: |
|
Raises: |
|
set_node_power_state
(node, target, wait=False, timeout=None)Run an action modifying node’s power state.
This call is asynchronous, it will return success as soon as the Bare Metal service acknowledges the request.
Parameters: |
|
---|
wait_for_node_power_state
(node, expected_state, timeout=None)Wait for the node to reach the power state.
Parameters: |
|
---|---|
Returns: | The updated |
wait_for_node_reservation
(node, 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: | The updated |
validate_node
(node, required=('boot', 'deploy', 'power'))Validate required information on a node.
Parameters: |
|
---|---|
Returns: | dict mapping interface names to
|
Raises: |
|
set_node_maintenance
(node, reason=None)Enable maintenance mode on the node.
Parameters: |
|
---|---|
Returns: | This |
unset_node_maintenance
(node)Disable maintenance mode on the node.
Parameters: | node – The value can be either the name or ID of a node or
a Node instance. |
---|---|
Returns: | This Node instance. |
delete_node
(node, ignore_missing=True)Delete a node.
Parameters: |
|
---|---|
Returns: | The instance of the node which was deleted. |
Return type: |
|
openstack.baremetal.v1._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)ports
(details=False, **query)Retrieve a generator of ports.
Parameters: |
|
---|---|
Returns: | A generator of port instances. |
create_port
(**attrs)Create a new port from attributes.
Parameters: | attrs (dict) – Keyword arguments that will be used to create a
Port . |
---|---|
Returns: | The results of port creation. |
Return type: | Port . |
find_port
(name_or_id, ignore_missing=True)Find a single port.
Parameters: |
|
---|---|
Returns: | One |
get_port
(port, fields=None)Get a specific port.
Parameters: |
|
---|---|
Returns: | One |
Raises: |
|
update_port
(port, **attrs)Update a port.
Parameters: |
|
---|---|
Returns: | The updated port. |
Return type: |
patch_port
(port, patch)Apply a JSON patch to the port.
Parameters: |
|
---|---|
Returns: | The updated port. |
Return type: |
delete_port
(port, ignore_missing=True)Delete a port.
Parameters: |
|
---|---|
Returns: | The instance of the port which was deleted. |
Return type: |
|
openstack.baremetal.v1._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)port_groups
(details=False, **query)Retrieve a generator of port groups.
Parameters: |
|
---|---|
Returns: | A generator of port group instances. |
create_port_group
(**attrs)Create a new portgroup from attributes.
Parameters: | attrs (dict) – Keyword arguments that will be used to create a
PortGroup . |
---|---|
Returns: | The results of portgroup creation. |
Return type: | PortGroup . |
find_port_group
(name_or_id, ignore_missing=True)Find a single port group.
Parameters: |
|
---|---|
Returns: | One |
get_port_group
(port_group, fields=None)Get a specific port group.
Parameters: |
|
---|---|
Returns: | One |
Raises: |
|
update_port_group
(port_group, **attrs)Update a port group.
Parameters: |
|
---|---|
Returns: | The updated port group. |
Return type: |
patch_port_group
(port_group, patch)Apply a JSON patch to the port_group.
Parameters: |
|
---|---|
Returns: | The updated port group. |
Return type: |
delete_port_group
(port_group, ignore_missing=True)Delete a port group.
Parameters: |
|
---|---|
Returns: | The instance of the port group which was deleted. |
Return type: |
openstack.baremetal.v1._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)drivers
(details=False)Retrieve a generator of drivers.
Parameters: | details (bool) – A boolean indicating whether the detailed information for every driver should be returned. |
---|---|
Returns: | A generator of driver instances. |
openstack.baremetal.v1._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)chassis
(details=False, **query)Retrieve a generator of chassis.
Parameters: |
|
---|---|
Returns: | A generator of chassis instances. |
create_chassis
(**attrs)Create a new chassis from attributes.
Parameters: | attrs (dict) – Keyword arguments that will be used to create a
Chassis . |
---|---|
Returns: | The results of chassis creation. |
Return type: | Chassis . |
find_chassis
(name_or_id, ignore_missing=True)Find a single chassis.
Parameters: |
|
---|---|
Returns: | One |
get_chassis
(chassis, fields=None)Get a specific chassis.
Parameters: |
|
---|---|
Returns: | One |
Raises: |
|
update_chassis
(chassis, **attrs)Update a chassis.
Parameters: |
|
---|---|
Returns: | The updated chassis. |
Return type: |
patch_chassis
(chassis, patch)Apply a JSON patch to the chassis.
Parameters: |
|
---|---|
Returns: | The updated chassis. |
Return type: |
delete_chassis
(chassis, ignore_missing=True)Delete a chassis.
Parameters: |
|
---|---|
Returns: | The instance of the chassis which was deleted. |
Return type: |
openstack.baremetal.v1._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)attach_vif_to_node
(node, 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_from_node
(node, 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_node_vifs
(node)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: | node – The value can be either the name or ID of a node or
a Node instance. |
---|---|
Returns: | List of VIF IDs as strings. |
Raises: | NotSupported if the server
does not support the VIF API. |
openstack.baremetal.v1._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)allocations
(**query)Retrieve a generator of allocations.
Parameters: | query (dict) – Optional query parameters to be sent to restrict the allocation to be returned. Available parameters include:
|
---|---|
Returns: | A generator of allocation instances. |
create_allocation
(**attrs)Create a new allocation from attributes.
Parameters: | attrs (dict) – Keyword arguments that will be used to create a
Allocation . |
---|---|
Returns: | The results of allocation creation. |
Return type: | Allocation . |
get_allocation
(allocation, fields=None)Get a specific allocation.
Parameters: |
|
---|---|
Returns: | One |
Raises: |
|
update_allocation
(allocation, **attrs)Update an allocation.
Parameters: |
|
---|---|
Returns: | The updated allocation. |
Return type: |
patch_allocation
(allocation, patch)Apply a JSON patch to the allocation.
Parameters: |
|
---|---|
Returns: | The updated allocation. |
Return type: |
delete_allocation
(allocation, ignore_missing=True)Delete an allocation.
Parameters: |
|
---|---|
Returns: | The instance of the allocation which was deleted. |
Return type: |
wait_for_allocation
(allocation, timeout=None, ignore_error=False)Wait for the allocation to become active.
Parameters: |
|
---|---|
Returns: | The instance of the allocation. |
Return type: | |
Raises: |
|
Raises: |
|
openstack.baremetal.v1._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)volume_connectors
(details=False, **query)Retrieve a generator of volume_connector.
Parameters: |
|
---|---|
Returns: | A generator of volume_connector instances. |
create_volume_connector
(**attrs)Create a new volume_connector from attributes.
Parameters: | attrs (dict) – Keyword arguments that will be used to create a :class: ~openstack.baremetal.v1.volume_connector.VolumeConnector. |
---|---|
Returns: | The results of volume_connector creation. |
find_volume_connector
(vc_id, ignore_missing=True)Find a single volume connector.
Parameters: |
|
---|---|
Returns: | One :class: ~openstack.baremetal.v1.volumeconnector.VolumeConnector object or None. |
get_volume_connector
(volume_connector, fields=None)Get a specific volume_connector.
Parameters: |
|
---|---|
Returns: | One :class: ~openstack.baremetal.v1.volume_connector.VolumeConnector |
Raises: |
|
update_volume_connector
(volume_connector, **attrs)Update a volume_connector.
:param volume_connector:Either the ID of a volume_connector
or an instance of
:param dict attrs: The attributes to update on the
volume_connector represented by the
volume_connector
parameter.`
Returns: | The updated volume_connector. |
---|
patch_volume_connector
(volume_connector, patch)Apply a JSON patch to the volume_connector.
Parameters: |
|
---|---|
Returns: | The updated volume_connector. |
delete_volume_connector
(volume_connector, ignore_missing=True)Delete an volume_connector.
Parameters: |
|
---|---|
Returns: | The instance of the volume_connector which was deleted. |
openstack.baremetal.v1._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)volume_targets
(details=False, **query)Retrieve a generator of volume_target.
Parameters: |
|
---|---|
Returns: | A generator of volume_target instances. |
create_volume_target
(**attrs)Create a new volume_target from attributes.
Parameters: | attrs (dict) – Keyword arguments that will be used to create a :class: ~openstack.baremetal.v1.volume_target.VolumeTarget. |
---|---|
Returns: | The results of volume_target creation. |
find_volume_target
(vt_id, ignore_missing=True)Find a single volume target.
Parameters: |
|
---|---|
Returns: | One :class: ~openstack.baremetal.v1.volumetarget.VolumeTarget object or None. |
get_volume_target
(volume_target, fields=None)Get a specific volume_target.
Parameters: |
|
---|---|
Returns: | One :class: ~openstack.baremetal.v1.volume_target.VolumeTarget |
Raises: |
|
update_volume_target
(volume_target, **attrs)Update a volume_target.
:param volume_target:Either the ID of a volume_target
or an instance of
:param dict attrs: The attributes to update on the
volume_target represented by the
volume_target
parameter.`
Returns: | The updated volume_target. |
---|
patch_volume_target
(volume_target, patch)Apply a JSON patch to the volume_target.
Parameters: |
|
---|---|
Returns: | The updated volume_target. |
delete_volume_target
(volume_target, ignore_missing=True)Delete an volume_target.
Parameters: |
|
---|---|
Returns: | The instance of the volume_target which was deleted. |
openstack.baremetal.v1._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)deploy_templates
(details=False, **query)Retrieve a generator of deploy_templates.
Parameters: |
|
---|---|
Returns: | A generator of Deploy templates instances. |
create_deploy_template
(**attrs)Create a new deploy_template from attributes.
Parameters: | attrs (dict) – Keyword arguments that will be used to create a
DeployTemplate . |
---|---|
Returns: | The results of deploy_template creation. |
Return type: | DeployTemplate . |
update_deploy_template
(deploy_template, **attrs)Update a deploy_template.
Parameters: |
|
---|---|
Returns: | The updated deploy_template. |
delete_deploy_template
(deploy_template, ignore_missing=True)Delete a deploy_template.
DeployTemplate
Parameters: | ignore_missing (bool) – When set to False ,
an exception:class:~openstack.exceptions.ResourceNotFound
will be raised when the deploy_template
could not be found.
When set to True , no
exception will be raised when attempting
to delete a non-existent
deploy_template. |
---|---|
Returns: | The instance of the deploy_template which was deleted. |
get_deploy_template
(deploy_template, fields=None)Get a specific deployment template.
Parameters: |
|
---|---|
Returns: | One
|
Raises: |
|
patch_deploy_template
(deploy_template, patch)Apply a JSON patch to the deploy_templates.
Parameters: |
|
---|---|
Returns: | The updated deploy_template. |
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.