from TestKey import TestKey
from TestSlice import TestSlice
from TestSliver import TestSliver
-from TestBox import TestBox
+from TestBoxQemu import TestBoxQemu
from TestSsh import TestSsh
from TestApiserver import TestApiserver
from TestSliceSfa import TestSliceSfa
for (box,nodes) in self.gather_hostBoxes().iteritems():
# pass the first nodename, as we don't push template-qemu on testboxes
nodedir=nodes[0].nodedir()
- TestBox(box,self.options.buildname).qemu_kill_all(nodedir)
+ TestBoxQemu(box,self.options.buildname).qemu_kill_all(nodedir)
return True
# make this a valid step
'list all qemu instances on the qemu boxes involved by this setup'
for (box,nodes) in self.gather_hostBoxes().iteritems():
# this is the brute force version, kill all qemus on that host box
- TestBox(box,self.options.buildname).qemu_list_all()
+ TestBoxQemu(box,self.options.buildname).qemu_list_all()
return True
# kill only the right qemus
def conffile(self,filename):
return "%s/%s"%(self.confdir(),filename)
- def confsubdir(self,dirname,clean):
+ def confsubdir(self,dirname,clean,dry_run=False):
subdirname="%s/%s"%(self.confdir(),dirname)
if clean:
utils.system("rm -rf %s"%subdirname)
if not os.path.isdir(subdirname):
utils.system("mkdir -p %s"%subdirname)
- if not os.path.isdir(subdirname):
+ if not dry_run and not os.path.isdir(subdirname):
raise "Cannot create config subdir %s for plc %s"%(dirname,self.name())
return subdirname
return True
def aggregate_xml_line(self):
- return '<aggregate addr="%s" hrn="%s" port="12347"/>' % \
- (self.vserverip,self.plc_spec['sfa']['SFA_REGISTRY_ROOT_AUTH'])
+ port=self.plc_spec['sfa']['neighbours-port']
+ return '<aggregate addr="%s" hrn="%s" port="%r"/>' % \
+ (self.vserverip,self.plc_spec['sfa']['SFA_REGISTRY_ROOT_AUTH'],port)
def registry_xml_line(self):
return '<registry addr="%s" hrn="%s" port="12345"/>' % \
return self.run_in_guest('service sfa start')==0
def sfi_configure(self):
- "Create /root/.sfi on the plc side"
+ "Create /root/.sfi on the plc side for sfi client configuration"
sfa_spec=self.plc_spec['sfa']
- "sfi client configuration"
- dir_name=self.confsubdir("dot-sfi",clean=True)
+ dir_name=self.confsubdir("dot-sfi",clean=True,dry_run=self.options.dry_run)
+ if self.options.dry_run: return True
file_name=dir_name + os.sep + sfa_spec['piuser'] + '.pkey'
fileconf=open(file_name,'w')
fileconf.write (self.plc_spec['keys'][0]['private'])