Removed deprecated intent operations
Change-Id: I2ca316dab4c1ac1a66fb4ddf101c4adf3302dcd2
diff --git a/core/api/src/main/java/org/onosproject/net/intent/IntentOperation.java b/core/api/src/main/java/org/onosproject/net/intent/IntentOperation.java
index c25c28f..7eed841 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/IntentOperation.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/IntentOperation.java
@@ -42,18 +42,6 @@
* Indicates that an intent should be removed.
*/
WITHDRAW,
-
- /**
- * Indicates that an intent should be replaced with another.
- */
- @Deprecated
- REPLACE,
-
- /**
- * Indicates that an intent should be updated (i.e. recompiled/reinstalled).
- */
- @Deprecated
- UPDATE,
}
/**
diff --git a/core/api/src/main/java/org/onosproject/net/intent/IntentService.java b/core/api/src/main/java/org/onosproject/net/intent/IntentService.java
index 1ba1b29..20a06fa 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/IntentService.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/IntentService.java
@@ -43,15 +43,6 @@
void withdraw(Intent intent);
/**
- * Replaces the specified intent with a new one.
- *
- * @param oldIntentId identifier of the old intent being replaced
- * @param newIntent new intent replacing the old one
- */
- @Deprecated
- void replace(IntentId oldIntentId, Intent newIntent);
-
- /**
* Returns an iterable of intents currently in the system.
*
* @return set of intents
diff --git a/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java b/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java
index a9a331f..4cdb674 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java
@@ -186,11 +186,6 @@
}
@Override
- public void replace(IntentId oldIntentId, Intent newIntent) {
- // TODO: implement later
- }
-
- @Override
public Set<Intent> getIntents() {
return Collections.unmodifiableSet(new HashSet<>(intents.values()));
}
diff --git a/core/api/src/test/java/org/onosproject/net/intent/IntentServiceAdapter.java b/core/api/src/test/java/org/onosproject/net/intent/IntentServiceAdapter.java
index e80883b..9441fa4 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/IntentServiceAdapter.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/IntentServiceAdapter.java
@@ -33,11 +33,6 @@
}
@Override
- public void replace(IntentId oldIntentId, Intent newIntent) {
-
- }
-
- @Override
public Iterable<Intent> getIntents() {
return null;
}
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
index fb33fd6..32e427d 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
@@ -167,11 +167,6 @@
}
@Override
- public void replace(IntentId oldIntentId, Intent newIntent) {
- throw new UnsupportedOperationException("replace is not implemented");
- }
-
- @Override
public Iterable<Intent> getIntents() {
return store.getIntents();
}
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
index 49efad5..897d292 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
@@ -373,31 +373,6 @@
assertEquals(0L, flowRuleService.getFlowRuleCount());
}
- @Test
- public void replaceIntent() {
- flowRuleService.setFuture(true);
-
- MockIntent intent = new MockIntent(MockIntent.nextId());
- listener.setLatch(1, Type.INSTALLED);
- service.submit(intent);
- listener.await(Type.INSTALLED);
- assertEquals(1L, service.getIntentCount());
- assertEquals(1L, manager.flowRuleService.getFlowRuleCount());
-
- MockIntent intent2 = new MockIntent(MockIntent.nextId());
- listener.setLatch(1, Type.WITHDRAWN);
- listener.setLatch(1, Type.INSTALL_REQ);
- listener.setLatch(1, Type.INSTALLED);
- service.replace(intent.id(), intent2);
- listener.await(Type.WITHDRAWN);
- listener.await(Type.INSTALLED);
- delay(10); //FIXME this is a race
- assertEquals(1L, service.getIntentCount());
- assertEquals(1L, manager.flowRuleService.getFlowRuleCount());
- assertEquals(intent2.number().intValue(),
- flowRuleService.flows.iterator().next().priority());
- }
-
/**
* Tests for proper behavior of installation of an intent that triggers
* a compilation error.