def test_resource_map_mtu_xenial(self, _use_dvr):
     _use_dvr.return_value = False
     self.os_release.return_value = 'mitaka'
     self.lsb_release.return_value = {'DISTRIB_CODENAME': 'xenial'}
     _map = nutils.resource_map()
     self.assertTrue(nutils.NEUTRON_CONF in _map.keys())
     self.assertFalse(nutils.PHY_NIC_MTU_CONF in _map.keys())
     self.assertFalse(nutils.EXT_PORT_CONF in _map.keys())
     _use_dvr.return_value = True
     _map = nutils.resource_map()
     self.assertFalse(nutils.EXT_PORT_CONF in _map.keys())
 def test_resource_map_mtu_xenial(self, _use_dvr):
     _use_dvr.return_value = False
     self.os_release.return_value = 'mitaka'
     self.lsb_release.return_value = {'DISTRIB_CODENAME': 'xenial'}
     _map = nutils.resource_map()
     self.assertTrue(nutils.NEUTRON_CONF in _map.keys())
     self.assertFalse(nutils.PHY_NIC_MTU_CONF in _map.keys())
     self.assertFalse(nutils.EXT_PORT_CONF in _map.keys())
     _use_dvr.return_value = True
     _map = nutils.resource_map()
     self.assertFalse(nutils.EXT_PORT_CONF in _map.keys())
Ejemplo n.º 3
0
 def test_resource_map(self, _use_dvr):
     _use_dvr.return_value = False
     _map = nutils.resource_map()
     svcs = ['neutron-plugin-openvswitch-agent']
     confs = [nutils.NEUTRON_CONF]
     [self.assertIn(q_conf, _map.keys()) for q_conf in confs]
     self.assertEqual(_map[nutils.NEUTRON_CONF]['services'], svcs)
Ejemplo n.º 4
0
 def test_resource_map_mitaka(self, _use_dvr):
     _use_dvr.return_value = False
     self.os_release.return_value = 'mitaka'
     _map = nutils.resource_map()
     svcs = ['neutron-openvswitch-agent']
     confs = [nutils.NEUTRON_CONF]
     [self.assertIn(q_conf, _map.keys()) for q_conf in confs]
     self.assertEqual(_map[nutils.NEUTRON_CONF]['services'], svcs)
 def test_resource_map(self, _use_dvr):
     _use_dvr.return_value = False
     self.os_release.return_value = 'icehouse'
     self.lsb_release.return_value = {'DISTRIB_CODENAME': 'precise'}
     _map = nutils.resource_map()
     svcs = ['neutron-plugin-openvswitch-agent']
     confs = [nutils.NEUTRON_CONF]
     [self.assertIn(q_conf, _map.keys()) for q_conf in confs]
     self.assertEqual(_map[nutils.NEUTRON_CONF]['services'], svcs)
 def test_resource_map_mitaka(self, _use_dvr):
     _use_dvr.return_value = False
     self.os_release.return_value = 'mitaka'
     self.lsb_release.return_value = {'DISTRIB_CODENAME': 'xenial'}
     _map = nutils.resource_map()
     svcs = ['neutron-openvswitch-agent']
     confs = [nutils.NEUTRON_CONF]
     [self.assertIn(q_conf, _map.keys()) for q_conf in confs]
     self.assertEqual(_map[nutils.NEUTRON_CONF]['services'], svcs)
 def test_resource_map_dvr(self, _use_dvr):
     _use_dvr.return_value = True
     self.os_release.return_value = 'icehouse'
     _map = nutils.resource_map()
     svcs = ['neutron-plugin-openvswitch-agent', 'neutron-metadata-agent',
             'neutron-l3-agent']
     confs = [nutils.NEUTRON_CONF]
     [self.assertIn(q_conf, _map.keys()) for q_conf in confs]
     self.assertEqual(_map[nutils.NEUTRON_CONF]['services'], svcs)
Ejemplo n.º 8
0
 def test_resource_map_dhcp(self, _use_dvr, _enable_local_dhcp):
     _enable_local_dhcp.return_value = True
     _use_dvr.return_value = False
     _map = nutils.resource_map()
     svcs = ['neutron-plugin-openvswitch-agent', 'neutron-metadata-agent',
             'neutron-dhcp-agent']
     confs = [nutils.NEUTRON_CONF, nutils.NEUTRON_METADATA_AGENT_CONF,
              nutils.NEUTRON_DHCP_AGENT_CONF]
     [self.assertIn(q_conf, _map.keys()) for q_conf in confs]
     self.assertEqual(_map[nutils.NEUTRON_CONF]['services'], svcs)
