From: Thierry Parmentelat Date: Mon, 17 Jan 2011 09:50:39 +0000 (+0100) Subject: nodestate_show displays current boot state X-Git-Tag: tests-5.0-22~3 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=9b0329cff29b8367bb22cbc2be72544d16c1e67c;p=tests.git nodestate_show displays current boot state --- diff --git a/system/TestNode.py b/system/TestNode.py index 5d8771b..c0e098b 100644 --- a/system/TestNode.py +++ b/system/TestNode.py @@ -145,10 +145,15 @@ class TestNode: self.name(),{'boot_state':'safeboot'}) return True - def nodestate_safeboot (self): + def nodestate_boot (self): self.test_plc.apiserver.UpdateNode(self.test_plc.auth_root(), self.name(),{'boot_state':'boot'}) return True + + def nodestate_show (self): + state=self.test_plc.apiserver.GetNodes(self.test_plc.auth_root(), self.name(), ['boot_state'])[0]['boot_state'] + print self.name(),':',state + return True def configure_qemu(self): if not self.is_qemu(): diff --git a/system/TestPlc.py b/system/TestPlc.py index a39cc5b..64084b1 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -110,7 +110,8 @@ class TestPlc: 'clean_sites', 'clean_nodes', 'clean_slices', 'clean_keys', SEP, 'clean_leases', 'list_leases', SEP, 'populate' , SEP, - 'nodestate_safeboot','nodestate_boot','list_all_qemus', 'list_qemus', 'kill_qemus', SEP, + 'nodestate_show','nodestate_safeboot','nodestate_boot', SEP, + 'list_all_qemus', 'list_qemus', 'kill_qemus', SEP, 'plcclean_sfa', 'dbclean_sfa', 'stop_sfa','uninstall_sfa', 'clean_sfi', SEP, 'db_dump' , 'db_restore', SEP, 'standby_1 through 20',SEP, @@ -939,7 +940,11 @@ class TestPlc: pass @node_mapper def nodestate_boot (self): - "all nodes: mark PLCAPI boot_state as safeboot" + "all nodes: mark PLCAPI boot_state as boot" + pass + @node_mapper + def nodestate_show (self): + "all nodes: show PLCAPI boot_state" pass @node_mapper def export_qemu (self):