def test_determine_packages_git(self, _head_pkgs, _os_rel, _git_requested, _use_dvr): self.test_config.set('enable-local-dhcp-and-metadata', False) _git_requested.return_value = True _use_dvr.return_value = True _os_rel.return_value = 'trusty' _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() self.assertFalse('neutron-l3-agent' in pkg_list)
def test_determine_packages(self, _head_pkgs, _os_rel, _use_dvr): self.test_config.set('enable-local-dhcp-and-metadata', False) _use_dvr.return_value = False _os_rel.return_value = 'icehouse' self.os_release.return_value = 'icehouse' _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() expect = [head_pkg, 'neutron-plugin-openvswitch-agent'] self.assertEqual(pkg_list, expect)
def test_determine_packages_git(self, _head_pkgs, _os_rel, _git_requested, _use_dvr): self.test_config.set('enable-local-dhcp-and-metadata', False) _git_requested.return_value = True _use_dvr.return_value = True _os_rel.return_value = 'icehouse' self.os_release.return_value = 'icehouse' _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() self.assertFalse('neutron-l3-agent' in pkg_list)
def test_determine_packages(self, _head_pkgs, _os_rel, _git_requested, _use_dvr): self.test_config.set('enable-local-dhcp-and-metadata', False) _git_requested.return_value = False _use_dvr.return_value = False _os_rel.return_value = 'trusty' _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() expect = ['neutron-plugin-openvswitch-agent', head_pkg] self.assertItemsEqual(pkg_list, expect)
def test_determine_packages_mitaka(self, _head_pkgs, _os_rel, _git_requested, _use_dvr): self.test_config.set('enable-local-dhcp-and-metadata', False) _git_requested.return_value = False _use_dvr.return_value = False _os_rel.return_value = 'mitaka' self.os_release.return_value = 'mitaka' _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() expect = ['neutron-openvswitch-agent', head_pkg] self.assertItemsEqual(pkg_list, expect)
def test_determine_packages_dvr(self, _head_pkgs, _os_rel, _use_dvr): _use_dvr.return_value = True _os_rel.return_value = 'icehouse' self.os_release.return_value = 'icehouse' _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() expect = [ head_pkg, 'neutron-plugin-openvswitch-agent', 'neutron-l3-agent', ] self.assertEqual(pkg_list, expect)
def test_determine_pkgs_sriov_mitaka(self, _head_pkgs, _os_rel, _use_dvr): self.test_config.set('enable-local-dhcp-and-metadata', False) self.test_config.set('enable-sriov', True) _use_dvr.return_value = False _os_rel.return_value = 'mitaka' self.os_release.return_value = 'mitaka' _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() expect = [ head_pkg, 'neutron-openvswitch-agent', 'neutron-sriov-agent', ] self.assertEqual(pkg_list, expect)
def test_determine_packages_dvr_rocky(self, _head_pkgs, _os_rel, _use_dvr): _use_dvr.return_value = True _os_rel.return_value = 'rocky' self.os_release.return_value = 'rocky' _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() expect = [ head_pkg, 'neutron-l3-agent', 'neutron-openvswitch-agent', 'python3-neutron', 'python3-neutron-fwaas', ] self.assertEqual(pkg_list, expect)
def test_determine_packages_dvr(self, _head_pkgs, _os_rel, _use_dvr, _use_l3ha): _use_dvr.return_value = True _use_l3ha.return_value = False _os_rel.return_value = 'icehouse' self.os_release.return_value = 'icehouse' _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() expect = [ head_pkg, 'neutron-plugin-openvswitch-agent', 'neutron-l3-agent', ] self.assertEqual(pkg_list, expect)
def test_determine_packages_mitaka(self, _head_pkgs, _os_rel, _use_dvr, _use_l3ha): self.test_config.set('enable-local-dhcp-and-metadata', False) _use_dvr.return_value = False _use_l3ha.return_value = False _os_rel.return_value = 'mitaka' self.os_release.return_value = 'mitaka' _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() expect = [ head_pkg, 'neutron-openvswitch-agent', ] self.assertEqual(pkg_list, expect)
def test_determine_packages(self, _head_pkgs, _os_rel, _use_dvr, _use_l3ha): self.test_config.set('enable-local-dhcp-and-metadata', False) _use_dvr.return_value = False _use_l3ha.return_value = False _os_rel.return_value = 'mitaka' self.os_release.return_value = 'mitaka' self.lsb_release.return_value = {'DISTRIB_CODENAME': 'xenial'} _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() expect = [ head_pkg, 'neutron-openvswitch-agent', ] self.assertEqual(pkg_list, expect)
def test_determine_packages_dvr(self, _head_pkgs, _os_rel, _use_dvr, _use_l3ha): _use_dvr.return_value = True _use_l3ha.return_value = False _os_rel.return_value = 'mitaka' self.os_release.return_value = 'mitaka' self.lsb_release.return_value = {'DISTRIB_CODENAME': 'xenial'} _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() expect = [ head_pkg, 'neutron-l3-agent', 'libnetfilter-log1', 'neutron-openvswitch-agent', ] self.assertEqual(pkg_list, expect)
def test_determine_packages_dvr_rocky(self, _head_pkgs, _os_rel, _use_dvr, _use_l3ha): _use_dvr.return_value = True _use_l3ha.return_value = False _os_rel.return_value = 'rocky' self.os_release.return_value = 'rocky' _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() expect = [ head_pkg, 'neutron-l3-agent', 'neutron-openvswitch-agent', 'python3-neutron', 'python3-neutron-fwaas', ] self.assertEqual(pkg_list, expect)
def test_determine_packages_mitaka_dvr_l3ha(self, _head_pkgs, _os_rel, _use_dvr, _use_l3ha): self.test_config.set('enable-local-dhcp-and-metadata', False) _use_dvr.return_value = True _use_l3ha.return_value = True _os_rel.return_value = 'mitaka' self.os_release.return_value = 'mitaka' _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() expect = [ head_pkg, 'neutron-l3-agent', 'libnetfilter-log1', 'neutron-openvswitch-agent', ] self.assertEqual(pkg_list, expect)
def test_determine_packages_dvr_rocky(self, _head_pkgs, _os_rel, _use_dvr, _use_l3ha): _use_dvr.return_value = True _use_l3ha.return_value = False _os_rel.return_value = 'rocky' self.os_release.return_value = 'rocky' self.lsb_release.return_value = {'DISTRIB_CODENAME': 'bionic'} _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() expect = [ head_pkg, 'neutron-l3-agent', 'libnetfilter-log1', 'neutron-openvswitch-agent', 'python3-neutron', 'python3-zmq', 'python3-neutron-fwaas', ] self.assertEqual(pkg_list, expect)
def test_determine_pkgs_hardware_offload(self, _head_pkgs, _os_rel, _use_dvr, _use_l3ha, _use_hw_offload): self.test_config.set('enable-local-dhcp-and-metadata', False) self.test_config.set('enable-hardware-offload', True) _use_hw_offload.return_value = True _use_dvr.return_value = False _use_l3ha.return_value = False _os_rel.return_value = 'stein' self.os_release.return_value = 'stein' self.lsb_release.return_value = {'DISTRIB_CODENAME': 'bionic'} _head_pkgs.return_value = head_pkg pkg_list = nutils.determine_packages() expect = [ head_pkg, 'neutron-openvswitch-agent', 'mlnx-switchdev-mode', 'sriov-netplan-shim', 'python3-neutron', 'python3-zmq', ] self.assertEqual(pkg_list, expect)