The ironicclient.v1.node Module

class ironicclient.v1.node.Node(manager, info, loaded=False)[source]

Bases: ironicclient.common.base.Resource

class ironicclient.v1.node.NodeManager(api)[source]

Bases: ironicclient.common.base.Manager

create(**kwargs)[source]
delete(node_id)[source]
get(node_id)[source]
get_boot_device(node_uuid)[source]
get_by_instance_uuid(instance_uuid)[source]
get_console(node_uuid)[source]
get_supported_boot_devices(node_uuid)[source]
list(associated=None, maintenance=None, marker=None, limit=None, detail=False, sort_key=None, sort_dir=None)[source]

Retrieve a list of nodes.

Parameters:
  • associated – Optional, boolean whether to return a list of associated or unassociated nodes.
  • maintenance – Optional, boolean value that indicates whether to get nodes in maintenance mode (“True”), or not in maintenance mode (“False”).
  • marker – Optional, the UUID of a node, eg the last node from a previous result set. Return the next result set.
  • limit
    The maximum number of results to return per
    request, if:
    1. limit > 0, the maximum number of nodes to return.
    2. limit == 0, return the entire list of nodes.
    3. limit param is NOT specified (None), the number of items returned respect the maximum imposed by the Ironic API (see Ironic’s api.max_limit option).
  • detail – Optional, boolean whether to return detailed information about nodes.
  • sort_key – Optional, field used for sorting.
  • sort_dir – Optional, direction of sorting, either ‘asc’ (the default) or ‘desc’.
Returns:

A list of nodes.

list_ports(node_id, marker=None, limit=None, sort_key=None, sort_dir=None, detail=False)[source]

List all the ports for a given node.

Parameters:
  • node_id – The UUID of the node.
  • marker – Optional, the UUID of a port, eg the last port from a previous result set. Return the next result set.
  • limit
    The maximum number of results to return per
    request, if:
    1. limit > 0, the maximum number of ports to return.
    2. limit == 0, return the entire list of ports.
    3. limit param is NOT specified (None), the number of items returned respect the maximum imposed by the Ironic API (see Ironic’s api.max_limit option).
  • sort_key – Optional, field used for sorting.
  • sort_dir – Optional, direction of sorting, either ‘asc’ (the default) or ‘desc’.
  • detail – Optional, boolean whether to return detailed information about ports.
Returns:

A list of ports.

resource_class

alias of Node

set_boot_device(node_uuid, boot_device, persistent=False)[source]
set_console_mode(node_uuid, enabled)[source]
set_maintenance(node_id, state, maint_reason=None)[source]
set_power_state(node_id, state)[source]
set_provision_state(node_uuid, state, configdrive=None)[source]
states(node_uuid)[source]
update(node_id, patch, http_method='PATCH')[source]
validate(node_uuid)[source]
vendor_passthru(node_id, method, args=None, http_method=None)[source]

Issue requests for vendor-specific actions on a given node.

Parameters:
  • node_id – The UUID of the node.
  • method – Name of the vendor method.
  • args – Optional. The arguments to be passed to the method.
  • http_method – The HTTP method to use on the request. Defaults to POST.

Previous topic

The ironicclient.v1.driver_shell Module

Next topic

The ironicclient.v1.node_shell Module

This Page