if( (!tZoneFromConfigDS.getTunnelType().equals(tunType)) && ItmUtils.isNotEmpty(tZoneFromConfigDS.getSubnets())) { String errorMsg = new StringBuilder("Changing the tunnel type from ").append(tZoneFromConfigDS.getTunnelType()) .append(" to ").append(strTunnelType)
return false; if (!Objects.equals(_subnets, other.getSubnets())) { return false;
if (tZoneOptional.isPresent()) { TransportZone tz = tZoneOptional.get(); if (tz.getSubnets() == null || tz.getSubnets().isEmpty()) return false; for (Subnets sub : tz.getSubnets()) { if (sub.getVteps() == null || sub.getVteps().isEmpty()) continue;
public TransportZoneBuilder(TransportZone base) { if (base.getKey() == null) { this._key = new TransportZoneKey( base.getZoneName() ); this._zoneName = base.getZoneName(); } else { this._key = base.getKey(); this._zoneName = _key.getZoneName(); } this._subnets = base.getSubnets(); this._tunnelType = base.getTunnelType(); if (base instanceof TransportZoneImpl) { TransportZoneImpl impl = (TransportZoneImpl) 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.transport.zones.TransportZone> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.TransportZone>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
isGreType = true; for (Subnets sub : ItmUtils.emptyIfNull(tZ.getSubnets())) { List<Vteps> vtepList = sub.getVteps(); validateForDuplicateAndSingleGreTep(inputVtep, isConfiguredTepGreType, isGreType, vtepList);
Class<? extends TunnelTypeBase> tunnel_type = transportZone.getTunnelType(); LOG.trace("Transport Zone_name: {}", zone_name); List<Subnets> subnetsList = transportZone.getSubnets(); if(subnetsList!=null){ for (Subnets subnet : subnetsList) {
Optional<TransportZone> tZoneOptional = ItmUtils.read(LogicalDatastoreType.CONFIGURATION, path, dataBroker); if (tZoneOptional.isPresent()) { if (tZoneOptional.get().getSubnets() != null && !tZoneOptional.get().getSubnets().isEmpty()) { for (Subnets sub : tZoneOptional.get().getSubnets()) { if (sub.getVteps() != null && !sub.getVteps().isEmpty()) { for (Vteps vtepLocal : sub.getVteps()) {
result.add("------------------------------------------------------------------------------------------------------------------------------"); for (TransportZone tZ : tZones.getTransportZone()) { if (tZ.getSubnets() == null || tZ.getSubnets().isEmpty()) { LOG.error("Transport Zone " + tZ.getZoneName() + "has no subnets"); continue; for (Subnets sub : tZ.getSubnets()) { if (sub.getVteps() == null || sub.getVteps().isEmpty()) { LOG.error("Transport Zone " + tZ.getZoneName() + "subnet " + sub.getPrefix() + "has no vteps");
Class<? extends TunnelTypeBase> tunnel_type = transportZone.getTunnelType(); LOG.trace("Transport Zone_name: {}", zone_name); List<Subnets> subnetsList = transportZone.getSubnets(); if (subnetsList != null) { for (Subnets subnet : subnetsList) {
hwVtepsExist = false; hwVteps = new ArrayList<>(); if (tzone.getSubnets() != null && !tzone.getSubnets().isEmpty()) { for (Subnets sub : tzone.getSubnets()) { if (sub.getDeviceVteps() != null && !sub.getDeviceVteps().isEmpty()) { hwVtepsExist = true;//gets set to true only if this particular tzone has
private int addVtep(TransportZone zone, String subnetIp, BigInteger dpnId) throws Exception { Subnets subnets = findSubnets(zone.getSubnets(), subnetIp); for(Vteps existingVtep : subnets.getVteps()){ if (existingVtep.getDpnId().equals(dpnId)) { return 0; } } IpAddress nodeIp = getNodeIP(dpnId); VtepsBuilder vtepsBuilder = new VtepsBuilder(); vtepsBuilder.setDpnId(dpnId); vtepsBuilder.setIpAddress(nodeIp); vtepsBuilder.setPortname(TUNNEL_PORT); subnets.getVteps().add(vtepsBuilder.build()); return 1; }
hwVtepsExist = false; hwVteps = new ArrayList<>(); if (tzone.getSubnets() != null && !tzone.getSubnets().isEmpty()) { for (Subnets sub : tzone.getSubnets()) { if (sub.getDeviceVteps() != null && !sub.getDeviceVteps().isEmpty()) { hwVtepsExist = true;
hwVtepsExist = false; hwVteps = new ArrayList<>(); if (tzone.getSubnets() != null && !tzone.getSubnets().isEmpty()) { for (Subnets sub : tzone.getSubnets()) { if (sub.getDeviceVteps() != null && !sub.getDeviceVteps().isEmpty()) { hwVtepsExist = true;
Class<? extends TunnelTypeBase> tunType = tZoneOptional.get().getTunnelType(); if (tZoneOptional.isPresent()) { if (tZoneOptional.get().getSubnets() != null && !tZoneOptional.get().getSubnets().isEmpty()) { for (Subnets sub : tZoneOptional.get().getSubnets()) { if (sub.getVteps() != null && !sub.getVteps().isEmpty()) { for (Vteps vtepLocal : sub.getVteps()) {
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 (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 =
foundVxlanTzone = true; String transportZone = tzone.getZoneName(); if (tzone.getSubnets() == null || tzone.getSubnets().isEmpty()) { result.set(RpcResultBuilder.<Void>failed() .withError(RpcError.ErrorType.APPLICATION, "No subnets Configured").build()); return result; SubnetsKey subnetsKey = tzone.getSubnets().get(0).getKey(); DeviceVtepsKey deviceVtepKey = new DeviceVtepsKey(hwIp, node_id); InstanceIdentifier<DeviceVteps> path = InstanceIdentifier.builder(TransportZones.class)
TransportZone tZone = tZoneOptional.get(); if (tZone.getSubnets() != null && !tZone.getSubnets().isEmpty()) { for (Subnets sub : tZone.getSubnets()) { if (sub.getDeviceVteps() != null && !sub.getDeviceVteps().isEmpty()) { for (DeviceVteps hwVtepDS : sub.getDeviceVteps()) {
foundVxlanTzone = true; String transportZone = tzone.getZoneName(); if (tzone.getSubnets() == null || tzone.getSubnets().isEmpty()) { result.set(RpcResultBuilder.<Void>failed() .withError(RpcError.ErrorType.APPLICATION, "No subnets Configured").build()); return result; SubnetsKey subnetsKey = tzone.getSubnets().get(0).getKey(); DeviceVtepsKey deviceVtepKey = new DeviceVtepsKey(hwIp, node_id); InstanceIdentifier<DeviceVteps> path = InstanceIdentifier.builder(TransportZones.class)
TransportZone tZone = tZoneOptional.get(); if (tZone.getSubnets() != null && !tZone.getSubnets().isEmpty()) { for (Subnets sub : tZone.getSubnets()) { if (sub.getDeviceVteps() != null && !sub.getDeviceVteps().isEmpty()) { for (DeviceVteps hwVtepDS : sub.getDeviceVteps()) {