mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-12-17 15:21:37 +01:00
more error-prone issue fix
Change-Id: I49f2cc0459cfddddc6a99e2ebb8ad52d547e2909
This commit is contained in:
parent
96b896d043
commit
488a94c31e
@ -124,18 +124,6 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<pluginManagement>
|
|
||||||
<plugins>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.karaf.tooling</groupId>
|
|
||||||
<artifactId>karaf-maven-plugin</artifactId>
|
|
||||||
<version>3.0.5</version>
|
|
||||||
<extensions>true</extensions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
</plugins>
|
|
||||||
</pluginManagement>
|
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|||||||
@ -124,18 +124,6 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<pluginManagement>
|
|
||||||
<plugins>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.karaf.tooling</groupId>
|
|
||||||
<artifactId>karaf-maven-plugin</artifactId>
|
|
||||||
<version>3.0.5</version>
|
|
||||||
<extensions>true</extensions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
</plugins>
|
|
||||||
</pluginManagement>
|
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|||||||
@ -198,7 +198,7 @@ public class EvpnInstanceRoute {
|
|||||||
|
|
||||||
EvpnInstanceRoute that = (EvpnInstanceRoute) other;
|
EvpnInstanceRoute that = (EvpnInstanceRoute) other;
|
||||||
|
|
||||||
return Objects.equals(prefix, prefix)
|
return Objects.equals(prefix, that.prefix)
|
||||||
&& Objects.equals(nextHop, that.nextHop)
|
&& Objects.equals(nextHop, that.nextHop)
|
||||||
&& Objects.equals(evpnName, that.evpnName)
|
&& Objects.equals(evpnName, that.evpnName)
|
||||||
&& Objects.equals(rd, that.rd)
|
&& Objects.equals(rd, that.rd)
|
||||||
|
|||||||
@ -115,7 +115,6 @@ public class EvpnRoute {
|
|||||||
checkNotNull(prefixMac);
|
checkNotNull(prefixMac);
|
||||||
checkNotNull(prefix);
|
checkNotNull(prefix);
|
||||||
//checkNotNull(nextHop); //next hop can be null in case of MP un reach.
|
//checkNotNull(nextHop); //next hop can be null in case of MP un reach.
|
||||||
checkNotNull(labelToInt);
|
|
||||||
this.source = checkNotNull(source);
|
this.source = checkNotNull(source);
|
||||||
this.prefix = prefix;
|
this.prefix = prefix;
|
||||||
this.prefixMac = prefixMac;
|
this.prefixMac = prefixMac;
|
||||||
@ -258,7 +257,7 @@ public class EvpnRoute {
|
|||||||
|
|
||||||
EvpnRoute that = (EvpnRoute) other;
|
EvpnRoute that = (EvpnRoute) other;
|
||||||
|
|
||||||
return Objects.equals(prefixMac, prefixMac)
|
return Objects.equals(prefixMac, that.prefixMac)
|
||||||
&& Objects.equals(prefix, that.prefix)
|
&& Objects.equals(prefix, that.prefix)
|
||||||
&& Objects.equals(nextHop, that.nextHop)
|
&& Objects.equals(nextHop, that.nextHop)
|
||||||
&& Objects.equals(this.rd, that.rd)
|
&& Objects.equals(this.rd, that.rd)
|
||||||
|
|||||||
@ -81,7 +81,9 @@ public class EvpnRouteManager implements EvpnRouteService,
|
|||||||
@Deactivate
|
@Deactivate
|
||||||
protected void deactivate() {
|
protected void deactivate() {
|
||||||
evpnRouteStore.unsetDelegate(evpnRouteStoreDelegate);
|
evpnRouteStore.unsetDelegate(evpnRouteStoreDelegate);
|
||||||
listeners.values().forEach(EvpnListenerQueue::stop);
|
synchronized (this) {
|
||||||
|
listeners.values().forEach(EvpnListenerQueue::stop);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -148,6 +150,7 @@ public class EvpnRouteManager implements EvpnRouteService,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public Collection<EvpnRouteTableId> getRouteTables() {
|
public Collection<EvpnRouteTableId> getRouteTables() {
|
||||||
return evpnRouteStore.getRouteTables();
|
return evpnRouteStore.getRouteTables();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,13 +48,6 @@ public class GraphiteMetricsReporterTest {
|
|||||||
gmr = new DefaultGraphiteMetricsReporter();
|
gmr = new DefaultGraphiteMetricsReporter();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Tears down graphite metrics reporter instance.
|
|
||||||
*/
|
|
||||||
public void tearDown() {
|
|
||||||
gmr.deactivate();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests whether the containsName method can always return the correct result
|
* Tests whether the containsName method can always return the correct result
|
||||||
* with the given metric name and a set of prefixes.
|
* with the given metric name and a set of prefixes.
|
||||||
|
|||||||
@ -67,7 +67,6 @@ public final class DefaultInfluxMetric implements InfluxMetric {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InfluxMetric build() {
|
public InfluxMetric build() {
|
||||||
checkNotNull(oneMinRate, ONE_MIN_RATE_MSG);
|
|
||||||
checkNotNull(timestamp, TIMESTAMP_MSG);
|
checkNotNull(timestamp, TIMESTAMP_MSG);
|
||||||
|
|
||||||
return new DefaultInfluxMetric(oneMinRate, parseTime(timestamp));
|
return new DefaultInfluxMetric(oneMinRate, parseTime(timestamp));
|
||||||
|
|||||||
@ -125,18 +125,6 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<pluginManagement>
|
|
||||||
<plugins>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.karaf.tooling</groupId>
|
|
||||||
<artifactId>karaf-maven-plugin</artifactId>
|
|
||||||
<version>3.0.5</version>
|
|
||||||
<extensions>true</extensions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
</plugins>
|
|
||||||
</pluginManagement>
|
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|||||||
@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2017-present Open Networking Foundation
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.onosproject.netconf.client;
|
|
||||||
|
|
||||||
import org.onosproject.config.DynamicConfigEvent;
|
|
||||||
import org.onosproject.net.DeviceId;
|
|
||||||
import org.onosproject.yang.model.ResourceId;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Event details.
|
|
||||||
*/
|
|
||||||
public class EventData {
|
|
||||||
|
|
||||||
private DeviceId devId;
|
|
||||||
private ResourceId key;
|
|
||||||
private DynamicConfigEvent.Type type;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an instance of EventData.
|
|
||||||
*
|
|
||||||
* @param devId device id
|
|
||||||
* @param key device key
|
|
||||||
* @param type event type
|
|
||||||
*/
|
|
||||||
public EventData(DeviceId devId, ResourceId key, DynamicConfigEvent.Type type) {
|
|
||||||
devId = devId;
|
|
||||||
key = key;
|
|
||||||
type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DeviceId getDevId() {
|
|
||||||
return devId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ResourceId getKey() {
|
|
||||||
return key;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DynamicConfigEvent.Type getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -398,7 +398,7 @@ public class PceManager implements PceService {
|
|||||||
//Log.info("computeExplicitPath :: finalComputedPath " + finalComputedPath);
|
//Log.info("computeExplicitPath :: finalComputedPath " + finalComputedPath);
|
||||||
|
|
||||||
if (finalComputedPath != null && !finalComputedPath.get(finalComputedPath.size() - 1).links()
|
if (finalComputedPath != null && !finalComputedPath.get(finalComputedPath.size() - 1).links()
|
||||||
.contains((Link) info.value())) {
|
.contains(info.value())) {
|
||||||
finalComputedPath = null;
|
finalComputedPath = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -913,7 +913,6 @@ public class PceManager implements PceService {
|
|||||||
private boolean releaseSharedBwForNewTunnel(Path computedPath, double bandwidthConstraint,
|
private boolean releaseSharedBwForNewTunnel(Path computedPath, double bandwidthConstraint,
|
||||||
SharedBandwidthConstraint shBwConstraint) {
|
SharedBandwidthConstraint shBwConstraint) {
|
||||||
checkNotNull(computedPath);
|
checkNotNull(computedPath);
|
||||||
checkNotNull(bandwidthConstraint);
|
|
||||||
double bwToAllocate;
|
double bwToAllocate;
|
||||||
|
|
||||||
Double additionalBwValue = null;
|
Double additionalBwValue = null;
|
||||||
@ -1071,7 +1070,6 @@ public class PceManager implements PceService {
|
|||||||
private boolean reserveBandwidth(Path computedPath, double bandwidthConstraint,
|
private boolean reserveBandwidth(Path computedPath, double bandwidthConstraint,
|
||||||
SharedBandwidthConstraint shBwConstraint) {
|
SharedBandwidthConstraint shBwConstraint) {
|
||||||
checkNotNull(computedPath);
|
checkNotNull(computedPath);
|
||||||
checkNotNull(bandwidthConstraint);
|
|
||||||
Resource resource = null;
|
Resource resource = null;
|
||||||
double bwToAllocate = 0;
|
double bwToAllocate = 0;
|
||||||
Map<Link, Double> linkMap = new HashMap<>();
|
Map<Link, Double> linkMap = new HashMap<>();
|
||||||
|
|||||||
@ -772,7 +772,7 @@ public class PceWebTopovMessageHandler extends UiMessageHandler {
|
|||||||
private void findTunnelAndHighlights() {
|
private void findTunnelAndHighlights() {
|
||||||
Collection<Tunnel> tunnelSet = null;
|
Collection<Tunnel> tunnelSet = null;
|
||||||
Highlights highlights = new Highlights();
|
Highlights highlights = new Highlights();
|
||||||
paths.removeAll(paths);
|
paths.clear();
|
||||||
tunnelSet = tunnelService.queryTunnel(MPLS);
|
tunnelSet = tunnelService.queryTunnel(MPLS);
|
||||||
if (tunnelSet.size() == 0) {
|
if (tunnelSet.size() == 0) {
|
||||||
log.warn("Tunnel does not exist");
|
log.warn("Tunnel does not exist");
|
||||||
@ -819,7 +819,7 @@ public class PceWebTopovMessageHandler extends UiMessageHandler {
|
|||||||
*/
|
*/
|
||||||
private void highlightsForTunnel(List<Tunnel> tunnels) {
|
private void highlightsForTunnel(List<Tunnel> tunnels) {
|
||||||
Highlights highlights = new Highlights();
|
Highlights highlights = new Highlights();
|
||||||
paths.removeAll(paths);
|
paths.clear();
|
||||||
|
|
||||||
if (tunnels.isEmpty()) {
|
if (tunnels.isEmpty()) {
|
||||||
log.error("path does not exist");
|
log.error("path does not exist");
|
||||||
|
|||||||
@ -113,7 +113,9 @@ public class RouteManager implements RouteService, RouteAdminService {
|
|||||||
@Deactivate
|
@Deactivate
|
||||||
protected void deactivate() {
|
protected void deactivate() {
|
||||||
routeMonitor.shutdown();
|
routeMonitor.shutdown();
|
||||||
listeners.values().forEach(ListenerQueue::stop);
|
synchronized (this) {
|
||||||
|
listeners.values().forEach(ListenerQueue::stop);
|
||||||
|
}
|
||||||
|
|
||||||
routeStore.unsetDelegate(delegate);
|
routeStore.unsetDelegate(delegate);
|
||||||
hostService.removeListener(hostListener);
|
hostService.removeListener(hostListener);
|
||||||
@ -176,6 +178,7 @@ public class RouteManager implements RouteService, RouteAdminService {
|
|||||||
return routeSets.stream().flatMap(r -> r.routes().stream()).collect(Collectors.toList());
|
return routeSets.stream().flatMap(r -> r.routes().stream()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Collection<RouteTableId> getRouteTables() {
|
public Collection<RouteTableId> getRouteTables() {
|
||||||
return routeStore.getRouteTables();
|
return routeStore.getRouteTables();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -160,14 +160,17 @@ public class RouterAdvertisementManager implements RoutingAdvertisementService {
|
|||||||
private final Map<ConnectPoint, Map.Entry<ScheduledFuture<?>, List<InterfaceIpAddress>>> transmitters =
|
private final Map<ConnectPoint, Map.Entry<ScheduledFuture<?>, List<InterfaceIpAddress>>> transmitters =
|
||||||
new LinkedHashMap<>();
|
new LinkedHashMap<>();
|
||||||
|
|
||||||
|
// TODO: should consider using concurrent variants
|
||||||
@GuardedBy(value = "this")
|
@GuardedBy(value = "this")
|
||||||
private final Map<DeviceId, List<InterfaceIpAddress>> globalPrefixes = new LinkedHashMap<>();
|
private final Map<DeviceId, List<InterfaceIpAddress>> globalPrefixes = new LinkedHashMap<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ImmutableMap<DeviceId, List<InterfaceIpAddress>> getGlobalPrefixes() {
|
public synchronized ImmutableMap<DeviceId, List<InterfaceIpAddress>> getGlobalPrefixes() {
|
||||||
return ImmutableMap.copyOf(globalPrefixes);
|
return ImmutableMap.copyOf(globalPrefixes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("GuardedBy")
|
||||||
|
@GuardedBy(value = "this")
|
||||||
private Function<Interface, Map.Entry<ConnectPoint, List<InterfaceIpAddress>>> prefixGenerator =
|
private Function<Interface, Map.Entry<ConnectPoint, List<InterfaceIpAddress>>> prefixGenerator =
|
||||||
i -> {
|
i -> {
|
||||||
Map.Entry<ConnectPoint, List<InterfaceIpAddress>> prefixEntry;
|
Map.Entry<ConnectPoint, List<InterfaceIpAddress>> prefixEntry;
|
||||||
@ -282,6 +285,7 @@ public class RouterAdvertisementManager implements RoutingAdvertisementService {
|
|||||||
clearThreadPool();
|
clearThreadPool();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("GuardedBy")
|
||||||
// Loading global prefixes for devices from network configuration
|
// Loading global prefixes for devices from network configuration
|
||||||
private synchronized void loadGlobalPrefixConfig() {
|
private synchronized void loadGlobalPrefixConfig() {
|
||||||
globalPrefixes.clear();
|
globalPrefixes.clear();
|
||||||
@ -507,6 +511,7 @@ public class RouterAdvertisementManager implements RoutingAdvertisementService {
|
|||||||
solicitHostAddress = ipv6Address;
|
solicitHostAddress = ipv6Address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
// Router Advertisement header filling. Please refer RFC-2461.
|
// Router Advertisement header filling. Please refer RFC-2461.
|
||||||
RouterAdvertisement ra = new RouterAdvertisement();
|
RouterAdvertisement ra = new RouterAdvertisement();
|
||||||
|
|||||||
@ -62,4 +62,33 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-XepDisableAllChecks</arg>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>compile</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-XepDisableAllChecks</arg>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -90,6 +90,32 @@
|
|||||||
</instructions>
|
</instructions>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-XepDisableAllChecks</arg>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>compile</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-XepDisableAllChecks</arg>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|||||||
@ -51,4 +51,34 @@
|
|||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-XepDisableAllChecks</arg>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>compile</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-XepDisableAllChecks</arg>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -44,6 +44,33 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
||||||
|
<!-- FIXME: YANG tool generates problematic code -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-XepDisableAllChecks</arg>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>compile</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-XepDisableAllChecks</arg>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.onosproject</groupId>
|
<groupId>org.onosproject</groupId>
|
||||||
<artifactId>onos-yang-maven-plugin</artifactId>
|
<artifactId>onos-yang-maven-plugin</artifactId>
|
||||||
|
|||||||
@ -1316,7 +1316,7 @@ public class DistributedTeTopologyStore
|
|||||||
TeNodeKey myTeNodeKey;
|
TeNodeKey myTeNodeKey;
|
||||||
InternalNetworkNode intNode = null;
|
InternalNetworkNode intNode = null;
|
||||||
if (!parentUpdate) {
|
if (!parentUpdate) {
|
||||||
intNode = networkNodeMap.get(tpKey.nodeId());
|
intNode = networkNodeMap.get(tpKey);
|
||||||
if (intNode == null) {
|
if (intNode == null) {
|
||||||
log.error(" node is not in dataStore for tp update {}", tpKey);
|
log.error(" node is not in dataStore for tp update {}", tpKey);
|
||||||
return;
|
return;
|
||||||
@ -1351,7 +1351,7 @@ public class DistributedTeTopologyStore
|
|||||||
@Override
|
@Override
|
||||||
public void removeTerminationPoint(TerminationPointKey tpKey) {
|
public void removeTerminationPoint(TerminationPointKey tpKey) {
|
||||||
// Update InternalNetworkNode
|
// Update InternalNetworkNode
|
||||||
InternalNetworkNode intNode = networkNodeMap.get(tpKey.nodeId());
|
InternalNetworkNode intNode = networkNodeMap.get(tpKey);
|
||||||
if (intNode != null && CollectionUtils.isNotEmpty(intNode.tpIds())) {
|
if (intNode != null && CollectionUtils.isNotEmpty(intNode.tpIds())) {
|
||||||
intNode.setChildUpdate(true);
|
intNode.setChildUpdate(true);
|
||||||
intNode.tpIds().remove(tpKey.tpId());
|
intNode.tpIds().remove(tpKey.tpId());
|
||||||
|
|||||||
@ -143,7 +143,7 @@ public final class DefaultBuilder {
|
|||||||
for (long i = 0; i < numTtps; i++) {
|
for (long i = 0; i < numTtps; i++) {
|
||||||
ttps.put(i, ttpBuilder(i));
|
ttps.put(i, ttpBuilder(i));
|
||||||
}
|
}
|
||||||
ttp = ttps.get(FIRST_INDEX);
|
ttp = ttps.get((long) FIRST_INDEX);
|
||||||
//TeNode
|
//TeNode
|
||||||
teNode = new DefaultTeNode(teNodeId, underlayTopologyId,
|
teNode = new DefaultTeNode(teNodeId, underlayTopologyId,
|
||||||
supportTeNodeId, sourceTeNodeId,
|
supportTeNodeId, sourceTeNodeId,
|
||||||
|
|||||||
@ -697,7 +697,7 @@ public class SimpleTeTopologyStore
|
|||||||
if (intNework != null
|
if (intNework != null
|
||||||
&& CollectionUtils.isNotEmpty(intNework.nodeIds())) {
|
&& CollectionUtils.isNotEmpty(intNework.nodeIds())) {
|
||||||
intNework.setChildUpdate(true);
|
intNework.setChildUpdate(true);
|
||||||
intNework.nodeIds().remove(nodeKey.nodeId());
|
intNework.nodeIds().remove(nodeKey);
|
||||||
}
|
}
|
||||||
InternalNetworkNode intNode = networkNodeMap.remove(nodeKey);
|
InternalNetworkNode intNode = networkNodeMap.remove(nodeKey);
|
||||||
if (intNode != null && CollectionUtils.isNotEmpty(intNode.tpIds())) {
|
if (intNode != null && CollectionUtils.isNotEmpty(intNode.tpIds())) {
|
||||||
@ -905,7 +905,7 @@ public class SimpleTeTopologyStore
|
|||||||
if (intNework != null
|
if (intNework != null
|
||||||
&& CollectionUtils.isNotEmpty(intNework.linkIds())) {
|
&& CollectionUtils.isNotEmpty(intNework.linkIds())) {
|
||||||
intNework.setChildUpdate(true);
|
intNework.setChildUpdate(true);
|
||||||
intNework.linkIds().remove(linkKey.linkId());
|
intNework.linkIds().remove(linkKey);
|
||||||
}
|
}
|
||||||
// Remove it from networkLinkMap
|
// Remove it from networkLinkMap
|
||||||
InternalNetworkLink intLink = networkLinkMap.remove(linkKey);
|
InternalNetworkLink intLink = networkLinkMap.remove(linkKey);
|
||||||
@ -937,7 +937,7 @@ public class SimpleTeTopologyStore
|
|||||||
TeNodeKey myTeNodeKey;
|
TeNodeKey myTeNodeKey;
|
||||||
InternalNetworkNode intNode = null;
|
InternalNetworkNode intNode = null;
|
||||||
if (!parentUpdate) {
|
if (!parentUpdate) {
|
||||||
intNode = networkNodeMap.get(tpKey.nodeId());
|
intNode = networkNodeMap.get(tpKey);
|
||||||
if (intNode == null) {
|
if (intNode == null) {
|
||||||
log.error(" node is not in dataStore for tp update {}", tpKey);
|
log.error(" node is not in dataStore for tp update {}", tpKey);
|
||||||
return;
|
return;
|
||||||
@ -974,7 +974,7 @@ public class SimpleTeTopologyStore
|
|||||||
@Override
|
@Override
|
||||||
public void removeTerminationPoint(TerminationPointKey tpKey) {
|
public void removeTerminationPoint(TerminationPointKey tpKey) {
|
||||||
// Update InternalNetworkNode
|
// Update InternalNetworkNode
|
||||||
InternalNetworkNode intNode = networkNodeMap.get(tpKey.nodeId());
|
InternalNetworkNode intNode = networkNodeMap.get(tpKey);
|
||||||
if (intNode != null && CollectionUtils.isNotEmpty(intNode.tpIds())) {
|
if (intNode != null && CollectionUtils.isNotEmpty(intNode.tpIds())) {
|
||||||
intNode.setChildUpdate(true);
|
intNode.setChildUpdate(true);
|
||||||
intNode.tpIds().remove(tpKey.tpId());
|
intNode.tpIds().remove(tpKey.tpId());
|
||||||
|
|||||||
@ -52,6 +52,7 @@ import org.onosproject.net.config.NetworkConfigServiceAdapter;
|
|||||||
import org.onosproject.net.host.HostEvent;
|
import org.onosproject.net.host.HostEvent;
|
||||||
import org.onosproject.net.host.HostListener;
|
import org.onosproject.net.host.HostListener;
|
||||||
import org.onosproject.net.host.HostServiceAdapter;
|
import org.onosproject.net.host.HostServiceAdapter;
|
||||||
|
import org.onosproject.net.host.InterfaceIpAddress;
|
||||||
import org.onosproject.net.intent.Intent;
|
import org.onosproject.net.intent.Intent;
|
||||||
import org.onosproject.net.intent.IntentData;
|
import org.onosproject.net.intent.IntentData;
|
||||||
import org.onosproject.net.intent.IntentEvent;
|
import org.onosproject.net.intent.IntentEvent;
|
||||||
@ -396,7 +397,11 @@ public abstract class VplsTest {
|
|||||||
@Override
|
@Override
|
||||||
public Set<Interface> getInterfacesByIp(IpAddress ip) {
|
public Set<Interface> getInterfacesByIp(IpAddress ip) {
|
||||||
return AVAILABLE_INTERFACES.stream()
|
return AVAILABLE_INTERFACES.stream()
|
||||||
.filter(intf -> intf.ipAddressesList().contains(ip))
|
.filter(intf -> intf.ipAddressesList().stream()
|
||||||
|
.map(InterfaceIpAddress::ipAddress)
|
||||||
|
.filter(ip::equals)
|
||||||
|
.findAny()
|
||||||
|
.isPresent())
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,7 +415,11 @@ public abstract class VplsTest {
|
|||||||
@Override
|
@Override
|
||||||
public Interface getMatchingInterface(IpAddress ip) {
|
public Interface getMatchingInterface(IpAddress ip) {
|
||||||
return AVAILABLE_INTERFACES.stream()
|
return AVAILABLE_INTERFACES.stream()
|
||||||
.filter(intf -> intf.ipAddressesList().contains(ip))
|
.filter(intf -> intf.ipAddressesList().stream()
|
||||||
|
.map(InterfaceIpAddress::ipAddress)
|
||||||
|
.filter(ip::equals)
|
||||||
|
.findAny()
|
||||||
|
.isPresent())
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
}
|
}
|
||||||
@ -418,7 +427,11 @@ public abstract class VplsTest {
|
|||||||
@Override
|
@Override
|
||||||
public Set<Interface> getMatchingInterfaces(IpAddress ip) {
|
public Set<Interface> getMatchingInterfaces(IpAddress ip) {
|
||||||
return AVAILABLE_INTERFACES.stream()
|
return AVAILABLE_INTERFACES.stream()
|
||||||
.filter(intf -> intf.ipAddressesList().contains(ip))
|
.filter(intf -> intf.ipAddressesList().stream()
|
||||||
|
.map(InterfaceIpAddress::ipAddress)
|
||||||
|
.filter(ip::equals)
|
||||||
|
.findAny()
|
||||||
|
.isPresent())
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,6 +89,7 @@ public final class VtnEventuallyConsistentMapTest<K, V> extends VtnEventuallyCon
|
|||||||
return map.get(key);
|
return map.get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("ReturnValueIgnored")
|
||||||
@Override
|
@Override
|
||||||
public void put(K key, V value) {
|
public void put(K key, V value) {
|
||||||
map.put(key, value);
|
map.put(key, value);
|
||||||
|
|||||||
@ -66,7 +66,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.felix</groupId>
|
<groupId>org.apache.felix</groupId>
|
||||||
<artifactId>maven-bundle-plugin</artifactId>
|
<artifactId>maven-bundle-plugin</artifactId>
|
||||||
<version>3.2.0</version>
|
|
||||||
<extensions>true</extensions>
|
<extensions>true</extensions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<instructions>
|
<instructions>
|
||||||
@ -79,6 +78,32 @@
|
|||||||
</instructions>
|
</instructions>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-XepDisableAllChecks</arg>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>compile</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-XepDisableAllChecks</arg>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -115,6 +115,31 @@
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-XepDisableAllChecks</arg>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>compile</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-XepDisableAllChecks</arg>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -147,18 +147,6 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<pluginManagement>
|
|
||||||
<plugins>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.karaf.tooling</groupId>
|
|
||||||
<artifactId>karaf-maven-plugin</artifactId>
|
|
||||||
<version>3.0.5</version>
|
|
||||||
<extensions>true</extensions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
</plugins>
|
|
||||||
</pluginManagement>
|
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|||||||
@ -857,6 +857,14 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.karaf.tooling</groupId>
|
||||||
|
<artifactId>karaf-maven-plugin</artifactId>
|
||||||
|
<version>${karaf.version}</version>
|
||||||
|
<extensions>true</extensions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
|
|
||||||
|
|||||||
@ -116,6 +116,17 @@
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<!-- FIXME: YANG tool generates problematic code -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-XepDisableAllChecks</arg>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
||||||
|
|||||||
@ -123,6 +123,17 @@
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<!-- FIXME: YANG tool generates problematic code -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-XepDisableAllChecks</arg>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
||||||
|
|||||||
21
models/openconfig/compile-yangs.sh
Executable file
21
models/openconfig/compile-yangs.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
YANG_ROOT=$1
|
||||||
|
|
||||||
|
CONFDC_ARGS=' -c'
|
||||||
|
|
||||||
|
# YANGPATHS
|
||||||
|
for path in $(find $YANG_ROOT -type d); do
|
||||||
|
CONFDC_ARGS+=" --yangpath $path"
|
||||||
|
done
|
||||||
|
|
||||||
|
# create output dir
|
||||||
|
mkdir -p fxs
|
||||||
|
|
||||||
|
# compile .yang s
|
||||||
|
for yang in $(find $YANG_ROOT -type f -name '*.yang'); do
|
||||||
|
BASE=$(basename $yang)
|
||||||
|
OUT="${BASE%.yang}.fxs"
|
||||||
|
echo "Compiling..$yang"
|
||||||
|
confdc $CONFDC_ARGS -o fxs/$OUT -- $yang
|
||||||
|
done
|
||||||
@ -117,6 +117,17 @@
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<!-- FIXME: YANG tool generates problematic code -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-XepDisableAllChecks</arg>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
||||||
|
|||||||
63
pom.xml
63
pom.xml
@ -240,4 +240,67 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<errorprone.version>2.2.0</errorprone.version>
|
||||||
|
<betachecker.version>1.0</betachecker.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.7.0</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<compilerId>javac-with-errorprone</compilerId>
|
||||||
|
<forceJavacCompilerUse>true</forceJavacCompilerUse>
|
||||||
|
<annotationProcessorPaths>
|
||||||
|
<path>
|
||||||
|
<groupId>com.google.guava</groupId>
|
||||||
|
<artifactId>guava-beta-checker</artifactId>
|
||||||
|
<version>${betachecker.version}</version>
|
||||||
|
</path>
|
||||||
|
</annotationProcessorPaths>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-Xep:BetaApi:WARN</arg>
|
||||||
|
<!-- <arg>-Xep:BetaApi:ERROR</arg> -->
|
||||||
|
<!-- Add following to disable error-prone -->
|
||||||
|
<!-- <arg>-XepDisableAllChecks</arg> -->
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-testCompile</id>
|
||||||
|
<phase>test-compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>testCompile</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<!-- Disable Beta Checker for tests -->
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-compiler-javac-errorprone</artifactId>
|
||||||
|
<version>2.8.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.errorprone</groupId>
|
||||||
|
<artifactId>error_prone_core</artifactId>
|
||||||
|
<!-- override plexus-compiler-javac-errorprone's dependency with the
|
||||||
|
latest Error Prone version -->
|
||||||
|
<version>${errorprone.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -218,6 +218,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @return the IP address of this neighbor
|
* @return the IP address of this neighbor
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Ip4Address neighborIpAddr() {
|
public Ip4Address neighborIpAddr() {
|
||||||
return neighborIpAddr;
|
return neighborIpAddr;
|
||||||
}
|
}
|
||||||
@ -227,6 +228,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @return true if the neighbor is opaque enabled else false.
|
* @return true if the neighbor is opaque enabled else false.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOpaqueCapable() {
|
public boolean isOpaqueCapable() {
|
||||||
return isOpaqueCapable;
|
return isOpaqueCapable;
|
||||||
}
|
}
|
||||||
@ -236,6 +238,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @param isOpaqueCapable true if the neighbor is opaque enabledelse false
|
* @param isOpaqueCapable true if the neighbor is opaque enabledelse false
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setIsOpaqueCapable(boolean isOpaqueCapable) {
|
public void setIsOpaqueCapable(boolean isOpaqueCapable) {
|
||||||
this.isOpaqueCapable = isOpaqueCapable;
|
this.isOpaqueCapable = isOpaqueCapable;
|
||||||
}
|
}
|
||||||
@ -245,6 +248,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @param routerDeadInterval router dead interval
|
* @param routerDeadInterval router dead interval
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setRouterDeadInterval(int routerDeadInterval) {
|
public void setRouterDeadInterval(int routerDeadInterval) {
|
||||||
this.routerDeadInterval = routerDeadInterval;
|
this.routerDeadInterval = routerDeadInterval;
|
||||||
}
|
}
|
||||||
@ -386,7 +390,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
state = OspfNeighborState.EXCHANGE;
|
state = OspfNeighborState.EXCHANGE;
|
||||||
boolean excludeMaxAgeLsa = true;
|
boolean excludeMaxAgeLsa = true;
|
||||||
//list of contents of area wise LSA
|
//list of contents of area wise LSA
|
||||||
ddSummaryList = (CopyOnWriteArrayList) ospfArea.getLsaHeaders(excludeMaxAgeLsa, isOpaqueCapable);
|
ddSummaryList = ospfArea.getLsaHeaders(excludeMaxAgeLsa, isOpaqueCapable);
|
||||||
|
|
||||||
if (neighborIsMaster) {
|
if (neighborIsMaster) {
|
||||||
processLsas(payload);
|
processLsas(payload);
|
||||||
@ -558,6 +562,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
* @param ch netty channel instance
|
* @param ch netty channel instance
|
||||||
* @throws Exception on error
|
* @throws Exception on error
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void badLSReq(Channel ch) throws Exception {
|
public void badLSReq(Channel ch) throws Exception {
|
||||||
log.debug("OSPFNbr::badLSReq...!!!");
|
log.debug("OSPFNbr::badLSReq...!!!");
|
||||||
|
|
||||||
@ -837,6 +842,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @param ch netty channel instance
|
* @param ch netty channel instance
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void adjOk(Channel ch) {
|
public void adjOk(Channel ch) {
|
||||||
log.debug("OSPFNbr::adjOk...!!!");
|
log.debug("OSPFNbr::adjOk...!!!");
|
||||||
if (ospfInterface.interfaceType() != OspfInterfaceType.POINT_TO_POINT.value()) {
|
if (ospfInterface.interfaceType() != OspfInterfaceType.POINT_TO_POINT.value()) {
|
||||||
@ -1176,7 +1182,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// RFC 2328 Section 13 (6)
|
// RFC 2328 Section 13 (6)
|
||||||
if (lsReqList.contains(key)) {
|
if (lsReqList.containsValue(key)) {
|
||||||
badLSReq(ch);
|
badLSReq(ch);
|
||||||
}
|
}
|
||||||
if (status.equals("same")) { //13 (7)
|
if (status.equals("same")) { //13 (7)
|
||||||
@ -1397,6 +1403,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
/**
|
/**
|
||||||
* Starts the inactivity timer.
|
* Starts the inactivity timer.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void startInactivityTimeCheck() {
|
public void startInactivityTimeCheck() {
|
||||||
if (!inActivityTimerScheduled) {
|
if (!inActivityTimerScheduled) {
|
||||||
log.debug("OSPFNbr::startInactivityTimeCheck");
|
log.debug("OSPFNbr::startInactivityTimeCheck");
|
||||||
@ -1411,6 +1418,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
/**
|
/**
|
||||||
* Stops the inactivity timer.
|
* Stops the inactivity timer.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void stopInactivityTimeCheck() {
|
public void stopInactivityTimeCheck() {
|
||||||
if (inActivityTimerScheduled) {
|
if (inActivityTimerScheduled) {
|
||||||
log.debug("OSPFNbr::stopInactivityTimeCheck ");
|
log.debug("OSPFNbr::stopInactivityTimeCheck ");
|
||||||
@ -1440,6 +1448,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
/**
|
/**
|
||||||
* Stops the flooding timer.
|
* Stops the flooding timer.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void stopFloodingTimer() {
|
public void stopFloodingTimer() {
|
||||||
if (floodingTimerScheduled) {
|
if (floodingTimerScheduled) {
|
||||||
log.debug("OSPFNbr::stopFloodingTimer ");
|
log.debug("OSPFNbr::stopFloodingTimer ");
|
||||||
@ -1467,6 +1476,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
/**
|
/**
|
||||||
* Stops the Dd Retransmission executor task.
|
* Stops the Dd Retransmission executor task.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void stopRxMtDdTimer() {
|
public void stopRxMtDdTimer() {
|
||||||
if (rxmtDdPacketTimerScheduled) {
|
if (rxmtDdPacketTimerScheduled) {
|
||||||
exServiceRxmtDDPacket.shutdown();
|
exServiceRxmtDDPacket.shutdown();
|
||||||
@ -1494,6 +1504,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
/**
|
/**
|
||||||
* Stops Ls request retransmission executor task.
|
* Stops Ls request retransmission executor task.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void stopRxMtLsrTimer() {
|
public void stopRxMtLsrTimer() {
|
||||||
if (rxmtLsrTimerScheduled) {
|
if (rxmtLsrTimerScheduled) {
|
||||||
exServiceRxmtLsr.shutdown();
|
exServiceRxmtLsr.shutdown();
|
||||||
@ -1524,6 +1535,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @return neighbor id
|
* @return neighbor id
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Ip4Address neighborId() {
|
public Ip4Address neighborId() {
|
||||||
return neighborId;
|
return neighborId;
|
||||||
}
|
}
|
||||||
@ -1533,6 +1545,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @param neighborId neighbor id
|
* @param neighborId neighbor id
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setNeighborId(Ip4Address neighborId) {
|
public void setNeighborId(Ip4Address neighborId) {
|
||||||
this.neighborId = neighborId;
|
this.neighborId = neighborId;
|
||||||
}
|
}
|
||||||
@ -1542,6 +1555,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @return neighbor DR address
|
* @return neighbor DR address
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Ip4Address neighborDr() {
|
public Ip4Address neighborDr() {
|
||||||
return neighborDr;
|
return neighborDr;
|
||||||
}
|
}
|
||||||
@ -1551,6 +1565,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @param neighborDr neighbor DR address
|
* @param neighborDr neighbor DR address
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setNeighborDr(Ip4Address neighborDr) {
|
public void setNeighborDr(Ip4Address neighborDr) {
|
||||||
this.neighborDr = neighborDr;
|
this.neighborDr = neighborDr;
|
||||||
}
|
}
|
||||||
@ -1560,6 +1575,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @return neighbor BDR address
|
* @return neighbor BDR address
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Ip4Address neighborBdr() {
|
public Ip4Address neighborBdr() {
|
||||||
return neighborBdr;
|
return neighborBdr;
|
||||||
}
|
}
|
||||||
@ -1569,6 +1585,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @param neighborBdr neighbor BDR address
|
* @param neighborBdr neighbor BDR address
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setNeighborBdr(Ip4Address neighborBdr) {
|
public void setNeighborBdr(Ip4Address neighborBdr) {
|
||||||
this.neighborBdr = neighborBdr;
|
this.neighborBdr = neighborBdr;
|
||||||
}
|
}
|
||||||
@ -1578,6 +1595,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @return router priority
|
* @return router priority
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int routerPriority() {
|
public int routerPriority() {
|
||||||
return routerPriority;
|
return routerPriority;
|
||||||
}
|
}
|
||||||
@ -1587,6 +1605,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @param routerPriority router priority
|
* @param routerPriority router priority
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setRouterPriority(int routerPriority) {
|
public void setRouterPriority(int routerPriority) {
|
||||||
this.routerPriority = routerPriority;
|
this.routerPriority = routerPriority;
|
||||||
}
|
}
|
||||||
@ -1596,6 +1615,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @return options value
|
* @return options value
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int options() {
|
public int options() {
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
@ -1605,6 +1625,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @param options options value
|
* @param options options value
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setOptions(int options) {
|
public void setOptions(int options) {
|
||||||
this.options = options;
|
this.options = options;
|
||||||
}
|
}
|
||||||
@ -1614,6 +1635,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @return DD sequence number
|
* @return DD sequence number
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public long ddSeqNum() {
|
public long ddSeqNum() {
|
||||||
return ddSeqNum;
|
return ddSeqNum;
|
||||||
}
|
}
|
||||||
@ -1623,6 +1645,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @param ddSeqNum DD sequence number
|
* @param ddSeqNum DD sequence number
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setDdSeqNum(long ddSeqNum) {
|
public void setDdSeqNum(long ddSeqNum) {
|
||||||
this.ddSeqNum = ddSeqNum;
|
this.ddSeqNum = ddSeqNum;
|
||||||
}
|
}
|
||||||
@ -1632,6 +1655,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @return true if neighbor is master else false
|
* @return true if neighbor is master else false
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int isMaster() {
|
public int isMaster() {
|
||||||
return isMaster;
|
return isMaster;
|
||||||
}
|
}
|
||||||
@ -1677,6 +1701,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @return neighbors state
|
* @return neighbors state
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public OspfNeighborState getState() {
|
public OspfNeighborState getState() {
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
@ -1695,6 +1720,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @param isMaster neighbor is master or not
|
* @param isMaster neighbor is master or not
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setIsMaster(int isMaster) {
|
public void setIsMaster(int isMaster) {
|
||||||
this.isMaster = isMaster;
|
this.isMaster = isMaster;
|
||||||
}
|
}
|
||||||
@ -1704,6 +1730,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @return ls request list
|
* @return ls request list
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Hashtable getLsReqList() {
|
public Hashtable getLsReqList() {
|
||||||
return lsReqList;
|
return lsReqList;
|
||||||
}
|
}
|
||||||
@ -1713,6 +1740,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @return reTxList instance
|
* @return reTxList instance
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Map getReTxList() {
|
public Map getReTxList() {
|
||||||
return reTxList;
|
return reTxList;
|
||||||
}
|
}
|
||||||
@ -1722,6 +1750,7 @@ public class OspfNbrImpl implements OspfNbr {
|
|||||||
*
|
*
|
||||||
* @return pendingReTxList instance
|
* @return pendingReTxList instance
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Map<String, OspfLsa> getPendingReTxList() {
|
public Map<String, OspfLsa> getPendingReTxList() {
|
||||||
return pendingReTxList;
|
return pendingReTxList;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -217,7 +217,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
|
|||||||
|
|
||||||
TunnelProviderService service;
|
TunnelProviderService service;
|
||||||
|
|
||||||
HashMap<String, TunnelId> tunnelMap = new HashMap<String, TunnelId>();
|
HashMap<String, TunnelId> tunnelMap = new HashMap<>();
|
||||||
HashMap<TunnelId, TunnelStatistics> tunnelStatisticsMap = new HashMap<>();
|
HashMap<TunnelId, TunnelStatistics> tunnelStatisticsMap = new HashMap<>();
|
||||||
private HashMap<String, TunnelStatsCollector> collectors = Maps.newHashMap();
|
private HashMap<String, TunnelStatsCollector> collectors = Maps.newHashMap();
|
||||||
|
|
||||||
@ -885,7 +885,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
|
|||||||
* @return list of ERO subobjects
|
* @return list of ERO subobjects
|
||||||
*/
|
*/
|
||||||
private LinkedList<PcepValueType> createPcepPath(Path path) {
|
private LinkedList<PcepValueType> createPcepPath(Path path) {
|
||||||
LinkedList<PcepValueType> llSubObjects = new LinkedList<PcepValueType>();
|
LinkedList<PcepValueType> llSubObjects = new LinkedList<>();
|
||||||
List<Link> listLink = path.links();
|
List<Link> listLink = path.links();
|
||||||
ConnectPoint source = null;
|
ConnectPoint source = null;
|
||||||
ConnectPoint destination = null;
|
ConnectPoint destination = null;
|
||||||
@ -952,7 +952,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
|
LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
|
||||||
|
|
||||||
// set PathSetupTypeTlv of SRP object
|
// set PathSetupTypeTlv of SRP object
|
||||||
tlv = new PathSetupTypeTlv(lspType.type());
|
tlv = new PathSetupTypeTlv(lspType.type());
|
||||||
@ -962,8 +962,8 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
|
|||||||
PcepSrpObject srpobj = pc.factory().buildSrpObject().setSrpID(srpId).setRFlag(false)
|
PcepSrpObject srpobj = pc.factory().buildSrpObject().setSrpID(srpId).setRFlag(false)
|
||||||
.setOptionalTlv(llOptionalTlv).build();
|
.setOptionalTlv(llOptionalTlv).build();
|
||||||
|
|
||||||
llOptionalTlv = new LinkedList<PcepValueType>();
|
llOptionalTlv = new LinkedList<>();
|
||||||
LinkedList<PcInitiatedLspRequest> llPcInitiatedLspRequestList = new LinkedList<PcInitiatedLspRequest>();
|
LinkedList<PcInitiatedLspRequest> llPcInitiatedLspRequestList = new LinkedList<>();
|
||||||
|
|
||||||
// set LSP identifiers TLV
|
// set LSP identifiers TLV
|
||||||
short localLspId = 0;
|
short localLspId = 0;
|
||||||
@ -1089,7 +1089,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
|
|||||||
int srpId = SrpIdGenerators.create();
|
int srpId = SrpIdGenerators.create();
|
||||||
|
|
||||||
PcepValueType tlv;
|
PcepValueType tlv;
|
||||||
LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
|
LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
|
||||||
|
|
||||||
// set PathSetupTypeTlv of SRP object
|
// set PathSetupTypeTlv of SRP object
|
||||||
tlv = new PathSetupTypeTlv(LspType.valueOf(tunnel.annotations().value(LSP_SIG_TYPE))
|
tlv = new PathSetupTypeTlv(LspType.valueOf(tunnel.annotations().value(LSP_SIG_TYPE))
|
||||||
@ -1100,8 +1100,8 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
|
|||||||
PcepSrpObject srpobj = pc.factory().buildSrpObject().setSrpID(srpId).setRFlag(true)
|
PcepSrpObject srpobj = pc.factory().buildSrpObject().setSrpID(srpId).setRFlag(true)
|
||||||
.setOptionalTlv(llOptionalTlv).build();
|
.setOptionalTlv(llOptionalTlv).build();
|
||||||
|
|
||||||
llOptionalTlv = new LinkedList<PcepValueType>();
|
llOptionalTlv = new LinkedList<>();
|
||||||
LinkedList<PcInitiatedLspRequest> llPcInitiatedLspRequestList = new LinkedList<PcInitiatedLspRequest>();
|
LinkedList<PcInitiatedLspRequest> llPcInitiatedLspRequestList = new LinkedList<>();
|
||||||
|
|
||||||
tlv = new SymbolicPathNameTlv(tunnel.tunnelName().value().getBytes());
|
tlv = new SymbolicPathNameTlv(tunnel.tunnelName().value().getBytes());
|
||||||
llOptionalTlv.add(tlv);
|
llOptionalTlv.add(tlv);
|
||||||
@ -1183,8 +1183,8 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
|
|||||||
llSubObjects = createPcepPath(path);
|
llSubObjects = createPcepPath(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
|
LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
|
||||||
LinkedList<PcepUpdateRequest> llUpdateRequestList = new LinkedList<PcepUpdateRequest>();
|
LinkedList<PcepUpdateRequest> llUpdateRequestList = new LinkedList<>();
|
||||||
|
|
||||||
// set PathSetupTypeTlv of SRP object
|
// set PathSetupTypeTlv of SRP object
|
||||||
tlv = new PathSetupTypeTlv(lspSigType.type());
|
tlv = new PathSetupTypeTlv(lspSigType.type());
|
||||||
@ -1194,7 +1194,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
|
|||||||
PcepSrpObject srpobj = pc.factory().buildSrpObject().setSrpID(srpId).setRFlag(false)
|
PcepSrpObject srpobj = pc.factory().buildSrpObject().setSrpID(srpId).setRFlag(false)
|
||||||
.setOptionalTlv(llOptionalTlv).build();
|
.setOptionalTlv(llOptionalTlv).build();
|
||||||
|
|
||||||
llOptionalTlv = new LinkedList<PcepValueType>();
|
llOptionalTlv = new LinkedList<>();
|
||||||
|
|
||||||
// Lsp Identifier tlv is required for all modes of lsp
|
// Lsp Identifier tlv is required for all modes of lsp
|
||||||
String localLspIdString = tunnel.annotations().value(LOCAL_LSP_ID);
|
String localLspIdString = tunnel.annotations().value(LOCAL_LSP_ID);
|
||||||
@ -1661,7 +1661,7 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid
|
|||||||
if (mastershipService.isLocalMaster(deviceId)) {
|
if (mastershipService.isLocalMaster(deviceId)) {
|
||||||
TunnelId tId = tunnelAdded(td, tunnelState);
|
TunnelId tId = tunnelAdded(td, tunnelState);
|
||||||
Tunnel tunnelInserted = new DefaultTunnel(providerId, tunnelEndPointSrc, tunnelEndPointDst, MPLS,
|
Tunnel tunnelInserted = new DefaultTunnel(providerId, tunnelEndPointSrc, tunnelEndPointDst, MPLS,
|
||||||
tunnelState, new GroupId(0), tId, TunnelName.tunnelName(String.valueOf(pathNameTlv
|
tunnelState, new GroupId(0), tId, TunnelName.tunnelName(Arrays.toString(pathNameTlv
|
||||||
.getValue())), path, labelStack, annotations);
|
.getValue())), path, labelStack, annotations);
|
||||||
|
|
||||||
PcepTunnelData pcepTunnelData = new PcepTunnelData(tunnelInserted, path, LSP_STATE_RPT);
|
PcepTunnelData pcepTunnelData = new PcepTunnelData(tunnelInserted, path, LSP_STATE_RPT);
|
||||||
|
|||||||
@ -53,4 +53,20 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-Xep:BetaApi:OFF</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -31,7 +31,6 @@
|
|||||||
<description>Miscellaneous ON.Lab utilities</description>
|
<description>Miscellaneous ON.Lab utilities</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<metrics.version>3.1.2</metrics.version>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -77,12 +76,10 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.dropwizard.metrics</groupId>
|
<groupId>io.dropwizard.metrics</groupId>
|
||||||
<artifactId>metrics-core</artifactId>
|
<artifactId>metrics-core</artifactId>
|
||||||
<version>${metrics.version}</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.dropwizard.metrics</groupId>
|
<groupId>io.dropwizard.metrics</groupId>
|
||||||
<artifactId>metrics-json</artifactId>
|
<artifactId>metrics-json</artifactId>
|
||||||
<version>${metrics.version}</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.felix</groupId>
|
<groupId>org.apache.felix</groupId>
|
||||||
|
|||||||
@ -162,7 +162,7 @@ public abstract class Tools {
|
|||||||
* @param collection collection to test
|
* @param collection collection to test
|
||||||
* @return true if null or empty; false otherwise
|
* @return true if null or empty; false otherwise
|
||||||
*/
|
*/
|
||||||
public static boolean isNullOrEmpty(Collection collection) {
|
public static boolean isNullOrEmpty(Collection<?> collection) {
|
||||||
return collection == null || collection.isEmpty();
|
return collection == null || collection.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user