X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2FTestNode.py;h=c4d44f8e7cf36dc080f8c3e47b5de70e2182b3cb;hb=75c32430bacfb7ea5cee9213f6ced1468e0ef7f2;hp=11e9391bff6650f3e193a87a22383b2380b5d4c6;hpb=1133022b1489e02c9fa3c08fb3f0c6d9cf87be7c;p=tests.git diff --git a/system/TestNode.py b/system/TestNode.py index 11e9391..c4d44f8 100644 --- a/system/TestNode.py +++ b/system/TestNode.py @@ -271,3 +271,17 @@ class TestNode: utils.header ("SUCCESS: node hook %s OK"%script_name) return True + def check_systemslice (self, slicename): + sitename=self.test_plc.plc_spec['PLC_SLICE_PREFIX'] + vservername="%s_%s"%(sitename,slicename) + test_ssh=self.create_test_ssh() + (retcod,output)=utils.output_of(test_ssh.actual_command("cat /vservers/%s/etc/slicefamily")%vservername) + if retcod != 0: + utils.header ("Can't find /etc/slicefamily for %s"%slicename) + return False + # get last line only as ssh pollutes the output + slicefamily=output.split("\n")[-1] + utils.header("system slice %s has slicefamily %s"%(slicename, slicefamily)) + return test_ssh.run("vserver-stat | grep %s"%vservername)==0 + +