Bare metal command-line clientThe ironic client is the command-line
interface (CLI) for the Bare metal and its extensions.
This chapter documents ironic version
0.4.1.
For help on a specific ironic
command, enter:
$ironicCOMMANDironic usageusage: ironic [--version] [--debug] [-v] [--cert-file OS_CERT]
[--key-file OS_KEY] [--ca-file OS_CACERT]
[--os-username OS_USERNAME] [--os-password OS_PASSWORD]
[--os-tenant-id OS_TENANT_ID] [--os-tenant-name OS_TENANT_NAME]
[--os-auth-url OS_AUTH_URL] [--os-region-name OS_REGION_NAME]
[--os-auth-token OS_AUTH_TOKEN] [--ironic-url IRONIC_URL]
[--ironic-api-version IRONIC_API_VERSION]
[--os-service-type OS_SERVICE_TYPE] [--os-endpoint OS_ENDPOINT]
[--os-endpoint-type OS_ENDPOINT_TYPE] [--insecure]
[--os-cacert <ca-certificate>] [--os-cert <certificate>]
[--os-key <key>] [--timeout <seconds>]
[--os-user-domain-id OS_USER_DOMAIN_ID]
[--os-user-domain-name OS_USER_DOMAIN_NAME]
[--os-project-id OS_PROJECT_ID]
[--os-project-name OS_PROJECT_NAME]
[--os-project-domain-id OS_PROJECT_DOMAIN_ID]
[--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
<subcommand> ...Subcommandschassis-create
Create a new chassis.
chassis-delete
Delete a chassis.
chassis-list
List chassis.
chassis-node-list
List the nodes contained in the chassis.
chassis-show
Show a chassis.
chassis-update
Update a chassis.
node-create
Register a new node with the Ironic service.
node-delete
Unregister a node from the Ironic service.
node-get-boot-device
Get the current boot device.
node-get-console
Return the connection information for the node's
console, if enabled.
node-get-supported-boot-devices
Get the supported boot devices.
node-list
List nodes which are registered with the Ironic
service.
node-port-list
List the ports associated with the node.
node-set-boot-device
Set the boot device for a node.
node-set-console-mode
Enable or disable serial console access for this node.
node-set-maintenance
Enable or disable maintenance mode for this node.
node-set-power-state
Power the node on or off or reboot.
node-set-provision-state
Provision, rebuild or delete an instance.
node-show
Show detailed information for a node.
node-update
Update information about a registered node.
node-validate
Validate the node driver interfaces.
node-vendor-passthru
Call a vendor-passthru extension for a node.
port-create
Create a new port.
port-delete
Delete a port.
port-list
List ports.
port-show
Show a port.
port-update
Update a port.
driver-list
List of enabled drivers.
driver-properties
Get properties of the driver.
driver-show
Show a driver.
driver-vendor-passthru
Call a vendor-passthru extension for a driver.
bash-completion
Prints all of the commands and options for bash-
completion.
help
Display help about this program or one of its
subcommands.
ironic optional arguments--version
show program's version number and exit
--debug
Defaults to env[IRONICCLIENT_DEBUG]-v, --verbose
Print more verbose output
--cert-file OS_CERTDEPRECATED! Use --os-cert.
--key-file OS_KEYDEPRECATED! Use --os-key.
--ca-file OS_CACERTDEPRECATED! Use --os-cacert.
--os-username OS_USERNAME
Defaults to env[OS_USERNAME]--os-password OS_PASSWORD
Defaults to env[OS_PASSWORD]--os-tenant-id OS_TENANT_ID
Defaults to env[OS_TENANT_ID]--os-tenant-name OS_TENANT_NAME
Defaults to env[OS_TENANT_NAME]--os-auth-url OS_AUTH_URL
Defaults to env[OS_AUTH_URL]--os-region-name OS_REGION_NAME
Defaults to env[OS_REGION_NAME]--os-auth-token OS_AUTH_TOKEN
Defaults to env[OS_AUTH_TOKEN]--ironic-url IRONIC_URL
Defaults to env[IRONIC_URL]--ironic-api-version IRONIC_API_VERSION
Defaults to env[IRONIC_API_VERSION] or 1
--os-service-type OS_SERVICE_TYPE
Defaults to env[OS_SERVICE_TYPE] or "baremetal"
--os-endpoint OS_ENDPOINT
Specify an endpoint to use instead of retrieving one
from the service catalog (via authentication).
Defaults to env[OS_SERVICE_ENDPOINT].
--os-endpoint-type OS_ENDPOINT_TYPE
Defaults to env[OS_ENDPOINT_TYPE] or "publicURL"
--insecure
Explicitly allow client to perform "insecure" TLS
(https) requests. The server's certificate will not be
verified against any certificate authorities. This
option should be used with caution.
--os-cacert <ca-certificate>
Specify a CA bundle file to use in verifying a TLS
(https) server certificate. Defaults to
env[OS_CACERT].
--os-cert <certificate>
Defaults to env[OS_CERT].
--os-key <key>
Defaults to env[OS_KEY].
--timeout <seconds>
Set request timeout (in seconds).
--os-user-domain-id OS_USER_DOMAIN_ID
Defaults to env[OS_USER_DOMAIN_ID].
--os-user-domain-name OS_USER_DOMAIN_NAME
Defaults to env[OS_USER_DOMAIN_NAME].
--os-project-id OS_PROJECT_ID
Another way to specify tenant ID. This option is
mutually exclusive with --os-tenant-id. Defaults to
env[OS_PROJECT_ID].
--os-project-name OS_PROJECT_NAME
Another way to specify tenant name. This option is
mutually exclusive with --os-tenant-name. Defaults to
env[OS_PROJECT_NAME].
--os-project-domain-id OS_PROJECT_DOMAIN_ID
Defaults to env[OS_PROJECT_DOMAIN_ID].
--os-project-domain-name OS_PROJECT_DOMAIN_NAME
Defaults to env[OS_PROJECT_DOMAIN_NAME].
ironic chassis-createusage: ironic chassis-create [-d <description>] [-e <key=value>]
Create a new chassis.
Optional arguments-d <description>, --description <description>
Free text description of the chassis
-e <key=value>, --extra <key=value>
Record arbitrary key/value metadata. Can be specified
multiple times
ironic chassis-deleteusage: ironic chassis-delete <chassis id> [<chassis id> ...]
Delete a chassis.
Positional arguments<chassis id>
UUID of chassis
ironic chassis-listusage: ironic chassis-list [--detail] [--limit <limit>] [--marker <marker>]
[--sort-key <sort_key>] [--sort-dir <sort_dir>]
List chassis.
Optional arguments--detail
Show detailed information about chassis.
--limit <limit>
Maximum number of chassis to return per request, 0 for
no limit. Default is the maximum number used by the
Ironic API Service.
--marker <marker>
Chassis UUID (e.g of the last chassis in the list from
a previous request). Returns the list of chassis after
this UUID.
--sort-key <sort_key>
Chassis field that will be used for sorting.
--sort-dir <sort_dir>
Sort direction: one of "asc" (the default) or "desc".
ironic chassis-node-listusage: ironic chassis-node-list [--detail] [--limit <limit>]
[--marker <marker>] [--sort-key <sort_key>]
[--sort-dir <sort_dir>]
<chassis id>
List the nodes contained in the chassis.
Positional arguments<chassis id>
UUID of chassis
Optional arguments--detail
Show detailed information about nodes.
--limit <limit>
Maximum number of nodes to return per request, 0 for
no limit. Default is the maximum number used by the
Ironic API Service.
--marker <marker>
Node UUID (e.g of the last node in the list from a
previous request). Returns the list of nodes after
this UUID.
--sort-key <sort_key>
Node field that will be used for sorting.
--sort-dir <sort_dir>
Sort direction: one of "asc" (the default) or "desc".
ironic chassis-showusage: ironic chassis-show <chassis id>
Show a chassis.
Positional arguments<chassis id>
UUID of chassis
ironic chassis-updateusage: ironic chassis-update <chassis id> <op> <path=value> [<path=value> ...]
Update a chassis.
Positional arguments<chassis id>
UUID of chassis
<op>
Operations: 'add', 'replace' or 'remove'
<path=value>
Attributes to add/replace or remove (only PATH is necessary on
remove)
ironic driver-listusage: ironic driver-list
List of enabled drivers.
ironic driver-propertiesusage: ironic driver-properties <driver name>
Get properties of the driver.
Positional arguments<driver name>
name of a driver
ironic driver-showusage: ironic driver-show <driver_name>
Show a driver.
Positional arguments<driver_name>
Name of the driver
ironic driver-vendor-passthruusage: ironic driver-vendor-passthru [--http_method <http_method>]
<driver_name> <method>
[<arg=value> [<arg=value> ...]]
Call a vendor-passthru extension for a driver.
Positional arguments<driver_name>
Name of the driver
<method>
vendor-passthru method to be called
<arg=value>
arguments to be passed to vendor-passthru method
Optional arguments--http_method <http_method>
The HTTP method to use in the request. Valid HTTP
methods are: 'POST', 'PUT', 'GET', 'DELETE', 'PATCH'.
Defaults to 'POST'.
ironic node-createusage: ironic node-create [-c <chassis uuid>] [-d <driver>] [-i <key=value>]
[-p <key=value>] [-e <key=value>] [-u <uuid>]
Register a new node with the Ironic service.
Optional arguments-c <chassis uuid>, --chassis_uuid <chassis uuid>
UUID of the chassis that this node belongs to
-d <driver>, --driver <driver>
Driver used to control the node [REQUIRED]
-i <key=value>, --driver_info <key=value>
Key/value pairs used by the driver, such as out-of-
band managementcredentials. Can be specified multiple
times
-p <key=value>, --properties <key=value>
Key/value pairs describing the physical
characteristics of the node. This is exported to Nova
and used by the scheduler. Can be specified multiple
times
-e <key=value>, --extra <key=value>
Record arbitrary key/value metadata. Can be specified
multiple times
-u <uuid>, --uuid <uuid>
Unique UUID for the node
ironic node-deleteusage: ironic node-delete <node id> [<node id> ...]
Unregister a node from the Ironic service.
Positional arguments<node id>
UUID of node
ironic node-get-boot-deviceusage: ironic node-get-boot-device <node uuid>
Get the current boot device.
Positional arguments<node uuid>
UUID of node
ironic node-get-consoleusage: ironic node-get-console <node uuid>
Return the connection information for the node's console, if enabled.
Positional arguments<node uuid>
UUID of node
ironic node-get-supported-boot-devicesusage: ironic node-get-supported-boot-devices <node uuid>
Get the supported boot devices.
Positional arguments<node uuid>
UUID of node
ironic node-listusage: ironic node-list [--limit <limit>] [--marker <marker>]
[--sort-key <sort_key>] [--sort-dir <sort_dir>]
[--maintenance <maintenance>] [--associated <assoc>]
[--detail]
List nodes which are registered with the Ironic service.
Optional arguments--limit <limit>
Maximum number of nodes to return per request, 0 for
no limit. Default is the maximum number used by the
Ironic API Service.
--marker <marker>
Node UUID (e.g of the last node in the list from a
previous request). Returns the list of nodes after
this UUID.
--sort-key <sort_key>
Node field that will be used for sorting.
--sort-dir <sort_dir>
Sort direction: one of "asc" (the default) or "desc".
--maintenance <maintenance>
List nodes in maintenance mode: 'true' or 'false'
--associated <assoc>
List nodes by instance association: 'true' or 'false'
--detail
Show detailed information about nodes
ironic node-port-listusage: ironic node-port-list [--detail] [--limit <limit>] [--marker <marker>]
[--sort-key <sort_key>] [--sort-dir <sort_dir>]
<node id>
List the ports associated with the node.
Positional arguments<node id>
UUID of node
Optional arguments--detail
Show detailed information about ports.
--limit <limit>
Maximum number of ports to return per request, 0 for
no limit. Default is the maximum number used by the
Ironic API Service.
--marker <marker>
Port UUID (e.g of the last port in the list from a
previous request). Returns the list of ports after
this UUID.
--sort-key <sort_key>
Port field that will be used for sorting.
--sort-dir <sort_dir>
Sort direction: one of "asc" (the default) or "desc".
ironic node-set-boot-deviceusage: ironic node-set-boot-device [--persistent] <node uuid> <boot device>
Set the boot device for a node.
Positional arguments<node uuid>
UUID of node
<boot device>
Supported boot devices: 'pxe', 'disk', 'cdrom', 'bios',
'safe'
Optional arguments--persistent
Make changes persistent for all future boots
ironic node-set-console-modeusage: ironic node-set-console-mode <node uuid> <enabled>
Enable or disable serial console access for this node.
Positional arguments<node uuid>
UUID of node
<enabled>
Enable or disable the console access. Supported options are:
'true' or 'false'
ironic node-set-maintenanceusage: ironic node-set-maintenance [--reason <reason>]
<node id> <maintenance mode>
Enable or disable maintenance mode for this node.
Positional arguments<node id>
UUID of node
<maintenance mode>
Supported states: 'true' or 'false'; 'on' or 'off'
Optional arguments--reason <reason>
The reason for setting maintenance mode to "true" or
"on"; not valid when setting to "false" or "off".
ironic node-set-power-stateusage: ironic node-set-power-state <node id> <power state>
Power the node on or off or reboot.
Positional arguments<node id>
UUID of node
<power state>
Supported states: 'on' or 'off' or 'reboot'
ironic node-set-provision-stateusage: ironic node-set-provision-state [--config-drive <config drive>]
<node id> <provision state>
Provision, rebuild or delete an instance.
Positional arguments<node id>
UUID of node
<provision state>
Supported states: 'active' or 'deleted' or 'rebuild'
Optional arguments--config-drive <config drive>
A gzipped base64 encoded config drive string or the
path to the config drive file; Only valid when setting
provision state to "active".
ironic node-showusage: ironic node-show [--instance] <id>
Show detailed information for a node.
Positional arguments<id>
ID, UUID or instance UUID of node
Optional arguments--instance
The id is an instance UUID
ironic node-updateusage: ironic node-update <node id> <op> <path=value> [<path=value> ...]
Update information about a registered node.
Positional arguments<node id>
UUID of node
<op>
Operations: 'add', 'replace' or 'remove'
<path=value>
Attributes to add/replace or remove (only PATH is necessary on
remove)
ironic node-validateusage: ironic node-validate <node uuid>
Validate the node driver interfaces.
Positional arguments<node uuid>
UUID of node
ironic node-vendor-passthruusage: ironic node-vendor-passthru [--http_method <http_method>]
<node id> <method>
[<arg=value> [<arg=value> ...]]
Call a vendor-passthru extension for a node.
Positional arguments<node id>
UUID of node
<method>
vendor-passthru method to be called
<arg=value>
arguments to be passed to vendor-passthru method
Optional arguments--http_method <http_method>
The HTTP method to use in the request. Valid HTTP
methods are: 'POST', 'PUT', 'GET', 'DELETE', 'PATCH'.
Defaults to 'POST'.
ironic port-createusage: ironic port-create -a <address> -n <node uuid> [-e <key=value>]
Create a new port.
Optional arguments-a <address>, --address <address>
MAC Address for this port
-n <node uuid>, --node_uuid <node uuid>
UUID of the node that this port belongs to
-e <key=value>, --extra <key=value>
Record arbitrary key/value metadata. Can be specified
multiple times
ironic port-deleteusage: ironic port-delete <port id> [<port id> ...]
Delete a port.
Positional arguments<port id>
UUID of port
ironic port-listusage: ironic port-list [--detail] [--address <macaddress>] [--limit <limit>]
[--marker <marker>] [--sort-key <sort_key>]
[--sort-dir <sort_dir>]
List ports.
Optional arguments--detail
Show detailed information about ports.
--address <macaddress>
MAC address of port, to get the port which has this
address.
--limit <limit>
Maximum number of ports to return per request, 0 for
no limit. Default is the maximum number used by the
Ironic API Service.
--marker <marker>
Port UUID (e.g of the last port in the list from a
previous request). Returns the list of ports after
this UUID.
--sort-key <sort_key>
Port field that will be used for sorting.
--sort-dir <sort_dir>
Sort direction: one of "asc" (the default) or "desc".
ironic port-showusage: ironic port-show [--address] <port id>
Show a port.
Positional arguments<port id>
UUID of port
Optional arguments--address
Get the port by it's MAC address instead of UUID.
ironic port-updateusage: ironic port-update <port id> <op> <path=value> [<path=value> ...]
Update a port.
Positional arguments<port id>
UUID of port
<op>
Operations: 'add', 'replace' or 'remove'
<path=value>
Attributes to add/replace or remove (only PATH is necessary on
remove)