import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import javax.inject.Inject;
import javax.inject.Singleton;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
}
private void updateTransportZone(TransportZone zone, BigInteger dpnId,
- @Nonnull TypedWriteTransaction<Configuration> tx) {
+ @NonNull TypedWriteTransaction<Configuration> tx) {
InstanceIdentifier<TransportZone> path = InstanceIdentifier.builder(TransportZones.class)
.child(TransportZone.class, new TransportZoneKey(zone.getZoneName())).build();
@SuppressWarnings("checkstyle:IllegalCatch")
private void updateTransportZone(String zoneName, BigInteger dpnId, @Nullable String localIp,
- @Nonnull TypedReadWriteTransaction<Configuration> tx)
+ @NonNull TypedReadWriteTransaction<Configuration> tx)
throws ExecutionException, InterruptedException {
InstanceIdentifier<TransportZone> inst = InstanceIdentifier.create(TransportZones.class)
.child(TransportZone.class, new TransportZoneKey(zoneName));
}
private void deleteTransportZone(TransportZone zone, BigInteger dpnId,
- @Nonnull TypedWriteTransaction<Configuration> tx) {
+ @NonNull TypedWriteTransaction<Configuration> tx) {
InstanceIdentifier<TransportZone> path = InstanceIdentifier.builder(TransportZones.class)
.child(TransportZone.class, new TransportZoneKey(zone.getZoneName())).build();
tx.delete(path);
@SuppressWarnings("checkstyle:IllegalCatch")
private void deleteTransportZone(String zoneName, BigInteger dpnId,
- @Nonnull TypedReadWriteTransaction<Configuration> tx) throws ExecutionException, InterruptedException {
+ @NonNull TypedReadWriteTransaction<Configuration> tx) throws ExecutionException, InterruptedException {
InstanceIdentifier<TransportZone> inst = InstanceIdentifier.create(TransportZones.class)
.child(TransportZone.class, new TransportZoneKey(zoneName));
private void handleChangedLocalIps(Map<String, ValueDifference<String>> changedEntries, BigInteger dpId,
Set<String> zonePrefixes, Map<String, List<String>> tepTzMap,
- @Nonnull TypedReadWriteTransaction<Configuration> tx) throws ExecutionException, InterruptedException {
+ @NonNull TypedReadWriteTransaction<Configuration> tx) throws ExecutionException, InterruptedException {
if (changedEntries == null || changedEntries.isEmpty()) {
LOG.trace("No changed local_ips found for DPN {}", dpId);
return;
}
private void handleRemovedLocalIps(Map<String, String> removedEntries, BigInteger dpId, Set<String> zonePrefixes,
- Map<String, List<String>> tepTzMap, @Nonnull TypedWriteTransaction<Configuration> tx) {
+ Map<String, List<String>> tepTzMap, @NonNull TypedWriteTransaction<Configuration> tx) {
if (removedEntries == null || removedEntries.isEmpty()) {
LOG.trace("No removed local_ips found on DPN {}", dpId);
return;
return false;
}
- private void removeVtep(String zoneName, BigInteger dpId, @Nonnull TypedWriteTransaction<Configuration> tx) {
+ private void removeVtep(String zoneName, BigInteger dpId, @NonNull TypedWriteTransaction<Configuration> tx) {
InstanceIdentifier<Vteps> path = InstanceIdentifier.builder(TransportZones.class)
.child(TransportZone.class, new TransportZoneKey(zoneName))
.child(Subnets.class, new SubnetsKey(IpPrefixBuilder.getDefaultInstance(ALL_SUBNETS)))
// search for relevant subnets for the given subnetIP, add one if it is
// necessary
- private Subnets getOrAddSubnet(@Nonnull List<Subnets> subnets, @Nonnull String subnetIp) {
+ private Subnets getOrAddSubnet(@NonNull List<Subnets> subnets, @NonNull String subnetIp) {
IpPrefix subnetPrefix = IpPrefixBuilder.getDefaultInstance(subnetIp);
for (Subnets subnet : subnets) {
return null;
}
- @Nonnull
+ @NonNull
private Map<String, String> getDpnLocalIps(BigInteger dpId) throws ReadFailedException {
// Example of local IPs from other_config:
// local_ips="10.0.43.159:MPLS,11.11.11.11:DSL,ip:underlay-network"