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,
for optname in ['config','exclude','ips_bplc','ips_vplc','ips_bnode','ips_vnode']:
setattr(self.options,optname, flatten ( [ arg.split() for arg in getattr(self.options,optname) ] ))
+ if not self.options.rspec_styles:
+ self.options.rspec_styles=['pl','pg']
+
# handle defaults and option persistence
for (recname,filename,default,need_reverse) in (
('build_url','arg-build-url',TestMain.default_build_url,None) ,
def name(self):
return self.sfa_slice_spec['slice_fields']['name']
- def rspecmode (self): return self.sfa_slice_spec['rspecmode']
+ def rspec_style (self): return self.sfa_slice_spec['rspec_style']
def hrn(self):
root_auth=self.test_plc.plc_spec['sfa']['SFA_REGISTRY_ROOT_AUTH']
def reqfile (self): return self.resname("req","rspec")
def nodefile (self): return self.resname("nodes","txt")
def discover_option(self):
- if self.rspecmode()=='pg': return "-r protogeni"
+ if self.rspec_style()=='pg': return "-r protogeni"
else: return ""
def sfi_path (self):
'SFA_PLC_URL' : 'deferred-myplc-api-url',
'SFA_API_DEBUG': True,
# details of the slices to create
- 'sfa_slice_specs' : [ sfa_slice_spec(options,index,rspecmode)
- for rspecmode in ['pl','pg']],
+ 'sfa_slice_specs' : [ sfa_slice_spec(options,index,rspec_style)
+ for rspec_style in options.rspec_styles ]
}
# subindex is 0 (pl slice) or 1 (pg slice)
-def sfa_slice_spec (options,index,rspecmode):
+def sfa_slice_spec (options,index,rspec_style):
the_login_base=login_base(index)
piuser='fake-pi%d'%index
- regularuser='sfauser%d%s'%(index,rspecmode)
- slicename='slsfa%d%s'%(index,rspecmode)
+ regularuser='sfauser%d%s'%(index,rspec_style)
+ slicename='slsfa%d%s'%(index,rspec_style)
prefix='%s.%s'%(sfa_root(index),the_login_base)
hrn=prefix+'.'+slicename
person_hrn=prefix+'.'+regularuser
'slicename' : slicename,
'slice_add_xml' : slice_add_xml,
'slice_person_xml' : slice_person_xml,
- 'rspecmode':rspecmode,
+ 'rspec_style':rspec_style,
}