Commit 40745061 authored by Gary Wong's avatar Gary Wong

Bug fix: improve error-handling with GENI test script options. Properly document the mandatory and optional parameters in
the help message. Use gnu_getopt instead of getopt.  That way, options
are interpreted anywhere on the command line, instead of before non-option
parameters only.
parent c6a3c283
......@@ -39,6 +39,27 @@ import re
def Usage():
print "usage: " + sys.argv[ 0 ] + " [option...] imagename sliver-urn [global]"
print """Options:
-c file, --credentials=file read self-credentials from file
[default: query from SA]
-d, --debug be verbose about XML methods invoked
-f file, --certificate=file read SSL certificate from file
[default: ~/.ssl/encrypted.pem]
-h, --help show options and usage
-l uri, --sa=uri specify uri of slice authority
[default: local]
-m uri, --cm=uri specify uri of component manager
[default: local]
-n name, --slicename=name specify human-readable name of slice
[default: mytestslice]
-p file, --passphrase=file read passphrase from file
[default: ~/.ssl/password]
-r file, --read-commands=file specify additional configuration file
-s file, --slicecredentials=file read slice credentials from file
[default: query from SA]"""
debug = 0
impotent = 1
doglobal = 1
......@@ -84,7 +84,7 @@ if "Usage" not in dir():
[default: query from SA]"""
opts, REQARGS = getopt.getopt( sys.argv[ 1: ], "a:c:df:hl:m:n:p:r:s:",
opts, REQARGS = getopt.gnu_getopt( sys.argv[ 1: ], "a:c:df:hl:m:n:p:r:s:",
[ "admincredentials=", "credentials=",
"debug", "certificate=",
"help", "sa=", "cm=", "slicename=",
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment