Change path-intent ID generation method
Change-Id: I466f1f7f01d6f14c2045fde810fb964d88da3fbb
diff --git a/src/main/java/net/onrc/onos/intent/PathIntent.java b/src/main/java/net/onrc/onos/intent/PathIntent.java
index 28e2dd3..9a49035 100644
--- a/src/main/java/net/onrc/onos/intent/PathIntent.java
+++ b/src/main/java/net/onrc/onos/intent/PathIntent.java
@@ -11,7 +11,7 @@
protected Intent parentIntent;
public static String createFirstId(String parentId) {
- return String.format("pi%s___0", parentId);
+ return String.format("%s___0", parentId);
}
public static String createNextId(String currentId) {
diff --git a/src/test/java/net/onrc/onos/intent/PathIntentTest.java b/src/test/java/net/onrc/onos/intent/PathIntentTest.java
index 211a68a..dd34e90 100644
--- a/src/test/java/net/onrc/onos/intent/PathIntentTest.java
+++ b/src/test/java/net/onrc/onos/intent/PathIntentTest.java
@@ -34,13 +34,13 @@
@Test
public void testCreateFirstId() {
String id = PathIntent.createFirstId("100");
- assertEquals("pi100___0", id);
+ assertEquals("100___0", id);
}
@Test
public void testCreateNextId() {
- String id = PathIntent.createNextId("pi100___999");
- assertEquals("pi100___1000", id);
+ String id = PathIntent.createNextId("100___999");
+ assertEquals("100___1000", id);
}
@Test