The ironic_ui.api.ironic_rest_api
Module¶
- class ironic_ui.api.ironic_rest_api.BootDevice(**kwargs)
Bases:
View
- get(request, node_id)
Get the boot device for a specified node
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- Returns:
Dictionary with keys “boot_device” and “persistent”.
- put(request, node_id)
Set the boot device for a specific node
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- Returns:
null.
- url_regex = 'ironic/nodes/(?P<node_id>[a-zA-Z0-9-._~]+)/boot_device$'
- class ironic_ui.api.ironic_rest_api.DriverDetails(**kwargs)
Bases:
View
- get(request, driver_name)
Get the details of a specified driver
- Parameters:
request – HTTP request
driver_name – Driver name
- Returns:
Dictionary of details
- url_regex = 'ironic/drivers/(?P<driver_name>[0-9a-zA-Z_-]+)$'
- class ironic_ui.api.ironic_rest_api.DriverProperties(**kwargs)
Bases:
View
- get(request, driver_name)
Get the properties associated with a specified driver
- Parameters:
request – HTTP request.
driver_name – Driver name.
- Returns:
Dictionary of properties.
- url_regex = 'ironic/drivers/(?P<driver_name>[0-9a-zA-Z_-]+)/properties$'
- class ironic_ui.api.ironic_rest_api.Drivers(**kwargs)
Bases:
View
- get(request)
Get the list of drivers.
- Parameters:
request – HTTP request.
- Returns:
List of drivers.
- url_regex = 'ironic/drivers/$'
- class ironic_ui.api.ironic_rest_api.InjectNmi(**kwargs)
Bases:
View
- put(request, node_id)
Inject Non-Masking Interrupts into a specified node.
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- Returns:
Empty response.
- url_regex = 'ironic/nodes/(?P<node_id>[a-zA-Z0-9-._~]+)/management/inject_nmi$'
- class ironic_ui.api.ironic_rest_api.Maintenance(**kwargs)
Bases:
View
- delete(request, node_id)
Take a specified node out of the maintenance state
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- Returns:
Return code.
- patch(request, node_id)
Put a specified node into maintenance state
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- Returns:
Return code.
- url_regex = 'ironic/nodes/(?P<node_id>[a-zA-Z0-9-._~]+)/maintenance$'
- class ironic_ui.api.ironic_rest_api.Node(**kwargs)
Bases:
View
- delete(request, node_id)
Delete an Ironic node from inventory
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- get(request, node_id)
Get information on a specified node.
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- Returns:
node.
- patch(request, node_id)
Update an Ironic node.
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- url_regex = 'ironic/nodes/(?P<node_id>[a-zA-Z0-9-._~]+)$'
- class ironic_ui.api.ironic_rest_api.NodePortgroups(**kwargs)
Bases:
View
- get(request, node_id)
Get the list of portgroups associated with a specified node.
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- Returns:
List of portgroups.
- url_regex = 'ironic/nodes/(?P<node_id>[a-zA-Z0-9-._~]+)/portgroups$'
- class ironic_ui.api.ironic_rest_api.NodePorts(**kwargs)
Bases:
View
- get(request, node_id)
Get the list of ports associated with a specified node.
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- Returns:
List of ports.
- url_regex = 'ironic/nodes/(?P<node_id>[a-zA-Z0-9-._~]+)/ports/detail$'
- class ironic_ui.api.ironic_rest_api.Nodes(**kwargs)
Bases:
View
- get(request)
Get the list of nodes.
- Parameters:
request – HTTP request.
- Returns:
List of nodes.
- post(request)
Create an Ironic node.
- Parameters:
request – HTTP request.
- url_regex = 'ironic/nodes/$'
- class ironic_ui.api.ironic_rest_api.Port(**kwargs)
Bases:
View
- delete(request, port_uuid)
Delete a network port.
- Parameters:
request – HTTP request
port_uuid – Port uuid.
- patch(request, port_uuid)
Update an Ironic port.
- Parameters:
request – HTTP request.
port_uuid – Port uuid.
- url_regex = 'ironic/ports/(?P<port_uuid>[0-9a-f-]+)$'
- class ironic_ui.api.ironic_rest_api.Portgroup(**kwargs)
Bases:
View
- delete(request, portgroup_id)
Delete a portgroup.
- Parameters:
request – HTTP request.
portgroup_id – UUID or name of portgroup.
- patch(request, portgroup_id)
Update an Ironic portgroup.
- Parameters:
request – HTTP request.
portgroup_id – UUID or name of portgroup.
- url_regex = 'ironic/portgroups/(?P<portgroup_id>[a-zA-Z0-9-._~]+)$'
- class ironic_ui.api.ironic_rest_api.PortgroupPorts(**kwargs)
Bases:
View
- get(request, portgroup_id)
Get the ports for a specified portgroup.
- Parameters:
request – HTTP request.
portgroup_id – UUID or name of portgroup.
- Returns:
List of port objects.
- url_regex = 'ironic/portgroups/(?P<portgroup_id>[a-zA-Z0-9-._~]+)/ports$'
- class ironic_ui.api.ironic_rest_api.Portgroups(**kwargs)
Bases:
View
- post(request)
Create a portgroup.
- Parameters:
request – HTTP request.
- Returns:
Portgroup.
- url_regex = 'ironic/portgroups$'
- class ironic_ui.api.ironic_rest_api.Ports(**kwargs)
Bases:
View
- post(request)
Create a network port.
- Parameters:
request – HTTP request.
- Returns:
Port
- url_regex = 'ironic/ports/$'
- class ironic_ui.api.ironic_rest_api.RaidConfig(**kwargs)
Bases:
View
- put(request, node_id)
Set the RAID configuration for a specified node.
- Parameters:
request – HTTP request.
node_id – Node name or node uuid
- Returns:
None
- url_regex = 'ironic/nodes/(?P<node_id>[a-zA-Z0-9-._~]+)/states/raid$'
- class ironic_ui.api.ironic_rest_api.StatesConsole(**kwargs)
Bases:
View
- get(request, node_id)
Get connection information for the node’s console
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- Returns:
Connection information.
- put(request, node_id)
Start or stop the serial console.
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- Returns:
Return code.
- url_regex = 'ironic/nodes/(?P<node_id>[a-zA-Z0-9-._~]+)/states/console$'
- class ironic_ui.api.ironic_rest_api.StatesPower(**kwargs)
Bases:
View
- patch(request, node_id)
Set the power state for a specified node.
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- Returns:
Return code.
- url_regex = 'ironic/nodes/(?P<node_id>[a-zA-Z0-9-._~]+)/states/power$'
- class ironic_ui.api.ironic_rest_api.StatesProvision(**kwargs)
Bases:
View
- put(request, node_id)
Set the provision state for a specified node.
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- Returns:
Return code.
- url_regex = 'ironic/nodes/(?P<node_id>[a-zA-Z0-9-._~]+)/states/provision$'
- class ironic_ui.api.ironic_rest_api.SupportedBootDevices(**kwargs)
Bases:
View
- get(request, node_id)
Get the list of supported boot devices for a specified node.
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- Returns:
List of supported boot devices.
- url_regex = 'ironic/nodes/(?P<node_id>[a-zA-Z0-9-._~]+)/boot_device/supported$'
- class ironic_ui.api.ironic_rest_api.Validate(**kwargs)
Bases:
View
- get(request, node_id)
Validate a specified node
- Parameters:
request – HTTP request.
node_id – Node name or uuid.
- Returns:
List of dictionaries of interface statuses.
- url_regex = 'ironic/nodes/(?P<node_id>[a-zA-Z0-9-._~]+)/validate$'