public TransportZonesBuilder(TransportZones base) { this._transportZone = base.getTransportZone(); if (base instanceof TransportZonesImpl) { TransportZonesImpl impl = (TransportZonesImpl) 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.genius.itm.rev160406.TransportZones> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.TransportZones>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
if (!Objects.equals(_transportZone, other.getTransportZone())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;
/** * Gets all transport zones as map. * * @return all transport zones as map */ private Map<String, TransportZone> getAllTransportZonesAsMap() { TransportZones tZones = getAllTransportZones(); Map<String, TransportZone> tZoneMap = new HashMap<>(); if( null != tZones) { for (TransportZone tzone : ItmUtils.emptyIfNull(tZones.getTransportZone())) { tZoneMap.put(tzone.getZoneName(), tzone); } } return tZoneMap; }
private void addTransportZone(TransportZone zone, String interName) { InstanceIdentifier<TransportZones> path = InstanceIdentifier.builder(TransportZones.class).build(); TransportZones zones = mdsalUtils.read(LogicalDatastoreType.CONFIGURATION, path); if (zones == null) { List<TransportZone> zoneList = new ArrayList<>(); zoneList.add(zone); zones = new TransportZonesBuilder().setTransportZone(zoneList).build(); } else { zones.getTransportZone().add(zone); } MDSALUtil.syncWrite(dataBroker, LogicalDatastoreType.CONFIGURATION, path, zones); LOG.info("updating transport zone {} due to {} handling", zone.getZoneName(), interName); }
if (tZonesOptional.isPresent()) { TransportZones tZones = tZonesOptional.get(); if(tZones.getTransportZone() == null || tZones.getTransportZone().isEmpty()) "GatewayIP", "VlanID", "DpnID", "IPAddress", "PortName")); result.add("------------------------------------------------------------------------------------------------------------------------------"); for (TransportZone tZ : tZones.getTransportZone()) { if (tZ.getSubnets() == null || tZ.getSubnets().isEmpty()) { LOG.error("Transport Zone " + tZ.getZoneName() + "has no subnets");
if (tZonesOptional.isPresent()) { TransportZones tZones = tZonesOptional.get(); for (TransportZone tZ : tZones.getTransportZone()) { if (tZ.getSubnets() == null || tZ.getSubnets().isEmpty()) continue; for (TransportZone tZ : tZones.getTransportZone()) { if (tZ.getSubnets() == null || tZ.getSubnets().isEmpty()) continue; if (tZones.getTransportZone().remove(tZ)) { InstanceIdentifier<T> tpath = (InstanceIdentifier<T>) InstanceIdentifier.builder(TransportZones.class) .child(TransportZone.class, tZ.getKey()).build(); tzPaths.add(tpath); if (tZones.getTransportZone() == null || tZones.getTransportZone().size() == 0) { MDSALDataStoreUtils.asyncRemove(dataBroker, LogicalDatastoreType.CONFIGURATION, path, ItmUtils.DEFAULT_CALLBACK);
.setTunnelType(tunType).build(); if (tZones.isPresent()) { tZoneList = tZones.get().getTransportZone(); if(tZoneList == null || tZoneList.isEmpty()) { tZoneList = new ArrayList<>();
if (tZonesOptional.isPresent()) { TransportZones tZones = tZonesOptional.get(); if (tZones.getTransportZone() == null || tZones.getTransportZone().isEmpty()) { LOG.error("No teps configured"); result.set(RpcResultBuilder.<Void>failed().withError(RpcError.ErrorType.APPLICATION, "No teps Configured").build()); return result; String transportZone = tZones.getTransportZone().get(0).getZoneName(); if (tZones.getTransportZone().get(0).getSubnets() == null || tZones.getTransportZone().get(0).getSubnets().isEmpty()) { result.set(RpcResultBuilder.<Void>failed().withError(RpcError.ErrorType.APPLICATION, "No subnets Configured").build()); return result; SubnetsKey subnetsKey = tZones.getTransportZone().get(0).getSubnets().get(0).getKey(); DeviceVtepsKey deviceVtepKey = new DeviceVtepsKey(hwIp, node_id.get(0)); InstanceIdentifier<DeviceVteps> path =
if (tZonesOptional.isPresent()) { TransportZones tZones = tZonesOptional.get(); for (TransportZone tzone : tZones.getTransportZone()) {
if (tZonesOptional.isPresent()) { TransportZones tZones = tZonesOptional.get(); for (TransportZone tzone : tZones.getTransportZone()) {
if (tZonesOptional.isPresent()) { TransportZones tZones = tZonesOptional.get(); for (TransportZone tzone : tZones.getTransportZone()) {
for (TransportZone tzone : tZones.getTransportZone()) { hwVtepsExist = false; hwVteps = new ArrayList<>();
if (tZonesOptional.isPresent()) { TransportZones tZones = tZonesOptional.get(); if (tZones.getTransportZone() == null || tZones.getTransportZone().isEmpty()) { LOG.error("No teps configured"); result.set(RpcResultBuilder.<Void>failed().withError(RpcError.ErrorType.APPLICATION, "No teps Configured").build()); return result; String transportZone = tZones.getTransportZone().get(0).getZoneName(); if (tZones.getTransportZone().get(0).getSubnets() == null || tZones.getTransportZone().get(0).getSubnets().isEmpty()) { result.set(RpcResultBuilder.<Void>failed().withError(RpcError.ErrorType.APPLICATION, "No subnets Configured").build()); return result; SubnetsKey subnetsKey = tZones.getTransportZone().get(0).getSubnets().get(0).getKey(); DeviceVtepsKey deviceVtepKey = new DeviceVtepsKey(hwIp, node_id.get(0)); InstanceIdentifier<DeviceVteps> path =
if (tZonesOptional.isPresent()) { TransportZones tZones = tZonesOptional.get(); for (TransportZone tzone : tZones.getTransportZone()) { hwVtepsExist = false; hwVteps = new ArrayList<>();
if (tZonesOptional.isPresent()) { TransportZones tZones = tZonesOptional.get(); if (tZones.getTransportZone() == null || tZones.getTransportZone().isEmpty()) { LOG.error("No teps configured"); result.set(RpcResultBuilder.<Void>failed().withError(RpcError.ErrorType.APPLICATION, "No teps Configured").build()); return result; for (TransportZone tzone : tZones.getTransportZone()) { if (!(tzone.getTunnelType().equals(TunnelTypeVxlan.class))) continue;
if (tZonesOptional.isPresent()) { TransportZones tZones = tZonesOptional.get(); for (TransportZone tzone : tZones.getTransportZone()) { hwVtepsExist = false; hwVteps = new ArrayList<>();
if (tZonesOptional.isPresent()) { TransportZones tZones = tZonesOptional.get(); if (tZones.getTransportZone() == null || tZones.getTransportZone().isEmpty()) { LOG.error("No transportZone configured"); result.set(RpcResultBuilder.<Void>failed() return result; for (TransportZone tzone : tZones.getTransportZone()) { if (!(tzone.getTunnelType().equals(TunnelTypeVxlan.class))) continue;