2 # this models a box that hosts qemu nodes
3 # could probably also be used for boxes that host plc instances
8 def __init__(self,hostname,key=None):
12 def run (self,command):
13 if self.hostname == "localhost":
14 return utils.system(command)
17 to_run="ssh -i %s.rsa %s %s"%(self.key,self.hostname,command)
19 to_run="ssh %s %s"%(self.hostname,command)
20 return utils.system(to_run)
22 def kill_all_qemus(self):
23 self.run("killall qemu")