[ONOS-3648] Implement REST API for collecting system metrics
- Implement REST API for gathering system metrics
- Add unit test for REST API
- Add swagger doc for REST API
Change-Id: Iedd21a5f6ed14d595e4d35c1fa08270b48a5031e
diff --git a/apps/cpman/src/main/resources/definitions/MemoryMetricsPost.json b/apps/cpman/src/main/resources/definitions/MemoryMetricsPost.json
new file mode 100644
index 0000000..ab815da
--- /dev/null
+++ b/apps/cpman/src/main/resources/definitions/MemoryMetricsPost.json
@@ -0,0 +1,31 @@
+{
+ "type": "object",
+ "required": [
+ "memoryUsedPercentage",
+ "memoryFreePercentage",
+ "memoryUsed",
+ "memoryFree"
+ ],
+ "properties": {
+ "memoryUsedPercentage": {
+ "type": "integer",
+ "format": "int64",
+ "example": "30"
+ },
+ "memoryFreePercentage": {
+ "type": "integer",
+ "format": "int64",
+ "example": "70"
+ },
+ "memoryUsed": {
+ "type": "integer",
+ "format": "int64",
+ "example": "1024"
+ },
+ "memoryFree": {
+ "type": "integer",
+ "format": "int64",
+ "example": "2048"
+ }
+ }
+}
\ No newline at end of file