The 'ironic' CLI is being deprecated; it is slated for removal in the S* release cycle. The 'openstack baremetal' CLI should be used instead. A message is printed out to that effect and the documentation is updated to reflect this. Change-Id: Ie6ac3c6222ec6a6231b9a9cb2949cac56b48967f Closes-Bug: 1700815
2.9 KiB
ironic
Command-Line Interface (CLI)
ironic
SYNOPSIS
ironic [options]
<command> [command-options]
ironic help
ironic help
<command>
DESCRIPTION
Warning
The ironic
command-line interface is deprecated; no new features will be added.
This CLI will be removed in the S* release. The openstack baremetal command-line interface
should be used instead.
The ironic
command-line interface (CLI) interacts with the OpenStack Bare Metal
Service (Ironic).
In order to use the CLI, you must provide your OpenStack username,
password, project (historically called tenant), and auth endpoint. You
can use configuration options --os-username,
--os-password, --os-tenant-id (or
--os-tenant-name), and --os-auth-url, or set
the corresponding environment variables:
$ export OS_USERNAME=user
$ export OS_PASSWORD=password
$ export OS_PROJECT_ID=b363706f891f48019483f8bd6503c54b # or OS_PROJECT_NAME
$ export OS_PROJECT_NAME=project # or OS_PROJECT_ID
$ export OS_AUTH_URL=http://auth.example.com:5000/v2.0The command-line tool will attempt to reauthenticate using the
provided credentials for every request. You can override this behavior
by manually supplying an auth token using --ironic-url and
--os-auth-token, or by setting the corresponding
environment variables:
$ export IRONIC_URL=http://ironic.example.org:6385/
$ export OS_AUTH_TOKEN=3bcc3d3a03f44e3d8377f9247b0ad155Since Keystone can return multiple regions in the Service Catalog,
you can specify the one you want with --os-region-name or
set the following environment variable. (It defaults to the first in the
list returned.) :
export OS_REGION_NAME=regionIronic CLI supports bash completion. The command-line tool can automatically fill partially typed commands. To use this feature, source the below file (available at https://git.openstack.org/cgit/openstack/python-ironicclient/tree/tools/ironic.bash_completion) to your terminal and then bash completion should work:
$ . ironic.bash_completionTo avoid doing this every time, add this to your .bashrc
or copy the ironic.bash_completion file to the default bash completion
scripts directory on your linux distribution.
OPTIONS
To get a list of available (sub)commands and options, run:
$ ironic helpTo get usage and options of a command, run:
$ ironic help <command>EXAMPLES
Get information about the node-create command:
$ ironic help node-createGet a list of available drivers:
$ ironic driver-listEnroll a node with the ipmi driver, specifying the IPMI
address:
$ ironic node-create -d ipmi -i ipmi_address=1.2.3.4Get a list of nodes:
$ ironic node-list