f24 & dnf --allowerasing
[tests.git] / system / TestPlc.py
index 8d37f86..cd36c0c 100644 (file)
@@ -162,7 +162,8 @@ class TestPlc:
         'check_vsys_defaults_ignore', SEP,
 # run this first off so it's easier to re-run on another qemu box        
         'qemu_kill_mine', 'nodestate_reinstall', 'qemu_local_init','bootcd', 'qemu_local_config', SEP,
-        'qemu_clean_mine', 'qemu_export', 'qemu_start', 'qemu_timestamp', 'qemu_nodefamily', SEP,
+        'qemu_clean_mine', 'qemu_export', 'qemu_cleanlog', SEP,
+        'qemu_start', 'qemu_timestamp', 'qemu_nodefamily', SEP,
         'sfa_install_all', 'sfa_configure', 'cross_sfa_configure', 'sfa_start', 'sfa_import', SEPSFA,
         'sfi_configure@1', 'sfa_register_site@1','sfa_register_pi@1', SEPSFA,
         'sfa_register_user@1', 'sfa_update_user@1', 'sfa_register_slice@1', 'sfa_renew_slice@1', SEPSFA,
@@ -184,6 +185,7 @@ class TestPlc:
         # for inspecting the slice while it runs the first time
         #'fail',
         # check slices are turned off properly
+        'debug_nodemanager',
         'empty_slices', 'ssh_slice_off', 'slice_fs_deleted_ignore', SEP,
         # check they are properly re-created with the same name
         'fill_slices', 'ssh_slice_again', SEP,
@@ -197,16 +199,15 @@ class TestPlc:
         'delete_leases', 'list_leases', SEP,
         'populate', SEP,
         'nodestate_show','nodestate_safeboot','nodestate_boot', 'nodestate_upgrade', SEP,
-        'nodeflavour_show','nodedistro_f14','nodedistro_f18', SEP,
+        'nodedistro_show','nodedistro_f14','nodedistro_f18', SEP,
         'nodedistro_f20', 'nodedistro_f21','nodedistro_f22', 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,
         'sfa_get_expires', SEPSFA,
         'plc_db_dump' , 'plc_db_restore', SEP,
         'check_netflow','check_drl', SEP,
-        'debug_nodemanager', 'slice_fs_present', SEP,
+        'slice_fs_present', SEP,
         'standby_1_through_20','yes','no',SEP,
         'install_syslinux6', 'bonding_builds', 'bonding_nodes', SEP,
         ]
@@ -342,7 +343,9 @@ class TestPlc:
     def yum_install(self, rpms):
         if isinstance(rpms, list): 
             rpms=" ".join(rpms)
-        self.run_in_guest("yum -y install {}".format(rpms))
+        yum_mode = self.run_in_guest("yum -y install {}".format(rpms))
+        if yum_mode != 0:
+            self.run_in_guest("dnf -y install --allowerasing {}".format(rpms))
         # yum-complete-transaction comes with yum-utils, that is in vtest.pkgs
         self.run_in_guest("yum-complete-transaction -y")
         return self.yum_check_installed(rpms)
@@ -711,7 +714,7 @@ class TestPlc:
     ### install_rpm 
     def plc_install(self):
         """
-        yum install myplc, noderepo + plain bootstrapfs as well
+        yum install myplc, noderepo
         """
 
         # compute nodefamily
@@ -727,7 +730,6 @@ class TestPlc:
         pkgs_list.append("slicerepo-{}".format(nodefamily))
         pkgs_list.append("myplc")
         pkgs_list.append("noderepo-{}".format(nodefamily))
-        pkgs_list.append("nodeimage-{}-plain".format(nodefamily))
         pkgs_string=" ".join(pkgs_list)
         return self.yum_install(pkgs_list)
 
@@ -774,7 +776,7 @@ class TestPlc:
         "run plc-config-tty"
         tmpname = '{}.plc-config-tty'.format(self.name())
         with open(tmpname,'w') as fileconf:
-            for (var,value) in self.plc_spec['settings'].items():
+            for var, value in self.plc_spec['settings'].items():
                 fileconf.write('e {}\n{}\n'.format(var, value))
             fileconf.write('w\n')
             fileconf.write('q\n')
@@ -1195,6 +1197,8 @@ class TestPlc:
     @node_mapper
     def qemu_export(self): pass
     @node_mapper
+    def qemu_cleanlog(self): pass
+    @node_mapper
     def nodestate_reinstall(self): pass
     @node_mapper
     def nodestate_upgrade(self): pass
@@ -1213,13 +1217,9 @@ class TestPlc:
     @node_mapper
     def nodedistro_f21(self): pass
     @node_mapper
-    def nodeflavour_show(self): pass
-    @node_mapper
-    def nodeplain_on(self): pass
-    @node_mapper
-    def nodeplain_off(self): pass
+    def nodedistro_f22(self): pass
     @node_mapper
-    def nodeplain_show(self): pass
+    def nodedistro_show(self): pass
         
     ### check hooks : invoke scripts from hooks/{node,slice}
     def check_hooks_node(self): 
@@ -1656,7 +1656,7 @@ class TestPlc:
         "run sfa-config-tty"
         tmpname = self.conffile("sfa-config-tty")
         with open(tmpname,'w') as fileconf:
-            for (var,value) in self.plc_spec['sfa']['settings'].items():
+            for var, value in self.plc_spec['sfa']['settings'].items():
                 fileconf.write('e {}\n{}\n'.format(var, value))
             fileconf.write('w\n')
             fileconf.write('R\n')