[common] cleanup RST syntax

* remove usage of 'linenos'
* use 'code-block' instead of 'code'
* use 'code-block' instead of '::'

Change-Id: Ifcacc4917b185ad5c23b8aa00882bb8263f370c5
This commit is contained in:
Christian Berendt
2015-10-09 15:03:26 +02:00
committed by Christian Berendt
parent 9f927b4461
commit d96a4e676f
10 changed files with 417 additions and 343 deletions

View File

@@ -2,17 +2,16 @@
Discover the version number for a client
========================================
Run the following command to discover the version number for a client::
Run the following command to discover the version number for a client:
.. code-block:: console
$ PROJECT --version
For example, to see the version number for the ``nova`` client, run the
following command::
following command:
.. code-block:: console
$ nova --version
The version number (2.15.0 in the example) is returned.
.. code::
2.15.0
2.31.0

View File

@@ -55,7 +55,7 @@ command-line clients, and provides installation instructions as needed.
| | |
| | **MacOS** |
| | |
| | .. code:: |
| | .. code-block:: console |
| | |
| | # easy_install pip |
| | |
@@ -66,7 +66,7 @@ command-line clients, and provides installation instructions as needed.
| | use the ``easy_install`` command from the setuptools|
| | package: |
| | |
| | .. code:: |
| | .. code-block:: console |
| | |
| | C:\>easy_install pip |
| | |
@@ -76,7 +76,7 @@ command-line clients, and provides installation instructions as needed.
| | |
| | **Ubuntu and Debian** |
| | |
| | .. code:: |
| | .. code-block:: console |
| | |
| | # apt-get install python-dev python-pip |
| | |
@@ -89,7 +89,7 @@ command-line clients, and provides installation instructions as needed.
| | A packaged version enables you to use yum to install|
| | the package: |
| | |
| | .. code:: |
| | .. code-block:: console |
| | |
| | # yum install python-devel python-pip |
| | |
@@ -108,7 +108,7 @@ command-line clients, and provides installation instructions as needed.
| | enables you to use or zypper to install the package.|
| | First, add the Open Build Service repository: |
| | |
| | .. code:: |
| | .. code-block:: console |
| | |
| | # zypper addrepo -f obs://Cloud:OpenStack: \ |
| | Kilo/SLE_12 Kilo |
@@ -116,7 +116,7 @@ command-line clients, and provides installation instructions as needed.
| | Then install pip and use it to manage client |
| | installation: |
| | |
| | .. code:: |
| | .. code-block:: console |
| | |
| | # zypper install python-devel python-pip |
| | |
@@ -129,7 +129,7 @@ command-line clients, and provides installation instructions as needed.
| | You can install pip and use it to manage client |
| | installation: |
| | |
| | .. code:: |
| | .. code-block:: console |
| | |
| | # zypper install python-devel python-pip |
| | |
@@ -185,7 +185,7 @@ Common OpenStack client supporting multiple services:
The following example shows the command for installing the nova client
with ``pip``.
.. code::
.. code-block:: console
# pip install python-novaclient
@@ -200,11 +200,15 @@ or remove a package.
Install each client separately by using the following command:
- For Mac OS X or Linux::
- For Mac OS X or Linux:
.. code-block:: console
# pip install python-PROJECTclient
- For Microsoft Windows::
- For Microsoft Windows:
.. code-block:: console
C:\>pip install python-PROJECTclient
@@ -218,27 +222,37 @@ that can be installed without ``pip``.
- On Red Hat Enterprise Linux, CentOS, or Fedora, use ``yum`` to install
the clients from the packaged versions available in
`RDO <https://www.rdoproject.org/>`__::
`RDO <https://www.rdoproject.org/>`__:
.. code-block:: console
# yum install python-PROJECTclient
- For Ubuntu or Debian, use ``apt-get`` to install the clients from the
packaged versions::
packaged versions:
.. code-block:: console
# apt-get install python-PROJECTclient
- For openSUSE, use ``zypper`` to install the clients from the distribution
packages service::
packages service:
.. code-block:: console
# zypper install python-PROJECTclient
- For SUSE Linux Enterprise Server, use ``zypper`` to install the clients from
the distribution packages in the Open Build Service. First, add the Open
Build Service repository::
Build Service repository:
.. code-block:: console
# zypper addrepo -f obs://Cloud:OpenStack:Kilo/SLE_12 Kilo
Then you can install the packages::
Then you can install the packages:
.. code-block:: console
# zypper install python-PROJECTclient
@@ -246,11 +260,15 @@ Upgrade or remove clients
~~~~~~~~~~~~~~~~~~~~~~~~~
To upgrade a client, add the ``--upgrade`` option to the ``pip install``
command::
command:
.. code-block:: console
# pip install --upgrade python-PROJECTclient
To remove the client, run the ``pip uninstall`` command::
To remove the client, run the ``pip uninstall`` command:
.. code-block:: console
# pip uninstall python-PROJECTclient

View File

@@ -23,7 +23,7 @@ List or get details for images (glance)
To get a list of images and to then get further details about a single
image, use ``glance image-list`` and ``glance image-show``.
.. code::
.. code-block:: console
$ glance image-list
+----------+---------------------------------+-------------+------------------+----------+--------+
@@ -35,7 +35,7 @@ image, use ``glance image-list`` and ``glance image-show``.
| 7e514... | myCirrosImage | ami | ami | 14221312 | active |
+----------+---------------------------------+-------------+------------------+----------+--------+
.. code::
.. code-block:: console
$ glance image-show myCirrosImage
@@ -79,7 +79,9 @@ image, use ``glance image-list`` and ``glance image-show``.
+---------------------------------------+--------------------------------------+
When viewing a list of images, you can also use ``grep`` to filter the
list, as follows::
list, as follows:
.. code-block:: console
$ glance image-list | grep 'cirros'
| 397e713c-b95b-4186-ad46-612... | cirros-0.3.2-x86_64-uec | ami | ami | 25165824 | active |
@@ -95,18 +97,21 @@ list, as follows::
- ``filesystem_store_metadata_file = filePath``, where filePath points to a JSON file that defines the mount point for OpenStack images on your system and a unique ID. For example:
.. code-block:: json
:linenos:
[{
"id": "2d9bb53f-70ea-4066-a68b-67960eaae673",
"mountpoint": "/var/lib/glance/images/"
}]
After you restart the Image service, you can use the following syntax to view the image's location information::
After you restart the Image service, you can use the following syntax to view the image's location information:
.. code-block:: console
$ glance --os-image-api-version 2 image-show imageID
For example, using the image ID shown above, you would issue the command as follows::
For example, using the image ID shown above, you would issue the command as follows:
.. code-block:: console
$ glance --os-image-api-version 2 image-show 2d9bb53f-70ea-4066-a68b-67960eaae673
@@ -115,13 +120,13 @@ Create or update an image (glance)
To create an image, use ``glance image-create``:
.. code::
.. code-block:: console
$ glance image-create imageName
To update an image by name or ID, use ``glance image-update``:
.. code::
.. code-block:: console
$ glance image-update imageName
@@ -194,7 +199,7 @@ Reference <http://docs.openstack.org/cli-reference/content/index.html>`__.
The following example shows the command that you would use to upload a
CentOS 6.3 image in qcow2 format and configure it for public access:
.. code::
.. code-block:: console
$ glance image-create --name centos63-image --disk-format qcow2 \
--container-format bare --is-public True --file ./centos63.qcow2
@@ -203,7 +208,7 @@ The following example shows how to update an existing image with a
properties that describe the disk bus, the CD-ROM bus, and the VIF
model:
.. code::
.. code-block:: console
$ glance image-update \
--property hw_disk_bus=scsi \

View File

