static List<Extraroute> getAllExtraRoutes(DataBroker broker, String vrfId) { Optional<Vpn> extraRoutes = read(broker, LogicalDatastoreType.OPERATIONAL, getVpnToExtrarouteIdentifier(vrfId)); if (extraRoutes.isPresent()) { return extraRoutes.get().getExtraroute(); } return new ArrayList<Extraroute>(); }
public static List<Extraroute> getVpnExtraroutes(DataBroker broker, String vpnRd) { InstanceIdentifier<Vpn> vpnExtraRoutesId = InstanceIdentifier.builder(VpnToExtraroute.class).child(Vpn.class, new VpnKey(vpnRd)).build(); Optional<Vpn> vpnOpc = read(broker, LogicalDatastoreType.OPERATIONAL, vpnExtraRoutesId); return vpnOpc.isPresent() ? vpnOpc.get().getExtraroute() : new ArrayList<Extraroute>(); }
if (!Objects.equals(_extraroute, other.getExtraroute())) { return false;
public VpnBuilder(Vpn base) { if (base.getKey() == null) { this._key = new VpnKey( base.getVrfId() ); this._vrfId = base.getVrfId(); } else { this._key = base.getKey(); this._vrfId = _key.getVrfId(); } this._extraroute = base.getExtraroute(); if (base instanceof VpnImpl) { VpnImpl impl = (VpnImpl) 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.vpn.to.extraroute.Vpn> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.to.extraroute.Vpn>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }