STC fixes
Hosts without a VLAN are now represented as /None rather than /-1
Flow ID in location returned by POST operation was hex rather than decimal
Change-Id: Ibb403f696399012b2b90f2954112265a6e230815
diff --git a/tools/test/scenarios/net-flow-objectives.xml b/tools/test/scenarios/net-flow-objectives.xml
index abf44c8..c2b82d4 100644
--- a/tools/test/scenarios/net-flow-objectives.xml
+++ b/tools/test/scenarios/net-flow-objectives.xml
@@ -32,18 +32,18 @@
<!-- Verify the hosts using the REST API -->
<step name="Net-Flow-Objectives.Query-Host-1" requires="Net-Flow-Objectives.Find-Host-1"
- exec="find-host.py ${OC1} host1 00:00:00:00:00:01/-1"/>
+ exec="find-host.py ${OC1} host1 00:00:00:00:00:01/None"/>
<step name="Net-Flow-Objectives.Validate-Host-1-Id" requires="^"
- exec="test '${host1Id}' == '00:00:00:00:00:01/-1'"/>
+ exec="test '${host1Id}' == '00:00:00:00:00:01/None'"/>
<step name="Net-Flow-Objectives.Validate-Host-1-Mac" requires="^"
exec="test '${host1Mac}' == '00:00:00:00:00:01'"/>
<step name="Net-Flow-Objectives.Validate-Host-1-Ip" requires="^"
exec="test '${host1IpAddress}' == '10.0.0.1'"/>
<step name="Net-Flow-Objectives.Query-Host-2" requires="Net-Flow-Objectives.Find-Host-2"
- exec="find-host.py ${OC1} host2 00:00:00:00:00:04/-1"/>
+ exec="find-host.py ${OC1} host2 00:00:00:00:00:04/None"/>
<step name="Net-Flow-Objectives.Validate-Host-2-Id" requires="^"
- exec="test '${host2Id}' == '00:00:00:00:00:04/-1'"/>
+ exec="test '${host2Id}' == '00:00:00:00:00:04/None'"/>
<step name="Net-Flow-Objectives.Validate-Host-2-Mac" requires="^"
exec="test '${host2Mac}' == '00:00:00:00:00:04'"/>
<step name="Net-Flow-Objectives.Validate-Host-2-Ip" requires="^"
diff --git a/tools/test/scenarios/net-rest.xml b/tools/test/scenarios/net-rest.xml
index ab7804d..fc79de0 100644
--- a/tools/test/scenarios/net-rest.xml
+++ b/tools/test/scenarios/net-rest.xml
@@ -63,18 +63,18 @@
<!-- Verify the hosts using the REST API -->
<step name="Net-REST.Query-Host-1" requires="Net-REST.Find-Host-2"
- exec="find-host.py ${OC1} host1 00:00:00:00:00:01/-1"/>
+ exec="find-host.py ${OC1} host1 00:00:00:00:00:01/None"/>
<step name="Net-REST.Validate-Host-1-Id" requires="^"
- exec="test '${host1Id}' == '00:00:00:00:00:01/-1'"/>
+ exec="test '${host1Id}' == '00:00:00:00:00:01/None'"/>
<step name="Net-REST.Validate-Host-1-Mac" requires="^"
exec="test '${host1Mac}' == '00:00:00:00:00:01'"/>
<step name="Net-REST.Validate-Host-1-Ip" requires="^"
exec="test '${host1IpAddress}' == '10.0.0.1'"/>
<step name="Net-REST.Query-Host-2" requires="Net-REST.Find-Host-2"
- exec="find-host.py ${OC1} host2 00:00:00:00:00:04/-1"/>
+ exec="find-host.py ${OC1} host2 00:00:00:00:00:04/None"/>
<step name="Net-REST.Validate-Host-2-Id" requires="^"
- exec="test '${host2Id}' == '00:00:00:00:00:04/-1'"/>
+ exec="test '${host2Id}' == '00:00:00:00:00:04/None'"/>
<step name="Net-REST.Validate-Host-2-Mac" requires="^"
exec="test '${host2Mac}' == '00:00:00:00:00:04'"/>
<step name="Net-REST.Validate-Host-2-Ip" requires="^"
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java
index b90f0a4..a7c0b5f 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java
@@ -195,7 +195,7 @@
UriBuilder locationBuilder = uriInfo.getBaseUriBuilder()
.path("flows")
.path(deviceId)
- .path(rule.id().toString());
+ .path(Long.toString(rule.id().value()));
return Response
.created(locationBuilder.build())