From: Thierry Parmentelat Date: Wed, 28 Mar 2012 07:58:51 +0000 (+0200) Subject: cosmetic - sense uses 2chars to describe the type of box X-Git-Tag: tests-5.1-1~26 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=8935fb0b41c4bd5368da7724d68393342c172c70;p=tests.git cosmetic - sense uses 2chars to describe the type of box --- diff --git a/system/Substrate.py b/system/Substrate.py index f260ef6..b2748a8 100644 --- a/system/Substrate.py +++ b/system/Substrate.py @@ -355,7 +355,7 @@ class BuildBox (Box): matcher=re.compile("\s*(?P[0-9]+).*-[bo]\s+(?P[^\s]+)(\s|\Z)") matcher_building_vm=re.compile("\s*(?P[0-9]+).*init-vserver.*-i\s+eth.\s+(?P[^\s]+)\s*\Z") def sense(self, options): - print 'b', + print 'bb', self.sense_uptime() pids=self.backquote_ssh(['pgrep','vbuild'],trash_err=True) if not pids: return @@ -441,6 +441,9 @@ class PlcBox (Box): dummy.set_now() self.plc_instances.append(dummy) + def forget (self, plc_instance): + self.plc_instances.remove(plc_instance) + def reboot (self, options): if not options.soft: self.reboot(options) @@ -474,9 +477,6 @@ class PlcVsBox (PlcBox): return self.plc_instances.append(PlcVsInstance(self,vservername,ctxid)) - def forget (self, plc_instance): - self.plc_instances.remove(plc_instance) - def line(self): msg="%s [max=%d,%d free, VS-based] (%s)"%(self.hostname, self.max_plcs,self.free_slots(),self.uname()) return msg @@ -491,7 +491,7 @@ class PlcVsBox (PlcBox): dry_run=options.dry_run) def sense (self, options): - print 'p', + print 'vp', self.get_uname() # try to find fullname (vserver_stat truncates to a ridiculously short name) # fetch the contexts for all vservers on that box @@ -556,7 +556,7 @@ class PlcLxcBox (PlcBox): # to describe the currently running VM's # as well as to call self.get_uname() once def sense (self, options): - print "p(lxc) - todo (PlcLxcBox.sense)", + print "px (todo:PlcLxcBox.sense)", self.get_uname() @@ -656,7 +656,7 @@ class QemuBox (Box): matcher=re.compile("\s*(?P[0-9]+).*-cdrom\s+(?P[^\s]+)\.iso") def sense(self, options): - print 'q', + print 'qn', modules=self.backquote_ssh(['lsmod']).split('\n') self._driver='*NO kqemu/kmv_intel MODULE LOADED*' for module in modules: @@ -797,7 +797,7 @@ class TestBox (Box): matcher_proc=re.compile (".*/proc/(?P[0-9]+)/cwd.*/root/(?P[^/]+)$") matcher_grep=re.compile ("/root/(?P[^/]+)/logs/trace.*:TRACE:\s*(?P[0-9]+).*step=(?P\S+).*") def sense (self, options): - print 't', + print 'tm', self.sense_uptime() self.starting_ips=[x for x in self.backquote_ssh(['cat',Starting.location], trash_err=True).strip().split('\n') if x]