-"""%(TestMain.default_config)
- usage += self.steps_message
- parser=OptionParser(usage=usage,version=self.subversion_id)
- parser.add_option("-u","--url",action="store", dest="arch_rpms_url",
- help="URL of the arch-dependent RPMS area - for locating what to test")
- parser.add_option("-b","--build",action="store", dest="build_url",
- help="ignored, for legacy only")
- parser.add_option("-c","--config",action="append", dest="config", default=[],
- help="Config module - can be set multiple times, or use quotes")
- parser.add_option("-p","--personality",action="store", dest="personality",
- help="personality - as in vbuild-nightly")
- parser.add_option("-d","--pldistro",action="store", dest="pldistro",
- help="pldistro - as in vbuild-nightly")
- parser.add_option("-f","--fcdistro",action="store", dest="fcdistro",
- help="fcdistro - as in vbuild-nightly")
- parser.add_option("-e","--exclude",action="append", dest="exclude", default=[],
- help="steps to exclude - can be set multiple times, or use quotes")
- parser.add_option("-i","--ignore",action="append", dest="ignore", default=[],
- help="steps to run but ignore - can be set multiple times, or use quotes")
- parser.add_option("-a","--all",action="store_true",dest="all_steps", default=False,
- help="Run all default steps")
- parser.add_option("-l","--list",action="store_true",dest="list_steps", default=False,
- help="List known steps")
- parser.add_option("-V","--vserver",action="append", dest="ips_bplc", default=[],
- help="Specify the set of hostnames for the boxes that host the plcs")
- parser.add_option("-P","--plcs",action="append", dest="ips_vplc", default=[],
- help="Specify the set of hostname/IP's to use for vplcs")
- parser.add_option("-Q","--qemus",action="append", dest="ips_bnode", default=[],
- help="Specify the set of hostnames for the boxes that host the nodes")
- parser.add_option("-N","--nodes",action="append", dest="ips_vnode", default=[],
- help="Specify the set of hostname/IP's to use for vnodes")
- parser.add_option ('-X', "--lxc",action='store_true',dest='plcs_use_lxc',default=True,
- help='use lxc-enabled plc boxes instead of vs-enabled ones')
- parser.add_option ('-S', "--vs",action='store_false',dest='plcs_use_lxc',
- help='use lxc-enabled plc boxes instead of vs-enabled ones')
- parser.add_option("-s","--size",action="store",type="int",dest="size",default=1,
- help="sets test size in # of plcs - default is 1")
- parser.add_option("-q","--qualifier",action="store",type="int",dest="qualifier",default=None,
- help="run steps only on plc numbered <qualifier>, starting at 1")
- parser.add_option("-y","--rspec-style",action="append",dest="rspec_styles",default=[],
- help="pl is for planetlab rspecs, pg is for protogeni")
- parser.add_option("-k","--keep-going",action="store",dest="keep_going",default=False,
- help="proceeds even if some steps are failing")
- parser.add_option("-D","--dbname",action="store",dest="dbname",default=None,
- help="Used by plc_db_dump and plc_db_restore")
- parser.add_option("-v","--verbose", action="store_true", dest="verbose", default=False,
- help="Run in verbose mode")
- parser.add_option("-I","--interactive",action="store_true",dest="interactive",default=False,
- help="prompts before each step")
- parser.add_option("-n","--dry-run", action="store_true", dest="dry_run", default=False,
- help="Show environment and exits")
-# dropped when added Completer.py
-# parser.add_option("-r","--restart-nm", action="store_true", dest="forcenm", default=False,
-# help="Force the NM to restart in ssh_slices step")
- parser.add_option("-t","--trace", action="store", dest="trace_file", default=None,
- help="Trace file location")
- (self.options, self.args) = parser.parse_args()
+""".format(TestMain.default_config)
+
+ parser = ArgumentParser(usage = usage)
+ parser.add_argument("-u", "--url", action="store", dest="arch_rpms_url",
+ help="URL of the arch-dependent RPMS area - for locating what to test")
+ parser.add_argument("-b", "--build", action="store", dest="build_url",
+ help="ignored, for legacy only")
+ parser.add_argument("-c", "--config", action="append", dest="config", default=[],
+ help="Config module - can be set multiple times, or use quotes")
+ parser.add_argument("-p", "--personality", action="store", dest="personality",
+ help="personality - as in vbuild-nightly")
+ parser.add_argument("-d", "--pldistro", action="store", dest="pldistro",
+ help="pldistro - as in vbuild-nightly")
+ parser.add_argument("-f", "--fcdistro", action="store", dest="fcdistro",
+ help="fcdistro - as in vbuild-nightly")
+ parser.add_argument("-e", "--exclude", action="append", dest="exclude", default=[],
+ help="steps to exclude - can be set multiple times, or use quotes")
+ parser.add_argument("-i", "--ignore", action="append", dest="ignore", default=[],
+ help="steps to run but ignore - can be set multiple times, or use quotes")
+ parser.add_argument("-a", "--all", action="store_true", dest="all_steps", default=False,
+ help="Run all default steps")
+ parser.add_argument("-l", "--list", action="store_true", dest="list_steps", default=False,
+ help="List known steps")
+ parser.add_argument("-V", "--vserver", action="append", dest="ips_bplc", default=[],
+ help="Specify the set of hostnames for the boxes that host the plcs")
+ parser.add_argument("-P", "--plcs", action="append", dest="ips_vplc", default=[],
+ help="Specify the set of hostname/IP's to use for vplcs")
+ parser.add_argument("-Q", "--qemus", action="append", dest="ips_bnode", default=[],
+ help="Specify the set of hostnames for the boxes that host the nodes")
+ parser.add_argument("-N", "--nodes", action="append", dest="ips_vnode", default=[],
+ help="Specify the set of hostname/IP's to use for vnodes")
+ parser.add_argument("-s", "--size", action="store", dest="size", default=1,
+ type=int,
+ help="set test size in # of plcs - default is 1")
+ parser.add_argument("-q", "--qualifier", action="store", dest="qualifier", default=None,
+ type=int,
+ help="run steps only on plc numbered <qualifier>, starting at 1")
+ parser.add_argument("-y", "--rspec-style", action="append", dest="rspec_styles", default=[],
+ help="pl is for planetlab rspecs, pg is for protogeni")
+ parser.add_argument("-k", "--keep-going", action="store", dest="keep_going", default=False,
+ help="proceeds even if some steps are failing")
+ parser.add_argument("-D", "--dbname", action="store", dest="dbname", default=None,
+ help="Used by plc_db_dump and plc_db_restore")
+ parser.add_argument("-v", "--verbose", action="store_true", dest="verbose", default=False,
+ help="Run in verbose mode")
+ parser.add_argument("-I", "--interactive", action="store_true", dest="interactive", default=False,
+ help="prompts before each step")
+ parser.add_argument("-n", "--dry-run", action="store_true", dest="dry_run", default=False,
+ help="Show environment and exits")
+ parser.add_argument("-t", "--trace", action="store", dest="trace_file", default=None,
+ help="Trace file location")
+ parser.add_argument("-g", "--bonding", action='store', dest='bonding', default=None,
+ help="specify build to bond with")
+ parser.add_argument("steps", nargs='*')
+ self.options = parser.parse_args()