@@ -26,7 +26,9 @@ Possible use cases for data migration include:
- Free up space in a thinly-provisioned back end.
Migrate a volume with the :command:`cinder migrate` command, as shown in the
following example::
following example:
.. code-block:: console
$ cinder migrate volumeID destinationHost --force-host-copy True|False
@@ -45,7 +47,9 @@ Create a volume
This example creates a my-new-volume volume based on an image.
#. List images, and note the ID of the image that you want to use for your
volume::
volume:
.. code-block:: console
$ nova image-list
@@ -60,7 +64,9 @@ This example creates a my-new-volume volume based on an image.
+-----------------------+---------------------------------+--------+--------------------------+
#. List the availability zones, and note the ID of the availability zone in
which you want to create your volume::
which you want to create your volume:
.. code-block:: console
$ cinder availability-zone-list
@@ -71,7 +77,9 @@ This example creates a my-new-volume volume based on an image.
+------+-----------+
#. Create a volume with 8 gibibytes (GiB) of space, and specify the
availability zone and image::
availability zone and image:
.. code-block:: console
$ cinder create 8 --display-name my-new-volume --image-id 397e713c-b95b-4186-ad46-6126863ea0a9 --availability-zone nova
@@ -96,7 +104,9 @@ This example creates a my-new-volume volume based on an image.
+---------------------+--------------------------------------+
#. To verify that your volume was created successfully, list the available
volumes::
volumes:
.. code-block:: console
$ cinder list
@@ -116,7 +126,9 @@ Attach a volume to an instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#. Attach your volume to a server, specifying the server ID and the volume
ID::
ID:
.. code-block:: console
$ nova volume-attach 84c6e57d-a6b1-44b6-81eb-fcb36afd31b5 573e024d-5235-49ce-8332-be1576d323f8 /dev/vdb
@@ -133,7 +145,7 @@ Attach a volume to an instance
#. Show information for your volume:
.. code::
.. code-block:: console
$ cinder show 573e024d-5235-49ce-8332-be1576d323f8
@@ -141,7 +153,7 @@ Attach a volume to an instance
``84c6e57d-a6b1-44b6-81eb-fcb36afd31b5``, is in the nova availability
zone, and is bootable.
.. code::
.. code-block:: console
+------------------------------+------------------------------------------+
| Property | Value |
@@ -179,18 +191,17 @@ Resize a volume
To detach the volume from your server, pass the server ID and volume ID
to the following command:
.. code::
.. code-block:: console
$ nova volume-detach 84c6e57d-a6b1-44b6-81eb-fcb36afd31b5 573e024d-5235-49ce-8332-be1576d323f8
The ``volume-detach`` command does not return any output.
#. List volumes::
#. List volumes:
.. code-block:: console
$ cinder list
.. code::
+----------------+-----------+-----------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+----------------+-----------+-----------------+------+-------------+----------+-------------+
@@ -201,7 +212,9 @@ Resize a volume
Note that the volume is now available.
#. Resize the volume by passing the volume ID and the new size (a value
greater than the old one) as parameters::
greater than the old one) as parameters:
.. code-block:: console
$ cinder extend 573e024d-5235-49ce-8332-be1576d323f8 10
@@ -214,19 +227,20 @@ Delete a volume
To detach the volume from your server and check for the list of existing
volumes, see steps 1 and 2 in Resize_a_volume_.
Delete the volume using either the volume name or ID::
Delete the volume using either the volume name or ID:
.. code-block:: console
$ cinder delete my-new-volume
The delete command does not return any output.
#. List the volumes again, and note that the status of your volume is
``deleting``::
``deleting``:
.. code-block:: console
$ cinder list
.. code::
+-----------------+-----------+-----------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+-----------------+-----------+-----------------+------+-------------+----------+-------------+
@@ -235,12 +249,11 @@ Delete a volume
+-----------------+-----------+-----------------+------+-------------+----------+-------------+
When the volume is fully deleted, it disappears from the list of
volumes::
volumes:
.. code-block:: console
$ cinder list
.. code::
+-----------------+-----------+-----------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+-----------------+-----------+-----------------+------+-------------+----------+-------------+
@@ -273,12 +286,11 @@ Use cases include:
Create a volume transfer request
--------------------------------
#. While logged in as the volume donor, list the available volumes::
#. While logged in as the volume donor, list the available volumes:
.. code-block:: console
$ cinder list
.. code::
+-----------------+-----------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+-----------------+-----------+--------------+------+-------------+----------+-------------+
@@ -287,21 +299,25 @@ Create a volume transfer request
+-----------------+-----------+--------------+------+-------------+----------+-------------+
#. As the volume donor, request a volume transfer authorization code for a
specific volume::
specific volume:
.. code-block:: console
$ cinder transfer-create volumeID
The volume must be in an ``available`` state or the request will be
denied. If the transfer request is valid in the database (that is, it
has not expired or been deleted), the volume is placed in an
``awaiting transfer`` state. For example::
``awaiting transfer`` state. For example:
.. code-block:: console
$ cinder transfer-create a1cdace0-08e4-4dc7-b9dc-457e9bcfe25f
The output shows the volume transfer ID in the ``id`` row and the
authorization key.
.. code::
.. code-block:: console
+------------+--------------------------------------+
| Property | Value |
@@ -327,12 +343,11 @@ Create a volume transfer request
#. Send the volume transfer ID and authorization key to the new owner (for
example, by email).
#. View pending transfers::
#. View pending transfers:
.. code-block:: console
$ cinder transfer-list
.. code::
+--------------------------------------+--------------------------------------+------+
| ID | VolumeID | Name |
+--------------------------------------+--------------------------------------+------+
@@ -340,12 +355,11 @@ Create a volume transfer request
+--------------------------------------+--------------------------------------+------+
#. After the volume recipient, or new owner, accepts the transfer, you can
see that the transfer is no longer available::
see that the transfer is no longer available:
.. code-block:: console
$ cinder transfer-list
.. code::
+----+-----------+------+
| ID | Volume ID | Name |
+----+-----------+------+
@@ -357,16 +371,17 @@ Accept a volume transfer request
#. As the volume recipient, you must first obtain the transfer ID and
authorization key from the original owner.
#. Accept the request::
#. Accept the request:
.. code-block:: console
$ cinder transfer-accept transferID authKey
For example::
For example:
.. code-block:: console
$ cinder transfer-accept 6e4e9aa4-bed5-4f94-8f76-df43232f44dc b2c8e585cbc68a80
.. code::
+-----------+--------------------------------------+
| Property | Value |
+-----------+--------------------------------------+
@@ -383,12 +398,11 @@ Accept a volume transfer request
Delete a volume transfer
------------------------
#. List available volumes and their statuses::
#. List available volumes and their statuses:
.. code-block:: console
$ cinder list
.. code::
+-------------+-----------------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+-------------+-----------------+--------------+------+-------------+----------+-------------+
@@ -396,46 +410,43 @@ Delete a volume transfer
| a1cdace0... |awaiting-transfer| None | 1 | None | false | |
+-------------+-----------------+--------------+------+-------------+----------+-------------+
#. Find the matching transfer ID::
#. Find the matching transfer ID:
.. code-block:: console
$ cinder transfer-list
.. code::
+--------------------------------------+--------------------------------------+------+
| ID | VolumeID | Name |
+--------------------------------------+--------------------------------------+------+
| a6da6888-7cdf-4291-9c08-8c1f22426b8a | a1cdace0-08e4-4dc7-b9dc-457e9bcfe25f | None |
+--------------------------------------+--------------------------------------+------+
#. Delete the volume::
#. Delete the volume:
.. code-block:: console
$ cinder transfer-delete transferID
For example:
.. code::
.. code-block:: console
$ cinder transfer-delete a6da6888-7cdf-4291-9c08-8c1f22426b8a
#. Verify that transfer list is now empty and that the volume is again
available for transfer::
available for transfer:
.. code-block:: console
$ cinder transfer-list
.. code::
+----+-----------+------+
| ID | Volume ID | Name |
+----+-----------+------+
+----+-----------+------+
.. code::
.. code-block:: console
$ cinder list
.. code::
+-----------------+-----------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+-----------------+-----------+--------------+------+-------------+----------+-------------+

