tools for dealing with plain-bootstrapfs tag, and simpler names: nodedistro instead...
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 29 Apr 2015 10:48:20 +0000 (12:48 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 29 Apr 2015 10:48:20 +0000 (12:48 +0200)
system/AA-bonding.md
system/Substrate.py
system/TestApiserver.py
system/TestNode.py
system/TestPlc.py

index e2e52e9..d712d8a 100644 (file)
@@ -78,7 +78,7 @@ usual sequence for testing a node upgrade; we start from a f20 myplc and upgrade
     f20
     bond ../$(t)*f21
     rung
-    run nodefcdistro-f21 nodestate-upgrade
+    run nodeplain-off nodefcdistro-f21 nodestate-upgrade
     run qemu-kill-mine qemu-start wait-node
 
 -----
index aeba245..a5f06bb 100644 (file)
@@ -272,13 +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()))
+#        print ("""
+#----------        
+#Ping command <{command}> has returned {status}
+#--
+#{output}
+#----------
+#        """.format(**locals()))
         return status == 0
 
 ####################
index 010b86c..502f2dc 100644 (file)
@@ -6,8 +6,8 @@
 import xmlrpc.client
 
 # the default value is for the dry run mode
-server_methods = [ ('GetNodes' ,  []),
-                   ('AddNode' , True),
+server_methods = [ ('GetNodes', []),
+                   ('AddNode', True),
                    ('SetNodePlainBootstrapfs', True),
                    ('SetNodeFcdistro', True),
                    ('DeleteNode' , True),
index 54de26c..6ff9836 100644 (file)
@@ -220,21 +220,20 @@ class TestNode:
         print("boot_state for {} : {}".format(self.name(), state))
         return True
     
-    def nodefcdistro_f14(self):
-        return self.nodefcdistro_set('f14')
-    def nodefcdistro_f18(self):
-        return self.nodefcdistro_set('f18')
-    def nodefcdistro_f20(self):
-        return self.nodefcdistro_set('f20')
-    def nodefcdistro_f21(self):
-        return self.nodefcdistro_set('f21')
-    def nodefcdistro_set(self, distro):
+    def nodedistro_f14(self):
+        return self.nodedistro_set('f14')
+    def nodedistro_f18(self):
+        return self.nodedistro_set('f18')
+    def nodedistro_f20(self):
+        return self.nodedistro_set('f20')
+    def nodedistro_f21(self):
+        return self.nodedistro_set('f21')
+    def nodedistro_set(self, distro):
         "set the fcdistro tag to distro, passed in arg"
         self.test_plc.apiserver.SetNodeFcdistro(self.test_plc.auth_root(),
-                                               self.name(), distro)
+                                                self.name(), distro)
         return True
-
-    def nodefcdistro_show(self):
+    def nodeflavour_show(self):
         "display the fcdistro tag - or flavour actually - of node"
         if self.dry_run():
             print("Dry_run: would fetch node flavour")
@@ -244,6 +243,25 @@ class TestNode:
         print("Flavour for {} : {}".format(self.name(), flavour))
         return True
 
+    def nodeplain_set(self, plain):
+        " set bootstrapfs-plain tag on nodes"
+        self.test_plc.apiserver.SetNodePlainBootstrapfs(self.test_plc.auth_root(),
+                                                        self.name(), plain)
+        return True
+    def nodeplain_on(self):
+        return self.nodeplain_set("True")
+    def nodeplain_off(self):
+        return self.nodeplain_set("")
+    def nodeplain_show(self):
+        "display bootstrapfs-plain tag"
+        if self.dry_run():
+            print("Dry_run: would fetch node plain-bootstrapfs tag")
+            return True
+        plain = self.test_plc.apiserver.GetNodePlainBootstrapfs(self.test_plc.auth_root(),
+                                                                  self.name())
+        print("Plain bootstrapfs for {} is {}".format(self.name(), plain))
+        return True
+
     def qemu_local_config(self):
         "all nodes: compute qemu config qemu.conf and store it locally"
         if not self.is_qemu():
index 3005b20..11fe697 100644 (file)
@@ -196,7 +196,8 @@ class TestPlc:
         'delete_leases', 'list_leases', SEP,
         'populate', SEP,
         'nodestate_show','nodestate_safeboot','nodestate_boot', 'nodestate_upgrade', SEP,
-        'nodefcdistro_show','nodefcdistro_f14','nodefcdistro_f18', 'nodefcdistro_f20', 'nodefcdistro_f21', SEP,
+        'nodeflavour_show','nodedistro_f14','nodedistro_f18', 'nodedistro_f20', 'nodedistro_f21', SEP,
+        'nodeplain_on','nodeplain_off','nodeplain_show', 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,
@@ -708,8 +709,7 @@ class TestPlc:
     ### install_rpm 
     def plc_install(self):
         """
-        yum install myplc, noderepo
-        plain bootstrapfs is not installed anymore
+        yum install myplc, noderepo + plain bootstrapfs as well
         """
 
         # compute nodefamily
@@ -1203,15 +1203,21 @@ class TestPlc:
     @node_mapper
     def nodestate_show(self): pass
     @node_mapper
-    def nodefcdistro_f14(self): pass
+    def nodedistro_f14(self): pass
     @node_mapper
-    def nodefcdistro_f18(self): pass
+    def nodedistro_f18(self): pass
     @node_mapper
-    def nodefcdistro_f20(self): pass
+    def nodedistro_f20(self): pass
     @node_mapper
-    def nodefcdistro_f21(self): pass
+    def nodedistro_f21(self): pass
     @node_mapper
-    def nodefcdistro_show(self): pass
+    def nodeflavour_show(self): pass
+    @node_mapper
+    def nodeplain_on(self): pass
+    @node_mapper
+    def nodeplain_off(self): pass
+    @node_mapper
+    def nodeplain_show(self): pass
         
     ### check hooks : invoke scripts from hooks/{node,slice}
     def check_hooks_node(self):