Client side of the conductor RPC API.
ironic.conductor.rpcapi.
ConductorAPI
(topic=None)[source]¶Bases: object
Client side of the conductor RPC API.
API version history:
RPC_API_VERSION
= '1.52'¶add_node_traits
(context, node_id, traits, replace=False, topic=None)[source]¶Add or replace traits for a node.
context – request context.
node_id – node ID or UUID.
traits – a list of traits to add to the node.
replace – True to replace all of the node’s traits.
topic – RPC topic. Defaults to self.topic.
InvalidParameterValue if adding the traits would exceed the per-node traits limit.
NodeLocked if node is locked by another conductor.
NodeNotFound if the node does not exist.
change_node_power_state
(context, node_id, new_state, topic=None, timeout=None)[source]¶Change a node’s power state.
Synchronously, acquire lock and start the conductor background task to change power state of a node.
context – request context.
node_id – node id or uuid.
new_state – one of ironic.common.states power state values
timeout – timeout (in seconds) positive integer (> 0) for any
power state. None
indicates to use default timeout.
topic – RPC topic. Defaults to self.topic.
NoFreeConductorWorker when there is no free worker to start async task.
continue_node_clean
(context, node_id, topic=None)[source]¶Signal to conductor service to start the next cleaning action.
NOTE(JoshNang) this is an RPC cast, there will be no response or exception raised by the conductor for this RPC.
context – request context.
node_id – node id or uuid.
topic – RPC topic. Defaults to self.topic.
continue_node_deploy
(context, node_id, topic=None)[source]¶Signal to conductor service to start the next deployment action.
NOTE(rloo): this is an RPC cast, there will be no response or exception raised by the conductor for this RPC.
context – request context.
node_id – node id or uuid.
topic – RPC topic. Defaults to self.topic.
create_allocation
(context, allocation, topic=None)[source]¶Create an allocation.
context – request context.
allocation – an allocation object.
topic – RPC topic. Defaults to self.topic.
create_node
(context, node_obj, topic=None)[source]¶Synchronously, have a conductor validate and create a node.
Create the node’s information in the database and return a node object.
context – request context.
node_obj – a created (but not saved) node object.
topic – RPC topic. Defaults to self.topic.
created node object.
InterfaceNotFoundInEntrypoint if validation fails for any dynamic interfaces (e.g. network_interface).
NoValidDefaultForInterface if no default can be calculated for some interfaces, and explicit values must be provided.
create_port
(context, port_obj, topic=None)[source]¶Synchronously, have a conductor validate and create a port.
Create the port’s information in the database and return a port object. The conductor will lock related node and trigger specific driver actions if they are needed.
context – request context.
port_obj – a created (but not saved) port object.
topic – RPC topic. Defaults to self.topic.
created port object.
destroy_allocation
(context, allocation, topic=None)[source]¶Delete an allocation.
context – request context.
allocation – an allocation object.
topic – RPC topic. Defaults to self.topic.
InvalidState if the associated node is in the wrong provision state to perform deallocation.
destroy_node
(context, node_id, topic=None)[source]¶Delete a node.
context – request context.
node_id – node id or uuid.
topic – RPC topic. Defaults to self.topic.
NodeLocked if node is locked by another conductor.
NodeAssociated if the node contains an instance associated with it.
InvalidState if the node is in the wrong provision state to perform deletion.
destroy_port
(context, port, topic=None)[source]¶Delete a port.
context – request context.
port – port object
topic – RPC topic. Defaults to self.topic.
NodeLocked if node is locked by another conductor.
NodeNotFound if the node associated with the port does not exist.
destroy_portgroup
(context, portgroup, topic=None)[source]¶Delete a portgroup.
context – request context.
portgroup – portgroup object
topic – RPC topic. Defaults to self.topic.
NodeLocked if node is locked by another conductor.
NodeNotFound if the node associated with the portgroup does not exist.
PortgroupNotEmpty if portgroup is not empty
destroy_volume_connector
(context, connector, topic=None)[source]¶Delete a volume connector.
Delete the volume connector. The conductor will lock the related node during this operation.
context – request context
connector – volume connector object
topic – RPC topic. Defaults to self.topic.
NodeLocked if node is locked by another conductor
NodeNotFound if the node associated with the connector does not exist
VolumeConnectorNotFound if the volume connector cannot be found
destroy_volume_target
(context, target, topic=None)[source]¶Delete a volume target.
context – request context
target – volume target object
topic – RPC topic. Defaults to self.topic.
NodeLocked if node is locked by another conductor
NodeNotFound if the node associated with the target does not exist
VolumeTargetNotFound if the volume target cannot be found
do_node_clean
(context, node_id, clean_steps, topic=None)[source]¶Signal to conductor service to perform manual cleaning on a node.
context – request context.
node_id – node ID or UUID.
clean_steps – a list of clean step dictionaries.
topic – RPC topic. Defaults to self.topic.
InvalidParameterValue if validation of power driver interface failed.
InvalidStateRequested if cleaning can not be performed.
NodeInMaintenance if node is in maintenance mode.
NodeLocked if node is locked by another conductor.
NoFreeConductorWorker when there is no free worker to start async task.
do_node_deploy
(context, node_id, rebuild, configdrive, topic=None, deploy_steps=None)[source]¶Signal to conductor service to perform a deployment.
context – request context.
node_id – node id or uuid.
rebuild – True if this is a rebuild request.
configdrive – A gzipped and base64 encoded configdrive.
topic – RPC topic. Defaults to self.topic.
deploy_steps – Deploy steps
InstanceDeployFailure
InvalidParameterValue if validation fails
MissingParameterValue if a required parameter is missing
NoFreeConductorWorker when there is no free worker to start async task.
The node must already be configured and in the appropriate undeployed state before this method is called.
do_node_rescue
(context, node_id, rescue_password, topic=None)[source]¶Signal to conductor service to perform a rescue.
context – request context.
node_id – node ID or UUID.
rescue_password – A string representing the password to be set inside the rescue environment.
topic – RPC topic. Defaults to self.topic.
InstanceRescueFailure
NoFreeConductorWorker when there is no free worker to start async task.
The node must already be configured and in the appropriate state before this method is called.
do_node_tear_down
(context, node_id, topic=None)[source]¶Signal to conductor service to tear down a deployment.
context – request context.
node_id – node id or uuid.
topic – RPC topic. Defaults to self.topic.
InstanceDeployFailure
InvalidParameterValue if validation fails
MissingParameterValue if a required parameter is missing
NoFreeConductorWorker when there is no free worker to start async task.
The node must already be configured and in the appropriate deployed state before this method is called.
do_node_unrescue
(context, node_id, topic=None)[source]¶Signal to conductor service to perform an unrescue.
context – request context.
node_id – node ID or UUID.
topic – RPC topic. Defaults to self.topic.
InstanceUnrescueFailure
NoFreeConductorWorker when there is no free worker to start async task.
The node must already be configured and in the appropriate state before this method is called.
do_provisioning_action
(context, node_id, action, topic=None)[source]¶Signal to conductor service to perform the given action on a node.
context – request context.
node_id – node id or uuid.
action – an action. One of ironic.common.states.VERBS
topic – RPC topic. Defaults to self.topic.
InvalidParameterValue
NoFreeConductorWorker when there is no free worker to start async task.
InvalidStateRequested if the requested action can not be performed.
This encapsulates some provisioning actions in a single call.
driver_vendor_passthru
(context, driver_name, driver_method, http_method, info, topic=None)[source]¶Pass vendor-specific calls which don’t specify a node to a driver.
Handles driver-level vendor passthru calls. These calls don’t require a node UUID and are executed on a random conductor with the specified driver. If the method mode is async the conductor will start background worker to perform vendor action.
context – request context.
driver_name – name of the driver on which to call the method.
driver_method – name of the vendor method, for use by the driver.
http_method – the HTTP method used for the request.
info – data to pass through to the driver.
topic – RPC topic. Defaults to self.topic.
InvalidParameterValue for parameter errors.
MissingParameterValue if a required parameter is missing
UnsupportedDriverExtension if the driver doesn’t have a vendor interface, or if the vendor interface does not support the specified driver_method.
DriverNotFound if the supplied driver is not loaded.
NoFreeConductorWorker when there is no free worker to start async task.
InterfaceNotFoundInEntrypoint if the default interface for a hardware type is invalid.
NoValidDefaultForInterface if no default interface implementation can be found for this driver’s vendor interface.
A dictionary containing:
The response of the invoked vendor method
Boolean value. Whether the method was invoked asynchronously (True) or synchronously (False). When invoked asynchronously the response will be always None.
Boolean value. Whether to attach the response of the invoked vendor method to the HTTP response object (True) or return it in the response body (False).
get_boot_device
(context, node_id, topic=None)[source]¶Get the current boot device.
Returns the current boot device of a node.
context – request context.
node_id – node id or uuid.
topic – RPC topic. Defaults to self.topic.
NodeLocked if node is locked by another conductor.
UnsupportedDriverExtension if the node’s driver doesn’t support management.
InvalidParameterValue when the wrong driver info is specified.
MissingParameterValue if missing supplied info.
a dictionary containing:
the boot device, one of
ironic.common.boot_devices
or None if it is unknown.
Whether the boot device will persist to all future boots or not, None if it is unknown.
get_conductor_for
(node)[source]¶Get the conductor which the node is mapped to.
node – a node object.
the conductor hostname.
NoValidHost
get_console_information
(context, node_id, topic=None)[source]¶Get connection information about the console.
context – request context.
node_id – node id or uuid.
topic – RPC topic. Defaults to self.topic.
UnsupportedDriverExtension if the node’s driver doesn’t support console.
InvalidParameterValue when the wrong driver info is specified.
MissingParameterValue if a required parameter is missing
get_driver_properties
(context, driver_name, topic=None)[source]¶Get the properties of the driver.
context – request context.
driver_name – name of the driver.
topic – RPC topic. Defaults to self.topic.
a dictionary with <property name>:<property description> entries.
DriverNotFound.
get_driver_vendor_passthru_methods
(context, driver_name, topic=None)[source]¶Retrieve information about vendor methods of the given driver.
context – an admin context.
driver_name – name of the driver.
topic – RPC topic. Defaults to self.topic.
UnsupportedDriverExtension if current driver does not have vendor interface.
DriverNotFound if the supplied driver is not loaded.
InterfaceNotFoundInEntrypoint if the default interface for a hardware type is invalid.
NoValidDefaultForInterface if no default interface implementation can be found for this driver’s vendor interface.
dictionary of <method name>:<method metadata> entries.
get_indicator_state
(context, node_id, component, indicator, topic=None)[source]¶Get node hardware component indicator state.
context – request context.
node_id – node id or uuid.
component – The hardware component, one of
ironic.common.components
.
indicator – Indicator IDs, as reported by get_supported_indicators)
topic – RPC topic. Defaults to self.topic.
NodeLocked if node is locked by another conductor.
UnsupportedDriverExtension if the node’s driver doesn’t support management.
InvalidParameterValue when the wrong driver info is specified.
MissingParameterValue if missing supplied info.
Indicator state, one of mod:ironic.common.indicator_states.
get_node_vendor_passthru_methods
(context, node_id, topic=None)[source]¶Retrieve information about vendor methods of the given node.
context – an admin context.
node_id – the id or uuid of a node.
topic – RPC topic. Defaults to self.topic.
dictionary of <method name>:<method metadata> entries.
get_node_with_token
(context, node_id, topic=None)[source]¶Request the node from the conductor with an agent token
context – request context.
node_id – node ID or UUID.
topic – RPC topic. Defaults to self.topic.
NodeLocked if node is locked by another conductor.
A Node object with agent token.
get_raid_logical_disk_properties
(context, driver_name, topic=None)[source]¶Get the logical disk properties for RAID configuration.
Gets the information about logical disk properties which can be specified in the input RAID configuration.
context – request context.
driver_name – name of the driver
topic – RPC topic. Defaults to self.topic.
UnsupportedDriverExtension if the driver doesn’t support RAID configuration.
InterfaceNotFoundInEntrypoint if the default interface for a hardware type is invalid.
NoValidDefaultForInterface if no default interface implementation can be found for this driver’s RAID interface.
A dictionary containing the properties that can be mentioned for logical disks and a textual description for them.
get_supported_boot_devices
(context, node_id, topic=None)[source]¶Get the list of supported devices.
Returns the list of supported boot devices of a node.
context – request context.
node_id – node id or uuid.
topic – RPC topic. Defaults to self.topic.
NodeLocked if node is locked by another conductor.
UnsupportedDriverExtension if the node’s driver doesn’t support management.
InvalidParameterValue when the wrong driver info is specified.
MissingParameterValue if missing supplied info.
A list with the supported boot devices defined
in ironic.common.boot_devices
.
get_supported_indicators
(context, node_id, component=None, topic=None)[source]¶Get node hardware components and their indicators.
context – request context.
node_id – node id or uuid.
component – The hardware component, one of
ironic.common.components
.
topic – RPC topic. Defaults to self.topic.
NodeLocked if node is locked by another conductor.
UnsupportedDriverExtension if the node’s driver doesn’t support management.
InvalidParameterValue when the wrong driver info is specified.
MissingParameterValue if missing supplied info.
A dictionary of hardware components
(ironic.common.components
) as keys with indicator IDs
as values.
{ 'chassis': ['enclosure-0'], 'system': ['blade-A'] 'drive': ['ssd0'] }
get_topic_for
(node)[source]¶Get the RPC topic for the conductor service the node is mapped to.
node – a node object.
an RPC topic string.
NoValidHost
get_topic_for_driver
(driver_name)[source]¶Get RPC topic name for a conductor supporting the given driver.
The topic is used to route messages to the conductor supporting the specified driver. A conductor is selected at random from the set of qualified conductors.
driver_name – the name of the driver to route to.
an RPC topic string.
DriverNotFound
heartbeat
(context, node_id, callback_url, agent_version, agent_token=None, agent_verify_ca=None, topic=None)[source]¶Process a node heartbeat.
context – request context.
node_id – node ID or UUID.
callback_url – URL to reach back to the ramdisk.
topic – RPC topic. Defaults to self.topic.
agent_token – randomly generated validation token.
agent_version – the version of the agent that is heartbeating
agent_verify_ca – TLS certificate for the agent.
InvalidParameterValue if an invalid agent token is received.
inject_nmi
(context, node_id, topic=None)[source]¶Inject NMI for a node.
Inject NMI (Non Maskable Interrupt) for a node immediately. Be aware that not all drivers support this.
context – request context.
node_id – node id or uuid.
topic – RPC topic. Defaults to self.topic.
NodeLocked if node is locked by another conductor.
UnsupportedDriverExtension if the node’s driver doesn’t support management or management.inject_nmi.
InvalidParameterValue when the wrong driver info is specified or an invalid boot device is specified.
MissingParameterValue if missing supplied info.
inspect_hardware
(context, node_id, topic=None)[source]¶Signals the conductor service to perform hardware introspection.
context – request context.
node_id – node id or uuid.
topic – RPC topic. Defaults to self.topic.
NodeLocked if node is locked by another conductor.
HardwareInspectionFailure
NoFreeConductorWorker when there is no free worker to start async task.
UnsupportedDriverExtension if the node’s driver doesn’t support inspection.
InvalidStateRequested if ‘inspect’ is not a valid action to do in the current state.
object_action
(context, objinst, objmethod, args, kwargs)[source]¶Perform an action on a VersionedObject instance.
We want any conductor to handle this, so it is intentional that there is no topic argument for this method.
context – The context within which to perform the action
objinst – The object instance on which to perform the action
objmethod – The name of the action method to call
args – The positional arguments to the action method
kwargs – The keyword arguments to the action method
NotImplementedError when an operator makes an error during upgrade
A tuple with the updates made to the object and the result of the action method
object_backport_versions
(context, objinst, object_versions)[source]¶Perform a backport of an object instance.
The default behavior of the base VersionedObjectSerializer, upon receiving an object with a version newer than what is in the local registry, is to call this method to request a backport of the object.
We want any conductor to handle this, so it is intentional that there is no topic argument for this method.
context – The context within which to perform the backport
objinst – An instance of a VersionedObject to be backported
object_versions – A dict of {objname: version} mappings
NotImplementedError when an operator makes an error during upgrade
The downgraded instance of objinst
object_class_action_versions
(context, objname, objmethod, object_versions, args, kwargs)[source]¶Perform an action on a VersionedObject class.
We want any conductor to handle this, so it is intentional that there is no topic argument for this method.
context – The context within which to perform the action
objname – The registry name of the object
objmethod – The name of the action method to call
object_versions – A dict of {objname: version} mappings
args – The positional arguments to the action method
kwargs – The keyword arguments to the action method
NotImplementedError when an operator makes an error during upgrade
The result of the action method, which may (or may not) be an instance of the implementing VersionedObject class.
remove_node_traits
(context, node_id, traits, topic=None)[source]¶Remove some or all traits from a node.
context – request context.
node_id – node ID or UUID.
traits – a list of traits to remove from the node, or None. If None, all traits will be removed from the node.
topic – RPC topic. Defaults to self.topic.
NodeLocked if node is locked by another conductor.
NodeNotFound if the node does not exist.
NodeTraitNotFound if one of the traits is not found.
set_boot_device
(context, node_id, device, persistent=False, topic=None)[source]¶Set the boot device for a node.
Set the boot device to use on next reboot of the node. Be aware that not all drivers support this.
context – request context.
node_id – node id or uuid.
device – the boot device, one of
ironic.common.boot_devices
.
persistent – Whether to set next-boot, or make the change permanent. Default: False.
topic – RPC topic. Defaults to self.topic.
NodeLocked if node is locked by another conductor.
UnsupportedDriverExtension if the node’s driver doesn’t support management.
InvalidParameterValue when the wrong driver info is specified or an invalid boot device is specified.
MissingParameterValue if missing supplied info.
set_console_mode
(context, node_id, enabled, topic=None)[source]¶Enable/Disable the console.
context – request context.
node_id – node id or uuid.
topic – RPC topic. Defaults to self.topic.
enabled – Boolean value; whether the console is enabled or disabled.
UnsupportedDriverExtension if the node’s driver doesn’t support console.
InvalidParameterValue when the wrong driver info is specified.
MissingParameterValue if a required parameter is missing
NoFreeConductorWorker when there is no free worker to start async task.
set_indicator_state
(context, node_id, component, indicator, state, topic=None)[source]¶Set node hardware components indicator to the desired state.
context – request context.
node_id – node id or uuid.
component – The hardware component, one of
ironic.common.components
.
indicator – Indicator IDs, as reported by get_supported_indicators)
state – Indicator state, one of mod:ironic.common.indicator_states.
topic – RPC topic. Defaults to self.topic.
NodeLocked if node is locked by another conductor.
UnsupportedDriverExtension if the node’s driver doesn’t support management.
InvalidParameterValue when the wrong driver info is specified or an invalid boot device is specified.
MissingParameterValue if missing supplied info.
set_target_raid_config
(context, node_id, target_raid_config, topic=None)[source]¶Stores the target RAID configuration on the node.
Stores the target RAID configuration on node.target_raid_config
context – request context.
node_id – node id or uuid.
target_raid_config – Dictionary containing the target RAID configuration. It may be an empty dictionary as well.
topic – RPC topic. Defaults to self.topic.
UnsupportedDriverExtension if the node’s driver doesn’t support RAID configuration.
InvalidParameterValue, if validation of target raid config fails.
MissingParameterValue, if some required parameters are missing.
NodeLocked if node is locked by another conductor.
update_node
(context, node_obj, topic=None, reset_interfaces=False)[source]¶Synchronously, have a conductor update the node’s information.
Update the node’s information in the database and return a node object. The conductor will lock the node while it validates the supplied information. If driver_info is passed, it will be validated by the core drivers. If instance_uuid is passed, it will be set or unset only if the node is properly configured.
Note that power_state should not be passed via this method. Use change_node_power_state for initiating driver actions.
context – request context.
node_obj – a changed (but not saved) node object.
topic – RPC topic. Defaults to self.topic.
reset_interfaces – whether to reset hardware interfaces to their defaults.
updated node object, including all fields.
NoValidDefaultForInterface if no default can be calculated for some interfaces, and explicit values must be provided.
update_port
(context, port_obj, topic=None)[source]¶Synchronously, have a conductor update the port’s information.
Update the port’s information in the database and return a port object. The conductor will lock related node and trigger specific driver actions if they are needed.
context – request context.
port_obj – a changed (but not saved) port object.
topic – RPC topic. Defaults to self.topic.
updated port object, including all fields.
update_portgroup
(context, portgroup_obj, topic=None)[source]¶Synchronously, have a conductor update the portgroup’s information.
Update the portgroup’s information in the database and return a portgroup object. The conductor will lock related node and trigger specific driver actions if they are needed.
context – request context.
portgroup_obj – a changed (but not saved) portgroup object.
topic – RPC topic. Defaults to self.topic.
updated portgroup object, including all fields.
update_volume_connector
(context, connector, topic=None)[source]¶Update the volume connector’s information.
Update the volume connector’s information in the database and return a volume connector object. The conductor will lock the related node during this operation.
context – request context
connector – a changed (but not saved) volume connector object
topic – RPC topic. Defaults to self.topic.
InvalidParameterValue if the volume connector’s UUID is being changed
NodeLocked if node is locked by another conductor
NodeNotFound if the node associated with the connector does not exist
VolumeConnectorNotFound if the volume connector cannot be found
VolumeConnectorTypeAndIdAlreadyExists if another connector already exists with the same values for type and connector_id fields
updated volume connector object, including all fields.
update_volume_target
(context, target, topic=None)[source]¶Update the volume target’s information.
Update the volume target’s information in the database and return a volume target object. The conductor will lock the related node during this operation.
context – request context
target – a changed (but not saved) volume target object
topic – RPC topic. Defaults to self.topic.
InvalidParameterValue if the volume target’s UUID is being changed
NodeLocked if the node is already locked
NodeNotFound if the node associated with the volume target does not exist
VolumeTargetNotFound if the volume target cannot be found
VolumeTargetBootIndexAlreadyExists if a volume target already exists with the same node ID and boot index values
updated volume target object, including all fields
validate_driver_interfaces
(context, node_id, topic=None)[source]¶Validate the core and standardized interfaces for drivers.
context – request context.
node_id – node id or uuid.
topic – RPC topic. Defaults to self.topic.
a dictionary containing the results of each interface validation.
vendor_passthru
(context, node_id, driver_method, http_method, info, topic=None)[source]¶Receive requests for vendor-specific actions.
Synchronously validate driver specific info or get driver status, and if successful invokes the vendor method. If the method mode is async the conductor will start background worker to perform vendor action.
context – request context.
node_id – node id or uuid.
driver_method – name of method for driver.
http_method – the HTTP method used for the request.
info – info for node driver.
topic – RPC topic. Defaults to self.topic.
InvalidParameterValue if supplied info is not valid.
MissingParameterValue if a required parameter is missing
UnsupportedDriverExtension if current driver does not have vendor interface.
NoFreeConductorWorker when there is no free worker to start async task.
NodeLocked if node is locked by another conductor.
A dictionary containing:
The response of the invoked vendor method
Boolean value. Whether the method was invoked asynchronously (True) or synchronously (False). When invoked asynchronously the response will be always None.
Boolean value. Whether to attach the response of the invoked vendor method to the HTTP response object (True) or return it in the response body (False).
vif_attach
(context, node_id, vif_info, topic=None)[source]¶Attach VIF to a node
context – request context.
node_id – node ID or UUID.
vif_info – a dictionary representing VIF object. It must have an ‘id’ key, whose value is a unique identifier for that VIF.
topic – RPC topic. Defaults to self.topic.
NodeLocked, if node has an exclusive lock held on it
NetworkError, if an error occurs during attaching the VIF.
InvalidParameterValue, if a parameter that’s required for VIF attach is wrong/missing.
vif_detach
(context, node_id, vif_id, topic=None)[source]¶Detach VIF from a node
context – request context.
node_id – node ID or UUID.
vif_id – an ID of a VIF.
topic – RPC topic. Defaults to self.topic.
NodeLocked, if node has an exclusive lock held on it
NetworkError, if an error occurs during detaching the VIF.
InvalidParameterValue, if a parameter that’s required for VIF detach is wrong/missing.
vif_list
(context, node_id, topic=None)[source]¶List attached VIFs for a node
context – request context.
node_id – node ID or UUID.
topic – RPC topic. Defaults to self.topic.
List of VIF dictionaries, each dictionary will have an ‘id’ entry with the ID of the VIF.
NetworkError, if an error occurs during listing the VIFs.
InvalidParameterValue, if a parameter that’s required for VIF list is wrong/missing.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.