add show config option and update docs
Change-Id: If5a3b1c1f96be4300c8b75998e84f1609bc31802
This commit is contained in:
parent
e487bba02c
commit
23bd7ac19a
@ -79,6 +79,7 @@ Super quick installation on Ubuntu/Debian
|
||||
$ git clone git://git.openstack.org/stackforge/vmtp
|
||||
$ cd vmtp
|
||||
$ pip install -r requirements-dev.txt
|
||||
$ cd vmtp
|
||||
$ python vmtp.py -h
|
||||
|
||||
Super quick installation on RHEL/CentOS
|
||||
@ -94,6 +95,7 @@ Super quick installation on RHEL/CentOS
|
||||
$ git clone git://git.openstack.org/stackforge/vmtp
|
||||
$ cd vmtp
|
||||
$ pip install -r requirements-dev.txt
|
||||
$ cd vmtp
|
||||
$ python vmtp.py -h
|
||||
|
||||
|
||||
@ -107,7 +109,7 @@ First, download XCode from App Store, then execute below commands:
|
||||
.. code-block:: bash
|
||||
|
||||
$ # Download the XCode command line tools
|
||||
$ code-select --install
|
||||
$ xcode-select --install
|
||||
$ # Install pip
|
||||
$ sudo easy_install pip
|
||||
$ # Install python virtualenv
|
||||
@ -118,4 +120,5 @@ First, download XCode from App Store, then execute below commands:
|
||||
$ git clone git://git.openstack.org/stackforge/vmtp
|
||||
$ cd vmtp
|
||||
$ pip install -r requirements-dev.txt
|
||||
$ cd vmtp
|
||||
$ python vmtp.py -h
|
||||
|
@ -7,10 +7,10 @@ VMTP Usage
|
||||
|
||||
.. code::
|
||||
|
||||
usage: vmtp.py [-h] [-c <config_file>] [-r <openrc_file>]
|
||||
usage: vmtp.py [-h] [-c <config_file>] [-sc] [-r <openrc_file>]
|
||||
[-m <gmond_ip>[:<port>]] [-p <password>] [-t <time>]
|
||||
[--host <user>@<host_ssh_ip>[:<password>:<server-listen-if-name>]]
|
||||
[--external-host <user>@<host_ssh_ip>[:password>]]
|
||||
[--external-host <user>@<host_ssh_ip>[:<password>]]
|
||||
[--controller-node <user>@<host_ssh_ip>[:<password>]]
|
||||
[--mongod-server <server ip>] [--json <file>]
|
||||
[--tp-tool <nuttcp|iperf>] [--hypervisor [<az>:] <hostname>]
|
||||
@ -25,6 +25,7 @@ VMTP Usage
|
||||
-h, --help show this help message and exit
|
||||
-c <config_file>, --config <config_file>
|
||||
override default values with a config file
|
||||
-sc, --show-cofig print the default config
|
||||
-r <openrc_file>, --rc <openrc_file>
|
||||
source OpenStack credentials from rc file
|
||||
-m <gmond_ip>[:<port>], --monitor <gmond_ip>[:<port>]
|
||||
|
10
vmtp/vmtp.py
10
vmtp/vmtp.py
@ -647,6 +647,11 @@ def parse_opts_from_cli():
|
||||
help='override default values with a config file',
|
||||
metavar='<config_file>')
|
||||
|
||||
parser.add_argument('-sc', '--show-config', dest='show_cofig',
|
||||
default=False,
|
||||
action='store_true',
|
||||
help='print the default config')
|
||||
|
||||
parser.add_argument('-r', '--rc', dest='rc',
|
||||
action='store',
|
||||
help='source OpenStack credentials from rc file',
|
||||
@ -812,6 +817,11 @@ def merge_opts_to_configs(opts):
|
||||
if opts.config:
|
||||
config = _merge_config(opts.config, config, required=True)
|
||||
|
||||
if opts.show_cofig:
|
||||
print default_cfg_file
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
if opts.version:
|
||||
print(__version__)
|
||||
sys.exit(0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user