Skip to content

Commit

Permalink
Merge branch 'master' into ks/#642-readme
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-maier committed Apr 26, 2017
2 parents 4146763 + fd195f2 commit fb980d0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ Bug fixes
* Add more mock tests. ModifyInstance was missing and some others were
missing an error test. issue#61

* add --version option to mof_compiler and pywbem cli tools. Generates the
pywbem version string. See issue # 630

Build, test, quality
^^^^^^^^^^^^^^^^^^^^

Expand Down
1 change: 1 addition & 0 deletions docs/mof_compiler.help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ General options:
Path name of a MOF include directory. Can be specified
multiple times.
-v, --verbose Print more messages while processing
-V, --version Display pywbem version and exit.
-h, --help Show this help message and exit

Example: mof_compiler CIM_Schema_2.45.mof -s https://localhost -n root/cimv2
Expand Down
7 changes: 6 additions & 1 deletion mof_compiler
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ from pywbem._cliutils import SmartFormatter
from pywbem import WBEMConnection, Error
from pywbem.mof_compiler import MOFWBEMConnection, MOFCompiler
from pywbem.cim_http import get_default_ca_cert_paths
from pywbem import __version__


def main():
Expand Down Expand Up @@ -164,6 +165,9 @@ Example:
'-v', '--verbose', dest='verbose',
action='store_true', default=False,
help='Print more messages while processing')
general_arggroup.add_argument(
'-V', '--version', action='version', version='%(prog)s ' + __version__,
help='Display pywbem version and exit.')
general_arggroup.add_argument(
'-h', '--help', action='help',
help='Show this help message and exit')
Expand Down Expand Up @@ -240,6 +244,7 @@ Example:

if args.remove or args.dry_run:
# Only record the changes to the repository, but do not perform them.
# pylint: disable=redefined-variable-type
conn = MOFWBEMConnection(conn=conn)

# conn.debug = True
Expand Down Expand Up @@ -285,5 +290,5 @@ Example:


if __name__ == '__main__':
rc = main()
rc = main() # pylint: disable=invalid-name
sys.exit(rc)
4 changes: 4 additions & 0 deletions wbemcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
from pywbem.cim_http import get_default_ca_cert_paths
from pywbem._cliutils import SmartFormatter as _SmartFormatter
from pywbem.config import DEFAULT_ITER_MAXOBJECTCOUNT
from pywbem import __version__

# Connection global variable. Set by remote_connection and use
# by all functions that execute operations.
Expand Down Expand Up @@ -2953,6 +2954,9 @@ def _main():
'-v', '--verbose', dest='verbose',
action='store_true', default=False,
help='Print more messages while processing')
general_arggroup.add_argument(
'-V', '--version', action='version', version='%(prog)s ' + __version__,
help='Display pywbem version and exit.')
general_arggroup.add_argument(
'-e', '--enable_stats', dest='verbose',
action='store_true', default=False,
Expand Down

0 comments on commit fb980d0

Please sign in to comment.