X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2FTestPlc.py;h=3d8de365b9f3efe0a2c4946d3ba9c23b854efe00;hb=890d71f31cf0a54b84ee8350cc427f6873de76b6;hp=72d2060f2b5914e96d741a4724c18074c1d1d609;hpb=c60ee8339624903382f0fa98e9afc552bbedc90d;p=tests.git diff --git a/system/TestPlc.py b/system/TestPlc.py index 72d2060..3d8de36 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -161,9 +161,8 @@ class TestPlc: # keep this our of the way for now 'check_vsys_defaults_ignore', SEP, # run this first off so it's easier to re-run on another qemu box - 'qemu_kill_mine', SEP, - 'nodestate_reinstall', 'qemu_local_init','bootcd', 'qemu_local_config', SEP, - 'qemu_clean_mine', 'qemu_export', 'qemu_start', 'qemu_timestamp', SEP, + '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, '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, @@ -205,6 +204,7 @@ class TestPlc: 'check_netflow','check_drl', SEP, 'debug_nodemanager', 'slice_fs_present', SEP, 'standby_1_through_20','yes','no',SEP, + 'install_syslinux6', 'bonding_builds', 'bonding_nodes', SEP, ] default_bonding_steps = [ 'bonding_init_partial', @@ -706,11 +706,10 @@ class TestPlc: ### install_rpm def plc_install(self): - "yum install myplc, noderepo, and the plain bootstrapfs" - - # workaround for getting pgsql8.2 on centos5 - if self.options.fcdistro == "centos5": - self.run_in_guest("rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm") + """ + yum install myplc, noderepo + plain bootstrapfs is not installed anymore + """ # compute nodefamily if self.options.personality == "linux32": @@ -729,6 +728,39 @@ class TestPlc: pkgs_string=" ".join(pkgs_list) return self.yum_install(pkgs_list) + def install_syslinux6(self): + """ + install syslinux6 from the fedora21 release + """ + key = 'http://mirror.onelab.eu/keys/RPM-GPG-KEY-fedora-21-primary' + + rpms = [ + 'http://mirror.onelab.eu/fedora/releases/21/Everything/x86_64/os/Packages/s/syslinux-6.03-1.fc21.x86_64.rpm', + 'http://mirror.onelab.eu/fedora/releases/21/Everything/x86_64/os/Packages/s/syslinux-nonlinux-6.03-1.fc21.noarch.rpm', + 'http://mirror.onelab.eu/fedora/releases/21/Everything/x86_64/os/Packages/s/syslinux-perl-6.03-1.fc21.x86_64.rpm', + ] + # this can be done several times + self.run_in_guest("rpm --import {key}".format(**locals())) + return self.run_in_guest("yum -y localinstall {}".format(" ".join(rpms))) == 0 + + def bonding_builds(self): + """ + list /etc/yum.repos.d on the myplc side + """ + self.run_in_guest("ls /etc/yum.repos.d/*partial.repo") + return True + + def bonding_nodes(self): + """ + List nodes known to the myplc together with their nodefamiliy + """ + print("---------------------------------------- nodes") + for node in self.apiserver.GetNodes(self.auth_root()): + print("{} -> {}".format(node['hostname'], + self.apiserver.GetNodeFlavour(self.auth_root(),node['hostname'])['nodefamily'])) + print("---------------------------------------- nodes") + + ### def mod_python(self): """yum install mod_python, useful on f18 and above so as to avoid broken wsgi""" @@ -1288,6 +1320,9 @@ class TestPlc: def keys_clear_known_hosts(self): pass def plcapi_urls(self): + """ + attempts to reach the PLCAPI with various forms for the URL + """ return PlcapiUrlScanner(self.auth_root(), ip=self.vserverip).scan() def speed_up_slices(self): @@ -1330,6 +1365,9 @@ class TestPlc: @node_mapper def qemu_timestamp(self) : pass + @node_mapper + def qemu_nodefamily(self): pass + # when a spec refers to a node possibly on another plc def locate_sliver_obj_cross(self, nodename, slicename, other_plcs): for plc in [ self ] + other_plcs: