Update documentation

This updates the documentation. Changes include:
- putting 'openstack baremetal' commands before 'ironic' commands, since
  the plan is to deprecate the 'ironic' CLI
- fixing formatting issues
- removing the description for the 'openstack baremetal create' command
  about how it can be used for creating a node -- this functionality has
  been deleted.
- in the examples, using hardware types instead of classic drivers, since
  the plan is to deprecate classic drivers

Change-Id: I09fdf160122664d923361a8a8c80c61aba347c30
This commit is contained in:
Ruby Loo
2017-09-27 12:41:28 -04:00
parent 55864c9c95
commit ad1fe203b0
5 changed files with 40 additions and 51 deletions

View File

@@ -4,5 +4,5 @@ python-ironicclient User Documentation
.. toctree::
ironic_client
osc_plugin_cli
ironic_client

View File

@@ -1,6 +1,6 @@
==========================================
Ironic Client Command-Line Interface (CLI)
==========================================
=======================================
``ironic`` Command-Line Interface (CLI)
=======================================
.. program:: ironic
.. highlight:: bash
@@ -85,9 +85,9 @@ Get a list of available drivers::
$ ironic driver-list
Enroll a node with "fake" deploy driver and "ipmitool" power driver::
Enroll a node with the ``ipmi`` driver, specifying the IPMI address::
$ ironic node-create -d fake_ipmitool -i ipmi_address=1.2.3.4
$ ironic node-create -d ipmi -i ipmi_address=1.2.3.4
Get a list of nodes::

View File

@@ -1,6 +1,6 @@
=============================================
OpenStack Client Command-Line Interface (CLI)
=============================================
====================================================
``openstack baremetal`` Command-Line Interface (CLI)
====================================================
.. program:: openstack baremetal
.. highlight:: bash
@@ -19,9 +19,16 @@ Description
The OpenStack Client plugin interacts with the Bare Metal service
through the ``openstack baremetal`` command line interface (CLI).
To use ``openstack`` CLI, the OpenStackClient should be installed::
To use the ``openstack`` CLI, the OpenStackClient (python-openstackclient)
package must be installed. There are two ways to do this:
# pip install python-openstackclient
* along with this python-ironicclient package::
$ pip install python-ironicclient[cli]
* directly::
$ pip install python-openstackclient
To use the CLI, you must provide your OpenStack username, password,
project, and auth endpoint. You can use configuration options
@@ -66,9 +73,9 @@ Get a list of available drivers::
$ openstack baremetal driver list
Enroll a node with "agent_ipmitool" driver::
Enroll a node with the ``ipmi`` driver::
$ openstack baremetal node create --driver agent_ipmitool --driver-info ipmi_address=1.2.3.4
$ openstack baremetal node create --driver ipmi --driver-info ipmi_address=1.2.3.4
Get a list of nodes::

View File

@@ -2,9 +2,10 @@
Python Bindings to the OpenStack Ironic API
===========================================
This is a client for OpenStack `Ironic`_ API. There's a Python API
(the `ironicclient` modules), and a command-line interface (installed as
`ironic`).
This is a client for the OpenStack `Ironic`_ API. It provides:
* a Python API: the ``ironicclient`` module, and
* two command-line interfaces: ``openstack baremetal`` and ``ironic``.
Contents
========
@@ -16,7 +17,7 @@ Contents
cli/index
user/create_command
contributor/index
Release Notes <http://docs.openstack.org/releasenotes/python-ironicclient/>
Release Notes <https://docs.openstack.org/releasenotes/python-ironicclient/>
Indices and tables
==================

View File

@@ -5,7 +5,19 @@ Creating the Bare Metal service resources from file
It is possible to create a set of resources using their descriptions in JSON
or YAML format. It can be done in one of three ways:
1. Using ironic CLI's ``ironic create`` command::
1. Using OpenStackClient bare metal plugin CLI's command ``openstack baremetal
create``::
$ openstack -h baremetal create
usage: openstack baremetal create [-h] <file> [<file> ...]
Create resources from files
positional arguments:
<file> File (.yaml or .json) containing descriptions of the
resources to create. Can be specified multiple times.
2. Using ironic CLI's ``ironic create`` command::
$ ironic help create
usage: ironic create <file> [<file> ...]
@@ -20,41 +32,10 @@ or YAML format. It can be done in one of three ways:
<file> File (.yaml or .json) containing descriptions of the resources
to create. Can be specified multiple times.
2. Using openstackclient plugin command ``openstack baremetal create``::
$ openstack -h baremetal create
usage: openstack [-h] [-f {json,shell,table,value,yaml}] [-c COLUMN]
[--max-width <integer>] [--noindent] [--prefix PREFIX]
[--chassis-uuid <chassis>] [--driver-info <key=value>]
[--property <key=value>] [--extra <key=value>]
[--uuid <uuid>] [--name <name>]
[--network-interface <network_interface>]
[--resource-class <resource_class>] [--driver <driver>]
[<file> [<file> ...]]
Create resources from files or Register a new node (DEPRECATED). Create
resources from files (by only specifying the files) or register a new
node by specifying one or more optional arguments (DEPRECATED, use
'openstack baremetal node create' instead).
positional arguments:
<file> File (.yaml or .json) containing descriptions of
the resources to create. Can be specified
multiple times. If you want to create resources,
only specify the files. Do not specify any of
the optional arguments.
.. note::
If the ``--driver`` argument is passed in, the behaviour of the command
is the same as ``openstack baremetal node create``, and positional
arguments are ignored. If it is not provided, the command does resource
creation from file(s), and only positional arguments will be taken into
account.
3. Programmatically using the Python API:
.. autofunction:: ironicclient.v1.create_resources.create_resources
:noindex:
.. autofunction:: ironicclient.v1.create_resources.create_resources
:noindex:
File containing Resource Descriptions
=====================================