Ejemplo n.º 1
0
    def internal_network_added(self, port):
        # Call RouterInfo's internal_network_added (Plugs the port, adds IP)
        RouterInfo.internal_network_added(self, port)

        for subnet in port['subnets']:
            self._set_subnet_arp_info(subnet['id'])
        self._snat_redirect_add_from_port(port)

        if not self.get_ex_gw_port() or not self._is_this_snat_host():
            return

        sn_port = self.get_snat_port_for_internal_port(port)
        if not sn_port:
            return

        self._plug_ha_router_port(sn_port, self._get_snat_int_device_name,
                                  dvr_snat_ns.SNAT_INT_DEV_PREFIX)
Ejemplo n.º 2
0
    def internal_network_added(self, port):
        # Call RouterInfo's internal_network_added (Plugs the port, adds IP)
        RouterInfo.internal_network_added(self, port)

        for subnet in port['subnets']:
            self._set_subnet_arp_info(subnet['id'])
        self._snat_redirect_add_from_port(port)

        if not self.get_ex_gw_port() or not self._is_this_snat_host():
            return

        sn_port = self.get_snat_port_for_internal_port(port)
        if not sn_port:
            return

        self._plug_ha_router_port(
            sn_port,
            self._get_snat_int_device_name,
            dvr_snat_ns.SNAT_INT_DEV_PREFIX)
Ejemplo n.º 3
0
 def get_router_cidrs(self, device):
     return RouterInfo.get_router_cidrs(self, device)
Ejemplo n.º 4
0
 def get_router_cidrs(self, device):
     return RouterInfo.get_router_cidrs(self, device)