nodestate-upgrade to set node in boot_state 'upgrade'
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Fri, 24 Apr 2015 15:02:58 +0000 (17:02 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Fri, 24 Apr 2015 15:02:58 +0000 (17:02 +0200)
system/Substrate.py
system/TestNode.py
system/TestPlc.py

index 3eb57f8..aeba245 100644 (file)
@@ -272,6 +272,13 @@ class Pool:
 
         command = "ping -c 1 {} 1 {}".format(Pool.ping_timeout_option, hostname)
         (status, output) = subprocess.getstatusoutput(command)
+        print ("""
+----------        
+Ping command <{command}> has returned {status}
+--
+{output}
+----------
+        """.format(**locals()))
         return status == 0
 
 ####################
index 7461929..3af821e 100644 (file)
@@ -193,6 +193,12 @@ class TestNode:
                                            self.name(),{'boot_state':'reinstall'})
         return True
     
+    def nodestate_upgrade(self):
+        "all nodes: mark PLCAPI boot_state as upgrade"
+        self.test_plc.apiserver.UpdateNode(self.test_plc.auth_root(),
+                                           self.name(),{'boot_state':'upgrade'})
+        return True
+    
     def nodestate_safeboot(self):
         "all nodes: mark PLCAPI boot_state as safeboot"
         self.test_plc.apiserver.UpdateNode(self.test_plc.auth_root(),
index 3d8de36..8d2138c 100644 (file)
@@ -195,7 +195,7 @@ class TestPlc:
         'delete_sites', 'delete_nodes', 'delete_slices', 'keys_clean', SEP,
         'delete_leases', 'list_leases', SEP,
         'populate', SEP,
-        'nodestate_show','nodestate_safeboot','nodestate_boot', SEP,
+        'nodestate_show','nodestate_safeboot','nodestate_boot', 'nodestate_upgrade', SEP,
         'qemu_list_all', 'qemu_list_mine', 'qemu_kill_all', SEP,
         'sfa_install_core', 'sfa_install_sfatables', 'sfa_install_plc', 'sfa_install_client', SEPSFA,
         'sfa_plcclean', 'sfa_dbclean', 'sfa_stop','sfa_uninstall', 'sfi_clean', SEPSFA,
@@ -1192,6 +1192,8 @@ class TestPlc:
     @node_mapper
     def nodestate_reinstall(self): pass
     @node_mapper
+    def nodestate_upgrade(self): pass
+    @node_mapper
     def nodestate_safeboot(self): pass
     @node_mapper
     def nodestate_boot(self): pass