ONOS-4077: REST API's for virtual networks, devices, ports, links: add missing onos.rsModel statements + fix example field in JSON files
Change-Id: I1ae2300143a0a56e5413f8837cea3016d964cb6c
diff --git a/web/api/src/main/resources/definitions/VirtualPorts.json b/web/api/src/main/resources/definitions/VirtualPorts.json
new file mode 100644
index 0000000..daa5019
--- /dev/null
+++ b/web/api/src/main/resources/definitions/VirtualPorts.json
@@ -0,0 +1,54 @@
+{
+ "type": "object",
+ "title": "VirtualPorts",
+ "required": [
+ "ports"
+ ],
+ "properties": {
+ "ports": {
+ "type": "array",
+ "xml": {
+ "name": "ports",
+ "wrapped": true
+ },
+ "items": {
+ "type": "object",
+ "title": "vport",
+ "required": [
+ "networkId",
+ "deviceId",
+ "portNum",
+ "physDeviceId",
+ "physPortNum"
+ ],
+ "properties": {
+ "networkId": {
+ "type": "int64",
+ "description": "Network identifier",
+ "example": 3
+ },
+ "deviceId": {
+ "type": "String",
+ "description": "Virtual device identifier",
+ "example": "of:0000000000000042"
+ },
+ "portNum": {
+ "type": "int64",
+ "description": "Virtual device port number",
+ "example": 34
+ },
+ "physDeviceId": {
+ "type": "String",
+ "description": "Physical device identifier",
+ "example": "of:0000000000000003"
+ },
+ "physPortNum": {
+ "type": "int64",
+ "description": "Physical device port number",
+ "example": 2
+ }
+ }
+ }
+ }
+ }
+}