Refactoring of IntentId based APIs
- getIntent
- getIntentState
- getInstallableIntents
Change-Id: I6d2073dfa165e0e5adcef46fe5908b563b481a43
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 4cdb674..c1b7886 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
@@ -196,18 +196,18 @@
}
@Override
- public Intent getIntent(IntentId id) {
- return intents.get(id);
+ public Intent getIntent(Key intentKey) {
+ return intents.get(intentKey);
}
@Override
- public IntentState getIntentState(IntentId id) {
- return intentStates.get(id);
+ public IntentState getIntentState(Key intentKey) {
+ return intentStates.get(intentKey);
}
@Override
- public List<Intent> getInstallableIntents(IntentId intentId) {
- return installables.get(intentId);
+ public List<Intent> getInstallableIntents(Key intentKey) {
+ return installables.get(intentKey);
}
@Override
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 9441fa4..d600dde 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
@@ -43,17 +43,17 @@
}
@Override
- public Intent getIntent(IntentId id) {
+ public Intent getIntent(Key intentKey) {
return null;
}
@Override
- public IntentState getIntentState(IntentId id) {
+ public IntentState getIntentState(Key intentKey) {
return null;
}
@Override
- public List<Intent> getInstallableIntents(IntentId intentId) {
+ public List<Intent> getInstallableIntents(Key intentKey) {
return null;
}
diff --git a/core/api/src/test/java/org/onosproject/net/intent/IntentServiceTest.java b/core/api/src/test/java/org/onosproject/net/intent/IntentServiceTest.java
index 9dce4f1..7ae00aa 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/IntentServiceTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/IntentServiceTest.java
@@ -91,7 +91,7 @@
@Override
public void run() {
assertEquals("incorrect intent state", IntentState.INSTALLED,
- service.getIntentState(intent.id()));
+ service.getIntentState(intent.key()));
}
});
@@ -112,7 +112,7 @@
@Override
public void run() {
assertEquals("incorrect intent state", IntentState.WITHDRAWN,
- service.getIntentState(intent.id()));
+ service.getIntentState(intent.key()));
}
});
@@ -140,7 +140,7 @@
@Override
public void run() {
assertEquals("incorrect intent state", IntentState.FAILED,
- service.getIntentState(intent.id()));
+ service.getIntentState(intent.key()));
}
});
@@ -163,7 +163,7 @@
@Override
public void run() {
assertEquals("incorrect intent state", IntentState.FAILED,
- service.getIntentState(intent.id()));
+ service.getIntentState(intent.key()));
}
});
@@ -255,7 +255,7 @@
@Override
public void run() {
assertEquals("incorrect intent state", IntentState.INSTALLED,
- service.getIntentState(intent.id()));
+ service.getIntentState(intent.key()));
}
});