Ejemplo n.º 9
0
 def test_resource_map_dvr(self, _use_dvr):
     _use_dvr.return_value = True
     self.os_release.return_value = 'icehouse'
     _map = nutils.resource_map()
     svcs = [
         'neutron-plugin-openvswitch-agent', 'neutron-metadata-agent',
         'neutron-l3-agent'
     ]
     confs = [nutils.NEUTRON_CONF]
     [self.assertIn(q_conf, _map.keys()) for q_conf in confs]
     self.assertEqual(_map[nutils.NEUTRON_CONF]['services'], svcs)
 def test_resource_map_mitaka_sriov(self, _use_dvr, _enable_sriov):
     _use_dvr.return_value = False
     _enable_sriov.return_value = True
     self.os_release.return_value = 'mitaka'
     self.lsb_release.return_value = {'DISTRIB_CODENAME': 'xenial'}
     _map = nutils.resource_map()
     svcs = ['neutron-openvswitch-agent', 'neutron-sriov-agent']
     confs = [nutils.NEUTRON_CONF, nutils.NEUTRON_SRIOV_AGENT_CONF]
     [self.assertIn(q_conf, _map.keys()) for q_conf in confs]
     self.assertEqual(_map[nutils.NEUTRON_CONF]['services'], svcs)
     self.assertEqual(_map[nutils.NEUTRON_SRIOV_AGENT_CONF]['services'],
                      ['neutron-sriov-agent'])
 def test_resource_map_dhcp(self, _use_dvr, _enable_local_dhcp):
     _enable_local_dhcp.return_value = True
     _use_dvr.return_value = False
     self.os_release.return_value = 'mitaka'
     self.lsb_release.return_value = {'DISTRIB_CODENAME': 'xenial'}
     _map = nutils.resource_map()
     svcs = ['neutron-metadata-agent', 'neutron-dhcp-agent',
             'neutron-openvswitch-agent']
     confs = [nutils.NEUTRON_CONF, nutils.NEUTRON_METADATA_AGENT_CONF,
              nutils.NEUTRON_DHCP_AGENT_CONF]
     [self.assertIn(q_conf, _map.keys()) for q_conf in confs]
     self.assertEqual(_map[nutils.NEUTRON_CONF]['services'], svcs)
Ejemplo n.º 12
0
 def test_resource_map_dhcp(self, _use_dvr, _enable_local_dhcp):
     _enable_local_dhcp.return_value = True
     _use_dvr.return_value = False
     self.os_release.return_value = 'mitaka'
     self.lsb_release.return_value = {'DISTRIB_CODENAME': 'xenial'}
     _map = nutils.resource_map()
     svcs = ['neutron-metadata-agent', 'neutron-dhcp-agent',
             'neutron-openvswitch-agent']
     confs = [nutils.NEUTRON_CONF, nutils.NEUTRON_METADATA_AGENT_CONF,
              nutils.NEUTRON_DHCP_AGENT_CONF]
     [self.assertIn(q_conf, _map.keys()) for q_conf in confs]
     self.assertEqual(_map[nutils.NEUTRON_CONF]['services'], svcs)
 def test_resource_map_mitaka_sriov(self, _use_dvr, _enable_sriov):
     _use_dvr.return_value = False
     _enable_sriov.return_value = True
     self.os_release.return_value = 'mitaka'
     self.lsb_release.return_value = {'DISTRIB_CODENAME': 'xenial'}
     _map = nutils.resource_map()
     svcs = ['neutron-openvswitch-agent',
             'neutron-sriov-agent']
     confs = [nutils.NEUTRON_CONF, nutils.NEUTRON_SRIOV_AGENT_CONF]
     [self.assertIn(q_conf, _map.keys()) for q_conf in confs]
     self.assertEqual(_map[nutils.NEUTRON_CONF]['services'], svcs)
     self.assertEqual(_map[nutils.NEUTRON_SRIOV_AGENT_CONF]['services'],
                      ['neutron-sriov-agent'])
Ejemplo n.º 14
0
 def test_resource_map_dhcp(self, _use_dvr, _enable_local_dhcp):
     _enable_local_dhcp.return_value = True
     _use_dvr.return_value = False
     _map = nutils.resource_map()
     svcs = [
         'neutron-plugin-openvswitch-agent', 'neutron-metadata-agent',
         'neutron-dhcp-agent'
     ]
     confs = [
         nutils.NEUTRON_CONF, nutils.NEUTRON_METADATA_AGENT_CONF,
         nutils.NEUTRON_DHCP_AGENT_CONF
     ]
     [self.assertIn(q_conf, _map.keys()) for q_conf in confs]
     self.assertEqual(_map[nutils.NEUTRON_CONF]['services'], svcs)