Exemplo n.º 1
0
 def test__get_ha_router_interface_ids_with_no_ha_port(self):
     self._create_router()
     self._setup_port_binding(
         device_owner=constants.DEVICE_OWNER_ROUTER_SNAT,
         device_id=TEST_ROUTER_ID)
     ha_iface_ids = l2pop_db._get_ha_router_interface_ids(
         self.ctx.session, TEST_NETWORK_ID)
     self.assertEqual(0, len(list(ha_iface_ids)))
Exemplo n.º 2
0
 def test__get_ha_router_interface_ids_with_no_ha_port(self):
     self._create_router()
     self._setup_port_binding(
         device_owner=constants.DEVICE_OWNER_ROUTER_SNAT,
         device_id=TEST_ROUTER_ID)
     ha_iface_ids = l2pop_db._get_ha_router_interface_ids(
         self.ctx.session, TEST_NETWORK_ID)
     self.assertEqual(0, len(list(ha_iface_ids)))
Exemplo n.º 3
0
 def test__get_ha_router_interface_ids_with_ha_replicated_port(self):
     helpers.register_dhcp_agent()
     helpers.register_l3_agent()
     helpers.register_ovs_agent()
     self._create_ha_router()
     self._setup_port_binding(
         device_owner=constants.DEVICE_OWNER_HA_REPLICATED_INT,
         device_id=TEST_ROUTER_ID)
     ha_iface_ids = l2pop_db._get_ha_router_interface_ids(
         self.ctx.session, TEST_NETWORK_ID)
     self.assertEqual(1, len(list(ha_iface_ids)))
Exemplo n.º 4
0
 def test__get_ha_router_interface_ids_with_ha_replicated_port(self):
     helpers.register_dhcp_agent()
     helpers.register_l3_agent()
     helpers.register_ovs_agent()
     self._create_ha_router()
     self._setup_port_binding(
         device_owner=constants.DEVICE_OWNER_HA_REPLICATED_INT,
         device_id=TEST_ROUTER_ID)
     ha_iface_ids = l2pop_db._get_ha_router_interface_ids(
         self.ctx.session, TEST_NETWORK_ID)
     self.assertEqual(1, len(list(ha_iface_ids)))