diff --git a/doc/source/conf.py b/doc/source/conf.py index ca1ac74..f2d1463 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -14,7 +14,6 @@ import datetime import os -import re import sys from pbr import version as pbr_ver diff --git a/doc/source/installation.rst b/doc/source/installation.rst index ddfc90e..f24ca5f 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -10,7 +10,7 @@ There are two ways to install and run VMTP tool. Users of VMTP should use regula PyPI based Installation ----------------------- -PyPI (The Python Package Index) is the offical repository for software in Python. It holds lots of packages, and the installation is relatively easy in only 2 steps. +PyPI (The Python Package Index) is the official repository for software in Python. It holds lots of packages, and the installation is relatively easy in only 2 steps. Step 1 ^^^^^^ @@ -42,6 +42,12 @@ Create a virtual environment for Python, and install VMTP:: $ pip install vmtp $ vmtp -h +**Note:** "A Virtual Environment is a tool to keep the dependencies required by different projects in separate places, by creating virtual Python environments for them." It is optional but recommended. We could use:: + + $ sudo pip install vmtp + +instead if isolation among multiple Python projects is not needed. + .. _git_installation: diff --git a/doc/source/usage.rst b/doc/source/usage.rst index 7143c8a..3d44fe8 100644 --- a/doc/source/usage.rst +++ b/doc/source/usage.rst @@ -20,9 +20,7 @@ VMTP Usage [--vnic-type ] [-d] [-v] [--stop-on-error] [--vm-image-url ] [--test-description ] - - OpenStack VM Throughput V2.1.4 - + optional arguments: -h, --help show this help message and exit -c , --config diff --git a/vmtp/vmtp.py b/vmtp/vmtp.py index 4e37c7a..c0e4a5f 100755 --- a/vmtp/vmtp.py +++ b/vmtp/vmtp.py @@ -666,7 +666,7 @@ def main(): return dest_config logging.basicConfig() - parser = argparse.ArgumentParser(description='OpenStack VM Throughput ' + __version__) + parser = argparse.ArgumentParser() parser.add_argument('-c', '--config', dest='config', action='store', @@ -974,14 +974,17 @@ def main(): vmtp_instance = None cred = credentials.Credentials(opts.rc, opts.pwd, opts.no_env) - if cred.rc_auth_url: - if config.debug: - print 'Using ' + cred.rc_auth_url - vmtp_instance = VmtpTest(config, cred) - for item in native_tp_results: - vmtp_instance.rescol.add_flow_result(item) - vmtp_instance.run() - vmtp_net = vmtp_instance.net + if not cred.rc_auth_url: + print 'Error: Cannot read the credentials of the cloud. ' + sys.exit(1) + + if config.debug: + print 'Using ' + cred.rc_auth_url + vmtp_instance = VmtpTest(config, cred) + for item in native_tp_results: + vmtp_instance.rescol.add_flow_result(item) + vmtp_instance.run() + vmtp_net = vmtp_instance.net # Retrieve controller information if requested # controller node ssh access to collect metadata for the run.