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
+
+
return actual
def node_mapper (method):
- def actual(self):
+ def actual(self,*args, **kwds):
overall=True
node_method = TestNode.__dict__[method.__name__]
for site_spec in self.plc_spec['sites']:
test_site = TestSite (self,site_spec)
for node_spec in site_spec['nodes']:
test_node = TestNode (self,test_site,node_spec)
- if not node_method(test_node): overall=False
+ if not node_method(test_node, *args, **kwds): overall=False
return overall
# restore the doc text
actual.__doc__=method.__doc__
# we used to run plcsh_stress_test, and then ssh_node_debug and ssh_node_boot
# but as the stress test might take a while, we sometimes missed the debug mode..
'ssh_node_debug@1', 'plcsh_stress_test@1', SEP,
- 'ssh_node_boot@1', 'ssh_slice', 'check_initscripts', SEP,
+ 'ssh_node_boot@1', 'ssh_slice', 'check_netflow', 'check_initscripts', SEP,
'ssh_slice_sfa@1', 'sfa_delete_slice@1', 'sfa_delete_user@1', SEPSFA,
'check_tcp', SEP,
'force_gather_logs', SEP,
"tries to ssh-enter the slice with the user key, to ensure slice creation"
pass
+ def check_netflow (self):
+ "all nodes: check that the netflow slice is alive"
+ return self.check_systemslice ('netflow')
+
+ @node_mapper
+ def check_systemslice (self, slicename):
+ pass
+
@node_mapper
def keys_clear_known_hosts (self):
"remove test nodes entries from the local known_hosts file"