ironicclient.v1.node.
NodeManager
(api)[source]¶Bases: ironicclient.common.base.CreateManager
add_trait
(node_ident, trait)[source]¶Add a trait to a node.
Parameters: |
|
---|
get_bios_setting
(node_ident, name)[source]¶Get a BIOS setting from a node.
Parameters: |
|
---|
list
(associated=None, maintenance=None, marker=None, limit=None, detail=False, sort_key=None, sort_dir=None, fields=None, provision_state=None, driver=None, resource_class=None, chassis=None, fault=None, os_ironic_api_version=None, conductor_group=None, conductor=None, owner=None)[source]¶Retrieve a list of nodes.
Parameters: |
|
---|---|
Returns: | A list of nodes. |
list_bios_settings
(node_ident)[source]¶List all BIOS settings from a node.
Parameters: | node_ident – node UUID or name. |
---|
list_ports
(node_id, marker=None, limit=None, sort_key=None, sort_dir=None, detail=False, fields=None)[source]¶List all the ports for a given node.
Parameters: |
|
---|---|
Returns: | A list of ports. |
list_volume_connectors
(node_id, marker=None, limit=None, sort_key=None, sort_dir=None, detail=False, fields=None)[source]¶List all the volume connectors for a given node.
Parameters: |
|
---|---|
Returns: | A list of volume connectors. |
list_volume_targets
(node_id, marker=None, limit=None, sort_key=None, sort_dir=None, detail=False, fields=None)[source]¶List all the volume targets for a given node.
Parameters: |
|
---|---|
Returns: | A list of volume targets. |
remove_all_traits
(node_ident)[source]¶Remove all traits from a node.
Parameters: | node_ident – node UUID or name. |
---|
remove_trait
(node_ident, trait)[source]¶Remove a trait from a node.
Parameters: |
|
---|
set_console_mode
(node_uuid, enabled)[source]¶Set the console mode for the node.
Parameters: |
|
---|
set_maintenance
(node_id, state, maint_reason=None)[source]¶Set the maintenance mode for the node.
Parameters: |
|
---|---|
Raises: | InvalidAttribute if state is an invalid string (that doesn’t represent a Boolean). |
set_power_state
(node_id, state, soft=False, timeout=None)[source]¶Sets power state for a node.
Parameters: |
|
---|---|
Raises: | ValueError if ‘soft’ or ‘timeout’ option is invalid |
Returns: | The status of the request |
set_provision_state
(node_uuid, state, configdrive=None, cleansteps=None, rescue_password=None, os_ironic_api_version=None)[source]¶Set the provision state for the node.
Parameters: |
|
---|---|
Raises: | InvalidAttribute if there was an error with the clean steps |
Returns: | The status of the request |
set_target_raid_config
(node_ident, target_raid_config)[source]¶Sets target_raid_config for a node.
Parameters: |
|
---|---|
Returns: | status of the request |
set_traits
(node_ident, traits)[source]¶Set traits for a node.
Removes any existing traits and adds the traits passed in to this method.
Parameters: |
|
---|
update
(node_id, patch, http_method='PATCH', os_ironic_api_version=None, reset_interfaces=None)[source]¶vendor_passthru
(node_id, method, args=None, http_method=None)[source]¶Issue requests for vendor-specific actions on a given node.
Parameters: |
|
---|
vif_attach
(node_ident, vif_id, **kwargs)[source]¶Attach VIF to a given node.
Parameters: |
|
---|
vif_detach
(node_ident, vif_id)[source]¶Detach VIF from a given node.
Parameters: |
|
---|
vif_list
(node_ident)[source]¶List VIFs attached to a given node.
Parameters: | node_ident – The UUID or Name of the node. |
---|
wait_for_provision_state
(node_ident, expected_state, timeout=0, poll_interval=2, poll_delay_function=None, fail_on_unexpected_state=True)[source]¶Helper function to wait for a node to reach a given state.
Polls Ironic API in a loop until node gets to a requested state.
Fails in the following cases: * Timeout (if provided) is reached * Node’s last_error gets set to a non-empty value * Unexpected stable state is reached and fail_on_unexpected_state is on * Error state is reached (if it’s not equal to expected_state)
Parameters: |
|
---|---|
Raises: | StateTransitionFailed if node reached an error state |
Raises: | StateTransitionTimeout on timeout |
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.