From: Thierry Parmentelat Date: Mon, 14 Nov 2011 09:17:11 +0000 (+0100) Subject: new 'show-plc' target for run X-Git-Tag: tests-5.0-31~22 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=af2d2d9c0a02a3271a76c4225df02192c9de0a4d;p=tests.git new 'show-plc' target for run --- diff --git a/system/TestPlc.py b/system/TestPlc.py index a21f42f..3811ad0 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -129,7 +129,7 @@ class TestPlc: return step != SEP and step != SEPSFA # turn off the sfa-related steps when build has skipped SFA - # this is originally for centos5 as recent SFAs won't build on this platformb + # this is originally for centos5 as recent SFAs won't build on this platform @staticmethod def check_whether_build_has_sfa (rpms_url): # warning, we're now building 'sface' so let's be a bit more picky @@ -339,6 +339,18 @@ class TestPlc: self.display_pass (2) return True + def show_vplc (self): + "print out a shell command that can be cut'n pasted to define the GUEST variable" + # these work but the shell prompt does not get displayed.. + command1="ssh %s vserver %s enter"%(self.plc_spec['host_box'],self.plc_spec['vservername']) + command2="ssh root@%s %s"%(socket.gethostname(),command1) + # guess local domain from hostname + domain=socket.gethostname().split('.',1)[1] + fqdn="%s.%s"%(self.plc_spec['host_box'],domain) + print "export PLCHOST=%s"%fqdn + print "export GUEST=%s"%self.plc_spec['vservername'] + return True + # entry point always_display_keys=['PLC_WWW_HOST','nodes','sites',] def display_pass (self,passno):