[admin-guide] Update CLI commands

Replace nova CLI commands with openstack CLI commands

Change-Id: I80f98ed497e1831bbce907e743f5083273f24ba8
Implements: blueprint use-openstack-command
This commit is contained in:
daz 2016-12-20 12:48:55 +11:00 committed by Darren Chan
parent efeab85f71
commit d0e9e772cb
4 changed files with 62 additions and 83 deletions

View File

@ -16,7 +16,7 @@ current VM host is not operational. Otherwise, the evacuation fails.
.. code-block:: console
$ nova host-list
$ openstack host list
#. Evacuate the instance. You can use the :option:`--password PWD` option
to pass the instance password to the command. If you do not specify a

View File

@ -10,54 +10,66 @@ examples disable and enable the ``nova-compute`` service.
.. code-block:: console
$ nova service-list
+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| nova-conductor | devstack | internal | enabled | up | 2013-10-16T00:56:08.000000 | None |
| nova-cert | devstack | internal | enabled | up | 2013-10-16T00:56:09.000000 | None |
| nova-compute | devstack | nova | enabled | up | 2013-10-16T00:56:07.000000 | None |
| nova-network | devstack | internal | enabled | up | 2013-10-16T00:56:06.000000 | None |
| nova-scheduler | devstack | internal | enabled | up | 2013-10-16T00:56:04.000000 | None |
| nova-consoleauth | devstack | internal | enabled | up | 2013-10-16T00:56:07.000000 | None |
+------------------+----------+----------+---------+-------+----------------------------+-----------------+
$ openstack compute service list
+----+--------------+------------+----------+---------+-------+--------------+
| ID | Binary | Host | Zone | Status | State | Updated At |
+----+--------------+------------+----------+---------+-------+--------------+
| 4 | nova- | controller | internal | enabled | up | 2016-12-20T0 |
| | consoleauth | | | | | 0:44:48.0000 |
| | | | | | | 00 |
| 5 | nova- | controller | internal | enabled | up | 2016-12-20T0 |
| | scheduler | | | | | 0:44:48.0000 |
| | | | | | | 00 |
| 6 | nova- | controller | internal | enabled | up | 2016-12-20T0 |
| | conductor | | | | | 0:44:54.0000 |
| | | | | | | 00 |
| 9 | nova-compute | compute | nova | enabled | up | 2016-10-21T0 |
| | | | | | | 2:35:03.0000 |
| | | | | | | 00 |
+----+--------------+------------+----------+---------+-------+--------------+
#. Disable a nova service:
.. code-block:: console
$ nova service-disable localhost.localdomain nova-compute --reason 'trial log'
$ openstack compute service set --disable --disable-reason trial log nova nova-compute
+----------+--------------+----------+-------------------+
| Host | Binary | Status | Disabled Reason |
+----------+--------------+----------+-------------------+
| devstack | nova-compute | disabled | Trial log |
| compute | nova-compute | disabled | trial log |
+----------+--------------+----------+-------------------+
#. Check the service list:
.. code-block:: console
$ nova service-list
+------------------+----------+----------+---------+-------+----------------------------+------------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+----------+----------+---------+-------+----------------------------+------------------+
| nova-conductor | devstack | internal | enabled | up | 2013-10-16T00:56:48.000000 | None |
| nova-cert | devstack | internal | enabled | up | 2013-10-16T00:56:49.000000 | None |
| nova-compute | devstack | nova | disabled | up | 2013-10-16T00:56:47.000000 | Trial log |
| nova-network | devstack | internal | enabled | up | 2013-10-16T00:56:51.000000 | None |
| nova-scheduler | devstack | internal | enabled | up | 2013-10-16T00:56:44.000000 | None |
| nova-consoleauth | devstack | internal | enabled | up | 2013-10-16T00:56:47.000000 | None |
+------------------+----------+----------+---------+-------+----------------------------+------------------+
$ openstack compute service list
+----+--------------+------------+----------+---------+-------+--------------+
| ID | Binary | Host | Zone | Status | State | Updated At |
+----+--------------+------------+----------+---------+-------+--------------+
| 4 | nova- | controller | internal | enabled | up | 2016-12-20T0 |
| | consoleauth | | | | | 0:44:48.0000 |
| | | | | | | 00 |
| 5 | nova- | controller | internal | enabled | up | 2016-12-20T0 |
| | scheduler | | | | | 0:44:48.0000 |
| | | | | | | 00 |
| 6 | nova- | controller | internal | enabled | up | 2016-12-20T0 |
| | conductor | | | | | 0:44:54.0000 |
| | | | | | | 00 |
| 9 | nova-compute | compute | nova | disabled| up | 2016-10-21T0 |
| | | | | | | 2:35:03.0000 |
| | | | | | | 00 |
+----+--------------+------------+----------+---------+-------+--------------+
#. Enable the service:
.. code-block:: console
$ nova service-enable localhost.localdomain nova-compute
$ openstack compute service set --enable nova nova-compute
+----------+--------------+---------+
| Host | Binary | Status |
+----------+--------------+---------+
| devstack | nova-compute | enabled |
| compute | nova-compute | enabled |
+----------+--------------+---------+
#. Check the service list:

