Removal of deprecated APIs
- OchSignal constructor
- unfiltered connect point methods in single point to multi point intents
- useBackup() method from disjoint paths
- ChannelAdapter class
- getLastUpdatedInstant() method from cluster store
- switchWorkingPath() method from protection config behaviour
- getVersion() method from partition
- getFlowRulesById() method from flow rule service
Change-Id: I5c6c2f31725f7e7e44ac2abb18ce3fb96b09d93e
diff --git a/core/api/src/main/java/org/onosproject/cluster/ClusterStore.java b/core/api/src/main/java/org/onosproject/cluster/ClusterStore.java
index fdcd315..716168d 100644
--- a/core/api/src/main/java/org/onosproject/cluster/ClusterStore.java
+++ b/core/api/src/main/java/org/onosproject/cluster/ClusterStore.java
@@ -15,13 +15,11 @@
*/
package org.onosproject.cluster;
-import org.joda.time.DateTime;
import org.onlab.packet.IpAddress;
import org.onosproject.core.Version;
import org.onosproject.store.Store;
import java.time.Instant;
-import java.util.Optional;
import java.util.Set;
/**
@@ -87,28 +85,7 @@
* @param nodeId controller node identifier
* @return system time when the availability state was last updated.
*/
- default Instant getLastUpdatedInstant(NodeId nodeId) {
- return Optional.ofNullable(getLastUpdated(nodeId))
- .map(DateTime::getMillis)
- .map(Instant::ofEpochMilli)
- .orElse(null);
- }
-
- /**
- * Returns the system when the availability state was last updated.
- *
- * @param nodeId controller node identifier
- * @return system time when the availability state was last updated.
- *
- * @deprecated in 1.12.0
- */
- @Deprecated
- default DateTime getLastUpdated(NodeId nodeId) {
- return Optional.ofNullable(getLastUpdatedInstant(nodeId))
- .map(Instant::toEpochMilli)
- .map(DateTime::new)
- .orElse(null);
- }
+ Instant getLastUpdatedInstant(NodeId nodeId);
/**
* Adds a new controller node to the cluster.
diff --git a/core/api/src/main/java/org/onosproject/cluster/DefaultPartition.java b/core/api/src/main/java/org/onosproject/cluster/DefaultPartition.java
index f0a73b6..491f9a9 100644
--- a/core/api/src/main/java/org/onosproject/cluster/DefaultPartition.java
+++ b/core/api/src/main/java/org/onosproject/cluster/DefaultPartition.java
@@ -15,13 +15,12 @@
*/
package org.onosproject.cluster;
-import java.util.Collection;
-import java.util.Objects;
-
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
-import org.onosproject.core.Version;
+
+import java.util.Collection;
+import java.util.Objects;
import static com.google.common.base.Preconditions.checkNotNull;
@@ -68,11 +67,6 @@
}
@Override
- public Version getVersion() {
- return null;
- }
-
- @Override
public Collection<NodeId> getMembers() {
return members;
}
diff --git a/core/api/src/main/java/org/onosproject/cluster/Partition.java b/core/api/src/main/java/org/onosproject/cluster/Partition.java
index 33bc68f..c73357d 100644
--- a/core/api/src/main/java/org/onosproject/cluster/Partition.java
+++ b/core/api/src/main/java/org/onosproject/cluster/Partition.java
@@ -17,8 +17,6 @@
import java.util.Collection;
-import org.onosproject.core.Version;
-
/**
* A partition or shard is a group of controller nodes that are work together to maintain state.
* A ONOS cluster is typically made of of one or partitions over which the the data is partitioned.
@@ -32,15 +30,6 @@
PartitionId getId();
/**
- * Returns the partition version.
- *
- * @return the partition version
- * @deprecated since 1.14
- */
- @Deprecated
- Version getVersion();
-
- /**
* Returns the controller nodes that are members of this partition.
* @return collection of controller node identifiers
*/
diff --git a/core/api/src/main/java/org/onosproject/net/DefaultDisjointPath.java b/core/api/src/main/java/org/onosproject/net/DefaultDisjointPath.java
index 67d9b56..fba79bd 100644
--- a/core/api/src/main/java/org/onosproject/net/DefaultDisjointPath.java
+++ b/core/api/src/main/java/org/onosproject/net/DefaultDisjointPath.java
@@ -98,10 +98,4 @@
}
return false;
}
-
- @Deprecated
- @Override
- public boolean useBackup() {
- return false;
- }
}
diff --git a/core/api/src/main/java/org/onosproject/net/DisjointPath.java b/core/api/src/main/java/org/onosproject/net/DisjointPath.java
index b7ff6e4..b96d713 100644
--- a/core/api/src/main/java/org/onosproject/net/DisjointPath.java
+++ b/core/api/src/main/java/org/onosproject/net/DisjointPath.java
@@ -26,17 +26,6 @@
public interface DisjointPath extends Path {
/**
- * Uses backup path.
- *
- * @return boolean corresponding to whether request to use
- * backup was successful.
- *
- * @deprecated in 1.11.0
- */
- @Deprecated
- boolean useBackup();
-
- /**
* Gets primary path.
*
* @return primary path
diff --git a/core/api/src/main/java/org/onosproject/net/OchSignal.java b/core/api/src/main/java/org/onosproject/net/OchSignal.java
index 2234aaf..d7d2625 100644
--- a/core/api/src/main/java/org/onosproject/net/OchSignal.java
+++ b/core/api/src/main/java/org/onosproject/net/OchSignal.java
@@ -95,23 +95,6 @@
}
/**
- * Creates OCh signal.
- *
- * @param centerFrequency frequency
- * @param channelSpacing spacing
- * @param slotGranularity granularity
- * @deprecated 1.4.0 Emu Release
- */
- @Deprecated
- public OchSignal(Frequency centerFrequency, ChannelSpacing channelSpacing, int slotGranularity) {
- this.gridType = DEFAULT_OCH_GRIDTYPE;
- this.channelSpacing = channelSpacing;
- this.spacingMultiplier = (int) Math.round((double) centerFrequency.
- subtract(Spectrum.CENTER_FREQUENCY).asHz() / channelSpacing().frequency().asHz());
- this.slotGranularity = slotGranularity;
- }
-
- /**
* Returns grid type.
*
* @return grid type
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/protection/ProtectionConfigBehaviour.java b/core/api/src/main/java/org/onosproject/net/behaviour/protection/ProtectionConfigBehaviour.java
index a2261ed..7280a34 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/protection/ProtectionConfigBehaviour.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/protection/ProtectionConfigBehaviour.java
@@ -153,18 +153,6 @@
}
/**
- * Attempts to manually switch working path to the one specified by {@code index}.
- *
- * @param identifier {@link ConnectPoint} for the virtual Port representing
- * protected path endpoint
- * @param index working path index to switch to
- * @return Completes if request was accepted, fails exceptionally on error.
- * Note: completion does not always assure working path has switched.
- */
- @Deprecated
- CompletableFuture<Void> switchWorkingPath(ConnectPoint identifier, int index);
-
- /**
* Attempts to forcibly switch to the one specified path by {@code index}.
*
* @param identifier {@link ConnectPoint} for the virtual Port representing
@@ -187,9 +175,7 @@
* @return Completes if request was accepted, fails exceptionally on error.
* Note: completion does not always assure working path has switched.
*/
- default CompletableFuture<Void> switchToManual(ConnectPoint identifier, int index) {
- return switchWorkingPath(identifier, index);
- }
+ CompletableFuture<Void> switchToManual(ConnectPoint identifier, int index);
/**
* Attempts to set the device to automatic protection mode.
diff --git a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java
index 0ade2ed..af9e57f 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java
@@ -125,15 +125,6 @@
* @param id the application ID to look up
* @return collection of flow rules
*/
- @Deprecated
- Iterable<FlowRule> getFlowRulesById(ApplicationId id);
-
- /**
- * Returns a list of rules with this application ID.
- *
- * @param id the application ID to look up
- * @return collection of flow rules
- */
Iterable<FlowEntry> getFlowEntriesById(ApplicationId id);
/**
diff --git a/core/api/src/main/java/org/onosproject/net/intent/SinglePointToMultiPointIntent.java b/core/api/src/main/java/org/onosproject/net/intent/SinglePointToMultiPointIntent.java
index 4625083..d12702e 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/SinglePointToMultiPointIntent.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/SinglePointToMultiPointIntent.java
@@ -167,44 +167,6 @@
}
/**
- * Sets the ingress point of the single point to multi point intent
- * that will be built.
- *
- * @param ingressPoint ingress connect point
- * @return this builder
- */
- @Deprecated
- public Builder ingressPoint(ConnectPoint ingressPoint) {
- if (this.ingressPoint != null) {
- log.warn("Ingress point is already set, " +
- "this will override original ingress point.");
- }
- this.ingressPoint = new FilteredConnectPoint(ingressPoint);
- return this;
- }
-
- /**
- * Sets the egress points of the single point to multi point intent
- * that will be built.
- *
- * @param egressPoints egress connect points
- * @return this builder
- */
- @Deprecated
- public Builder egressPoints(Set<ConnectPoint> egressPoints) {
- if (this.egressPoints != null) {
- log.warn("Egress points are already set, " +
- "this will override original egress points.");
- }
- Set<FilteredConnectPoint> filteredConnectPoints =
- egressPoints.stream()
- .map(FilteredConnectPoint::new)
- .collect(Collectors.toSet());
- this.egressPoints = ImmutableSet.copyOf(filteredConnectPoints);
- return this;
- }
-
- /**
* Sets the filtered ingress point of the single point to
* multi point intent that will be built.
*
diff --git a/core/api/src/test/java/org/onosproject/core/netty/ChannelAdapter.java b/core/api/src/test/java/org/onosproject/core/netty/ChannelAdapter.java
deleted file mode 100644
index 667084e..0000000
--- a/core/api/src/test/java/org/onosproject/core/netty/ChannelAdapter.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright 2016-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.core.netty;
-
-import java.net.SocketAddress;
-
-import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelConfig;
-import org.jboss.netty.channel.ChannelFactory;
-import org.jboss.netty.channel.ChannelFuture;
-import org.jboss.netty.channel.ChannelPipeline;
-
-/**
- * Adapter for testing against a netty channel.
- *
- * @deprecated in 1.11.0
- */
-@Deprecated
-public class ChannelAdapter implements Channel {
- @Override
- public Integer getId() {
- return null;
- }
-
- @Override
- public ChannelFactory getFactory() {
- return null;
- }
-
- @Override
- public Channel getParent() {
- return null;
- }
-
- @Override
- public ChannelConfig getConfig() {
- return null;
- }
-
- @Override
- public ChannelPipeline getPipeline() {
- return null;
- }
-
- @Override
- public boolean isOpen() {
- return false;
- }
-
- @Override
- public boolean isBound() {
- return false;
- }
-
- @Override
- public boolean isConnected() {
- return false;
- }
-
- @Override
- public SocketAddress getLocalAddress() {
- return null;
- }
-
- @Override
- public SocketAddress getRemoteAddress() {
- return null;
- }
-
- @Override
- public ChannelFuture write(Object o) {
- return null;
- }
-
- @Override
- public ChannelFuture write(Object o, SocketAddress socketAddress) {
- return null;
- }
-
- @Override
- public ChannelFuture bind(SocketAddress socketAddress) {
- return null;
- }
-
- @Override
- public ChannelFuture connect(SocketAddress socketAddress) {
- return null;
- }
-
- @Override
- public ChannelFuture disconnect() {
- return null;
- }
-
- @Override
- public ChannelFuture unbind() {
- return null;
- }
-
- @Override
- public ChannelFuture close() {
- return null;
- }
-
- @Override
- public ChannelFuture getCloseFuture() {
- return null;
- }
-
- @Override
- public int getInterestOps() {
- return 0;
- }
-
- @Override
- public boolean isReadable() {
- return false;
- }
-
- @Override
- public boolean isWritable() {
- return false;
- }
-
- @Override
- public ChannelFuture setInterestOps(int i) {
- return null;
- }
-
- @Override
- public ChannelFuture setReadable(boolean b) {
- return null;
- }
-
- @Override
- public boolean getUserDefinedWritability(int i) {
- return false;
- }
-
- @Override
- public void setUserDefinedWritability(int i, boolean b) {
-
- }
-
- @Override
- public Object getAttachment() {
- return null;
- }
-
- @Override
- public void setAttachment(Object o) {
-
- }
-
- @Override
- public int compareTo(Channel o) {
- return 0;
- }
-}
diff --git a/core/api/src/test/java/org/onosproject/net/flow/FlowRuleServiceAdapter.java b/core/api/src/test/java/org/onosproject/net/flow/FlowRuleServiceAdapter.java
index 56cfe03..21fd045 100644
--- a/core/api/src/test/java/org/onosproject/net/flow/FlowRuleServiceAdapter.java
+++ b/core/api/src/test/java/org/onosproject/net/flow/FlowRuleServiceAdapter.java
@@ -50,11 +50,6 @@
}
@Override
- public Iterable<FlowRule> getFlowRulesById(ApplicationId id) {
- return null;
- }
-
- @Override
public Iterable<FlowEntry> getFlowEntriesById(ApplicationId id) {
return null;
}
diff --git a/core/api/src/test/java/org/onosproject/net/intent/SinglePointToMultiPointIntentTest.java b/core/api/src/test/java/org/onosproject/net/intent/SinglePointToMultiPointIntentTest.java
index c00279a..12d8bcc 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/SinglePointToMultiPointIntentTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/SinglePointToMultiPointIntentTest.java
@@ -16,6 +16,11 @@
package org.onosproject.net.intent;
import org.junit.Test;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.FilteredConnectPoint;
+
+import java.util.HashSet;
+import java.util.Set;
import static org.junit.Assert.assertEquals;
import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutable;
@@ -70,14 +75,20 @@
assertEquals("incorrect filtered egress", FPS2, intent.filteredEgressPoints());
}
+ private Set<FilteredConnectPoint> filterPoints(Set<ConnectPoint> points) {
+ HashSet<FilteredConnectPoint> result = new HashSet<>();
+ points.iterator().forEachRemaining(point -> result.add(new FilteredConnectPoint(point)));
+ return result;
+ }
+
@Override
protected SinglePointToMultiPointIntent createOne() {
return SinglePointToMultiPointIntent.builder()
.appId(APPID)
.selector(MATCH)
.treatment(NOP)
- .ingressPoint(P1)
- .egressPoints(PS2)
+ .filteredIngressPoint(new FilteredConnectPoint(P1))
+ .filteredEgressPoints(filterPoints(PS2))
.build();
}
@@ -87,8 +98,8 @@
.appId(APPID)
.selector(MATCH)
.treatment(NOP)
- .ingressPoint(P2)
- .egressPoints(PS1)
+ .filteredIngressPoint(new FilteredConnectPoint(P2))
+ .filteredEgressPoints(filterPoints(PS1))
.build();
}
@@ -97,8 +108,8 @@
.appId(APPID)
.selector(MATCH)
.treatment(NOP)
- .ingressPoint(P2)
- .egressPoints(PS1)
+ .filteredIngressPoint(new FilteredConnectPoint(P2))
+ .filteredEgressPoints(filterPoints(PS1))
.resourceGroup(RESOURCE_GROUP)
.build();
}