[ONOS-3394] Json Models for Intents
Change-Id: I33620d826fddffa69982d49cb99fe4199c2bf522
diff --git a/web/api/src/main/resources/definitions/IntentHost.json b/web/api/src/main/resources/definitions/IntentHost.json
new file mode 100644
index 0000000..67c181c
--- /dev/null
+++ b/web/api/src/main/resources/definitions/IntentHost.json
@@ -0,0 +1,34 @@
+{
+ "type": "object",
+ "title": "host",
+ "required": [
+ "type",
+ "appId",
+ "priority",
+ "one",
+ "two"
+ ],
+ "properties": {
+ "type": {
+ "type": "string",
+ "example": "HostToHostIntent"
+ },
+ "appId": {
+ "type": "string",
+ "example": "org.onosproject.ovsdb"
+ },
+ "priority": {
+ "type": "integer",
+ "format": "int64",
+ "example": 55
+ },
+ "one": {
+ "type": "string",
+ "example": "46:E4:3C:A4:17:C8/-1"
+ },
+ "two": {
+ "type": "string",
+ "example": "08:00:27:56:8a:15/-1"
+ }
+ }
+}
\ No newline at end of file
diff --git a/web/api/src/main/resources/definitions/IntentPoint.json b/web/api/src/main/resources/definitions/IntentPoint.json
new file mode 100644
index 0000000..b84ad98
--- /dev/null
+++ b/web/api/src/main/resources/definitions/IntentPoint.json
@@ -0,0 +1,62 @@
+{
+ "type": "object",
+ "title": "host",
+ "required": [
+ "type",
+ "appId",
+ "priority",
+ "ingressPoint",
+ "egressPoint"
+ ],
+ "properties": {
+ "type": {
+ "type": "string",
+ "example": "PointToPointIntent"
+ },
+ "appId": {
+ "type": "string",
+ "example": "org.onosproject.ovsdb"
+ },
+ "priority": {
+ "type": "integer",
+ "format": "int64",
+ "example": 55
+ },
+ "ingressPoint": {
+ "type": "object",
+ "title": "point",
+ "required": [
+ "port",
+ "device"
+ ],
+ "properties": {
+ "port": {
+ "type": "string",
+ "example": "3"
+ },
+ "device": {
+ "type": "string",
+ "example": "of:0000000000000002"
+ }
+ }
+ },
+ "egressPoint": {
+ "type": "object",
+ "title": "point",
+ "required": [
+ "port",
+ "device"
+ ],
+ "properties": {
+ "port": {
+ "type": "string",
+ "example": "2"
+ },
+ "device": {
+ "type": "string",
+ "example": "of:0000000000000003"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/web/api/src/main/resources/definitions/Intents.json b/web/api/src/main/resources/definitions/Intents.json
new file mode 100644
index 0000000..f32ef07
--- /dev/null
+++ b/web/api/src/main/resources/definitions/Intents.json
@@ -0,0 +1,60 @@
+{
+ "type": "object",
+ "title": "intents",
+ "required": [
+ "intents"
+ ],
+ "properties": {
+ "intents": {
+ "type": "array",
+ "xml": {
+ "name": "intents",
+ "wrapped": true
+ },
+ "items": {
+ "type": "object",
+ "title": "host",
+ "required": [
+ "type",
+ "id",
+ "appId",
+ "state"
+ ],
+ "properties": {
+ "type": {
+ "type": "string",
+ "example": "HostToHostIntent"
+ },
+ "id": {
+ "type": "string",
+ "example": "0x6"
+ },
+ "appId": {
+ "type": "string",
+ "example": "org.onosproject.ovsdb"
+ },
+ "priority": {
+ "type": "integer",
+ "format": "int64",
+ "example": 55
+ },
+ "resources": {
+ "type": "array",
+ "xml": {
+ "name": "resources",
+ "wrapped": true
+ },
+ "items": {
+ "type": "string",
+ "example": "46:E4:3C:A4:17:C8/-1"
+ },
+ "state": {
+ "type": "string",
+ "example": "INSTALLED"
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/web/api/src/main/resources/definitions/StatisticsFlowsTablesDevices.json b/web/api/src/main/resources/definitions/StatisticsFlowsTablesDevices.json
deleted file mode 100644
index 20575c2..0000000
--- a/web/api/src/main/resources/definitions/StatisticsFlowsTablesDevices.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "type": "object",
- "title": "device-table-statistics",
- "required": [
- "table-statistics"
- ],
- "properties": {
- "device-table-statistics": {
- "type": "array",
- "required": [
- "device-table-statistics"
- ],
- "xml": {
- "name": "table-statistics",
- "wrapped": true
- },
- "items": {
- "type": "object",
- "title": "table-statistics",
- "required": [
- "device-table-statistics"
- ],
- "properties": {
- "deviceId": {
- "type": "string",
- "example": "of:0000000000000001"
- },
- "table-statistics": {
- "type": "array",
- "xml": {
- "name": "table",
- "wrapped": true
- },
- "items": {
- "type": "object",
- "title": "table-statistics",
- "required": [
- "tableId",
- "deviceId",
- "activeEntries",
- "packetsLookedUp",
- "packetsMathced"
- ],
- "properties": {
- "tableId": {
- "type": "integer",
- "format": "int64",
- "example": 0
- },
- "deviceId": {
- "type": "string",
- "example": "of:0000000000000001"
- },
- "activeEntries": {
- "type": "integer",
- "format": "int64",
- "example": 3
- },
- "packetsLookedUp": {
- "type": "integer",
- "format": "int64",
- "example": 458530
- },
- "packetsMathced": {
- "type": "integer",
- "format": "int64",
- "example": 458501
- }
- }
- }
- }
- }
- }
- }
- }
-}
\ No newline at end of file