From af2d2d9c0a02a3271a76c4225df02192c9de0a4d Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 14 Nov 2011 10:17:11 +0100 Subject: [PATCH] new 'show-plc' target for run --- system/TestPlc.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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): -- 2.43.0