From: <jsa...@us...> - 2013-11-21 13:46:59
|
Revision: 626 http://sourceforge.net/p/pywbem/code/626 Author: jsafranek Date: 2013-11-21 13:46:57 +0000 (Thu, 21 Nov 2013) Log Message: ----------- mof_compiler: Add '-d' option to dry-run the operation. It just checks the mof file syntax. The idea behind this patch is to easily detect included mof files from 'mof_compiler -v -d' output. Modified Paths: -------------- pywbem/trunk/mof_compiler.py Modified: pywbem/trunk/mof_compiler.py =================================================================== --- pywbem/trunk/mof_compiler.py 2013-08-27 07:34:44 UTC (rev 625) +++ pywbem/trunk/mof_compiler.py 2013-11-21 13:46:57 UTC (rev 626) @@ -1680,6 +1680,9 @@ oparser.add_option('-p', '--password', dest='password', metavar='Password', help='Specify the password') + oparser.add_option('-d', '--dry-run', + dest='dry_run', default=False, action='store_true', + help="Don't actually modify the repository, just check mof file syntax. Connection to CIMOM is still required to check qualifiers.") (options, args) = oparser.parse_args() search = options.search @@ -1695,7 +1698,7 @@ conn = WBEMConnection(options.url, (options.username, passwd)) else: conn = WBEMConnection(options.url) - if options.remove: + if options.remove or options.dry_run: conn = MOFWBEMConnection(conn=conn) #conn.debug = True conn.default_namespace = options.ns @@ -1728,7 +1731,5 @@ except CIMError, ce: sys.exit(1) - if options.remove: + if options.remove and not options.dry_run: conn.rollback(verbose=options.verbose) - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |