ironic.api.controllers.v1.node module¶
-
class
ironic.api.controllers.v1.node.
BootDeviceController
[source]¶ Bases:
pecan.rest.RestController
-
get
(node_ident)[source]¶ Get the current boot device for a node.
- Parameters
node_ident – the UUID or logical name of a node.
- Returns
a json object containing:
- boot_device
the boot device, one of
ironic.common.boot_devices
or None if it is unknown.- persistent
Whether the boot device will persist to all future boots or not, None if it is unknown.
-
put
(node_ident, boot_device, persistent=False)[source]¶ Set the boot device for a node.
Set the boot device to use on next reboot of the node.
- Parameters
node_ident – the UUID or logical name of a node.
boot_device – the boot device, one of
ironic.common.boot_devices
.persistent – Boolean value. True if the boot device will persist to all future boots, False if not. Default: False.
-
-
class
ironic.api.controllers.v1.node.
ConsoleInfo
(**kw)[source]¶ Bases:
ironic.api.controllers.base.Base
API representation of the console information for a node.
-
console_enabled
¶ The console state: if the console is enabled or not.
-
console_info
¶ The console information. It typically includes the url to access the console and the type of the application that hosts the console.
-
-
class
ironic.api.controllers.v1.node.
Indicator
(**kwargs)[source]¶ Bases:
ironic.api.controllers.base.APIBase
API representation of an indicator.
-
component
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
classmethod
convert_with_links
(node_uuid, rpc_component, rpc_name, **rpc_fields)[source]¶ Add links to the indicator.
-
created_at
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
links
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
name
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
readonly
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
states
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
updated_at
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
-
class
ironic.api.controllers.v1.node.
IndicatorController
[source]¶ Bases:
pecan.rest.RestController
-
get_all
(node_ident)[source]¶ Get node hardware components and their indicators.
- Parameters
node_ident – the UUID or logical name of a node.
- Returns
A json object of hardware components (
ironic.common.components
) as keys with indicator IDs (from get_supported_indicators) as values.
-
get_one
(node_ident, indicator)[source]¶ Get node hardware component indicator and its state.
- Parameters
node_ident – the UUID or logical name of a node.
indicator – Indicator ID (as reported by get_supported_indicators).
- Returns
a dict with the “state” key and one of mod:ironic.common.indicator_states as a value.
-
-
class
ironic.api.controllers.v1.node.
IndicatorState
(**kwargs)[source]¶ Bases:
ironic.api.controllers.base.APIBase
API representation of indicator state.
-
created_at
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
state
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
updated_at
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
-
class
ironic.api.controllers.v1.node.
IndicatorsCollection
(**kw)[source]¶ Bases:
wsme.types.Base
API representation of the indicators for a node.
-
indicators
¶ Node indicators list
-
-
class
ironic.api.controllers.v1.node.
InjectNmiController
[source]¶ Bases:
pecan.rest.RestController
-
put
(node_ident)[source]¶ Inject NMI for a node.
Inject NMI (Non Maskable Interrupt) for a node immediately.
- Parameters
node_ident – the UUID or logical name of a node.
- Raises
NotFound if requested version of the API doesn’t support inject nmi.
- Raises
HTTPForbidden if the policy is not authorized.
- Raises
NodeNotFound if the node is not found.
- Raises
NodeLocked if the node is locked by another conductor.
- Raises
UnsupportedDriverExtension if the node’s driver doesn’t support management or management.inject_nmi.
- Raises
InvalidParameterValue when the wrong driver info is specified or an invalid boot device is specified.
- Raises
MissingParameterValue if missing supplied info.
-
-
class
ironic.api.controllers.v1.node.
Node
(**kwargs)[source]¶ Bases:
ironic.api.controllers.base.APIBase
API representation of a bare metal node.
This class enforces type checking and value constraints, and converts between the internal object model and the API representation of a node.
-
allocation_uuid
¶ The UUID of the allocation this node belongs
-
automated_clean
¶ Indicates whether the node will perform automated clean or not.
-
bios_interface
¶ The bios interface to be used for this node
-
boot_interface
¶ The boot interface to be used for this node
-
property
chassis_uuid
¶ The UUID of the chassis this node belongs
-
clean_step
¶ The current clean step
-
conductor
¶ Represent the conductor currently serving the node
-
conductor_group
¶ The conductor group to manage this node
-
console_enabled
¶ Indicates whether the console access is enabled or disabled on the node.
-
console_interface
¶ The console interface to be used for this node
-
created_at
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
deploy_interface
¶ The deploy interface to be used for this node
-
deploy_step
¶ The current deploy step
-
description
¶ Field for node description
-
driver
¶ The driver responsible for controlling the node
-
driver_info
¶ This node’s driver configuration
-
driver_internal_info
¶ This driver’s internal configuration
-
extra
¶ This node’s meta data
-
fault
¶ Indicates the active fault of a node.
-
inspect_interface
¶ The inspect interface to be used for this node
-
inspection_finished_at
¶ The UTC date and time when the last hardware inspection finished successfully.
-
inspection_started_at
¶ The UTC date and time when the hardware inspection was started
-
instance_info
¶ This node’s instance info.
-
instance_uuid
¶ The UUID of the instance in nova-compute
-
last_error
¶ Any error from the most recent (last) asynchronous transaction that started but failed to finish.
-
lessee
¶ Field for storage of physical node lessee
-
links
¶ A list containing a self link and associated node links
-
maintenance
¶ Indicates whether the node is in maintenance mode.
-
maintenance_reason
¶ Indicates reason for putting a node in maintenance mode.
-
management_interface
¶ The management interface to be used for this node
-
name
¶ The logical name for this node
-
network_interface
¶ The network interface to be used for this node
-
owner
¶ Field for storage of physical node owner
-
portgroups
¶ Links to the collection of portgroups on this node
-
ports
¶ Links to the collection of ports on this node
-
power_interface
¶ The power interface to be used for this node
-
power_state
¶ Represent the current (not transition) power state of the node
-
properties
¶ The physical characteristics of this node
-
protected
¶ Indicates whether the node is protected from undeploying/rebuilding.
-
protected_reason
¶ Indicates reason for protecting the node.
-
provision_state
¶ Represent the current (not transition) provision state of the node
-
provision_updated_at
¶ The UTC date and time of the last provision state change
-
raid_config
¶ Represents the current RAID configuration of the node
-
raid_interface
¶ The raid interface to be used for this node
-
rescue_interface
¶ The rescue interface to be used for this node
-
reservation
¶ The hostname of the conductor that holds an exclusive lock on the node.
-
resource_class
¶ The resource class for the node, useful for classifying or grouping nodes. Used, for example, to classify nodes in Nova’s placement engine.
-
retired
¶ Indicates whether the node is marked for retirement.
-
retired_reason
¶ Indicates the reason for a node’s retirement.
-
sanitize
(fields)[source]¶ Removes sensitive and unrequested data.
Will only keep the fields specified in the
fields
parameter.- Parameters
fields (list of str) – list of fields to preserve, or
None
to preserve them all
-
states
¶ Links to endpoint for retrieving and setting node states
-
storage_interface
¶ The storage interface to be used for this node
-
target_power_state
¶ The user modified desired power state of the node.
-
target_provision_state
¶ The user modified desired provision state of the node.
-
target_raid_config
¶ The user modified RAID configuration of the node
-
traits
¶ The traits associated with this node
-
updated_at
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
uuid
¶ Unique UUID for this node
-
vendor_interface
¶ The vendor interface to be used for this node
-
volume
¶ Links to endpoint for retrieving volume resources on this node
-
-
class
ironic.api.controllers.v1.node.
NodeCollection
(**kwargs)[source]¶ Bases:
ironic.api.controllers.v1.collection.Collection
API representation of a collection of nodes.
-
next
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
nodes
¶ A list containing nodes objects
-
-
class
ironic.api.controllers.v1.node.
NodeConsoleController
[source]¶ Bases:
pecan.rest.RestController
-
class
ironic.api.controllers.v1.node.
NodeMaintenanceController
[source]¶ Bases:
pecan.rest.RestController
-
class
ironic.api.controllers.v1.node.
NodeManagementController
[source]¶ Bases:
pecan.rest.RestController
-
boot_device
= <ironic.api.controllers.v1.node.BootDeviceController object>¶ Expose boot_device as a sub-element of management
-
indicators
= <ironic.api.controllers.v1.node.IndicatorController object>¶ Expose indicators as a sub-element of management
-
inject_nmi
= <ironic.api.controllers.v1.node.InjectNmiController object>¶ Expose inject_nmi as a sub-element of management
-
-
class
ironic.api.controllers.v1.node.
NodePatchType
(**kw)[source]¶ Bases:
ironic.api.controllers.v1.types.JsonPatchType
-
static
internal_attrs
()[source]¶ Returns a list of internal attributes.
Internal attributes can’t be added, replaced or removed. This method may be overwritten by derived class.
-
op
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
path
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
value
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
static
-
class
ironic.api.controllers.v1.node.
NodeStates
(**kw)[source]¶ Bases:
ironic.api.controllers.base.APIBase
API representation of the states of a node.
-
console_enabled
¶ Indicates whether the console access is enabled or disabled on the node.
-
created_at
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
last_error
¶ Any error from the most recent (last) asynchronous transaction that started but failed to finish.
-
power_state
¶ Represent the current (not transition) power state of the node
-
provision_state
¶ Represent the current (not transition) provision state of the node
-
provision_updated_at
¶ The UTC date and time of the last provision state change
-
raid_config
¶ Represents the RAID configuration that the node is configured with.
-
target_power_state
¶ The user modified desired power state of the node.
-
target_provision_state
¶ The user modified desired provision state of the node.
-
target_raid_config
¶ The desired RAID configuration, to be used the next time the node is configured.
-
updated_at
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
-
class
ironic.api.controllers.v1.node.
NodeStatesController
[source]¶ Bases:
pecan.rest.RestController
-
console
= <ironic.api.controllers.v1.node.NodeConsoleController object>¶ Expose console as a sub-element of states
-
get
(node_ident)[source]¶ List the states of the node.
- Parameters
node_ident – the UUID or logical_name of a node.
-
power
(node_ident, target, timeout=None)[source]¶ Set the power state of the node.
- Parameters
node_ident – the UUID or logical name of a node.
target – The desired power state of the node.
timeout – timeout (in seconds) positive integer (> 0) for any power state.
None
indicates to use default timeout.
- Raises
ClientSideError (HTTP 409) if a power operation is already in progress.
- Raises
InvalidStateRequested (HTTP 400) if the requested target state is not valid or if the node is in CLEANING state.
- Raises
NotAcceptable (HTTP 406) for soft reboot, soft power off or timeout parameter, if requested version of the API is less than 1.27.
- Raises
Invalid (HTTP 400) if timeout value is less than 1.
-
provision
(node_ident, target, configdrive=None, clean_steps=None, rescue_password=None)[source]¶ Asynchronous trigger the provisioning of the node.
This will set the target provision state of the node, and a background task will begin which actually applies the state change. This call will return a 202 (Accepted) indicating the request was accepted and is in progress; the client should continue to GET the status of this node to observe the status of the requested action.
- Parameters
node_ident – UUID or logical name of a node.
target – The desired provision state of the node or verb.
configdrive – Optional. A gzipped and base64 encoded configdrive or a dict to build a configdrive from. Only valid when setting provision state to “active” or “rebuild”.
clean_steps –
An ordered list of cleaning steps that will be performed on the node. A cleaning step is a dictionary with required keys ‘interface’ and ‘step’, and optional key ‘args’. If specified, the value for ‘args’ is a keyword variable argument dictionary that is passed to the cleaning step method.:
{ 'interface': <driver_interface>, 'step': <name_of_clean_step>, 'args': {<arg1>: <value1>, ..., <argn>: <valuen>} }
For example (this isn’t a real example, this cleaning step doesn’t exist):
{ 'interface': 'deploy', 'step': 'upgrade_firmware', 'args': {'force': True} }
This is required (and only valid) when target is “clean”.
rescue_password – A string representing the password to be set inside the rescue environment. This is required (and only valid), when target is “rescue”.
- Raises
NodeLocked (HTTP 409) if the node is currently locked.
- Raises
ClientSideError (HTTP 409) if the node is already being provisioned.
- Raises
InvalidParameterValue (HTTP 400), if validation of clean_steps or power driver interface fails.
- Raises
InvalidStateRequested (HTTP 400) if the requested transition is not possible from the current state.
- Raises
NodeInMaintenance (HTTP 400), if operation cannot be performed because the node is in maintenance mode.
- Raises
NoFreeConductorWorker (HTTP 503) if no workers are available.
- Raises
NotAcceptable (HTTP 406) if the API version specified does not allow the requested state transition.
-
raid
(node_ident, target_raid_config)[source]¶ Set the target raid config of the node.
- Parameters
node_ident – the UUID or logical name of a node.
target_raid_config – Desired target RAID configuration of the node. It may be an empty dictionary as well.
- Raises
UnsupportedDriverExtension, if the node’s driver doesn’t support RAID configuration.
- Raises
InvalidParameterValue, if validation of target raid config fails.
- Raises
NotAcceptable, if requested version of the API is less than 1.12.
-
-
class
ironic.api.controllers.v1.node.
NodeTraitsController
(node_ident)[source]¶ Bases:
pecan.rest.RestController
-
delete
(trait=None)[source]¶ Remove one or all traits from a node.
- Parameters
trait – String value; trait to remove from a node, or None. If None, all traits are removed.
-
put
(trait=None, traits=None)[source]¶ Add a trait to a node.
- Parameters
trait – String value; trait to add to a node, or None. Mutually exclusive with ‘traits’. If not None, adds this trait to the node.
traits – List of Strings; traits to set for a node, or None. Mutually exclusive with ‘trait’. If not None, replaces the node’s traits with this list.
-
-
class
ironic.api.controllers.v1.node.
NodeVIFController
(node_ident)[source]¶ Bases:
pecan.rest.RestController
-
class
ironic.api.controllers.v1.node.
NodeVendorPassthruController
[source]¶ Bases:
pecan.rest.RestController
REST controller for VendorPassthru.
This controller allow vendors to expose a custom functionality in the Ironic API. Ironic will merely relay the message from here to the appropriate driver, no introspection will be made in the message body.
-
class
ironic.api.controllers.v1.node.
NodesController
[source]¶ Bases:
pecan.rest.RestController
REST controller for Nodes.
-
detail
(chassis_uuid=None, instance_uuid=None, associated=None, maintenance=None, retired=None, provision_state=None, marker=None, limit=None, sort_key='id', sort_dir='asc', driver=None, resource_class=None, fault=None, conductor_group=None, conductor=None, owner=None, description_contains=None, lessee=None, project=None)[source]¶ Retrieve a list of nodes with detail.
- Parameters
chassis_uuid – Optional UUID of a chassis, to get only nodes for that chassis.
instance_uuid – Optional UUID of an instance, to find the node associated with that instance.
associated – Optional boolean whether to return a list of associated or unassociated nodes. May be combined with other parameters.
maintenance – Optional boolean value that indicates whether to get nodes in maintenance mode (“True”), or not in maintenance mode (“False”).
retired – Optional boolean value that indicates whether to get nodes which are retired.
provision_state – Optional string value to get only nodes in that provision state.
marker – pagination marker for large data sets.
limit – maximum number of resources to return in a single result. This value cannot be larger than the value of max_limit in the [api] section of the ironic configuration, or only max_limit resources will be returned.
sort_key – column to sort results by. Default: id.
sort_dir – direction to sort. “asc” or “desc”. Default: asc.
driver – Optional string value to get only nodes using that driver.
resource_class – Optional string value to get only nodes with that resource_class.
fault – Optional string value to get only nodes with that fault.
conductor_group – Optional string value to get only nodes with that conductor_group.
owner – Optional string value that set the owner whose nodes are to be retrurned.
lessee – Optional string value that set the lessee whose nodes are to be returned.
project – Optional string value that set the project - lessee or owner - whose nodes are to be returned.
description_contains – Optional string value to get only nodes with description field contains matching value.
-
from_chassis
= False¶ A flag to indicate if the requests to this controller are coming from the top-level resource Chassis
-
get_all
(chassis_uuid=None, instance_uuid=None, associated=None, maintenance=None, retired=None, provision_state=None, marker=None, limit=None, sort_key='id', sort_dir='asc', driver=None, fields=None, resource_class=None, fault=None, conductor_group=None, detail=None, conductor=None, owner=None, description_contains=None, lessee=None, project=None)[source]¶ Retrieve a list of nodes.
- Parameters
chassis_uuid – Optional UUID of a chassis, to get only nodes for that chassis.
instance_uuid – Optional UUID of an instance, to find the node associated with that instance.
associated – Optional boolean whether to return a list of associated or unassociated nodes. May be combined with other parameters.
maintenance – Optional boolean value that indicates whether to get nodes in maintenance mode (“True”), or not in maintenance mode (“False”).
retired – Optional boolean value that indicates whether to get retired nodes.
provision_state – Optional string value to get only nodes in that provision state.
marker – pagination marker for large data sets.
limit – maximum number of resources to return in a single result. This value cannot be larger than the value of max_limit in the [api] section of the ironic configuration, or only max_limit resources will be returned.
sort_key – column to sort results by. Default: id.
sort_dir – direction to sort. “asc” or “desc”. Default: asc.
driver – Optional string value to get only nodes using that driver.
resource_class – Optional string value to get only nodes with that resource_class.
conductor_group – Optional string value to get only nodes with that conductor_group.
conductor – Optional string value to get only nodes managed by that conductor.
owner – Optional string value that set the owner whose nodes are to be retrurned.
lessee – Optional string value that set the lessee whose nodes are to be returned.
project – Optional string value that set the project - lessee or owner - whose nodes are to be returned.
fields – Optional, a list with a specified set of fields of the resource to be returned.
fault – Optional string value to get only nodes with that fault.
description_contains – Optional string value to get only nodes with description field contains matching value.
-
get_one
(node_ident, fields=None)[source]¶ Retrieve information about the given node.
- Parameters
node_ident – UUID or logical name of a node.
fields – Optional, a list with a specified set of fields of the resource to be returned.
-
invalid_sort_key_list
= ['properties', 'driver_info', 'extra', 'instance_info', 'driver_internal_info', 'clean_step', 'deploy_step', 'raid_config', 'target_raid_config', 'traits']¶
-
maintenance
= <ironic.api.controllers.v1.node.NodeMaintenanceController object>¶ Expose maintenance as a sub-element of nodes
-
management
= <ironic.api.controllers.v1.node.NodeManagementController object>¶ Expose management as a sub-element of nodes
-
patch
(node_ident, reset_interfaces=None, patch=None)[source]¶ Update an existing node.
- Parameters
node_ident – UUID or logical name of a node.
reset_interfaces – whether to reset hardware interfaces to their defaults. Only valid when updating the driver field.
patch – a json PATCH document to apply to this node.
-
states
= <ironic.api.controllers.v1.node.NodeStatesController object>¶ Expose the state controller action as a sub-element of nodes
-
validate
(node=None, node_uuid=None)[source]¶ Validate the driver interfaces, using the node’s UUID or name.
Note that the ‘node_uuid’ interface is deprecated in favour of the ‘node’ interface
- Parameters
node – UUID or name of a node.
node_uuid – UUID of a node.
-
vendor_passthru
= <ironic.api.controllers.v1.node.NodeVendorPassthruController object>¶ A resource used for vendors to expose a custom functionality in the API
-
-
class
ironic.api.controllers.v1.node.
Traits
(**kw)[source]¶ Bases:
ironic.api.controllers.base.APIBase
API representation of the traits for a node.
-
created_at
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
traits
¶ node traits
-
updated_at
¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
-
class
ironic.api.controllers.v1.node.
VifCollection
(**kw)[source]¶ Bases:
ironic.api.controllers.base.Base
API representation of a collection of VIFs.
-
vifs
¶ A list containing VIFs objects
-
-
ironic.api.controllers.v1.node.
hide_fields_in_newer_versions
(obj)[source]¶ This method hides fields that were added in newer API versions.
Certain node fields were introduced at certain API versions. These fields are only made available when the request’s API version matches or exceeds the versions when these fields were introduced.