Adding instructions on README
diff --git a/README.md b/README.md
index 749c245..c0e0c8f 100644
--- a/README.md
+++ b/README.md
@@ -1,119 +1,159 @@
-=================================================
Tempest Integration of Tungsten Fabric (Contrail)
=================================================
This directory contains Tempest tests to cover the contrail project, as well
as a plugin to automatically load these tests into tempest. This is a set of
integration tests to be run against a live open-contrail cluster. Tempest has
-testcases for Contrail API validation, scenarios, and other specific tests
+test-cases for Contrail API validation, scenarios, and other specific tests
useful in validating an open-contrail deployment.
See the tempest plugin docs for information on using it:
-http://docs.openstack.org/developer/tempest/plugin.html#using-plugins
+
+[http://docs.openstack.org/developer/tempest/plugin.html#using-plugins](http://docs.openstack.org/developer/tempest/plugin.html#using-plugins)
See the tempest docs for information on writing new tests etc:
-http://docs.openstack.org/developer/tempest/
+
+[http://docs.openstack.org/developer/tempest/](http://docs.openstack.org/developer/tempest/)
+
Quickstart
----------
-To run tungstent-tempest, you must first have `Tempest`_ installed and configured
-properly. Please reference Tempest's `Quickstart`_ guide to do so. Follow all
-the steps outlined therein. You can install all these includin tempest in a virtual
+#Tempest Installation
+
+To run *tungsten-tempest*, you must first have `Tempest`_ installed and configured
+properly. Please reference Tempest's `Quickstart`_ guide to do so and for all
+exact details. Follow all the steps outlined therein.
+
+ Here are some sample steps:
+
+ $ git clone https://git.openstack.org/openstack/tempest
+ $ cd tempest
+ $ pip install -r requirements.txt
+ $ pip install -r test-requirements.txt
+ $ pip install tox
+ $ pip install tempest
+
+Now below command should show you list of available tempest test cases.
+
+ $ ostestr -l
+
+You can install all these including tempest in a virtual
environment. If virtual environment is not installed, then install it using
-"sud apt-get install python-virtualenv". Afterward, proceed with the steps below.
+"`sudo apt-get install python-virtualenv`". Afterward, proceed with the steps below.
-#. Second, you need to install Patrole. This is done with pip after you check out
- the Patrole repo. Please reference `Patrole'`_'s `Quickstart`_ guide for further
- details::
+#Patrole Installation
- $ git clone https://git.openstack.org/openstack/patrole
- $ pip install patrole/
+This is done with pip after you check out the [Patrole repo](https://github.com/openstack/patrole "Patrole repo"). Please reference `Patrole` [Quickstart](https://github.com/openstack/patrole/blob/master/README.rst "Quickstart") guide for further details.
- This can be done within a venv.
+ Here are some sample steps:
- .. note::
+ $ git clone https://git.openstack.org/openstack/patrole
+ $ cd patrole
+ $ pip install -e .
- You may also install Patrole from source code by running::
+NOTE: This can be done within a venv.
+Now below command should show you list of available Patrole test cases.
+
+ $ ostestr -l | grep patrole
- pip install -e patrole/
+#Tungsten-tempest Installation
-#. Then you need to install tungsten-fabric This is done with pip after you chekc out
- the tungsten-tempest repo::
+This is done with pip after you check out the tungsten-tempest repo::
- $ git clone https://git.openstack.org/tungsten/tungsten-tempest
- $ source tempestV/bin/activate
- $ pip install tungstent_tempest/
+ $ git clone https://git.openstack.org/tungsten/tungsten-tempest
+ $ pip install -e tungsten_tempest/
- This can be done within a venv.
+NOTE: This can be done within a venv.
+Now below command should show you list of available tungsten-tempest test cases.
- .. note::
+ $ ostestr -l | grep tungsten
- You may also install tungsten-fabric from source code by running::
+#Configuration
- pip install -e tungsten_tempest/
+You must properly configure tempest, which is relatively straightforward. For details on configuring tempest refer to the [tempest-configuration](https://github.com/openstack/tempest/blob/master/doc/source/configuration.rst "tempest-configuration").
-#. Next you must properly configure tempest, which is relatively
- straightforward. For details on configuring tempest refer to the
- :ref:`tempest-configuration`.
+Next you must properly configure Patrole, which is relatively straightforward. For details on configuring Patrole refer to the [patrole-configuration](https://github.com/openstack/patrole/blob/master/doc/source/configuration.rst "patrole-configuration")
-#. Next you must properly configure Patrole, which is relatively
- straightforward. For details on configuring Patrole refer to the
- :ref:`patrole-configuration`.
+Next you must properly configure tungsten-fabric, which is relatively straightforward too. For details on configuring tungsten-fabric refer to the :ref:`tungsten-configuration`.
-#. Next you must properly configure tungsten-fabric, which is relatively
- straightforward. For details on configuring tungsten-fabirc refer to the
- :ref:`tungsten-configuration`.
+After comfiguring tempmest.conf as per tempest and Patrole requirements, please make below changes too in the patrole section of tempest.conf:
-#. Once the configuration is done you're now ready to run tungsten-fabric.
- This can be done using the `tempest_run`_ command. This can be done by running::
+ enable_rbac must be true.
- $ tempest run --regex '^tungsten_tempest_plugin\.tests\.api'
+ test_custom_requirements must be true if you want to run tests against a `custom_requirements_file` which defines RBAC requirements.
- There is also the option to use testr directly, or any `testr`_ based test
- runner, like `ostestr`_. For example, from the workspace dir run::
+ custom_requirements_file must be absolute path of file path of the YAML file that defines your RBAC requirements.
- $ stestr --regex '(?!.*\[.*\bslow\b.*\])(^tungsten_tempest_plugin\.tests\.api))'
+For the details about these flags please refer [patrole.conf.sample](https://github.com/openstack/patrole/blob/master/etc/patrole.conf.sample "patrole.conf.sample") file.
- will run the same set of tests as the default gate jobs.
- You can also run tungsten_tempest tests using `tox`_. To do so, ``cd`` into the
- **Tempest** directory and run::
+**NOTE:** Make sure you have contrail endpoints in keystone catalog-list already like sdn-l-config-*. Otherwise configure below two keys under [sdn] section of tempest.conf.
- $ tox -eall-plugin -- tungstent_tempest_plugin.tests.api
+ [sdn]
+ endpoint_type = <public|admin|internal|publicURL|adminURL|internalURL>
+ catalog_type = <Catalog type of the SDN service, default sdn-l-config>
-#. Log information from tests is captured in ``tempest.log`` under the Tempest
- repository. Some Patrole debugging information is captured in that log
- related to expected test results and :ref:`role-overriding`.
+#Running tungsten-tempest
- More detailed RBAC testing log output is emitted to ``tungsten_log``.
- To configure Patrole's logging, see the :ref:`tungsten-tempest-configuration` guide.
+Once the configuration is done you're now ready to run tungsten-fabric.
-.. _Tempest: https://github.com/openstack/tempest
-.. _Quickstart: https://docs.openstack.org/tempest/latest/overview.html#quickstart
-.. _tempest_run: https://docs.openstack.org/tempest/latest/run.html
-.. _testr: https://testrepository.readthedocs.org/en/latest/MANUAL.html
-.. _ostestr: https://docs.openstack.org/os-testr/latest/
-.. _tox: https://tox.readthedocs.io/en/latest/
+The easiest way to run is using any testr utilities like below:
-RBAC Tests
+ $ ostestr run --regex tungsten_tempest_plugin.tests.api
+
+This can also be done using the `tempest_run`_ command. This can be done by running::
+
+ $ tempest run --regex '^tungsten_tempest_plugin\.tests\.api'
+
+There is also the option to use testr directly, or any `testr`_ based test runner, like `ostestr`_. For example, from the work-space dir run::
+
+ $ stestr --regex '(?!.*\[.*\bslow\b.*\])(^tungsten_tempest_plugin\.tests\.api))'
+
+will run the same set of tests as the default gate jobs.
+
+You can also run tungsten_tempest tests using `tox`_. To do so, ``cd`` into the **Tempest** directory and run::
+
+ $ tox -eall-plugin -- tungstent_tempest_plugin.tests.api
+
+#Log Information
+
+Log information from tests is captured in ``tempest.log`` under the Tempest repository. Some Patrole debugging information is captured in that log related to expected test results and :ref:`role-overriding`.
+
+More detailed RBAC testing log output is emitted to ``tungsten_log``.
+
+To configure tungsten-tempest's logging, see the :ref:`tungsten-tempest-configuration` guide.
+
+
+Tempest: [https://github.com/openstack/tempest](https://github.com/openstack/tempest)
+
+Tempest Quickstart: [https://docs.openstack.org/tempest/latest/overview.html#quickstart](https://docs.openstack.org/tempest/latest/overview.html#quickstart)
+
+tempest_run: [https://docs.openstack.org/tempest/latest/run.html](https://docs.openstack.org/tempest/latest/run.html)
+
+testr: [https://testrepository.readthedocs.org/en/latest/MANUAL.html
+](https://testrepository.readthedocs.org/en/latest/MANUAL.html)
+
+ostestr: [https://docs.openstack.org/os-testr/latest/](https://docs.openstack.org/os-testr/latest/)
+
+tox: [https://tox.readthedocs.io/en/latest/](https://tox.readthedocs.io/en/latest/)
+
+
+
+#RBAC Tests
----------
-To change the role that the tungsten_tempest tests are being run as, edit
-``rbac_test_role`` in the ``patrole`` section of tempest.conf: ::
+To change the role that the tungsten_tempest tests are being run as, edit ``rbac_test_role`` in the ``patrole`` section of tempest.conf: ::
[patrole]
rbac_test_role = member
...
-.. note::
+**NOTE**::
- The ``rbac_test_role`` is service-specific. member, for example,
- is an arbitrary role, but by convention is used to designate the default
- non-admin role in the system. Most tunsgtent_tempest tests should be run with
- **admin** and **member** roles. However, other services may use entirely
- different roles.
+The ``rbac_test_role`` is service-specific. member, for example, is an arbitrary role, but by convention is used to designate the default non-admin role in the system. Most tunsgtent_tempest tests should be run with **admin** and **member** roles. However, other services may use entirely different roles.
For more information about the member role and its nomenclature,
+
please see: `<https://ask.openstack.org/en/question/4759/member-vs-_member_/>`__.
diff --git a/README.rst b/README.rst
index 749c245..c0e0c8f 100644
--- a/README.rst
+++ b/README.rst
@@ -1,119 +1,159 @@
-=================================================
Tempest Integration of Tungsten Fabric (Contrail)
=================================================
This directory contains Tempest tests to cover the contrail project, as well
as a plugin to automatically load these tests into tempest. This is a set of
integration tests to be run against a live open-contrail cluster. Tempest has
-testcases for Contrail API validation, scenarios, and other specific tests
+test-cases for Contrail API validation, scenarios, and other specific tests
useful in validating an open-contrail deployment.
See the tempest plugin docs for information on using it:
-http://docs.openstack.org/developer/tempest/plugin.html#using-plugins
+
+[http://docs.openstack.org/developer/tempest/plugin.html#using-plugins](http://docs.openstack.org/developer/tempest/plugin.html#using-plugins)
See the tempest docs for information on writing new tests etc:
-http://docs.openstack.org/developer/tempest/
+
+[http://docs.openstack.org/developer/tempest/](http://docs.openstack.org/developer/tempest/)
+
Quickstart
----------
-To run tungstent-tempest, you must first have `Tempest`_ installed and configured
-properly. Please reference Tempest's `Quickstart`_ guide to do so. Follow all
-the steps outlined therein. You can install all these includin tempest in a virtual
+#Tempest Installation
+
+To run *tungsten-tempest*, you must first have `Tempest`_ installed and configured
+properly. Please reference Tempest's `Quickstart`_ guide to do so and for all
+exact details. Follow all the steps outlined therein.
+
+ Here are some sample steps:
+
+ $ git clone https://git.openstack.org/openstack/tempest
+ $ cd tempest
+ $ pip install -r requirements.txt
+ $ pip install -r test-requirements.txt
+ $ pip install tox
+ $ pip install tempest
+
+Now below command should show you list of available tempest test cases.
+
+ $ ostestr -l
+
+You can install all these including tempest in a virtual
environment. If virtual environment is not installed, then install it using
-"sud apt-get install python-virtualenv". Afterward, proceed with the steps below.
+"`sudo apt-get install python-virtualenv`". Afterward, proceed with the steps below.
-#. Second, you need to install Patrole. This is done with pip after you check out
- the Patrole repo. Please reference `Patrole'`_'s `Quickstart`_ guide for further
- details::
+#Patrole Installation
- $ git clone https://git.openstack.org/openstack/patrole
- $ pip install patrole/
+This is done with pip after you check out the [Patrole repo](https://github.com/openstack/patrole "Patrole repo"). Please reference `Patrole` [Quickstart](https://github.com/openstack/patrole/blob/master/README.rst "Quickstart") guide for further details.
- This can be done within a venv.
+ Here are some sample steps:
- .. note::
+ $ git clone https://git.openstack.org/openstack/patrole
+ $ cd patrole
+ $ pip install -e .
- You may also install Patrole from source code by running::
+NOTE: This can be done within a venv.
+Now below command should show you list of available Patrole test cases.
+
+ $ ostestr -l | grep patrole
- pip install -e patrole/
+#Tungsten-tempest Installation
-#. Then you need to install tungsten-fabric This is done with pip after you chekc out
- the tungsten-tempest repo::
+This is done with pip after you check out the tungsten-tempest repo::
- $ git clone https://git.openstack.org/tungsten/tungsten-tempest
- $ source tempestV/bin/activate
- $ pip install tungstent_tempest/
+ $ git clone https://git.openstack.org/tungsten/tungsten-tempest
+ $ pip install -e tungsten_tempest/
- This can be done within a venv.
+NOTE: This can be done within a venv.
+Now below command should show you list of available tungsten-tempest test cases.
- .. note::
+ $ ostestr -l | grep tungsten
- You may also install tungsten-fabric from source code by running::
+#Configuration
- pip install -e tungsten_tempest/
+You must properly configure tempest, which is relatively straightforward. For details on configuring tempest refer to the [tempest-configuration](https://github.com/openstack/tempest/blob/master/doc/source/configuration.rst "tempest-configuration").
-#. Next you must properly configure tempest, which is relatively
- straightforward. For details on configuring tempest refer to the
- :ref:`tempest-configuration`.
+Next you must properly configure Patrole, which is relatively straightforward. For details on configuring Patrole refer to the [patrole-configuration](https://github.com/openstack/patrole/blob/master/doc/source/configuration.rst "patrole-configuration")
-#. Next you must properly configure Patrole, which is relatively
- straightforward. For details on configuring Patrole refer to the
- :ref:`patrole-configuration`.
+Next you must properly configure tungsten-fabric, which is relatively straightforward too. For details on configuring tungsten-fabric refer to the :ref:`tungsten-configuration`.
-#. Next you must properly configure tungsten-fabric, which is relatively
- straightforward. For details on configuring tungsten-fabirc refer to the
- :ref:`tungsten-configuration`.
+After comfiguring tempmest.conf as per tempest and Patrole requirements, please make below changes too in the patrole section of tempest.conf:
-#. Once the configuration is done you're now ready to run tungsten-fabric.
- This can be done using the `tempest_run`_ command. This can be done by running::
+ enable_rbac must be true.
- $ tempest run --regex '^tungsten_tempest_plugin\.tests\.api'
+ test_custom_requirements must be true if you want to run tests against a `custom_requirements_file` which defines RBAC requirements.
- There is also the option to use testr directly, or any `testr`_ based test
- runner, like `ostestr`_. For example, from the workspace dir run::
+ custom_requirements_file must be absolute path of file path of the YAML file that defines your RBAC requirements.
- $ stestr --regex '(?!.*\[.*\bslow\b.*\])(^tungsten_tempest_plugin\.tests\.api))'
+For the details about these flags please refer [patrole.conf.sample](https://github.com/openstack/patrole/blob/master/etc/patrole.conf.sample "patrole.conf.sample") file.
- will run the same set of tests as the default gate jobs.
- You can also run tungsten_tempest tests using `tox`_. To do so, ``cd`` into the
- **Tempest** directory and run::
+**NOTE:** Make sure you have contrail endpoints in keystone catalog-list already like sdn-l-config-*. Otherwise configure below two keys under [sdn] section of tempest.conf.
- $ tox -eall-plugin -- tungstent_tempest_plugin.tests.api
+ [sdn]
+ endpoint_type = <public|admin|internal|publicURL|adminURL|internalURL>
+ catalog_type = <Catalog type of the SDN service, default sdn-l-config>
-#. Log information from tests is captured in ``tempest.log`` under the Tempest
- repository. Some Patrole debugging information is captured in that log
- related to expected test results and :ref:`role-overriding`.
+#Running tungsten-tempest
- More detailed RBAC testing log output is emitted to ``tungsten_log``.
- To configure Patrole's logging, see the :ref:`tungsten-tempest-configuration` guide.
+Once the configuration is done you're now ready to run tungsten-fabric.
-.. _Tempest: https://github.com/openstack/tempest
-.. _Quickstart: https://docs.openstack.org/tempest/latest/overview.html#quickstart
-.. _tempest_run: https://docs.openstack.org/tempest/latest/run.html
-.. _testr: https://testrepository.readthedocs.org/en/latest/MANUAL.html
-.. _ostestr: https://docs.openstack.org/os-testr/latest/
-.. _tox: https://tox.readthedocs.io/en/latest/
+The easiest way to run is using any testr utilities like below:
-RBAC Tests
+ $ ostestr run --regex tungsten_tempest_plugin.tests.api
+
+This can also be done using the `tempest_run`_ command. This can be done by running::
+
+ $ tempest run --regex '^tungsten_tempest_plugin\.tests\.api'
+
+There is also the option to use testr directly, or any `testr`_ based test runner, like `ostestr`_. For example, from the work-space dir run::
+
+ $ stestr --regex '(?!.*\[.*\bslow\b.*\])(^tungsten_tempest_plugin\.tests\.api))'
+
+will run the same set of tests as the default gate jobs.
+
+You can also run tungsten_tempest tests using `tox`_. To do so, ``cd`` into the **Tempest** directory and run::
+
+ $ tox -eall-plugin -- tungstent_tempest_plugin.tests.api
+
+#Log Information
+
+Log information from tests is captured in ``tempest.log`` under the Tempest repository. Some Patrole debugging information is captured in that log related to expected test results and :ref:`role-overriding`.
+
+More detailed RBAC testing log output is emitted to ``tungsten_log``.
+
+To configure tungsten-tempest's logging, see the :ref:`tungsten-tempest-configuration` guide.
+
+
+Tempest: [https://github.com/openstack/tempest](https://github.com/openstack/tempest)
+
+Tempest Quickstart: [https://docs.openstack.org/tempest/latest/overview.html#quickstart](https://docs.openstack.org/tempest/latest/overview.html#quickstart)
+
+tempest_run: [https://docs.openstack.org/tempest/latest/run.html](https://docs.openstack.org/tempest/latest/run.html)
+
+testr: [https://testrepository.readthedocs.org/en/latest/MANUAL.html
+](https://testrepository.readthedocs.org/en/latest/MANUAL.html)
+
+ostestr: [https://docs.openstack.org/os-testr/latest/](https://docs.openstack.org/os-testr/latest/)
+
+tox: [https://tox.readthedocs.io/en/latest/](https://tox.readthedocs.io/en/latest/)
+
+
+
+#RBAC Tests
----------
-To change the role that the tungsten_tempest tests are being run as, edit
-``rbac_test_role`` in the ``patrole`` section of tempest.conf: ::
+To change the role that the tungsten_tempest tests are being run as, edit ``rbac_test_role`` in the ``patrole`` section of tempest.conf: ::
[patrole]
rbac_test_role = member
...
-.. note::
+**NOTE**::
- The ``rbac_test_role`` is service-specific. member, for example,
- is an arbitrary role, but by convention is used to designate the default
- non-admin role in the system. Most tunsgtent_tempest tests should be run with
- **admin** and **member** roles. However, other services may use entirely
- different roles.
+The ``rbac_test_role`` is service-specific. member, for example, is an arbitrary role, but by convention is used to designate the default non-admin role in the system. Most tunsgtent_tempest tests should be run with **admin** and **member** roles. However, other services may use entirely different roles.
For more information about the member role and its nomenclature,
+
please see: `<https://ask.openstack.org/en/question/4759/member-vs-_member_/>`__.
diff --git a/tungsten_tempest_plugin/tests/api/contrail/rbac_base.py b/tungsten_tempest_plugin/tests/api/contrail/rbac_base.py
index dc0b2c7..d0137c2 100644
--- a/tungsten_tempest_plugin/tests/api/contrail/rbac_base.py
+++ b/tungsten_tempest_plugin/tests/api/contrail/rbac_base.py
@@ -378,7 +378,7 @@
@classmethod
def resource_setup(cls):
cls.tenant_name = cls.os_primary.credentials.tenant_name
- if CONF.auth.allow_tenant_isolation:
+ if CONF.auth.use_dynamic_credentials:
# Create a contrail project for tests
post_body = {
'parent_type': 'domain',
@@ -389,7 +389,7 @@
@classmethod
def resource_cleanup(cls):
- if CONF.auth.allow_tenant_isolation:
+ if CONF.auth.use_dynamic_credentials:
cls._try_delete_resource(cls.project_client.delete_project,
cls.project_uuid)