View File

@@ -42,7 +42,9 @@ On any shell from which you want to run OpenStack commands, source the
``PROJECT-openrc.sh`` file for the respective project.
In the following example, the ``demo-openrc.sh`` file is sourced for
the demo project::
the demo project:
.. code-block:: console
$ source demo-openrc.sh
@@ -56,7 +58,9 @@ Alternatively, you can create the ``PROJECT-openrc.sh`` file from
scratch, if you cannot download the file from the dashboard.
In a text editor, create a file named ``PROJECT-openrc.sh`` and add
the following authentication information::
the following authentication information:
.. code-block:: shell
export OS_USERNAME=username
export OS_PASSWORD=password
@@ -70,7 +74,9 @@ the following authentication information::
On any shell from which you want to run OpenStack commands, source the
``PROJECT-openrc.sh`` file for the respective project. In this
example, you source the ``admin-openrc.sh`` file for the admin
project::
project:
.. code-block:: console
$ source admin-openrc.sh
@@ -99,7 +105,9 @@ environment variable settings by using the options that are listed at
the end of the ``help`` output of the various client commands. For
example, you can override the ``OS_PASSWORD`` setting in the
``PROJECT-openrc.sh`` file by specifying a password on a
:command:`openstack` command, as follows::
:command:`openstack` command, as follows:
.. code-block:: console
$ openstack --os-password PASSWORD service list

