nodestate_show displays current boot state
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 17 Jan 2011 09:50:39 +0000 (10:50 +0100)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 17 Jan 2011 09:50:39 +0000 (10:50 +0100)
system/TestNode.py
system/TestPlc.py

index 5d8771b..c0e098b 100644 (file)
@@ -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():
index a39cc5b..64084b1 100644 (file)
@@ -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):