From: Thierry Parmentelat Date: Tue, 13 Sep 2011 09:40:34 +0000 (+0200) Subject: cosmetic X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1e5fef7a52e673c0d7ac421973d47ae33daf43bd;p=infrastructure.git cosmetic --- diff --git a/scripts/manage-infrastructure.py b/scripts/manage-infrastructure.py index c6251d6..4199e6e 100755 --- a/scripts/manage-infrastructure.py +++ b/scripts/manage-infrastructure.py @@ -5,7 +5,7 @@ import re import subprocess from optparse import OptionParser -class BuildBoxes: +class Infrastructure: # everything in the onelab.eu domain domain = 'pl.sophia.inria.fr' @@ -29,7 +29,7 @@ class BuildBoxes: def refresh_cache (self): retrieved= \ self.backquote_ssh(self.fqdn(self.testmaster),['LocalTestResources.py'],trash_err=True) - remove="."+BuildBoxes.domain + remove="."+Infrastructure.domain retrieved = [ x.replace(remove,"").strip() for x in retrieved.split()] self.qemu_boxes = retrieved cache=self.cache_file() @@ -53,7 +53,7 @@ class BuildBoxes: @staticmethod def ssh(box): - return BuildBoxes.ssh_command + [ BuildBoxes.root(box) ] + return Infrastructure.ssh_command + [ Infrastructure.root(box) ] def header (self,message): print "===============",message @@ -110,8 +110,7 @@ class BuildBoxes: if not tracker: continue try: tracker=tracker.strip() - [hostname,buildname]=tracker.split('@') - [left,plcname]=buildname.rsplit('-',1) + (hostname,buildname,plcname)=tracker.split('@') print self.margin_outline(plcname),tracker except: print self.margin(""),tracker @@ -408,4 +407,4 @@ Default is to act on test boxes only""" for box in self.boxes: self.handle_box (box,"testmaster") if __name__ == "__main__": - BuildBoxes().main() + Infrastructure().main()