public RouterDpnListBuilder(RouterDpnList base) { if (base.getKey() == null) { this._key = new RouterDpnListKey( base.getRouterId() ); this._routerId = base.getRouterId(); } else { this._key = base.getKey(); this._routerId = _key.getRouterId(); } this._dpnVpninterfacesList = base.getDpnVpninterfacesList(); if (base instanceof RouterDpnListImpl) { RouterDpnListImpl impl = (RouterDpnListImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.neutron.router.dpns.RouterDpnList> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.neutron.router.dpns.RouterDpnList>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
return false; if (!Objects.equals(_routerId, other.getRouterId())) { return false;
public void updateTrasportZone(RouterDpnList routerDpnList) { try{ InstanceIdentifier<TransportZone> inst = InstanceIdentifier.create(TransportZones.class). child(TransportZone.class, new TransportZoneKey(routerDpnList.getRouterId())); TransportZone zone = mdsalUtils.read(LogicalDatastoreType.CONFIGURATION, inst); String subnetIp = ALL_SUBNETS; if (zone == null) { zone = createZone(subnetIp, routerDpnList.getRouterId()); } int addedTeps = 0; for (DpnVpninterfacesList dpnVpninterfacesList : routerDpnList.getDpnVpninterfacesList()) { BigInteger dpnId = dpnVpninterfacesList.getDpnId(); addedTeps += addVtep(zone, subnetIp, dpnId); } if (addedTeps > 0) { addTransportZone(zone, "router " + routerDpnList.getRouterId()); } } catch (Exception e) { LOG.warn("failed to add tunnels on router added of routerDpnList {} due to {}", routerDpnList, e.getMessage()); } }