Make code blocks in documentation prettier

This commit tags code blocks with the appropriate language so that
Sphinx can add syntax highlighting and make them look nicer.

Change-Id: Id8f178110236b1d97015162b148f3e9127251a3a
This commit is contained in:
Chris St. Pierre 2015-09-24 09:16:19 -05:00
parent a7793e6612
commit ce94b93875
3 changed files with 34 additions and 18 deletions

View File

@ -37,14 +37,14 @@ How to contribute
3. Tell git your details: 3. Tell git your details:
.. code-block:: none .. code-block:: bash
git config --global user.name "Firstname Lastname" git config --global user.name "Firstname Lastname"
git config --global user.email "your_email@youremail.com" git config --global user.email "your_email@youremail.com"
4. Install git-review. This tool takes a lot of the pain out of remembering commands to push code up to Gerrit for review and to pull it back down to edit it. It is installed using: 4. Install git-review. This tool takes a lot of the pain out of remembering commands to push code up to Gerrit for review and to pull it back down to edit it. It is installed using:
.. code-block:: none .. code-block:: bash
pip install git-review pip install git-review
@ -52,13 +52,13 @@ Several Linux distributions (notably Fedora 16 and Ubuntu 12.04) are also starti
5. Grab the Rally repository: 5. Grab the Rally repository:
.. code-block:: none .. code-block:: bash
git clone git@github.com:openstack/rally.git git clone git@github.com:openstack/rally.git
6. Checkout a new branch to hack on: 6. Checkout a new branch to hack on:
.. code-block:: none .. code-block:: bash
git checkout -b TOPIC-BRANCH git checkout -b TOPIC-BRANCH
@ -66,7 +66,7 @@ Several Linux distributions (notably Fedora 16 and Ubuntu 12.04) are also starti
8. Run the test suite locally to make sure nothing broke, e.g. (this will run py26/py27/pep8 tests): 8. Run the test suite locally to make sure nothing broke, e.g. (this will run py26/py27/pep8 tests):
.. code-block:: none .. code-block:: bash
tox tox
@ -76,7 +76,7 @@ If you extend Rally with new functionality, make sure you have also provided uni
9. Commit your work using: 9. Commit your work using:
.. code-block:: none .. code-block:: bash
git commit -a git commit -a
@ -85,7 +85,7 @@ Make sure you have supplied your commit with a neat commit message, containing a
10. Push the commit up for code review using: 10. Push the commit up for code review using:
.. code-block:: none .. code-block:: bash
git review -R git review -R
@ -120,24 +120,32 @@ About Rally unit tests:
- `Tox <https://tox.readthedocs.org/en/latest/>`_ is used to run unit tests - `Tox <https://tox.readthedocs.org/en/latest/>`_ is used to run unit tests
To run unit tests locally:: To run unit tests locally:
.. code-block:: console
$ pip install tox $ pip install tox
$ tox $ tox
To run py26, py27 or pep8 only:: To run py26, py27 or pep8 only:
.. code-block:: console
$ tox -e <name> $ tox -e <name>
#NOTE: <name> is one of py26, py27 or pep8 #NOTE: <name> is one of py26, py27 or pep8
To get test coverage:: To get test coverage:
.. code-block:: console
$ tox -e cover $ tox -e cover
#NOTE: Results will be in /cover/index.html #NOTE: Results will be in /cover/index.html
To generate docs:: To generate docs:
.. code-block:: console
$ tox -e docs $ tox -e docs
@ -151,7 +159,9 @@ Functional tests
The goal of `functional tests <https://en.wikipedia.org/wiki/Functional_testing>`_ is to check that everything works well together. The goal of `functional tests <https://en.wikipedia.org/wiki/Functional_testing>`_ is to check that everything works well together.
Functional tests use Rally API only and check responses without touching internal parts. Functional tests use Rally API only and check responses without touching internal parts.
To run functional tests locally:: To run functional tests locally:
.. code-block:: console
$ source openrc $ source openrc
$ rally deployment create --fromenv --name testing $ rally deployment create --fromenv --name testing

View File

@ -45,7 +45,7 @@ Results
1. Concurrency = 4 1. Concurrency = 4
.. code-block:: none .. code-block:: json
{'context': {'users': {'concurrent': 30, {'context': {'users': {'concurrent': 30,
'tenants': 12, 'tenants': 12,
@ -66,7 +66,7 @@ Results
2. Concurrency = 16 2. Concurrency = 16
.. code-block:: none .. code-block:: json
{'context': {'users': {'concurrent': 30, {'context': {'users': {'concurrent': 30,
'tenants': 12, 'tenants': 12,
@ -86,7 +86,7 @@ Results
3. Concurrency = 32 3. Concurrency = 32
.. code-block:: none .. code-block:: json
{'context': {'users': {'concurrent': 30, {'context': {'users': {'concurrent': 30,
'tenants': 12, 'tenants': 12,

View File

@ -69,7 +69,9 @@ https://review.openstack.org/#/c/96300/
Rally was deployed for cluster using `ExistingCloud <https://github.com/openstack/rally/blob/master/samples/deployments/existing.json>`_ type of deployment. Rally was deployed for cluster using `ExistingCloud <https://github.com/openstack/rally/blob/master/samples/deployments/existing.json>`_ type of deployment.
**Server flavor** :: **Server flavor**
.. code-block:: console
$ nova flavor-show ram64 $ nova flavor-show ram64
+----------------------------+--------------------------------------+ +----------------------------+--------------------------------------+
@ -88,7 +90,9 @@ Rally was deployed for cluster using `ExistingCloud <https://github.com/openstac
| vcpus | 1 | | vcpus | 1 |
+----------------------------+--------------------------------------+ +----------------------------+--------------------------------------+
**Server image** :: **Server image**
.. code-block:: console
$ nova image-show TestVM $ nova image-show TestVM
+----------------------------+-------------------------------------------------+ +----------------------------+-------------------------------------------------+
@ -107,7 +111,9 @@ Rally was deployed for cluster using `ExistingCloud <https://github.com/openstac
+----------------------------+-------------------------------------------------+ +----------------------------+-------------------------------------------------+
**Task configuration file (in JSON format):** :: **Task configuration file (in JSON format):**
.. code-block:: json
{ {
"NovaServers.boot_server": [ "NovaServers.boot_server": [