+
+ def check_rootfs (self, expected):
+ overall=True
+ for nodename in self.slice_spec['nodenames']:
+ node_spec=self.test_site.locate_node(nodename)
+ test_node=TestNode(self.test_plc,self.test_site,node_spec)
+ test_node_ssh=test_node.create_test_ssh()
+ command="ls /vservers/%s"%self.name()
+ full_command = test_node_ssh.actual_command(command)
+ retcod=utils.system(full_command,silent=True)
+ # we expect the fs to be present, retcod should be 0
+ if expected: fine=(retcod==0)
+ else: fine=(retcod!=0)
+ if not fine: overall=False
+ return overall
+
+ def slice_fs_present (self, options):
+ "check that /vservers/<slicename> can be found"
+ return self.check_rootfs (expected=True)
+ def slice_fs_deleted (self, options):
+ "check that /vservers/<slicename> has been properly wiped off on all nodes"
+ return self.check_rootfs (expected=False)