[ONOS-3663] Add swagger doc for control metrics query REST API
Change-Id: Id8b667dabb64d11149b43cfeead57cf5ebd6997e
diff --git a/apps/cpman/app/src/main/resources/definitions/DiskMetrics.json b/apps/cpman/app/src/main/resources/definitions/DiskMetrics.json
new file mode 100644
index 0000000..6203eb8
--- /dev/null
+++ b/apps/cpman/app/src/main/resources/definitions/DiskMetrics.json
@@ -0,0 +1,91 @@
+{
+ "type": "object",
+ "title": "disks",
+ "required": [
+ "disks"
+ ],
+ "properties": {
+ "disks": {
+ "type": "object",
+ "required": [
+ "name",
+ "value"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "object",
+ "title": "metrics",
+ "required": [
+ "metrics"
+ ],
+ "properties": {
+ "metrics": {
+ "type": "array",
+ "xml": {
+ "name": "metrics",
+ "wrapped": true
+ },
+ "items": {
+ "type": "object",
+ "title": "metrics",
+ "required": [
+ "readBytes",
+ "writeBytes"
+ ],
+ "properties": {
+ "readBytes": {
+ "type": "object",
+ "required": [
+ "time",
+ "latest",
+ "average"
+ ],
+ "properties": {
+ "time": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "latest": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "average": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ },
+ "writeBytes": {
+ "type": "object",
+ "required": [
+ "time",
+ "latest",
+ "average"
+ ],
+ "properties": {
+ "time": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "latest": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "average": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file