View File

@ -55,13 +55,8 @@ To view and update default quota values
.. code-block:: console
$ nova quota-defaults
$ openstack quota show --default
For example:
.. code-block:: console
$ nova quota-defaults
+-----------------------------+-------+
| Quota | Limit |
+-----------------------------+-------+
@ -81,13 +76,7 @@ To view and update default quota values
| server_group_members | 10 |
+-----------------------------+-------+
#. Update a default value for a new project.
.. code-block:: console
$ nova quota-class-update --KEY VALUE default
For example:
#. Update a default value for a new project, for example:
.. code-block:: console
@ -96,23 +85,12 @@ To view and update default quota values
To view quota values for an existing project
--------------------------------------------
#. Place the project ID in a usable variable.
#. List the currently set quota values for a project:
.. code-block:: console
$ tenant=$(openstack project show -f value -c id TENANT_NAME)
$ openstack quota show TENANT_NAME
#. List the currently set quota values for a project.
.. code-block:: console
$ nova quota-show --tenant $tenant
For example:
.. code-block:: console
$ nova quota-show --tenant $tenant
+-----------------------------+-------+
| Quota | Limit |
+-----------------------------+-------+
@ -151,8 +129,8 @@ To update quota values for an existing project
.. code-block:: console
$ nova quota-update --floating-ips 20 $tenant
$ nova quota-show --tenant $tenant
$ nova quota-update --floating-ips 20 TENANT_NAME
$ openstack quota show TENANT_NAME
+-----------------------------+-------+
| Quota | Limit |
+-----------------------------+-------+

View File

@ -482,35 +482,24 @@ Basic operations on agents
~~~~~~~~~~~~~~~~~~~~~~~~~~
This table shows examples of Networking commands that enable you to
complete basic operations on agents:
complete basic operations on agents.
+----------------------------------------+------------------------------------+
| Operation | Command |
+========================================+====================================+
| List all available agents. | |
| | |
| | ``$ neutron agent-list`` |
+----------------------------------------+------------------------------------+
| Show information of a given | |
| agent. | |
| | |
| | ``$ neutron agent-show AGENT_ID`` |
+----------------------------------------+------------------------------------+
| Update the admin status and description| |
| for a specified agent. The command can | |
| be used to enable and disable agents by| |
| using :option:`--admin-state-up` | |
| parameter | |
| set to ``False`` or ``True``. | |
| | |
| | ``$ neutron agent-update`` |
| | ``--admin-state-up False AGENT_ID``|
+----------------------------------------+------------------------------------+
| Delete a given agent. Consider | |
| disabling the agent before deletion. | |
| | |
| | ``$ neutron agent-delete AGENT_ID``|
+----------------------------------------+------------------------------------+
.. list-table::
:widths: 50 50
:header-rows: 1
* - Operation
- Command
* - List all available agents.
- ``$ openstack network agent list``
* - Show information of a given agent.
- ``$ openstack network agent show AGENT_ID``
* - Update the admin status and description for a specified agent. The
command can be used to enable and disable agents by using
:option:`--admin-state-up` parameter set to ``False`` or ``True``.
- ``$ neutron agent-update --admin-state-up False AGENT_ID``
* - Delete a given agent. Consider disabling the agent before deletion.
- ``$ openstack network agent delete AGENT_ID``
**Basic operations on Networking agents**