String srcTepIp = String.valueOf(stateTunnelList.getSrcInfo().getTepIp().getValue());
BigInteger srcDpnId = new BigInteger(stateTunnelList.getSrcInfo().getTepDeviceId());
- AdjacenciesOp adjacencies = vpnInterface.getAugmentation(AdjacenciesOp.class);
+ AdjacenciesOp adjacencies = vpnInterface.augmentation(AdjacenciesOp.class);
List<Adjacency> adjList = adjacencies != null ? adjacencies.getAdjacency() : new ArrayList<>();
if (adjList.isEmpty()) {
LOG.trace("updateVpnInterfaceOnTepAdd: Adjacencies are empty for vpnInterface {} on dpn {}",
}
AdjacenciesOp aug = VpnUtil.getVpnInterfaceOpDataEntryAugmentation(value);
VpnInterfaceOpDataEntry opInterface = new VpnInterfaceOpDataEntryBuilder(vpnInterface)
- .setKey(new VpnInterfaceOpDataEntryKey(vpnInterface.getName(), vpnName))
+ .withKey(new VpnInterfaceOpDataEntryKey(vpnInterface.getName(), vpnName))
.addAugmentation(AdjacenciesOp.class, aug).build();
InstanceIdentifier<VpnInterfaceOpDataEntry> interfaceId =
VpnUtil.getVpnInterfaceOpDataEntryIdentifier(vpnInterface.getName(), vpnName);
WriteTransaction writeConfigTxn,
WriteTransaction writeOperTxn) {
- AdjacenciesOp adjacencies = vpnInterface.getAugmentation(AdjacenciesOp.class);
+ AdjacenciesOp adjacencies = vpnInterface.augmentation(AdjacenciesOp.class);
List<Adjacency> adjList = adjacencies != null ? adjacencies.getAdjacency() : new ArrayList<>();
String prefix = null;
long label = 0;
}
AdjacenciesOp aug = VpnUtil.getVpnInterfaceOpDataEntryAugmentation(value);
VpnInterfaceOpDataEntry opInterface = new VpnInterfaceOpDataEntryBuilder(vpnInterface)
- .setKey(new VpnInterfaceOpDataEntryKey(vpnInterface.getName(), vpnName))
+ .withKey(new VpnInterfaceOpDataEntryKey(vpnInterface.getName(), vpnName))
.addAugmentation(AdjacenciesOp.class, aug).build();
InstanceIdentifier<VpnInterfaceOpDataEntry> interfaceId =
VpnUtil.getVpnInterfaceOpDataEntryIdentifier(vpnInterface.getName(), vpnName);
LOG.info("handleVpnsExportingRoutes: Importing subnet route fib entry rd {} "
+ "prefix {} nexthop {} label {} to vpn {} vpnRd {}",
vpn.getVrfId(), prefix, nh, label, vpnName, vpnRd);
- SubnetRoute route = vrfEntry.getAugmentation(SubnetRoute.class);
+ SubnetRoute route = vrfEntry.augmentation(SubnetRoute.class);
importSubnetRouteForNewVpn(vpnRd, prefix, nh, label, route, vpn.getVrfId(),
confTx);
}
update.getVpnInstanceNames());
final String vpnInterfaceName = update.getName();
final BigInteger dpnId = InterfaceUtils.getDpnForInterface(ifaceMgrRpcService, vpnInterfaceName);
- final Adjacencies origAdjs = original.getAugmentation(Adjacencies.class);
+ final Adjacencies origAdjs = original.augmentation(Adjacencies.class);
final List<Adjacency> oldAdjs = origAdjs != null && origAdjs.getAdjacency()
!= null ? origAdjs.getAdjacency() : new ArrayList<>();
- final Adjacencies updateAdjs = update.getAugmentation(Adjacencies.class);
+ final Adjacencies updateAdjs = update.augmentation(Adjacencies.class);
final List<Adjacency> newAdjs = updateAdjs != null && updateAdjs.getAdjacency()
!= null ? updateAdjs.getAdjacency() : new ArrayList<>();
if (!VpnUtil.isVpnPendingDelete(dataBroker, primaryRd)) {
LOG.info("handleVpnSwapForVpnInterface: VPN Interface update event - intfName {} onto vpnName {}"
+ "running config-driven swap addition", interfaceName, newVpnName);
- final Adjacencies origAdjs = original.getAugmentation(Adjacencies.class);
+ final Adjacencies origAdjs = original.augmentation(Adjacencies.class);
final List<Adjacency> oldAdjs = (origAdjs != null && origAdjs.getAdjacency() != null)
? origAdjs.getAdjacency() : new ArrayList<>();
- final Adjacencies updateAdjs = update.getAugmentation(Adjacencies.class);
+ final Adjacencies updateAdjs = update.augmentation(Adjacencies.class);
final List<Adjacency> newAdjs = (updateAdjs != null && updateAdjs.getAdjacency() != null)
? updateAdjs.getAdjacency() : new ArrayList<>();
Optional<DpnVpninterfacesList> optionalRouterDpnList = VpnUtil.read(dataBroker, LogicalDatastoreType
.OPERATIONAL, routerDpnListIdentifier);
RouterInterfaces routerInterface =
- new RouterInterfacesBuilder().setKey(new RouterInterfacesKey(vpnInterfaceName)).setInterface(
+ new RouterInterfacesBuilder().withKey(new RouterInterfacesKey(vpnInterfaceName)).setInterface(
vpnInterfaceName).build();
if (optionalRouterDpnList.isPresent()) {
writeOperTxn.merge(LogicalDatastoreType.OPERATIONAL, routerDpnListIdentifier.child(
if (optionalRouterDpnList.isPresent()) {
List<RouterInterfaces> routerInterfaces = optionalRouterDpnList.get().getRouterInterfaces();
RouterInterfaces routerInterface =
- new RouterInterfacesBuilder().setKey(new RouterInterfacesKey(vpnInterfaceName)).setInterface(
+ new RouterInterfacesBuilder().withKey(new RouterInterfacesKey(vpnInterfaceName)).setInterface(
vpnInterfaceName).build();
if (routerInterfaces != null && routerInterfaces.remove(routerInterface)) {
if (optionalRouterDpnList.isPresent()) {
List<RouterInterfaces> routerInterfaces = optionalRouterDpnList.get().getRouterInterfaces();
RouterInterfaces routerInterface =
- new RouterInterfacesBuilder().setKey(new RouterInterfacesKey(vpnInterfaceName)).setInterface(
+ new RouterInterfacesBuilder().withKey(new RouterInterfacesKey(vpnInterfaceName)).setInterface(
vpnInterfaceName).build();
if (routerInterfaces != null && routerInterfaces.remove(routerInterface)) {
if (routerInterfaces.isEmpty()) {
protected void deleteFibEntryForRouterInterface(VpnInterface vpnInterface,
WriteTransaction writeConfigTxn, String vpnName) {
- Adjacencies adjs = vpnInterface.getAugmentation(Adjacencies.class);
+ Adjacencies adjs = vpnInterface.augmentation(Adjacencies.class);
String rd = VpnUtil.getVpnRd(dataBroker, vpnName);
if (adjs != null) {
List<Adjacency> adjsList = adjs.getAdjacency();
return;
}
List<Adjacency> operationVpnAdjacencies = vpnInterfaceOptional.get()
- .getAugmentation(AdjacenciesOp.class).getAdjacency();
+ .augmentation(AdjacenciesOp.class).getAdjacency();
// Due to insufficient rds, some of the extra route wont get processed when it is added.
// The unprocessed adjacencies will be present in config vpn interface DS but will be missing
// in operational DS. These unprocessed adjacencies will be handled below.