- //get vpn external form this network external to setup vpnInternet for ipv6
- Uuid vpnExternal = neutronvpnUtils.getVpnForNetwork(extNetId);
- if (vpnExternal == null) {
- LOG.debug("addExternalNetworkToRouter : no vpnExternal for Network {}", extNetId);
- }
- LOG.debug("addExternalNetworkToRouter : the vpnExternal {}", vpnExternal);
- //get subnetmap associate to the router, any subnetmap "external" could be existing
- List<Subnetmap> snList = neutronvpnUtils.getNeutronRouterSubnetMaps(routerId);
- LOG.debug("addExternalNetworkToRouter : the vpnExternal {} subnetmap to be set with vpnInternet {}",
- vpnExternal, snList);
- for (Subnetmap sn : snList) {
- if (sn.getInternetVpnId() == null) {
- continue;
- }
- IpVersionChoice ipVers = NeutronvpnUtils.getIpVersionFromString(sn.getSubnetIp());
- if (ipVers == IpVersionChoice.IPV6) {
- LOG.debug("addExternalNetworkToRouter : setup vpnInternet IPv6 for vpnExternal {} subnetmap {}",
- vpnExternal, sn);
- nvpnManager.updateVpnInternetForSubnet(sn, vpnExternal, true);
- }
- }