ironic.objects.node
Module¶ironic.objects.node.
Node
(context=None, **kwargs)[source]¶Bases: ironic.objects.base.IronicObject
, oslo_versionedobjects.base.VersionedObjectDictCompat
create
(context=None)[source]¶Create a Node record in the DB.
Column-wise updates will be made based on the result of self.what_changed(). If target_power_state is provided, it will be checked against the in-database copy of the node before updates are made.
Parameters: | context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: Node(context) |
---|---|
Raises: | InvalidParameterValue if some property values are invalid. |
destroy
(context=None)[source]¶Delete the Node from the DB.
Parameters: | context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: Node(context) |
---|
get
(context, node_id)[source]¶Find a node based on its id or uuid and return a Node object.
Parameters: |
|
---|---|
Returns: | a |
get_by_id
(context, node_id)[source]¶Find a node based on its integer ID and return a Node object.
Parameters: |
|
---|---|
Returns: | a |
get_by_instance_uuid
(context, instance_uuid)[source]¶Find a node based on the instance UUID and return a Node object.
Parameters: |
|
---|---|
Returns: | a |
get_by_name
(context, name)[source]¶Find a node based on name and return a Node object.
Parameters: |
|
---|---|
Returns: | a |
get_by_port_addresses
(context, addresses)[source]¶Get a node by associated port addresses.
Parameters: |
|
---|---|
Raises: | NodeNotFound if the node is not found. |
Returns: | a |
get_by_uuid
(context, uuid)[source]¶Find a node based on UUID and return a Node object.
Parameters: |
|
---|---|
Returns: | a |
list
(context, limit=None, marker=None, sort_key=None, sort_dir=None, filters=None)[source]¶Return a list of Node objects.
Parameters: |
|
---|---|
Returns: | a list of |
refresh
(context=None)[source]¶Refresh the object by re-fetching from the DB.
Parameters: | context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: Node(context) |
---|
release
(context, tag, node_id)[source]¶Release the reservation on a node.
Parameters: |
|
---|---|
Raises: | NodeNotFound if the node is not found. |
reserve
(context, tag, node_id)[source]¶Get and reserve a node.
To prevent other ManagerServices from manipulating the given Node while a Task is performed, mark it reserved by this host.
Parameters: |
|
---|---|
Raises: | NodeNotFound if the node is not found. |
Returns: | a |
save
(context=None)[source]¶Save updates to this Node.
Column-wise updates will be made based on the result of self.what_changed(). If target_power_state is provided, it will be checked against the in-database copy of the node before updates are made.
Parameters: | context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: Node(context) |
---|---|
Raises: | InvalidParameterValue if some property values are invalid. |
ironic.objects.node.
NodeCRUDNotification
(context=None, **kwargs)[source]¶Bases: ironic.objects.notification.NotificationBase
Notification emitted when ironic creates, updates or deletes a node.
ironic.objects.node.
NodeCRUDPayload
(node, chassis_uuid)[source]¶Bases: ironic.objects.node.NodePayload
Payload schema for when ironic creates, updates or deletes a node.
ironic.objects.node.
NodeConsoleNotification
(context=None, **kwargs)[source]¶Bases: ironic.objects.notification.NotificationBase
Notification emitted when node console state changed.
ironic.objects.node.
NodeCorrectedPowerStateNotification
(context=None, **kwargs)[source]¶Bases: ironic.objects.notification.NotificationBase
Notification for when a node’s power state is corrected in the database.
This notification is emitted when ironic detects that the actual power state on a bare metal hardware is different from the power state on an ironic node (DB). This notification is emitted after the database is updated to reflect this correction.
ironic.objects.node.
NodeCorrectedPowerStatePayload
(node, from_power)[source]¶Bases: ironic.objects.node.NodePayload
Notification payload schema for when a node’s power state is corrected.
“from_power” indicates the previous power state on the ironic node before the node was updated.
ironic.objects.node.
NodeMaintenanceNotification
(context=None, **kwargs)[source]¶Bases: ironic.objects.notification.NotificationBase
Notification emitted when maintenance state changed via API.
ironic.objects.node.
NodePayload
(node, **kwargs)[source]¶Bases: ironic.objects.notification.NotificationPayloadBase
Base class used for all notification payloads about a Node object.
ironic.objects.node.
NodeSetPowerStateNotification
(context=None, **kwargs)[source]¶Bases: ironic.objects.notification.NotificationBase
Notification emitted when ironic changes a node’s power state.
ironic.objects.node.
NodeSetPowerStatePayload
(node, to_power)[source]¶Bases: ironic.objects.node.NodePayload
Payload schema for when ironic changes a node’s power state.
ironic.objects.node.
NodeSetProvisionStateNotification
(context=None, **kwargs)[source]¶Bases: ironic.objects.notification.NotificationBase
Notification emitted when ironic changes a node provision state.
ironic.objects.node.
NodeSetProvisionStatePayload
(node, prev_state, prev_target, event)[source]¶Bases: ironic.objects.node.NodePayload
Payload schema for when ironic changes a node provision state.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.