View File

@@ -11,15 +11,19 @@ Once you have the dashboard installed you can customize the way it looks
and feels to suit your own needs.
.. note::
The OpenStack dashboard by default on Ubuntu installs the
``openstack-dashboard-ubuntu-theme`` package.
If you do not want to use this theme you can remove it and its
dependencies using the following command::
dependencies using the following command:
.. code-block:: console
# apt-get remove --auto-remove openstack-dashboard-ubuntu-theme
.. note::
This guide focuses on the ``local_settings.py`` file, stored in
``/openstack-dashboard/openstack_dashboard/local/``.
@@ -42,7 +46,9 @@ Logo and site colors
#. Change the colors and image file names as appropriate, though the
relative directory paths should be the same. The following example file
shows you how to customize your CSS file::
shows you how to customize your CSS file:
.. code-block:: css
/*
* New theme colors for dashboard that override the defaults:
@@ -78,12 +84,16 @@ Logo and site colors
text-decoration: none;
}
#. Open the following HTML template in an editor of your choice::
#. Open the following HTML template in an editor of your choice:
.. code-block:: console
/usr/share/openstack-dashboard/openstack_dashboard/templates/_stylesheets.html
#. Add a line to include your newly created style sheet. For example
``custom.css``::
``custom.css``:
.. code-block:: html
<link href='{{ STATIC_URL }}bootstrap/css/bootstrap.min.css' media='screen' rel='stylesheet' />
<link href='{{ STATIC_URL }}dashboard/css/{% choose_css %}' media='screen' rel='stylesheet' />
@@ -91,15 +101,21 @@ Logo and site colors
#. Restart Apache:
On Ubuntu::
On Ubuntu:
.. code-block:: console
# service apache2 restart
On Fedora, RHEL, CentOS::
On Fedora, RHEL, CentOS:
.. code-block:: console
# service httpd restart
On openSUSE::
On openSUSE:
.. code-block:: console
# service apache2 restart
@@ -109,7 +125,9 @@ Logo and site colors
HTML title
~~~~~~~~~~
#. Set the HTML title, which appears at the top of the browser window, by
adding the following line to ``local_settings.py``::
adding the following line to ``local_settings.py``:
.. code-block:: python
SITE_BRANDING = "Example, Inc. Cloud"
@@ -119,7 +137,9 @@ Logo link
~~~~~~~~~
#. The logo also acts as a hyperlink. The default behavior is to redirect
to ``horizon:user_home``. To change this, add the following attribute to
``local_settings.py``::
``local_settings.py``:
.. code-block:: python
SITE_BRANDING_LINK = "http://example.com"
@@ -129,7 +149,9 @@ Help URL
~~~~~~~~
#. By default the help URL points to http://docs.openstack.org. Change this
by editing the following attribute to the URL of your choice in
``local_settings.py``::
``local_settings.py``:
.. code-block:: python
'help_url': "http://openstack.mycompany.org"

View File

@@ -35,7 +35,9 @@ This example is a high-level process flow for using Database services:
followed by the :command:`trove show` command to get the IP address of
it.
#. Access the Database service instance using typical database access
commands. For example, with MySQL::
commands. For example, with MySQL:
.. code-block:: console
$ mysql -u myuser -p -h TROVE_IP_ADDRESS mydb

View File

@@ -20,11 +20,7 @@ server role.
support <https://github.com/kanaka/noVNC/wiki/Browser-support>`__.
#. In the address bar, enter the host name or IP address for the
dashboard.
.. code::
https://ipAddressOrHostName/
dashboard, for example ``https://ipAddressOrHostName/``.
.. note::

View File

@@ -18,7 +18,9 @@ Show host usage statistics
The following examples show the host usage statistics for a host called
``devstack``.
- List the hosts and the nova-related services that run on them::
- List the hosts and the nova-related services that run on them:
.. code-block:: console
$ nova host-list
+-----------+-------------+----------+
@@ -33,7 +35,9 @@ The following examples show the host usage statistics for a host called
+-----------+-------------+----------+
- Get a summary of resource usage of all of the instances running on
the host::
the host:
.. code-block:: console
$ nova host-describe devstack
+----------+----------------------------------+-----+-----------+---------+
@@ -77,7 +81,7 @@ Show instance usage statistics
#. List instances:
.. code::
.. code-block:: console
$ nova list
+----------+----------------------+--------+------------+-------------+------------------+
@@ -89,7 +93,7 @@ Show instance usage statistics
#. Get diagnostic statistics:
.. code::
.. code-block:: console
$ nova diagnostics myCirrosServer
+------------------+----------------+
@@ -114,7 +118,7 @@ Show instance usage statistics
- Get summary statistics for each tenant:
.. code::
.. code-block:: console
$ nova usage-list
Usage from 2013-06-25 to 2013-07-24:

View File

@@ -53,7 +53,9 @@ including a complete report of the service's current state, and is sent to
For example, if you redirect error output to ``nova-api-err.log``
using :command:`nova-api 2>/var/log/nova/nova-api-err.log`,
resulting in the process ID 8675, you can then run::
resulting in the process ID 8675, you can then run:
.. code-block:: console
# kill -USR1 8675
@@ -142,7 +144,9 @@ Next, check the log file for the instance in the ``/var/log/libvirt/qemu``
directory to see if it exists and has any useful error messages in it.
Finally, from the ``/var/lib/nova/instances`` directory for the instance,
see if this command returns an error::
see if this command returns an error:
.. code-block:: console
# virsh create libvirt.xml
@@ -158,7 +162,9 @@ This occurs when the Compute service attempts to retrieve the log output
of the instance via a serial console while the instance itself is not
configured to send output to the console. To rectify this, append the
following parameters to kernel arguments specified in the instance's boot
loader::
loader:
.. code-block:: ini
console=tty0 console=ttyS0,115200n8
@@ -173,13 +179,18 @@ Reset the state of an instance
If an instance remains in an intermediate state, such as ``deleting``, you
can use the :command:`nova reset-state` command to manually reset the state
of an instance to an error state. You can then delete the instance. For example::
of an instance to an error state. You can then delete the instance. For
example:
.. code-block:: console
$ nova reset-state c6bbbf26-b40a-47e7-8d5c-eb17bf65c485
$ nova delete c6bbbf26-b40a-47e7-8d5c-eb17bf65c485
You can also use the :option:`--active` parameter to force the instance back
to an active state instead of an error state. For example::
to an active state instead of an error state. For example:
.. code-block:: console
$ nova reset-state --active c6bbbf26-b40a-47e7-8d5c-eb17bf65c485
@@ -194,7 +205,6 @@ If instances do not boot or boot slowly, investigate file injection as a cause.
To disable injection in libvirt, set the following in ``nova.conf``:
.. code-block:: ini
:linenos:
[libvirt]
inject_partition = -2
@@ -222,7 +232,6 @@ You can turn off the live snapshotting mechanism by setting up its value to
``True`` in the ``[workarounds]`` section of the ``nova.conf`` file:
.. code-block:: ini
:linenos:
[workarounds]
disable_libvirt_livesnapshot = True