# OS-dependent ping option (support for macos, for convenience)
ping_timeout_option = None
# returns True when a given hostname/ip responds to ping
# OS-dependent ping option (support for macos, for convenience)
ping_timeout_option = None
# returns True when a given hostname/ip responds to ping
def backquote_ssh (self, argv, trash_err=False):
if not self.probe(): return ''
return self.backquote( self.test_ssh().actual_argv(argv), trash_err)
def backquote_ssh (self, argv, trash_err=False):
if not self.probe(): return ''
return self.backquote( self.test_ssh().actual_argv(argv), trash_err)
if not vserver_line: continue
context=vserver_line.split()[0]
if context=="CTX": continue
if not vserver_line: continue
context=vserver_line.split()[0]
if context=="CTX": continue
- longname=ctx_dict[context]
- self.add_vserver(longname,context)
-# print self.margin_outline(self.vplcname(longname)),"%(vserver_line)s [=%(longname)s]"%locals()
+ try:
+ longname=ctx_dict[context]
+ self.add_vserver(longname,context)
+ except:
+ print 'WARNING: found ctx %s in vserver_stat but was unable to figure a corresp. vserver'%context
live_builds.append(buildname)
except: print 'WARNING, could not parse pid line',pid_line
# retrieve timestamps
live_builds.append(buildname)
except: print 'WARNING, could not parse pid line',pid_line
# retrieve timestamps
# this is likely to not invoke ssh so we need to be a bit smarter to get * expanded
# xxx would make sense above too
command=['bash','-c',"grep . /root/*/timestamp /dev/null"]
# this is likely to not invoke ssh so we need to be a bit smarter to get * expanded
# xxx would make sense above too
command=['bash','-c',"grep . /root/*/timestamp /dev/null"]
self.build_boxes = [ BuildBox(h) for h in self.build_boxes_spec() ]
self.plc_boxes = [ PlcBox (h,m) for (h,m) in self.plc_boxes_spec ()]
self.qemu_boxes = [ QemuBox (h,m) for (h,m) in self.qemu_boxes_spec ()]
self.build_boxes = [ BuildBox(h) for h in self.build_boxes_spec() ]
self.plc_boxes = [ PlcBox (h,m) for (h,m) in self.plc_boxes_spec ()]
self.qemu_boxes = [ QemuBox (h,m) for (h,m) in self.qemu_boxes_spec ()]
def sense (self,force=False):
if self._sensed and not force: return False
print 'Sensing local substrate...',
def sense (self,force=False):
if self._sensed and not force: return False
print 'Sensing local substrate...',
help='add plc boxes')
parser.add_option ('-q',"--qemu",action='store_true',dest='qemus',default=False,
help='add qemu boxes')
help='add plc boxes')
parser.add_option ('-q',"--qemu",action='store_true',dest='qemus',default=False,
help='add qemu boxes')
+ parser.add_option ('-a',"--all",action='store_true',dest='all',default=False,
+ help='address all known boxes, like -b -t -p -q')
parser.add_option ('-v',"--verbose",action='store_true',dest='verbose',default=False,
help='verbose mode')
parser.add_option ('-n',"--dry_run",action='store_true',dest='dry_run',default=False,
parser.add_option ('-v',"--verbose",action='store_true',dest='verbose',default=False,
help='verbose mode')
parser.add_option ('-n',"--dry_run",action='store_true',dest='dry_run',default=False,
if self.options.builds: boxes += [b.hostname for b in self.build_boxes]
if self.options.plcs: boxes += [b.hostname for b in self.plc_boxes]
if self.options.qemus: boxes += [b.hostname for b in self.qemu_boxes]
if self.options.builds: boxes += [b.hostname for b in self.build_boxes]
if self.options.plcs: boxes += [b.hostname for b in self.plc_boxes]
if self.options.qemus: boxes += [b.hostname for b in self.qemu_boxes]