FIX for ONOS-5260: METER AppID Display on GET, Precedence Range Issue
Change-Id: Ia82b8d70de0b5d824d808f9593ada64d3c1fbd09
diff --git a/web/api/src/main/resources/definitions/Meter.json b/web/api/src/main/resources/definitions/Meter.json
index e8fefe5..d34b7e0 100644
--- a/web/api/src/main/resources/definitions/Meter.json
+++ b/web/api/src/main/resources/definitions/Meter.json
@@ -21,7 +21,7 @@
},
"appId": {
"type": "string",
- "example": "1"
+ "example": "org.onosproject.rest"
},
"deviceId": {
"type": "string",
@@ -110,4 +110,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/web/api/src/main/resources/definitions/Meters.json b/web/api/src/main/resources/definitions/Meters.json
index 46e8727..d5f6d70 100644
--- a/web/api/src/main/resources/definitions/Meters.json
+++ b/web/api/src/main/resources/definitions/Meters.json
@@ -34,7 +34,7 @@
},
"appId": {
"type": "string",
- "example": "1"
+ "example": "org.onosproject.rest"
},
"deviceId": {
"type": "string",
@@ -126,4 +126,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/web/api/src/test/java/org/onosproject/rest/resources/MetersResourceTest.java b/web/api/src/test/java/org/onosproject/rest/resources/MetersResourceTest.java
index bcf5d17..a23ca8c 100644
--- a/web/api/src/test/java/org/onosproject/rest/resources/MetersResourceTest.java
+++ b/web/api/src/test/java/org/onosproject/rest/resources/MetersResourceTest.java
@@ -263,9 +263,9 @@
// check application id
final String jsonAppId = jsonMeter.get("appId").asString();
- final String appId = meter.appId().toString();
+ final String appId = meter.appId().name();
if (!jsonAppId.equals(appId)) {
- reason = "appId " + meter.appId().toString();
+ reason = "appId " + meter.appId().name();
return false;
}