The ironic_ui.api.ironic
Module¶
- ironic_ui.api.ironic.driver_details(request, driver_name)
Retrieve the details of a specified driver
- Parameters:
request – HTTP request
driver_name – Name of the driver
- Returns:
dictionary of driver details
https://docs.openstack.org/python-ironicclient/latest/cli/osc/v1/index.html#baremetal-driver-show
- ironic_ui.api.ironic.driver_list(request)
Retrieve a list of drivers.
- Parameters:
request – HTTP request.
- Returns:
A list of drivers.
- ironic_ui.api.ironic.driver_properties(request, driver_name)
Retrieve the properties of a specified driver
- Parameters:
request – HTTP request
driver_name – Name of the driver
- Returns:
Property list
- ironic_ui.api.ironic.ironicclient(request)
Returns a client connected to the Ironic backend.
- Parameters:
request – HTTP request.
- Returns:
Ironic client.
- ironic_ui.api.ironic.node_create(request, params)
Create a node
- Parameters:
request – HTTP request.
params – Dictionary of node parameters
- ironic_ui.api.ironic.node_delete(request, node_id)
Delete a node from inventory.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
- Returns:
node.
- ironic_ui.api.ironic.node_get(request, node_id)
Retrieve a node.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
- Returns:
node.
- ironic_ui.api.ironic.node_get_boot_device(request, node_id)
Get the boot device for a specified node.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
- Returns:
Dictionary with keys “boot_device” and “persistent”
- ironic_ui.api.ironic.node_get_console(request, node_id)
Get connection information for a node’s console.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
- Returns:
Console connection information
- ironic_ui.api.ironic.node_get_supported_boot_devices(request, node_id)
Get the list of supported boot devices for a specified node.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
- Returns:
List of supported boot devices (strings)
- ironic_ui.api.ironic.node_inject_nmi(request, node_id)
Inject Non-Masking Interrupts into a specified node.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
- Returns:
Empty response.
- ironic_ui.api.ironic.node_list(request)
Retrieve a list of nodes.
- Parameters:
request – HTTP request.
- Returns:
A list of nodes.
- ironic_ui.api.ironic.node_list_ports(request, node_id)
List all the ports on a given node.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
- Returns:
A full list of ports. (limit=0)
- ironic_ui.api.ironic.node_set_boot_device(request, node_id, device, persistent)
Set the boot device for a specified node.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
device – boot device.
persistent – True or False.
- Returns:
null.
- ironic_ui.api.ironic.node_set_console_mode(request, node_id, enabled)
Start or stop the serial console for a given node.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
enabled – True to start the console, False to stop it
- Returns:
node.
- ironic_ui.api.ironic.node_set_maintenance(request, node_id, state, maint_reason=None)
Set the maintenance mode on a given node.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
state – The maintenance state to set.
- Returns:
node.
- ironic_ui.api.ironic.node_set_power_state(request, node_id, state, soft=False)
Set power state for a given node.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
state – the power state to set [‘on’, ‘off’, ‘reboot’].
soft – flag for graceful power ‘off’ or reboot
- Returns:
node.
- ironic_ui.api.ironic.node_set_provision_state(request, node_id, state, cleansteps=None)
Set the target provision state for a given node.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
state – the target provision state to set.
cleansteps – Optional list of cleaning steps
- Returns:
node.
- ironic_ui.api.ironic.node_set_raid_config(request, node_id, target_raid_config)
Set target raid configuration for a given node.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
target_raid_config – Target raid configuration.
- Returns:
Node.
- ironic_ui.api.ironic.node_update(request, node_id, patch)
Update a specified node.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
patch – Sequence of update operations
- Returns:
node.
- ironic_ui.api.ironic.node_validate(request, node_id)
Validate a specified node.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
- Returns:
List of dictionaries, each containing an interface status
- ironic_ui.api.ironic.port_create(request, params)
Create network port
- Parameters:
request – HTTP request
params – Port creation parameters
- Returns:
Port
- ironic_ui.api.ironic.port_delete(request, port_uuid)
Delete a network port
- Parameters:
request – HTTP request
port_uuid – Port uuid
- Returns:
Port
- ironic_ui.api.ironic.port_update(request, port_uuid, patch)
Update a specified port.
- Parameters:
request – HTTP request.
port_id – The UUID of the port.
patch – Sequence of update operations
- Returns:
Port.
- ironic_ui.api.ironic.portgroup_create(request, params)
Create a portgroup.
- Parameters:
request – HTTP request.
params – Portgroup creation parameters.
- Returns:
Portgroup.
- ironic_ui.api.ironic.portgroup_delete(request, portgroup_id)
Delete a portgroup from the DB.
- Parameters:
request – HTTP request.
portgroup_id – The UUID or name of the portgroup.
- Returns:
Portgroup.
- ironic_ui.api.ironic.portgroup_get_ports(request, portgroup_id)
Get the ports associated with a specified portgroup.
- Parameters:
request – HTTP request.
portgroup_id – The UUID or name of the portgroup.
- Returns:
List of ports.
- ironic_ui.api.ironic.portgroup_list(request, node_id)
List the portgroups associated with a given node.
- Parameters:
request – HTTP request.
node_id – The UUID or name of the node.
- Returns:
A full list of portgroups. (limit=0)
- ironic_ui.api.ironic.portgroup_update(request, portgroup_id, patch)
Update a specified portgroup.
- Parameters:
request – HTTP request.
portgroup_id – The UUID or name of the portgroup.
patch – Sequence of update operations
- Returns:
Portgroup.