def test_get_packages_ovs_juno_utopic(self, git_requested): git_requested.return_value = False self.config.return_value = 'ovs' self.get_os_codename_install_source.return_value = 'juno' self._set_distrib_codename('utopic') self.assertFalse('neutron-vpn-agent' in neutron_utils.get_packages()) self.assertTrue('neutron-l3-agent' in neutron_utils.get_packages())
def test_get_packages_ovs_icehouse(self): self.patch_object(neutron_utils, 'disable_nova_metadata', return_value=False) self.config.return_value = 'ovs' self.os_release.return_value = 'icehouse' self.assertTrue('neutron-vpn-agent' in neutron_utils.get_packages()) self.assertFalse('neutron-l3-agent' in neutron_utils.get_packages())
def test_get_packages_ovs_icehouse(self): self.patch_object(neutron_utils, 'disable_nova_metadata', return_value=False) self.config.return_value = 'ovs' self.os_release.return_value = 'icehouse' self.assertTrue('neutron-vpn-agent' in neutron_utils.get_packages()) self.assertFalse('neutron-l3-agent' in neutron_utils.get_packages())
def test_get_packages_ovs_juno_utopic(self): self.patch_object(neutron_utils, 'disable_nova_metadata', return_value=False) self.config.return_value = 'ovs' self.os_release.return_value = 'juno' self._set_distrib_codename('utopic') self.assertFalse('neutron-vpn-agent' in neutron_utils.get_packages()) self.assertTrue('neutron-l3-agent' in neutron_utils.get_packages())
def test_get_packages_ovs_juno_utopic(self): self.patch_object(neutron_utils, 'disable_nova_metadata', return_value=False) self.config.return_value = 'ovs' self.os_release.return_value = 'juno' self._set_distrib_codename('utopic') self.assertFalse('neutron-vpn-agent' in neutron_utils.get_packages()) self.assertTrue('neutron-l3-agent' in neutron_utils.get_packages())
def install(): status_set('maintenance', 'Executing pre-install') execd_preinstall() src = config('openstack-origin') if (lsb_release()['DISTRIB_CODENAME'] == 'precise' and src == 'distro'): src = 'cloud:precise-icehouse' configure_installation_source(src) status_set('maintenance', 'Installing apt packages') apt_update(fatal=True) apt_install('python-six', fatal=True) # Force upgrade if valid_plugin(): apt_install(filter_installed_packages(get_early_packages()), fatal=True) apt_install(filter_installed_packages(get_packages()), fatal=True) else: message = 'Please provide a valid plugin config' log(message, level=ERROR) status_set('blocked', message) sys.exit(1) # Legacy HA for Icehouse update_legacy_ha_files() # Install systemd overrides to remove service startup race between # n-gateway and n-cloud-controller services. install_systemd_override() # LP #1825906: prefer to install the lbaas package and then mask it # instead of checking if we need to install that package on each # config-changed hook if disable_neutron_lbaas(): remove_legacy_neutron_lbaas()
def install(): status_set('maintenance', 'Executing pre-install') execd_preinstall() src = config('openstack-origin') if (lsb_release()['DISTRIB_CODENAME'] == 'precise' and src == 'distro'): src = 'cloud:precise-icehouse' configure_installation_source(src) status_set('maintenance', 'Installing apt packages') apt_update(fatal=True) apt_install('python-six', fatal=True) # Force upgrade if valid_plugin(): apt_install(filter_installed_packages(get_early_packages()), fatal=True) apt_install(filter_installed_packages(get_packages()), fatal=True) else: message = 'Please provide a valid plugin config' log(message, level=ERROR) status_set('blocked', message) sys.exit(1) # Legacy HA for Icehouse update_legacy_ha_files() # Install systemd overrides to remove service startup race between # n-gateway and n-cloud-controller services. install_systemd_override()
def test_get_packages_l3ha(self): self.patch_object(neutron_utils, 'disable_nova_metadata', return_value=False) self.config.return_value = 'ovs' self.get_os_codename_install_source.return_value = 'juno' self.os_release.return_value = 'juno' self.assertTrue('keepalived' in neutron_utils.get_packages())
def install(): status_set('maintenance', 'Executing pre-install') execd_preinstall() src = config('openstack-origin') if (lsb_release()['DISTRIB_CODENAME'] == 'precise' and src == 'distro'): src = 'cloud:precise-icehouse' configure_installation_source(src) status_set('maintenance', 'Installing apt packages') apt_update(fatal=True) apt_install('python-six', fatal=True) # Force upgrade if valid_plugin(): apt_install(filter_installed_packages(get_early_packages()), fatal=True) apt_install(filter_installed_packages(get_packages()), fatal=True) status_set('maintenance', 'Git install') git_install(config('openstack-origin-git')) else: message = 'Please provide a valid plugin config' log(message, level=ERROR) status_set('blocked', message) sys.exit(1) # Legacy HA for Icehouse update_legacy_ha_files() # Install systemd overrides to remove service startup race between # n-gateway and n-cloud-controller services. install_systemd_override()
def test_get_packages_ovs_kilo(self): self.patch_object(neutron_utils, 'disable_nova_metadata', return_value=False) self.config.return_value = 'ovs' self.os_release.return_value = 'kilo' self.assertTrue('python-neutron-fwaas' in neutron_utils.get_packages())
def test_get_packages_l3ha(self): self.patch_object(neutron_utils, 'disable_nova_metadata', return_value=False) self.config.return_value = 'ovs' self.get_os_codename_install_source.return_value = 'juno' self.os_release.return_value = 'juno' self.assertTrue('keepalived' in neutron_utils.get_packages())
def install(): status_set('maintenance', 'Executing pre-install') execd_preinstall() src = config('openstack-origin') if (lsb_release()['DISTRIB_CODENAME'] == 'precise' and src == 'distro'): src = 'cloud:precise-folsom' configure_installation_source(src) status_set('maintenance', 'Installing apt packages') apt_update(fatal=True) apt_install('python-six', fatal=True) # Force upgrade if valid_plugin(): apt_install(filter_installed_packages(get_early_packages()), fatal=True) apt_install(filter_installed_packages(get_packages()), fatal=True) status_set('maintenance', 'Git install') git_install(config('openstack-origin-git')) else: message = 'Please provide a valid plugin config' log(message, level=ERROR) status_set('blocked', message) sys.exit(1) # Legacy HA for Icehouse update_legacy_ha_files()
def test_get_packages_ovs_liberty(self): self.config.return_value = 'ovs' self.os_release.return_value = 'liberty' packages = neutron_utils.get_packages() self.assertTrue('neutron-metering-agent' in packages) self.assertFalse('neutron-plugin-metering-agent' in packages) self.assertFalse('python-mysqldb' in packages) self.assertTrue('python-pymysql' in packages)
def test_get_packages_ovs_liberty(self, git_requested): git_requested.return_value = False self.config.return_value = 'ovs' self.get_os_codename_install_source.return_value = 'liberty' packages = neutron_utils.get_packages() self.assertTrue('neutron-metering-agent' in packages) self.assertFalse('neutron-plugin-metering-agent' in packages) self.assertFalse('python-mysqldb' in packages) self.assertTrue('python-pymysql' in packages)
def test_get_packages_ovsodl_icehouse(self): self.config.return_value = 'ovs-odl' self.os_release.return_value = 'icehouse' packages = neutron_utils.get_packages() self.assertTrue('neutron-metering-agent' in packages) self.assertFalse('neutron-plugin-metering-agent' in packages) self.assertFalse('neutron-plugin-openvswitch-agent' in packages) self.assertFalse('neutron-openvswitch-agent' in packages) self.assertTrue('neutron-lbaas-agent' in packages)
def test_get_packages_ovs_rocky(self): self.patch_object(neutron_utils, 'disable_nova_metadata', return_value=True) self.config.return_value = 'ovs' self.os_release.return_value = 'rocky' packages = neutron_utils.get_packages() self.assertEqual( len(packages), len([p for p in packages if not p.startswith('python-')]) )
def test_get_packages_ovs_liberty(self): self.patch_object(neutron_utils, 'disable_nova_metadata', return_value=False) self.config.return_value = 'ovs' self.os_release.return_value = 'liberty' packages = neutron_utils.get_packages() self.assertTrue('neutron-metering-agent' in packages) self.assertFalse('neutron-plugin-metering-agent' in packages) self.assertFalse('python-mysqldb' in packages) self.assertTrue('python-pymysql' in packages)
def test_get_packages_ovs_liberty(self): self.patch_object(neutron_utils, 'disable_nova_metadata', return_value=False) self.config.return_value = 'ovs' self.os_release.return_value = 'liberty' packages = neutron_utils.get_packages() self.assertTrue('neutron-metering-agent' in packages) self.assertFalse('neutron-plugin-metering-agent' in packages) self.assertFalse('python-mysqldb' in packages) self.assertTrue('python-pymysql' in packages)
def test_get_packages_ovs_rocky(self): self.patch_object(neutron_utils, 'disable_nova_metadata', return_value=True) self.config.return_value = 'ovs' self.os_release.return_value = 'rocky' packages = neutron_utils.get_packages() self.assertEqual( len(packages), len([p for p in packages if not p.startswith('python-')]) )
def test_get_packages_ovsodl_icehouse(self): self.patch_object(neutron_utils, 'disable_nova_metadata', return_value=False) self.config.return_value = 'ovs-odl' self.os_release.return_value = 'icehouse' packages = neutron_utils.get_packages() self.assertTrue('neutron-metering-agent' in packages) self.assertFalse('neutron-plugin-metering-agent' in packages) self.assertFalse('neutron-plugin-openvswitch-agent' in packages) self.assertFalse('neutron-openvswitch-agent' in packages) self.assertTrue('neutron-lbaas-agent' in packages)
def test_get_packages_ovs_newton(self): self.config.return_value = 'ovs' self.os_release.return_value = 'newton' packages = neutron_utils.get_packages() self.assertTrue('neutron-metering-agent' in packages) self.assertFalse('neutron-plugin-metering-agent' in packages) self.assertTrue('neutron-openvswitch-agent' in packages) self.assertFalse('neutron-plugin-openvswitch-agent' in packages) self.assertFalse('neutron-lbaas-agent' in packages) self.assertFalse('python-mysqldb' in packages) self.assertTrue('python-pymysql' in packages)
def test_get_packages_ovs_train(self): self.patch_object(neutron_utils, 'disable_nova_metadata', return_value=True) self.config.return_value = 'ovs' self.os_release.return_value = 'train' packages = neutron_utils.get_packages() self.assertEqual( len(packages), len([p for p in packages if not p.startswith('python-')])) self.assertFalse('python3-neutron-lbaas' in packages) self.assertFalse('neutron-lbaasv2-agent' in packages)
def test_get_packages_ovsodl_newton(self): self.patch_object(neutron_utils, 'disable_nova_metadata', return_value=False) self.config.return_value = 'ovs-odl' self.os_release.return_value = 'newton' packages = neutron_utils.get_packages() self.assertTrue('neutron-metering-agent' in packages) self.assertFalse('neutron-plugin-metering-agent' in packages) self.assertFalse('neutron-plugin-openvswitch-agent' in packages) self.assertFalse('neutron-openvswitch-agent' in packages) self.assertFalse('neutron-lbaas-agent' in packages) self.assertTrue('neutron-lbaasv2-agent' in packages)
def install(): status_set('maintenance', 'Executing pre-install') execd_preinstall() src = config('openstack-origin') if (lsb_release()['DISTRIB_CODENAME'] == 'precise' and src == 'distro'): src = 'cloud:precise-icehouse' configure_installation_source(src) status_set('maintenance', 'Installing apt packages') apt_update(fatal=True) apt_install('python-six', fatal=True) # Force upgrade if valid_plugin(): apt_install(filter_installed_packages(get_early_packages()), fatal=True) apt_install(filter_installed_packages(get_packages()), fatal=True) status_set('maintenance', 'Git install') git_install(config('openstack-origin-git')) else: message = 'Please provide a valid plugin config' log(message, level=ERROR) status_set('blocked', message) sys.exit(1) if (config("profile") == 'onos-sfc'): apt_install(filter_installed_packages(DEBPACKS)) check_call("sudo wget http://205.177.226.237:9999/onosfw\ /package_ovs_debian.tar.gz -O ovs.tar", shell=True) check_call("sudo tar xvf ovs.tar", shell=True) check_call("sudo dpkg -i openvswitch-common_2.5.90-1_amd64.deb", shell=True) check_call("sudo dpkg -i openvswitch-datapath-dkms_2.5.90-1_all.deb", shell=True) check_call("sudo dpkg -i openvswitch-switch_2.5.90-1_amd64.deb", shell=True) status_set('maintenance', 'openvswitch 2.5.9 installed') # Legacy HA for Icehouse update_legacy_ha_files() # Install systemd overrides to remove service startup race between # n-gateway and n-cloud-controller services. install_systemd_override()
def install(): status_set('maintenance', 'Executing pre-install') execd_preinstall() src = config('openstack-origin') if (lsb_release()['DISTRIB_CODENAME'] == 'precise' and src == 'distro'): src = 'cloud:precise-icehouse' configure_installation_source(src) status_set('maintenance', 'Installing apt packages') apt_update(fatal=True) apt_install('python-six', fatal=True) # Force upgrade if valid_plugin(): apt_install(filter_installed_packages(get_early_packages()), fatal=True) apt_install(filter_installed_packages(get_packages()), fatal=True) status_set('maintenance', 'Git install') git_install(config('openstack-origin-git')) else: message = 'Please provide a valid plugin config' log(message, level=ERROR) status_set('blocked', message) sys.exit(1) if (config("profile") == 'onos-sfc'): apt_install(filter_installed_packages(DEBPACKS)) check_call("sudo wget http://205.177.226.237:9999/onosfw\ /package_ovs_debian.tar.gz -O ovs.tar", shell=True) check_call("sudo tar xvf ovs.tar", shell=True) check_call("sudo dpkg -i openvswitch-common_2.5.90-1_amd64.deb", shell=True) check_call("sudo dpkg -i openvswitch-datapath-dkms_2.5.90-1_all.deb", shell=True) check_call("sudo dpkg -i openvswitch-switch_2.5.90-1_amd64.deb", shell=True) status_set('maintenance', 'openvswitch 2.5.9 installed') # Legacy HA for Icehouse update_legacy_ha_files() # Install systemd overrides to remove service startup race between # n-gateway and n-cloud-controller services. install_systemd_override()
def test_get_packages_ovs_icehouse(self, git_requested): git_requested.return_value = False self.config.return_value = 'ovs' self.get_os_codename_install_source.return_value = 'icehouse' self.assertTrue('neutron-vpn-agent' in neutron_utils.get_packages()) self.assertFalse('neutron-l3-agent' in neutron_utils.get_packages())
def test_get_packages_ovs_juno_trusty(self): self.config.return_value = 'ovs' self.os_release.return_value = 'juno' self.assertTrue('neutron-vpn-agent' in neutron_utils.get_packages()) self.assertFalse('neutron-l3-agent' in neutron_utils.get_packages())
def test_get_packages_ovs_juno_utopic(self): self.config.return_value = 'ovs' self.os_release.return_value = 'juno' self._set_distrib_codename('utopic') self.assertFalse('neutron-vpn-agent' in neutron_utils.get_packages()) self.assertTrue('neutron-l3-agent' in neutron_utils.get_packages())
def test_get_packages_l3ha(self): self.config.return_value = 'ovs' self.get_os_codename_install_source.return_value = 'juno' self.os_release.return_value = 'juno' self.assertTrue('keepalived' in neutron_utils.get_packages())
def test_get_packages_ovs_kilo(self): self.config.return_value = 'ovs' self.os_release.return_value = 'kilo' self.assertTrue('python-neutron-fwaas' in neutron_utils.get_packages())
def test_get_packages_l3ha(self, git_requested): git_requested.return_value = False self.config.return_value = 'ovs' self.get_os_codename_install_source.return_value = 'juno' self.assertTrue('keepalived' in neutron_utils.get_packages())
def test_get_packages_ovs_kilo(self, git_requested): git_requested.return_value = False self.config.return_value = 'ovs' self.get_os_codename_install_source.return_value = 'kilo' self.assertTrue('python-neutron-fwaas' in neutron_utils.get_packages())
def test_get_packages_ovs_kilo(self): self.patch_object(neutron_utils, 'disable_nova_metadata', return_value=False) self.config.return_value = 'ovs' self.os_release.return_value = 'kilo' self.assertTrue('python-neutron-fwaas' in neutron_utils.get_packages())
def test_get_packages_ovs(self, git_requested): git_requested.return_value = False self.config.return_value = 'ovs' self.get_os_codename_install_source.return_value = 'havana' self.assertNotEqual(neutron_utils.get_packages(), [])