Added new field FlowPath.flowPathUserState
diff --git a/src/test/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjectsIFlowPathTest.java b/src/test/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjectsIFlowPathTest.java
index db39153..9a1e34a 100644
--- a/src/test/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjectsIFlowPathTest.java
+++ b/src/test/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjectsIFlowPathTest.java
@@ -122,6 +122,24 @@
/**
* Desc:
+ * Test method for get and set FlowPathUserState method.
+ * Condition:
+ * N/A
+ * Expect:
+ * 1. Should set the Flow Path User State.
+ * 2. Should get the Flow Path User State.
+ */
+ @Test
+ public void testSetGetFlowPathUserState() {
+ String flowId = "xx";
+ String flowPathUserState = "FP_USER_ADD";
+ flowPath.setFlowId(flowId);
+ flowPath.setFlowPathUserState(flowPathUserState);
+ assertEquals(flowPath.getFlowPathUserState(), flowPathUserState);
+ }
+
+ /**
+ * Desc:
* Test method for get and set FlowPathFlags method.
* Condition:
* N/A
@@ -475,24 +493,6 @@
/**
* Desc:
- * Test method for set and get UserState.
- * Condition:
- * N/A
- * Expect:
- * 1. Should set UserState.
- * 2. Should get UserState.
- */
- @Test
- public void testSetGetUserState() {
- String flowId = "xx";
- String userStatus = "Good";
- flowPath.setFlowId(flowId);
- flowPath.setUserState(userStatus);
- assertEquals(flowPath.getUserState(), userStatus);
- }
-
- /**
- * Desc:
* Test method for get Switches.
* Condition:
* N/A
diff --git a/src/test/java/net/onrc/onos/ofcontroller/core/internal/TestableGraphDBOperation.java b/src/test/java/net/onrc/onos/ofcontroller/core/internal/TestableGraphDBOperation.java
index cf6501a..dfe6ccf 100644
--- a/src/test/java/net/onrc/onos/ofcontroller/core/internal/TestableGraphDBOperation.java
+++ b/src/test/java/net/onrc/onos/ofcontroller/core/internal/TestableGraphDBOperation.java
@@ -416,8 +416,9 @@
public static class TestFlowPath implements IFlowPath {
private String state,type,flowId,installerId,srcSw,dstSw;
private String flowPathType;
+ private String flowPathUserState;
private Long flowPathFlags;
- private String dataPathSummary,userState;
+ private String dataPathSummary;
private Short srcPort,dstPort;
private String matchSrcMac,matchDstMac;
private Short matchEthernetFrameType;
@@ -433,8 +434,9 @@
private String stateToUpdate,typeToUpdate,flowIdToUpdate,installerIdToUpdate,srcSwToUpdate,dstSwToUpdate;
private String flowPathTypeToUpdate;
+ private String flowPathUserStateToUpdate;
private Long flowPathFlagsToUpdate;
- private String dataPathSummaryToUpdate,userStateToUpdate;
+ private String dataPathSummaryToUpdate;
private Short srcPortToUpdate,dstPortToUpdate;
private String matchSrcMacToUpdate,matchDstMacToUpdate;
private Short matchEthernetFrameTypeToUpdate;
@@ -472,11 +474,11 @@
if(flowIdToUpdate != null) { flowId = flowIdToUpdate; }
if(installerIdToUpdate != null) { installerId = installerIdToUpdate; }
if(flowPathTypeToUpdate != null) { flowPathType = flowPathTypeToUpdate; }
+ if(flowPathUserStateToUpdate != null) { flowPathUserState = flowPathUserStateToUpdate; }
if(flowPathFlagsToUpdate != null) { flowPathFlags = flowPathFlagsToUpdate; }
if(srcSwToUpdate != null) { srcSw = srcSwToUpdate; }
if(dstSwToUpdate != null) { dstSw = dstSwToUpdate; }
if(dataPathSummaryToUpdate != null) { dataPathSummary = dataPathSummaryToUpdate; }
- if(userStateToUpdate != null) { userState = userStateToUpdate; }
if(srcPortToUpdate != null) { srcPort = srcPortToUpdate; }
if(dstPortToUpdate != null) { dstPort = dstPortToUpdate; }
if(matchSrcMacToUpdate != null) { matchSrcMac = matchSrcMacToUpdate; }
@@ -503,8 +505,9 @@
stateToUpdate = typeToUpdate = flowIdToUpdate = installerIdToUpdate = null;
flowPathTypeToUpdate = null;
+ flowPathUserStateToUpdate = null;
flowPathFlagsToUpdate = null;
- srcSwToUpdate = dstSwToUpdate = dataPathSummaryToUpdate = userStateToUpdate = null;
+ srcSwToUpdate = dstSwToUpdate = dataPathSummaryToUpdate = null;
srcPortToUpdate = dstPortToUpdate = null;
matchSrcMacToUpdate = matchDstMacToUpdate = null;
matchEthernetFrameTypeToUpdate = null;
@@ -522,11 +525,11 @@
public void setFlowIdForTest(String flowId) { this.flowId = flowId; }
public void setInstallerIdForTest(String installerId) { this.installerId = installerId; }
public void setFlowPathTypeForTest(String flowPathType) { this.flowPathType = flowPathType; }
+ public void setFlowPathUserStateForTest(String flowPathUserState) { this.flowPathUserState = flowPathUserState; }
public void setFlowPathFlagsForTest(Long flowPathFlags) { this.flowPathFlags = flowPathFlags; }
public void setSrcSwForTest(String srcSw) { this.srcSw = srcSw; }
public void setDstSwForTest(String dstSw) { this.dstSw = dstSw; }
public void setDataPathSummaryForTest(String dataPathSummary) { this.dataPathSummary = dataPathSummary; }
- public void setUserStateForTest(String userState) { this.userState = userState; }
public void setSrcPortForTest(Short srcPort) { this.srcPort = srcPort; }
public void setDstPortForTest(Short dstPort) { this.dstPort = dstPort; }
public void setMatchSrcMacForTest(String matchSrcMac) { this.matchSrcMac = matchSrcMac; }
@@ -581,6 +584,12 @@
public void setFlowPathType(String flowPathType) { flowPathTypeToUpdate = flowPathType; }
@Override
+ public String getFlowPathUserState() { return flowPathUserState; }
+
+ @Override
+ public void setFlowPathUserState(String flowPathUserState) { flowPathUserStateToUpdate = flowPathUserState; }
+
+ @Override
public Long getFlowPathFlags() { return flowPathFlags; }
@Override
@@ -717,12 +726,6 @@
@Override
public Iterable<ISwitchObject> getSwitches() { return switches; }
-
- @Override
- public String getUserState() { return userState; }
-
- @Override
- public void setUserState(String userState) { userStateToUpdate = userState; }
}
public static class TestFlowEntry implements IFlowEntry {