Fix rst errors in README

This fixes some rst formatting errors in the README file. The
readme is used as the package long description on pypi, and
they have recently enabled some checks that cause package
upload errors if there are formatting issues with the rst
content.

Change-Id: I3ff7a509c2b875606c985c87b61a63c5e15c1bda
(cherry picked from commit be83eae483)
This commit is contained in:
Sean McGinnis 2018-07-16 17:15:41 -05:00
parent 4c831b53b6
commit 770f74861e
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
1 changed files with 40 additions and 27 deletions

View File

@ -8,48 +8,56 @@ Team and repository tags
.. Change things from this point on .. Change things from this point on
Python bindings to the Monasca API Python bindings to the Monasca API
======================================= ==================================
This is a client library for Monasca built to interface with the Monasca API. It This is a client library for Monasca built to interface with the Monasca API.
provides a Python API (the ``monascaclient`` module) and a command-line tool It provides a Python API (the ``monascaclient`` module) and a command-line tool
(``monasca``). (``monasca``).
The Monasca Client was written using the OpenStack Heat Python client as a framework. The Monasca Client was written using the OpenStack Heat Python client as a
framework.
.. contents:: Contents: .. contents:: Contents:
:local: :local:
Ubuntu Install Ubuntu Install
-------------- --------------
Requires: Requires::
- pip - version >= 1.4. python get-pip.py
pip - version >= 1.4. python get-pip.py
See versions on PYPI: See versions on PYPI:
https://pypi.python.org/pypi/python-monascaclient/ https://pypi.python.org/pypi/python-monascaclient/
Install It: Install It::
- sudo pip install python-monascaclient
Alternative Manual Install Steps: sudo pip install python-monascaclient
- cd to your python-monascaclient repo
- sudo pip install -r requirements.txt Alternative Manual Install Steps::
- python setup.py install
cd <path to your python-monascaclient repo>
sudo pip install -r requirements.txt
python setup.py install
Building and Packaging Building and Packaging
---------------------- ----------------------
Install the tool dependencies Install the tool dependencies::
sudo apt-get install python-pip python-virtualenv
In the python-monascaclient source directory sudo apt-get install python-pip python-virtualenv
virtualenv --no-site-packages .venv
source ./.venv/bin/activate In the python-monascaclient source directory::
pip install wheel virtualenv --no-site-packages .venv
python setup.py bdist_wheel source ./.venv/bin/activate
pip install $(ls -1rt dist/*.whl | tail -1) --upgrade pip install wheel
python setup.py bdist_wheel
pip install $(ls -1rt dist/*.whl | tail -1) --upgrade
Command-line API Command-line API
---------------- ----------------
@ -57,6 +65,9 @@ Installing this distribution gets you a shell command, ``monasca``, that you
can use to interact with the Monitoring API server. can use to interact with the Monitoring API server.
Usage: Usage:
.. code-block:: console
monasca monasca
monasca help monasca help
@ -66,15 +77,15 @@ Usage:
This outputs the results in json format. Normally output is in table format. This outputs the results in json format. Normally output is in table format.
The monascaclient CLI needs the Monasca API endpoint url and the OS_AUTH_TOKEN to pass to the The monascaclient CLI needs the Monasca API endpoint url and the OS_AUTH_TOKEN
Monasca API RESTful interface. This is provided through environment or CLI to pass to the Monasca API RESTful interface. This is provided through
parameters. environment or CLI parameters.
Environmental Variables Environmental Variables
======================= =======================
Environmental variables can be sourced, or optionally passed in as CLI arguments. Environmental variables can be sourced, or optionally passed in as CLI
It is easiest to source them first and then use the CLI. arguments. It is easiest to source them first and then use the CLI.
When token and endpoint are known:: When token and endpoint are known::
@ -92,7 +103,8 @@ When using Keystone to obtain the token and endpoint::
# Optional(specific version added to OS_AUTH_URL if (v2.0 or v3) not present already) # Optional(specific version added to OS_AUTH_URL if (v2.0 or v3) not present already)
export OS_AUTH_VERSION= export OS_AUTH_VERSION=
When OS_USER_DOMAIN_NAME is not set, then 'Default' is assumed. Alternatively IDs can be used instead of names. When OS_USER_DOMAIN_NAME is not set, then 'Default' is assumed. Alternatively
IDs can be used instead of names.
Although *deprecated*, but OS_TENANT_NAME and OS_TENANT_ID can be used for Although *deprecated*, but OS_TENANT_NAME and OS_TENANT_ID can be used for
OS_PROEJCT_NAME and OS_PROJECT_ID respectively. OS_PROEJCT_NAME and OS_PROJECT_ID respectively.
@ -102,7 +114,8 @@ When using Vagrant Environment with middleware disabled::
export OS_NO_CLIENT_AUTH=1 export OS_NO_CLIENT_AUTH=1
export MONASCA_API_URL=http://192.168.10.4:8070/v2.0/ export MONASCA_API_URL=http://192.168.10.4:8070/v2.0/
The Monasca API will treat the auth token as the tenant ID when Keystone is not enabled. The Monasca API will treat the auth token as the tenant ID when Keystone is not
enabled.
Usage Usage
===== =====