[ONOS-3394] Json models for REST api
Change-Id: I69c396ae08d25e83dce31e4d2ec92cd9a28c54f5
Showing
31 changed files
with
1464 additions
and
89 deletions
... | @@ -44,6 +44,7 @@ public class ApplicationsWebResource extends AbstractWebResource { | ... | @@ -44,6 +44,7 @@ public class ApplicationsWebResource extends AbstractWebResource { |
44 | * Get all installed applications. | 44 | * Get all installed applications. |
45 | * Returns array of all installed applications. | 45 | * Returns array of all installed applications. |
46 | * | 46 | * |
47 | + * @rsModel Applications | ||
47 | * @return 200 OK | 48 | * @return 200 OK |
48 | */ | 49 | */ |
49 | @GET | 50 | @GET |
... | @@ -56,7 +57,7 @@ public class ApplicationsWebResource extends AbstractWebResource { | ... | @@ -56,7 +57,7 @@ public class ApplicationsWebResource extends AbstractWebResource { |
56 | /** | 57 | /** |
57 | * Get application details. | 58 | * Get application details. |
58 | * Returns details of the specified application. | 59 | * Returns details of the specified application. |
59 | - * | 60 | + * @rsModel Application |
60 | * @param name application name | 61 | * @param name application name |
61 | * @return 200 OK; 404; 401 | 62 | * @return 200 OK; 404; 401 |
62 | */ | 63 | */ | ... | ... |
... | @@ -49,6 +49,7 @@ public class ClusterWebResource extends AbstractWebResource { | ... | @@ -49,6 +49,7 @@ public class ClusterWebResource extends AbstractWebResource { |
49 | * Returns array of all cluster nodes. | 49 | * Returns array of all cluster nodes. |
50 | * | 50 | * |
51 | * @return 200 OK | 51 | * @return 200 OK |
52 | + * @rsModel Cluster | ||
52 | */ | 53 | */ |
53 | @GET | 54 | @GET |
54 | public Response getClusterNodes() { | 55 | public Response getClusterNodes() { |
... | @@ -62,6 +63,7 @@ public class ClusterWebResource extends AbstractWebResource { | ... | @@ -62,6 +63,7 @@ public class ClusterWebResource extends AbstractWebResource { |
62 | * | 63 | * |
63 | * @param id cluster node identifier | 64 | * @param id cluster node identifier |
64 | * @return 200 OK | 65 | * @return 200 OK |
66 | + * @rsModel ClusterNode | ||
65 | */ | 67 | */ |
66 | @GET | 68 | @GET |
67 | @Path("{id}") | 69 | @Path("{id}") |
... | @@ -78,6 +80,7 @@ public class ClusterWebResource extends AbstractWebResource { | ... | @@ -78,6 +80,7 @@ public class ClusterWebResource extends AbstractWebResource { |
78 | * @param config cluster definition | 80 | * @param config cluster definition |
79 | * @return 200 OK | 81 | * @return 200 OK |
80 | * @throws IOException to signify bad request | 82 | * @throws IOException to signify bad request |
83 | + * @rsModel ClusterPost | ||
81 | */ | 84 | */ |
82 | @POST | 85 | @POST |
83 | @Path("configuration") | 86 | @Path("configuration") | ... | ... |
... | @@ -58,7 +58,7 @@ public class FlowsWebResource extends AbstractWebResource { | ... | @@ -58,7 +58,7 @@ public class FlowsWebResource extends AbstractWebResource { |
58 | 58 | ||
59 | /** | 59 | /** |
60 | * Get all flow entries. Returns array of all flow rules in the system. | 60 | * Get all flow entries. Returns array of all flow rules in the system. |
61 | - * | 61 | + * @rsModel Flows |
62 | * @return array of all the intents in the system | 62 | * @return array of all the intents in the system |
63 | */ | 63 | */ |
64 | @GET | 64 | @GET |
... | @@ -80,7 +80,7 @@ public class FlowsWebResource extends AbstractWebResource { | ... | @@ -80,7 +80,7 @@ public class FlowsWebResource extends AbstractWebResource { |
80 | /** | 80 | /** |
81 | * Get flow entries of a device. Returns array of all flow rules for the | 81 | * Get flow entries of a device. Returns array of all flow rules for the |
82 | * specified device. | 82 | * specified device. |
83 | - * | 83 | + * @rsModel Flows |
84 | * @param deviceId device identifier | 84 | * @param deviceId device identifier |
85 | * @return flow data as an array | 85 | * @return flow data as an array |
86 | */ | 86 | */ |
... | @@ -103,7 +103,7 @@ public class FlowsWebResource extends AbstractWebResource { | ... | @@ -103,7 +103,7 @@ public class FlowsWebResource extends AbstractWebResource { |
103 | /** | 103 | /** |
104 | * Get flow rule. Returns the flow entry specified by the device id and | 104 | * Get flow rule. Returns the flow entry specified by the device id and |
105 | * flow rule id. | 105 | * flow rule id. |
106 | - * | 106 | + * @rsModel Flows |
107 | * @param deviceId device identifier | 107 | * @param deviceId device identifier |
108 | * @param flowId flow rule identifier | 108 | * @param flowId flow rule identifier |
109 | * @return flow data as an array | 109 | * @return flow data as an array |
... | @@ -130,7 +130,7 @@ public class FlowsWebResource extends AbstractWebResource { | ... | @@ -130,7 +130,7 @@ public class FlowsWebResource extends AbstractWebResource { |
130 | /** | 130 | /** |
131 | * Create new flow rule. Creates and installs a new flow rule for the | 131 | * Create new flow rule. Creates and installs a new flow rule for the |
132 | * specified device. | 132 | * specified device. |
133 | - * | 133 | + * @rsModel FlowsPost |
134 | * @param deviceId device identifier | 134 | * @param deviceId device identifier |
135 | * @param stream flow rule JSON | 135 | * @param stream flow rule JSON |
136 | * @return status of the request - CREATED if the JSON is correct, | 136 | * @return status of the request - CREATED if the JSON is correct, | ... | ... |
... | @@ -70,6 +70,7 @@ public class HostsWebResource extends AbstractWebResource { | ... | @@ -70,6 +70,7 @@ public class HostsWebResource extends AbstractWebResource { |
70 | * Returns array of all known end-station hosts. | 70 | * Returns array of all known end-station hosts. |
71 | * | 71 | * |
72 | * @return 200 OK | 72 | * @return 200 OK |
73 | + * @rsModel Hosts | ||
73 | */ | 74 | */ |
74 | @GET | 75 | @GET |
75 | @Produces(MediaType.APPLICATION_JSON) | 76 | @Produces(MediaType.APPLICATION_JSON) |
... | @@ -85,6 +86,7 @@ public class HostsWebResource extends AbstractWebResource { | ... | @@ -85,6 +86,7 @@ public class HostsWebResource extends AbstractWebResource { |
85 | * | 86 | * |
86 | * @param id host identifier | 87 | * @param id host identifier |
87 | * @return 200 OK | 88 | * @return 200 OK |
89 | + * @rsModel Host | ||
88 | */ | 90 | */ |
89 | @GET | 91 | @GET |
90 | @Produces(MediaType.APPLICATION_JSON) | 92 | @Produces(MediaType.APPLICATION_JSON) |
... | @@ -103,6 +105,7 @@ public class HostsWebResource extends AbstractWebResource { | ... | @@ -103,6 +105,7 @@ public class HostsWebResource extends AbstractWebResource { |
103 | * @param mac host MAC address | 105 | * @param mac host MAC address |
104 | * @param vlan host VLAN identifier | 106 | * @param vlan host VLAN identifier |
105 | * @return 200 OK | 107 | * @return 200 OK |
108 | + * @rsModel Host | ||
106 | */ | 109 | */ |
107 | @GET | 110 | @GET |
108 | @Produces(MediaType.APPLICATION_JSON) | 111 | @Produces(MediaType.APPLICATION_JSON) |
... | @@ -122,6 +125,7 @@ public class HostsWebResource extends AbstractWebResource { | ... | @@ -122,6 +125,7 @@ public class HostsWebResource extends AbstractWebResource { |
122 | * @param stream input JSON | 125 | * @param stream input JSON |
123 | * @return status of the request - CREATED if the JSON is correct, | 126 | * @return status of the request - CREATED if the JSON is correct, |
124 | * BAD_REQUEST if the JSON is invalid | 127 | * BAD_REQUEST if the JSON is invalid |
128 | + * @rsModel HostPut | ||
125 | */ | 129 | */ |
126 | @POST | 130 | @POST |
127 | @Consumes(MediaType.APPLICATION_JSON) | 131 | @Consumes(MediaType.APPLICATION_JSON) |
... | @@ -195,6 +199,7 @@ public class HostsWebResource extends AbstractWebResource { | ... | @@ -195,6 +199,7 @@ public class HostsWebResource extends AbstractWebResource { |
195 | while (ipStrings.hasNext()) { | 199 | while (ipStrings.hasNext()) { |
196 | ips.add(IpAddress.valueOf(ipStrings.next().asText())); | 200 | ips.add(IpAddress.valueOf(ipStrings.next().asText())); |
197 | } | 201 | } |
202 | + //TODO remove elements from json node after reading them | ||
198 | SparseAnnotations annotations = annotations(node); | 203 | SparseAnnotations annotations = annotations(node); |
199 | // Update host inventory | 204 | // Update host inventory |
200 | 205 | ... | ... |
... | @@ -44,7 +44,7 @@ public class LinksWebResource extends AbstractWebResource { | ... | @@ -44,7 +44,7 @@ public class LinksWebResource extends AbstractWebResource { |
44 | /** | 44 | /** |
45 | * Get infrastructure links. | 45 | * Get infrastructure links. |
46 | * Returns array of all links, or links for the specified device or port. | 46 | * Returns array of all links, or links for the specified device or port. |
47 | - * | 47 | + * @rsModel LinksGet |
48 | * @param deviceId (optional) device identifier | 48 | * @param deviceId (optional) device identifier |
49 | * @param port (optional) port number | 49 | * @param port (optional) port number |
50 | * @param direction (optional) direction qualifier | 50 | * @param direction (optional) direction qualifier | ... | ... |
... | @@ -60,7 +60,7 @@ public class PathsWebResource extends AbstractWebResource { | ... | @@ -60,7 +60,7 @@ public class PathsWebResource extends AbstractWebResource { |
60 | /** | 60 | /** |
61 | * Get all shortest paths between any two hosts or devices. | 61 | * Get all shortest paths between any two hosts or devices. |
62 | * Returns array of all shortest paths between any two elements. | 62 | * Returns array of all shortest paths between any two elements. |
63 | - * | 63 | + * @rsModel Paths |
64 | * @param src source identifier | 64 | * @param src source identifier |
65 | * @param dst destination identifier | 65 | * @param dst destination identifier |
66 | * @return path data | 66 | * @return path data |
... | @@ -79,7 +79,7 @@ public class PathsWebResource extends AbstractWebResource { | ... | @@ -79,7 +79,7 @@ public class PathsWebResource extends AbstractWebResource { |
79 | /** | 79 | /** |
80 | * Get all shortest disjoint paths between any two hosts or devices. | 80 | * Get all shortest disjoint paths between any two hosts or devices. |
81 | * Returns array of all shortest disjoint paths between any two elements. | 81 | * Returns array of all shortest disjoint paths between any two elements. |
82 | - * | 82 | + * @rsModel Paths |
83 | * @param src source identifier | 83 | * @param src source identifier |
84 | * @param dst destination identifier | 84 | * @param dst destination identifier |
85 | * @return path data | 85 | * @return path data | ... | ... |
... | @@ -59,7 +59,7 @@ public class StatisticsWebResource extends AbstractWebResource { | ... | @@ -59,7 +59,7 @@ public class StatisticsWebResource extends AbstractWebResource { |
59 | 59 | ||
60 | /** | 60 | /** |
61 | * Get load statistics for all links or for a specific link. | 61 | * Get load statistics for all links or for a specific link. |
62 | - * | 62 | + * @rsModel StatisticsFlowsLink |
63 | * @param deviceId (optional) device ID for a specific link | 63 | * @param deviceId (optional) device ID for a specific link |
64 | * @param port (optional) port number for a specified link | 64 | * @param port (optional) port number for a specified link |
65 | * @return JSON encoded array lof Load objects | 65 | * @return JSON encoded array lof Load objects |
... | @@ -101,7 +101,7 @@ public class StatisticsWebResource extends AbstractWebResource { | ... | @@ -101,7 +101,7 @@ public class StatisticsWebResource extends AbstractWebResource { |
101 | 101 | ||
102 | /** | 102 | /** |
103 | * Get table statistics for all tables of all devices. | 103 | * Get table statistics for all tables of all devices. |
104 | - * | 104 | + * @rsModel StatisticsFlowsTables |
105 | * @return JSON encoded array of table statistics | 105 | * @return JSON encoded array of table statistics |
106 | */ | 106 | */ |
107 | @GET | 107 | @GET |
... | @@ -111,11 +111,11 @@ public class StatisticsWebResource extends AbstractWebResource { | ... | @@ -111,11 +111,11 @@ public class StatisticsWebResource extends AbstractWebResource { |
111 | final FlowRuleService service = get(FlowRuleService.class); | 111 | final FlowRuleService service = get(FlowRuleService.class); |
112 | final Iterable<Device> devices = get(DeviceService.class).getDevices(); | 112 | final Iterable<Device> devices = get(DeviceService.class).getDevices(); |
113 | final ObjectNode root = mapper().createObjectNode(); | 113 | final ObjectNode root = mapper().createObjectNode(); |
114 | - final ArrayNode rootArrayNode = root.putArray("device-table-statistics"); | 114 | + final ArrayNode rootArrayNode = root.putArray("statistics"); |
115 | for (final Device device : devices) { | 115 | for (final Device device : devices) { |
116 | final ObjectNode deviceStatsNode = mapper().createObjectNode(); | 116 | final ObjectNode deviceStatsNode = mapper().createObjectNode(); |
117 | deviceStatsNode.put("device", device.id().toString()); | 117 | deviceStatsNode.put("device", device.id().toString()); |
118 | - final ArrayNode statisticsNode = deviceStatsNode.putArray("table-statistics"); | 118 | + final ArrayNode statisticsNode = deviceStatsNode.putArray("table"); |
119 | final Iterable<TableStatisticsEntry> tableStatsEntries = service.getFlowTableStatistics(device.id()); | 119 | final Iterable<TableStatisticsEntry> tableStatsEntries = service.getFlowTableStatistics(device.id()); |
120 | if (tableStatsEntries != null) { | 120 | if (tableStatsEntries != null) { |
121 | for (final TableStatisticsEntry entry : tableStatsEntries) { | 121 | for (final TableStatisticsEntry entry : tableStatsEntries) { |
... | @@ -130,7 +130,7 @@ public class StatisticsWebResource extends AbstractWebResource { | ... | @@ -130,7 +130,7 @@ public class StatisticsWebResource extends AbstractWebResource { |
130 | 130 | ||
131 | /** | 131 | /** |
132 | * Get table statistics for all tables of a specified device. | 132 | * Get table statistics for all tables of a specified device. |
133 | - * | 133 | + * @rsModel StatisticsFlowsTables |
134 | * @param deviceId device ID | 134 | * @param deviceId device ID |
135 | * @return JSON encoded array of table statistics | 135 | * @return JSON encoded array of table statistics |
136 | */ | 136 | */ |
... | @@ -142,11 +142,11 @@ public class StatisticsWebResource extends AbstractWebResource { | ... | @@ -142,11 +142,11 @@ public class StatisticsWebResource extends AbstractWebResource { |
142 | final Iterable<TableStatisticsEntry> tableStatisticsEntries = | 142 | final Iterable<TableStatisticsEntry> tableStatisticsEntries = |
143 | service.getFlowTableStatistics(DeviceId.deviceId(deviceId)); | 143 | service.getFlowTableStatistics(DeviceId.deviceId(deviceId)); |
144 | final ObjectNode root = mapper().createObjectNode(); | 144 | final ObjectNode root = mapper().createObjectNode(); |
145 | - final ArrayNode rootArrayNode = root.putArray("table-statistics"); | 145 | + final ArrayNode rootArrayNode = root.putArray("statistics"); |
146 | 146 | ||
147 | final ObjectNode deviceStatsNode = mapper().createObjectNode(); | 147 | final ObjectNode deviceStatsNode = mapper().createObjectNode(); |
148 | deviceStatsNode.put("device", deviceId); | 148 | deviceStatsNode.put("device", deviceId); |
149 | - final ArrayNode statisticsNode = deviceStatsNode.putArray("table-statistics"); | 149 | + final ArrayNode statisticsNode = deviceStatsNode.putArray("table"); |
150 | for (final TableStatisticsEntry entry : tableStatisticsEntries) { | 150 | for (final TableStatisticsEntry entry : tableStatisticsEntries) { |
151 | statisticsNode.add(codec(TableStatisticsEntry.class).encode(entry, this)); | 151 | statisticsNode.add(codec(TableStatisticsEntry.class).encode(entry, this)); |
152 | } | 152 | } | ... | ... |
... | @@ -50,6 +50,7 @@ public class TopologyWebResource extends AbstractWebResource { | ... | @@ -50,6 +50,7 @@ public class TopologyWebResource extends AbstractWebResource { |
50 | * Get overview of current topology. | 50 | * Get overview of current topology. |
51 | * | 51 | * |
52 | * @return topology overview | 52 | * @return topology overview |
53 | + * @rsModel Topology | ||
53 | */ | 54 | */ |
54 | @GET | 55 | @GET |
55 | @Produces(MediaType.APPLICATION_JSON) | 56 | @Produces(MediaType.APPLICATION_JSON) |
... | @@ -63,6 +64,7 @@ public class TopologyWebResource extends AbstractWebResource { | ... | @@ -63,6 +64,7 @@ public class TopologyWebResource extends AbstractWebResource { |
63 | * Get overview of topology SCCs. | 64 | * Get overview of topology SCCs. |
64 | * | 65 | * |
65 | * @return topology clusters overview | 66 | * @return topology clusters overview |
67 | + * @rsModel TopologyClusters | ||
66 | */ | 68 | */ |
67 | @GET | 69 | @GET |
68 | @Produces(MediaType.APPLICATION_JSON) | 70 | @Produces(MediaType.APPLICATION_JSON) |
... | @@ -80,6 +82,7 @@ public class TopologyWebResource extends AbstractWebResource { | ... | @@ -80,6 +82,7 @@ public class TopologyWebResource extends AbstractWebResource { |
80 | * | 82 | * |
81 | * @param clusterId id of the cluster to query | 83 | * @param clusterId id of the cluster to query |
82 | * @return topology cluster details | 84 | * @return topology cluster details |
85 | + * @rsModel TopologyCluster | ||
83 | */ | 86 | */ |
84 | @GET | 87 | @GET |
85 | @Produces(MediaType.APPLICATION_JSON) | 88 | @Produces(MediaType.APPLICATION_JSON) |
... | @@ -103,6 +106,7 @@ public class TopologyWebResource extends AbstractWebResource { | ... | @@ -103,6 +106,7 @@ public class TopologyWebResource extends AbstractWebResource { |
103 | * | 106 | * |
104 | * @param clusterId id of the cluster to query | 107 | * @param clusterId id of the cluster to query |
105 | * @return topology cluster devices | 108 | * @return topology cluster devices |
109 | + * @rsModel TopologyClustersDevices | ||
106 | */ | 110 | */ |
107 | @GET | 111 | @GET |
108 | @Produces(MediaType.APPLICATION_JSON) | 112 | @Produces(MediaType.APPLICATION_JSON) |
... | @@ -126,6 +130,7 @@ public class TopologyWebResource extends AbstractWebResource { | ... | @@ -126,6 +130,7 @@ public class TopologyWebResource extends AbstractWebResource { |
126 | * | 130 | * |
127 | * @param clusterId id of the cluster to query | 131 | * @param clusterId id of the cluster to query |
128 | * @return topology cluster links | 132 | * @return topology cluster links |
133 | + * @rsModel LinksGet | ||
129 | */ | 134 | */ |
130 | @GET | 135 | @GET |
131 | @Produces(MediaType.APPLICATION_JSON) | 136 | @Produces(MediaType.APPLICATION_JSON) |
... | @@ -136,7 +141,7 @@ public class TopologyWebResource extends AbstractWebResource { | ... | @@ -136,7 +141,7 @@ public class TopologyWebResource extends AbstractWebResource { |
136 | 141 | ||
137 | List<Link> links = | 142 | List<Link> links = |
138 | Lists.newArrayList(get(TopologyService.class) | 143 | Lists.newArrayList(get(TopologyService.class) |
139 | - .getClusterLinks(topology, cluster)); | 144 | + .getClusterLinks(topology, cluster)); |
140 | 145 | ||
141 | return ok(encodeArray(Link.class, "links", links)).build(); | 146 | return ok(encodeArray(Link.class, "links", links)).build(); |
142 | } | 147 | } |
... | @@ -174,7 +179,8 @@ public class TopologyWebResource extends AbstractWebResource { | ... | @@ -174,7 +179,8 @@ public class TopologyWebResource extends AbstractWebResource { |
174 | * | 179 | * |
175 | * @param connectPointString deviceid:portnumber | 180 | * @param connectPointString deviceid:portnumber |
176 | * @return JSON representation of true if the connect point is broadcast, | 181 | * @return JSON representation of true if the connect point is broadcast, |
177 | - * false otherwise | 182 | + * false otherwise |
183 | + * @rsModel TopologyBroadcast | ||
178 | */ | 184 | */ |
179 | @GET | 185 | @GET |
180 | @Produces(MediaType.APPLICATION_JSON) | 186 | @Produces(MediaType.APPLICATION_JSON) |
... | @@ -188,8 +194,8 @@ public class TopologyWebResource extends AbstractWebResource { | ... | @@ -188,8 +194,8 @@ public class TopologyWebResource extends AbstractWebResource { |
188 | boolean isBroadcast = get(TopologyService.class).isBroadcastPoint(topology, connectPoint); | 194 | boolean isBroadcast = get(TopologyService.class).isBroadcastPoint(topology, connectPoint); |
189 | 195 | ||
190 | return ok(mapper() | 196 | return ok(mapper() |
191 | - .createObjectNode() | 197 | + .createObjectNode() |
192 | - .put("broadcast", isBroadcast)) | 198 | + .put("broadcast", isBroadcast)) |
193 | .build(); | 199 | .build(); |
194 | } | 200 | } |
195 | 201 | ||
... | @@ -198,7 +204,8 @@ public class TopologyWebResource extends AbstractWebResource { | ... | @@ -198,7 +204,8 @@ public class TopologyWebResource extends AbstractWebResource { |
198 | * | 204 | * |
199 | * @param connectPointString deviceid:portnumber | 205 | * @param connectPointString deviceid:portnumber |
200 | * @return JSON representation of true if the connect point is broadcast, | 206 | * @return JSON representation of true if the connect point is broadcast, |
201 | - * false otherwise | 207 | + * false otherwise |
208 | + * @rsModel TopologyInfrastructure | ||
202 | */ | 209 | */ |
203 | @GET | 210 | @GET |
204 | @Produces(MediaType.APPLICATION_JSON) | 211 | @Produces(MediaType.APPLICATION_JSON) |
... | @@ -212,8 +219,8 @@ public class TopologyWebResource extends AbstractWebResource { | ... | @@ -212,8 +219,8 @@ public class TopologyWebResource extends AbstractWebResource { |
212 | boolean isInfrastructure = get(TopologyService.class).isInfrastructure(topology, connectPoint); | 219 | boolean isInfrastructure = get(TopologyService.class).isInfrastructure(topology, connectPoint); |
213 | 220 | ||
214 | return ok(mapper() | 221 | return ok(mapper() |
215 | - .createObjectNode() | 222 | + .createObjectNode() |
216 | - .put("infrastructure", isInfrastructure)) | 223 | + .put("infrastructure", isInfrastructure)) |
217 | .build(); | 224 | .build(); |
218 | } | 225 | } |
219 | 226 | ... | ... |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "application", | ||
4 | + "required": [ | ||
5 | + "name", | ||
6 | + "id", | ||
7 | + "version", | ||
8 | + "description", | ||
9 | + "origin", | ||
10 | + "permissions", | ||
11 | + "featuresRepo", | ||
12 | + "features", | ||
13 | + "requiredApps", | ||
14 | + "state" | ||
15 | + ], | ||
16 | + "properties": { | ||
17 | + "name": { | ||
18 | + "type": "string", | ||
19 | + "example": "org.onosproject.distributedprimitives" | ||
20 | + }, | ||
21 | + "id": { | ||
22 | + "type": "integer", | ||
23 | + "format": "int64", | ||
24 | + "example": 1 | ||
25 | + }, | ||
26 | + "version": { | ||
27 | + "type": "string", | ||
28 | + "example": "1.4.0.SNAPSHOT" | ||
29 | + }, | ||
30 | + "description": { | ||
31 | + "type": "string", | ||
32 | + "example": "ONOS app to test distributed primitives" | ||
33 | + }, | ||
34 | + "origin": { | ||
35 | + "type": "string", | ||
36 | + "example": "ON.Lab" | ||
37 | + }, | ||
38 | + "permissions": { | ||
39 | + "type": "array", | ||
40 | + "xml": { | ||
41 | + "name": "hosts", | ||
42 | + "wrapped": true | ||
43 | + }, | ||
44 | + "items": { | ||
45 | + "type": "string", | ||
46 | + "example": "" | ||
47 | + } | ||
48 | + }, | ||
49 | + "featuresRepo": { | ||
50 | + "type": "string", | ||
51 | + "example": "mvn:org.onosproject/onos-app-cip/1.4.0-SNAPSHOT/xml/features" | ||
52 | + }, | ||
53 | + "features": { | ||
54 | + "type": "array", | ||
55 | + "xml": { | ||
56 | + "name": "features", | ||
57 | + "wrapped": true | ||
58 | + }, | ||
59 | + "items": { | ||
60 | + "type": "string", | ||
61 | + "example": "onos-app-distributed-primitives" | ||
62 | + } | ||
63 | + }, | ||
64 | + "requiredApps": { | ||
65 | + "type": "array", | ||
66 | + "xml": { | ||
67 | + "name": "requiredApps", | ||
68 | + "wrapped": true | ||
69 | + }, | ||
70 | + "items": { | ||
71 | + "type": "string", | ||
72 | + "example": "" | ||
73 | + } | ||
74 | + }, | ||
75 | + "state": { | ||
76 | + "type": "string", | ||
77 | + "example": "ACTIVE" | ||
78 | + } | ||
79 | + } | ||
80 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "application", | ||
4 | + "required": [ | ||
5 | + "name", | ||
6 | + "id", | ||
7 | + "version", | ||
8 | + "description", | ||
9 | + "origin", | ||
10 | + "permissions", | ||
11 | + "featuresRepo", | ||
12 | + "features", | ||
13 | + "requiredApps", | ||
14 | + "state" | ||
15 | + ], | ||
16 | + "properties": { | ||
17 | + "name": { | ||
18 | + "type": "string", | ||
19 | + "example": "org.onosproject.distributedprimitives" | ||
20 | + }, | ||
21 | + "id": { | ||
22 | + "type": "integer", | ||
23 | + "format": "int64", | ||
24 | + "example": 1 | ||
25 | + }, | ||
26 | + "version": { | ||
27 | + "type": "string", | ||
28 | + "example": "1.4.0.SNAPSHOT" | ||
29 | + }, | ||
30 | + "description": { | ||
31 | + "type": "string", | ||
32 | + "example": "ONOS app to test distributed primitives" | ||
33 | + }, | ||
34 | + "origin": { | ||
35 | + "type": "string", | ||
36 | + "example": "ON.Lab" | ||
37 | + }, | ||
38 | + "permissions": { | ||
39 | + "type": "array", | ||
40 | + "xml": { | ||
41 | + "name": "hosts", | ||
42 | + "wrapped": true | ||
43 | + }, | ||
44 | + "items": { | ||
45 | + "type": "string", | ||
46 | + "example": "" | ||
47 | + } | ||
48 | + }, | ||
49 | + "featuresRepo": { | ||
50 | + "type": "string", | ||
51 | + "example": "mvn:org.onosproject/onos-app-cip/1.4.0-SNAPSHOT/xml/features" | ||
52 | + }, | ||
53 | + "features": { | ||
54 | + "type": "array", | ||
55 | + "xml": { | ||
56 | + "name": "features", | ||
57 | + "wrapped": true | ||
58 | + }, | ||
59 | + "items": { | ||
60 | + "type": "string", | ||
61 | + "example": "onos-app-distributed-primitives" | ||
62 | + } | ||
63 | + }, | ||
64 | + "requiredApps": { | ||
65 | + "type": "array", | ||
66 | + "xml": { | ||
67 | + "name": "requiredApps", | ||
68 | + "wrapped": true | ||
69 | + }, | ||
70 | + "items": { | ||
71 | + "type": "string", | ||
72 | + "example": "" | ||
73 | + } | ||
74 | + }, | ||
75 | + "state": { | ||
76 | + "type": "string", | ||
77 | + "example": "ACTIVE" | ||
78 | + } | ||
79 | + } | ||
80 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "applications", | ||
4 | + "required": [ | ||
5 | + "applications" | ||
6 | + ], | ||
7 | + "properties": { | ||
8 | + "applications": { | ||
9 | + "type": "array", | ||
10 | + "xml": { | ||
11 | + "name": "applications", | ||
12 | + "wrapped": true | ||
13 | + }, | ||
14 | + "items": { | ||
15 | + "type": "object", | ||
16 | + "title": "application", | ||
17 | + "required": [ | ||
18 | + "name", | ||
19 | + "id", | ||
20 | + "version", | ||
21 | + "description", | ||
22 | + "origin", | ||
23 | + "permissions", | ||
24 | + "featuresRepo", | ||
25 | + "features", | ||
26 | + "requiredApps", | ||
27 | + "state" | ||
28 | + ], | ||
29 | + "properties": { | ||
30 | + "name": { | ||
31 | + "type": "string", | ||
32 | + "example": "org.onosproject.distributedprimitives" | ||
33 | + }, | ||
34 | + "id": { | ||
35 | + "type": "integer", | ||
36 | + "format": "int64", | ||
37 | + "example": 1 | ||
38 | + }, | ||
39 | + "version": { | ||
40 | + "type": "string", | ||
41 | + "example": "1.4.0.SNAPSHOT" | ||
42 | + }, | ||
43 | + "description": { | ||
44 | + "type": "string", | ||
45 | + "example": "ONOS app to test distributed primitives" | ||
46 | + }, | ||
47 | + "origin": { | ||
48 | + "type": "string", | ||
49 | + "example": "ON.Lab" | ||
50 | + }, | ||
51 | + "permissions": { | ||
52 | + "type": "array", | ||
53 | + "xml": { | ||
54 | + "name": "hosts", | ||
55 | + "wrapped": true | ||
56 | + }, | ||
57 | + "items": { | ||
58 | + "type": "string", | ||
59 | + "example": "" | ||
60 | + } | ||
61 | + }, | ||
62 | + "featuresRepo": { | ||
63 | + "type": "string", | ||
64 | + "example": "mvn:org.onosproject/onos-app-cip/1.4.0-SNAPSHOT/xml/features" | ||
65 | + }, | ||
66 | + "features": { | ||
67 | + "type": "array", | ||
68 | + "xml": { | ||
69 | + "name": "features", | ||
70 | + "wrapped": true | ||
71 | + }, | ||
72 | + "items": { | ||
73 | + "type": "string", | ||
74 | + "example": "onos-app-distributed-primitives" | ||
75 | + } | ||
76 | + }, | ||
77 | + "requiredApps": { | ||
78 | + "type": "array", | ||
79 | + "xml": { | ||
80 | + "name": "requiredApps", | ||
81 | + "wrapped": true | ||
82 | + }, | ||
83 | + "items": { | ||
84 | + "type": "string", | ||
85 | + "example": "" | ||
86 | + } | ||
87 | + }, | ||
88 | + "state": { | ||
89 | + "type": "string", | ||
90 | + "example": "ACTIVE" | ||
91 | + } | ||
92 | + } | ||
93 | + } | ||
94 | + } | ||
95 | + } | ||
96 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "cluster", | ||
4 | + "required": [ | ||
5 | + "nodes" | ||
6 | + ], | ||
7 | + "properties": { | ||
8 | + "nodes": { | ||
9 | + "type": "array", | ||
10 | + "xml": { | ||
11 | + "name": "nodes", | ||
12 | + "wrapped": true | ||
13 | + }, | ||
14 | + "items": { | ||
15 | + "type": "object", | ||
16 | + "title": "nodes", | ||
17 | + "required": [ | ||
18 | + "id", | ||
19 | + "ip", | ||
20 | + "tcpPort", | ||
21 | + "status" | ||
22 | + ], | ||
23 | + "properties": { | ||
24 | + "id": { | ||
25 | + "type": "string", | ||
26 | + "example": "127.0.0.1" | ||
27 | + }, | ||
28 | + "ip": { | ||
29 | + "type": "string", | ||
30 | + "example": "127.0.0.1" | ||
31 | + }, | ||
32 | + "tcpPort": { | ||
33 | + "type": "integer", | ||
34 | + "format": "int64", | ||
35 | + "example": 9876 | ||
36 | + }, | ||
37 | + "status": { | ||
38 | + "type": "string", | ||
39 | + "example": "ACTIVE" | ||
40 | + } | ||
41 | + } | ||
42 | + } | ||
43 | + } | ||
44 | + } | ||
45 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "required": [ | ||
4 | + "id", | ||
5 | + "ip", | ||
6 | + "tcpPort", | ||
7 | + "status" | ||
8 | + ], | ||
9 | + "properties": { | ||
10 | + "id": { | ||
11 | + "type": "string", | ||
12 | + "example": "127.0.0.1" | ||
13 | + }, | ||
14 | + "ip": { | ||
15 | + "type": "string", | ||
16 | + "example": "127.0.0.1" | ||
17 | + }, | ||
18 | + "tcpPort": { | ||
19 | + "type": "integer", | ||
20 | + "format": "int64", | ||
21 | + "example": 9876 | ||
22 | + }, | ||
23 | + "status": { | ||
24 | + "type": "string", | ||
25 | + "example": "ACTIVE" | ||
26 | + } | ||
27 | + } | ||
28 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "nodes", | ||
4 | + "properties": { | ||
5 | + "nodes": { | ||
6 | + "type": "array", | ||
7 | + "xml": { | ||
8 | + "name": "nodes", | ||
9 | + "wrapped": true | ||
10 | + }, | ||
11 | + "items": { | ||
12 | + "type": "object", | ||
13 | + "title": "nodes", | ||
14 | + "required": [ | ||
15 | + "id", | ||
16 | + "ip", | ||
17 | + "tcpPort", | ||
18 | + "status" | ||
19 | + ], | ||
20 | + "properties": { | ||
21 | + "id": { | ||
22 | + "type": "string", | ||
23 | + "example": "127.0.0.1" | ||
24 | + }, | ||
25 | + "ip": { | ||
26 | + "type": "string", | ||
27 | + "example": "127.0.0.1" | ||
28 | + }, | ||
29 | + "tcpPort": { | ||
30 | + "type": "integer", | ||
31 | + "format": "int64", | ||
32 | + "example": 9876 | ||
33 | + }, | ||
34 | + "status": { | ||
35 | + "type": "string", | ||
36 | + "example": "ACTIVE" | ||
37 | + } | ||
38 | + } | ||
39 | + } | ||
40 | + } | ||
41 | + } | ||
42 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | { | 1 | { |
2 | - "type": "array", | 2 | + "type": "object", |
3 | - "xml": { | 3 | + "title": "nodes", |
4 | - "name": "device", | 4 | + "required": [ |
5 | - "wrapped": true | 5 | + "devices" |
6 | - }, | 6 | + ], |
7 | - "items": { | 7 | + "properties": { |
8 | - "type": "object", | 8 | + "devices": { |
9 | - "title": "device", | 9 | + "type": "array", |
10 | - "required": [ | 10 | + "xml": { |
11 | - "id", | 11 | + "name": "device", |
12 | - "type", | 12 | + "wrapped": true |
13 | - "available", | ||
14 | - "role", | ||
15 | - "mfr", | ||
16 | - "hw", | ||
17 | - "sw", | ||
18 | - "serial", | ||
19 | - "chassisId", | ||
20 | - "annotations" | ||
21 | - ], | ||
22 | - "properties": { | ||
23 | - "id": { | ||
24 | - "type": "string", | ||
25 | - "example": "of:0000000000000001" | ||
26 | }, | 13 | }, |
27 | - "type": { | 14 | + "items": { |
28 | - "type": "string", | ||
29 | - "example": "SWITCH" | ||
30 | - }, | ||
31 | - "available": { | ||
32 | - "type": "boolean", | ||
33 | - "example": true | ||
34 | - }, | ||
35 | - "role": { | ||
36 | - "type": "string", | ||
37 | - "example": "of:0000000000000001" | ||
38 | - }, | ||
39 | - "mfr": { | ||
40 | - "type": "string", | ||
41 | - "example": "Nicira, Inc." | ||
42 | - }, | ||
43 | - "hw": { | ||
44 | - "type": "string", | ||
45 | - "example": "Open vSwitch" | ||
46 | - }, | ||
47 | - "sw": { | ||
48 | - "type": "string", | ||
49 | - "example": "2.3.1" | ||
50 | - }, | ||
51 | - "serial": { | ||
52 | - "type": "string", | ||
53 | - "example": "123" | ||
54 | - }, | ||
55 | - "chassisId": { | ||
56 | - "type": "string", | ||
57 | - "example": "1" | ||
58 | - }, | ||
59 | - "annotations": { | ||
60 | "type": "object", | 15 | "type": "object", |
61 | - "title": "annotations", | 16 | + "title": "device", |
62 | "required": [ | 17 | "required": [ |
63 | - "managementAddress", | 18 | + "id", |
64 | - "protocol", | 19 | + "type", |
65 | - "channelId" | 20 | + "available", |
21 | + "role", | ||
22 | + "mfr", | ||
23 | + "hw", | ||
24 | + "sw", | ||
25 | + "serial", | ||
26 | + "chassisId", | ||
27 | + "annotations" | ||
66 | ], | 28 | ], |
67 | "properties": { | 29 | "properties": { |
68 | - "managementAddress": { | 30 | + "id": { |
69 | "type": "string", | 31 | "type": "string", |
70 | - "example": "123" | 32 | + "example": "of:0000000000000001" |
33 | + }, | ||
34 | + "type": { | ||
35 | + "type": "string", | ||
36 | + "example": "SWITCH" | ||
71 | }, | 37 | }, |
72 | - "protocol": { | 38 | + "available": { |
39 | + "type": "boolean", | ||
40 | + "example": true | ||
41 | + }, | ||
42 | + "role": { | ||
43 | + "type": "string", | ||
44 | + "example": "of:0000000000000001" | ||
45 | + }, | ||
46 | + "mfr": { | ||
73 | "type": "string", | 47 | "type": "string", |
74 | - "example": "OF_13" | 48 | + "example": "Nicira, Inc." |
75 | }, | 49 | }, |
76 | - "channelId": { | 50 | + "hw": { |
77 | "type": "string", | 51 | "type": "string", |
78 | - "example": "10.128.12.4:34689" | 52 | + "example": "Open vSwitch" |
53 | + }, | ||
54 | + "sw": { | ||
55 | + "type": "string", | ||
56 | + "example": "2.3.1" | ||
57 | + }, | ||
58 | + "serial": { | ||
59 | + "type": "string", | ||
60 | + "example": "123" | ||
61 | + }, | ||
62 | + "chassisId": { | ||
63 | + "type": "string", | ||
64 | + "example": "1" | ||
65 | + }, | ||
66 | + "annotations": { | ||
67 | + "type": "object", | ||
68 | + "title": "annotations", | ||
69 | + "required": [ | ||
70 | + "managementAddress", | ||
71 | + "protocol", | ||
72 | + "channelId" | ||
73 | + ], | ||
74 | + "properties": { | ||
75 | + "managementAddress": { | ||
76 | + "type": "string", | ||
77 | + "example": "123" | ||
78 | + }, | ||
79 | + "protocol": { | ||
80 | + "type": "string", | ||
81 | + "example": "OF_13" | ||
82 | + }, | ||
83 | + "channelId": { | ||
84 | + "type": "string", | ||
85 | + "example": "10.128.12.4:34689" | ||
86 | + } | ||
87 | + } | ||
79 | } | 88 | } |
80 | } | 89 | } |
81 | } | 90 | } | ... | ... |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "flows", | ||
4 | + "required": [ | ||
5 | + "flows" | ||
6 | + ], | ||
7 | + "properties": { | ||
8 | + "flows": { | ||
9 | + "type": "array", | ||
10 | + "xml": { | ||
11 | + "name": "hosts", | ||
12 | + "wrapped": true | ||
13 | + }, | ||
14 | + "items": { | ||
15 | + "type": "object", | ||
16 | + "title": "flow", | ||
17 | + "required": [ | ||
18 | + "id", | ||
19 | + "appId", | ||
20 | + "groupId", | ||
21 | + "priority", | ||
22 | + "timeout", | ||
23 | + "isPermanent", | ||
24 | + "deviceId", | ||
25 | + "state", | ||
26 | + "life", | ||
27 | + "packets", | ||
28 | + "bytes", | ||
29 | + "lastSeen" | ||
30 | + ], | ||
31 | + "properties": { | ||
32 | + "id": { | ||
33 | + "type": "string", | ||
34 | + "example": "12103425214920339" | ||
35 | + }, | ||
36 | + "appId": { | ||
37 | + "type": "string", | ||
38 | + "example": "org.onosproject.core" | ||
39 | + }, | ||
40 | + "groupId": { | ||
41 | + "type": "integer", | ||
42 | + "format": "int64", | ||
43 | + "example": 0 | ||
44 | + }, | ||
45 | + "priority": { | ||
46 | + "type": "integer", | ||
47 | + "format": "int64", | ||
48 | + "example": 400000 | ||
49 | + }, | ||
50 | + "timeout": { | ||
51 | + "type": "integer", | ||
52 | + "format": "int64", | ||
53 | + "example": 0 | ||
54 | + }, | ||
55 | + "isPermanent": { | ||
56 | + "type": "boolean", | ||
57 | + "example": true | ||
58 | + }, | ||
59 | + "deviceId": { | ||
60 | + "type": "string", | ||
61 | + "example": "of:0000000000000003" | ||
62 | + }, | ||
63 | + "state": { | ||
64 | + "type": "string", | ||
65 | + "example": "ADDED" | ||
66 | + }, | ||
67 | + "life": { | ||
68 | + "type": "integer", | ||
69 | + "format": "int64", | ||
70 | + "example": 69889 | ||
71 | + }, | ||
72 | + "packets": { | ||
73 | + "type": "integer", | ||
74 | + "format": "int64", | ||
75 | + "example": 22546 | ||
76 | + }, | ||
77 | + "bytes": { | ||
78 | + "type": "integer", | ||
79 | + "format": "int64", | ||
80 | + "example": 1826226 | ||
81 | + }, | ||
82 | + "lastSeen": { | ||
83 | + "type": "integer", | ||
84 | + "format": "int64", | ||
85 | + "example": 1447892365670 | ||
86 | + }, | ||
87 | + "treatment": { | ||
88 | + "type": "object", | ||
89 | + "title": "treatment", | ||
90 | + "required": [ | ||
91 | + "instructions", | ||
92 | + "deferred" | ||
93 | + ], | ||
94 | + "properties": { | ||
95 | + "instructions": { | ||
96 | + "type": "array", | ||
97 | + "title": "treatment", | ||
98 | + "required": [ | ||
99 | + "properties", | ||
100 | + "port" | ||
101 | + ], | ||
102 | + "items": { | ||
103 | + "type": "object", | ||
104 | + "title": "instruction", | ||
105 | + "required": [ | ||
106 | + "type", | ||
107 | + "port" | ||
108 | + ], | ||
109 | + "properties": { | ||
110 | + "type": { | ||
111 | + "type": "string", | ||
112 | + "example": "OUTPUT" | ||
113 | + }, | ||
114 | + "port": { | ||
115 | + "type": "integer", | ||
116 | + "format": "int64", | ||
117 | + "example": -3 | ||
118 | + } | ||
119 | + } | ||
120 | + } | ||
121 | + }, | ||
122 | + "deferred": { | ||
123 | + "type": "array", | ||
124 | + "xml": { | ||
125 | + "name": "deferred", | ||
126 | + "wrapped": true | ||
127 | + }, | ||
128 | + "items": { | ||
129 | + "type": "string" | ||
130 | + } | ||
131 | + } | ||
132 | + } | ||
133 | + } | ||
134 | + } | ||
135 | + } | ||
136 | + }, | ||
137 | + "selector": { | ||
138 | + "type": "object", | ||
139 | + "title": "selector", | ||
140 | + "required": [ | ||
141 | + "criteria" | ||
142 | + ], | ||
143 | + "properties": { | ||
144 | + "criteria": { | ||
145 | + "type": "array", | ||
146 | + "xml": { | ||
147 | + "name": "criteria", | ||
148 | + "wrapped": true | ||
149 | + }, | ||
150 | + "items": { | ||
151 | + "type": "object", | ||
152 | + "title": "criteria", | ||
153 | + "required": [ | ||
154 | + "type", | ||
155 | + "ethType" | ||
156 | + ], | ||
157 | + "properties": { | ||
158 | + "type": { | ||
159 | + "type": "string", | ||
160 | + "example": "ETH_TYPE" | ||
161 | + }, | ||
162 | + "ethType": { | ||
163 | + "type": "integer", | ||
164 | + "format": "int64", | ||
165 | + "example": -30516 | ||
166 | + } | ||
167 | + } | ||
168 | + } | ||
169 | + } | ||
170 | + } | ||
171 | + } | ||
172 | + } | ||
173 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "flow", | ||
4 | + "required": [ | ||
5 | + "priority", | ||
6 | + "timeout", | ||
7 | + "isPermanent", | ||
8 | + "deviceId" | ||
9 | + ], | ||
10 | + "properties": { | ||
11 | + "priority": { | ||
12 | + "type": "integer", | ||
13 | + "format": "int64", | ||
14 | + "example": 400000 | ||
15 | + }, | ||
16 | + "timeout": { | ||
17 | + "type": "integer", | ||
18 | + "format": "int64", | ||
19 | + "example": 0 | ||
20 | + }, | ||
21 | + "isPermanent": { | ||
22 | + "type": "boolean", | ||
23 | + "example": true | ||
24 | + }, | ||
25 | + "deviceId": { | ||
26 | + "type": "string", | ||
27 | + "example": "of:0000000000000003" | ||
28 | + }, | ||
29 | + "treatment": { | ||
30 | + "type": "object", | ||
31 | + "title": "treatment", | ||
32 | + "required": [ | ||
33 | + "instructions", | ||
34 | + "deferred" | ||
35 | + ], | ||
36 | + "properties": { | ||
37 | + "instructions": { | ||
38 | + "type": "array", | ||
39 | + "title": "treatment", | ||
40 | + "required": [ | ||
41 | + "properties", | ||
42 | + "port" | ||
43 | + ], | ||
44 | + "items": { | ||
45 | + "type": "object", | ||
46 | + "title": "instructions", | ||
47 | + "required": [ | ||
48 | + "type", | ||
49 | + "port" | ||
50 | + ], | ||
51 | + "properties": { | ||
52 | + "type": { | ||
53 | + "type": "string", | ||
54 | + "example": "OUTPUT" | ||
55 | + }, | ||
56 | + "port": { | ||
57 | + "type": "integer", | ||
58 | + "format": "int64", | ||
59 | + "example": -3 | ||
60 | + } | ||
61 | + } | ||
62 | + } | ||
63 | + } | ||
64 | + } | ||
65 | + }, | ||
66 | + "selector": { | ||
67 | + "type": "object", | ||
68 | + "title": "selector", | ||
69 | + "required": [ | ||
70 | + "criteria" | ||
71 | + ], | ||
72 | + "properties": { | ||
73 | + "criteria": { | ||
74 | + "type": "array", | ||
75 | + "xml": { | ||
76 | + "name": "criteria", | ||
77 | + "wrapped": true | ||
78 | + }, | ||
79 | + "items": { | ||
80 | + "type": "object", | ||
81 | + "title": "criteria", | ||
82 | + "required": [ | ||
83 | + "type", | ||
84 | + "ethType" | ||
85 | + ], | ||
86 | + "properties": { | ||
87 | + "type": { | ||
88 | + "type": "string", | ||
89 | + "example": "ETH_TYPE" | ||
90 | + }, | ||
91 | + "ethType": { | ||
92 | + "type": "integer", | ||
93 | + "format": "int64", | ||
94 | + "example": -30516 | ||
95 | + } | ||
96 | + } | ||
97 | + } | ||
98 | + } | ||
99 | + } | ||
100 | + } | ||
101 | + } | ||
102 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "host", | ||
4 | + "required": [ | ||
5 | + "id", | ||
6 | + "mac", | ||
7 | + "vlan", | ||
8 | + "ipAddresses", | ||
9 | + "location" | ||
10 | + ], | ||
11 | + "properties": { | ||
12 | + "id": { | ||
13 | + "type": "string", | ||
14 | + "example": "46:E4:3C:A4:17:C8/-1" | ||
15 | + }, | ||
16 | + "mac": { | ||
17 | + "type": "string", | ||
18 | + "example": "46:E4:3C:A4:17:C8" | ||
19 | + }, | ||
20 | + "vlan": { | ||
21 | + "type": "string", | ||
22 | + "example": "-1" | ||
23 | + }, | ||
24 | + "ipAddresses": { | ||
25 | + "type": "array", | ||
26 | + "xml": { | ||
27 | + "name": "hosts", | ||
28 | + "wrapped": true | ||
29 | + }, | ||
30 | + "items": { | ||
31 | + "type": "string", | ||
32 | + "example": "127.0.0.1" | ||
33 | + } | ||
34 | + }, | ||
35 | + "location": { | ||
36 | + "type": "object", | ||
37 | + "title": "location", | ||
38 | + "required": [ | ||
39 | + "elementId", | ||
40 | + "port" | ||
41 | + ], | ||
42 | + "properties": { | ||
43 | + "elementId": { | ||
44 | + "type": "string", | ||
45 | + "example": "of:0000000000000002" | ||
46 | + }, | ||
47 | + "port": { | ||
48 | + "type": "string", | ||
49 | + "example": "3" | ||
50 | + } | ||
51 | + } | ||
52 | + } | ||
53 | + } | ||
54 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "host", | ||
4 | + "required": [ | ||
5 | + "mac", | ||
6 | + "vlan", | ||
7 | + "ipAddresses", | ||
8 | + "location" | ||
9 | + ], | ||
10 | + "properties": { | ||
11 | + "mac": { | ||
12 | + "type": "string", | ||
13 | + "example": "46:E4:3C:A4:17:C8" | ||
14 | + }, | ||
15 | + "vlan": { | ||
16 | + "type": "string", | ||
17 | + "example": "-1" | ||
18 | + }, | ||
19 | + "ipAddresses": { | ||
20 | + "type": "array", | ||
21 | + "xml": { | ||
22 | + "name": "hosts", | ||
23 | + "wrapped": true | ||
24 | + }, | ||
25 | + "items": { | ||
26 | + "type": "string", | ||
27 | + "example": "127.0.0.1" | ||
28 | + } | ||
29 | + }, | ||
30 | + "location": { | ||
31 | + "type": "object", | ||
32 | + "title": "location", | ||
33 | + "required": [ | ||
34 | + "elementId", | ||
35 | + "port" | ||
36 | + ], | ||
37 | + "properties": { | ||
38 | + "elementId": { | ||
39 | + "type": "string", | ||
40 | + "example": "of:0000000000000002" | ||
41 | + }, | ||
42 | + "port": { | ||
43 | + "type": "string", | ||
44 | + "example": "3" | ||
45 | + } | ||
46 | + } | ||
47 | + } | ||
48 | + } | ||
49 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "hosts", | ||
4 | + "required": [ | ||
5 | + "hosts" | ||
6 | + ], | ||
7 | + "properties": { | ||
8 | + "hosts": { | ||
9 | + "type": "array", | ||
10 | + "xml": { | ||
11 | + "name": "hosts", | ||
12 | + "wrapped": true | ||
13 | + }, | ||
14 | + "items": { | ||
15 | + "type": "object", | ||
16 | + "title": "host", | ||
17 | + "required": [ | ||
18 | + "id", | ||
19 | + "mac", | ||
20 | + "vlan", | ||
21 | + "ipAddresses", | ||
22 | + "location" | ||
23 | + ], | ||
24 | + "properties": { | ||
25 | + "id": { | ||
26 | + "type": "string", | ||
27 | + "example": "46:E4:3C:A4:17:C8/-1" | ||
28 | + }, | ||
29 | + "mac": { | ||
30 | + "type": "string", | ||
31 | + "example": "46:E4:3C:A4:17:C8" | ||
32 | + }, | ||
33 | + "vlan": { | ||
34 | + "type": "string", | ||
35 | + "example": "-1" | ||
36 | + }, | ||
37 | + "ipAddresses": { | ||
38 | + "type": "array", | ||
39 | + "xml": { | ||
40 | + "name": "hosts", | ||
41 | + "wrapped": true | ||
42 | + }, | ||
43 | + "items": { | ||
44 | + "type": "string", | ||
45 | + "example": "127.0.0.1" | ||
46 | + } | ||
47 | + }, | ||
48 | + "location": { | ||
49 | + "type": "object", | ||
50 | + "title": "location", | ||
51 | + "required": [ | ||
52 | + "elementId", | ||
53 | + "port" | ||
54 | + ], | ||
55 | + "properties": { | ||
56 | + "elementId": { | ||
57 | + "type": "string", | ||
58 | + "example": "of:0000000000000002" | ||
59 | + }, | ||
60 | + "port": { | ||
61 | + "type": "string", | ||
62 | + "example": "3" | ||
63 | + } | ||
64 | + } | ||
65 | + } | ||
66 | + } | ||
67 | + } | ||
68 | + } | ||
69 | + } | ||
70 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "links", | ||
4 | + "required": [ | ||
5 | + "links" | ||
6 | + ], | ||
7 | + "properties": { | ||
8 | + "links": { | ||
9 | + "type": "array", | ||
10 | + "xml": { | ||
11 | + "name": "links", | ||
12 | + "wrapped": true | ||
13 | + }, | ||
14 | + "items": { | ||
15 | + "type": "object", | ||
16 | + "title": "link", | ||
17 | + "required": [ | ||
18 | + "src", | ||
19 | + "dst", | ||
20 | + "type", | ||
21 | + "state" | ||
22 | + ], | ||
23 | + "properties": { | ||
24 | + "src": { | ||
25 | + "type": "object", | ||
26 | + "title": "src", | ||
27 | + "required": [ | ||
28 | + "port", | ||
29 | + "device" | ||
30 | + ], | ||
31 | + "properties": { | ||
32 | + "port": { | ||
33 | + "type": "string", | ||
34 | + "example": "3" | ||
35 | + }, | ||
36 | + "device": { | ||
37 | + "type": "string", | ||
38 | + "example": "of:0000000000000002" | ||
39 | + } | ||
40 | + } | ||
41 | + }, | ||
42 | + "dst": { | ||
43 | + "type": "object", | ||
44 | + "title": "dst", | ||
45 | + "required": [ | ||
46 | + "port", | ||
47 | + "device" | ||
48 | + ], | ||
49 | + "properties": { | ||
50 | + "port": { | ||
51 | + "type": "string", | ||
52 | + "example": "2" | ||
53 | + }, | ||
54 | + "device": { | ||
55 | + "type": "string", | ||
56 | + "example": "of:0000000000000003" | ||
57 | + } | ||
58 | + } | ||
59 | + }, | ||
60 | + "type": { | ||
61 | + "type": "string", | ||
62 | + "example": "DIRECT" | ||
63 | + }, | ||
64 | + "state": { | ||
65 | + "type": "string", | ||
66 | + "example": "ACTIVE" | ||
67 | + } | ||
68 | + } | ||
69 | + } | ||
70 | + } | ||
71 | + } | ||
72 | +} |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "paths", | ||
4 | + "required": [ | ||
5 | + "paths" | ||
6 | + ], | ||
7 | + "properties": { | ||
8 | + "paths": { | ||
9 | + "type": "array", | ||
10 | + "xml": { | ||
11 | + "name": "hosts", | ||
12 | + "wrapped": true | ||
13 | + }, | ||
14 | + "items": { | ||
15 | + "type": "object", | ||
16 | + "title": "host", | ||
17 | + "required": [ | ||
18 | + "cost", | ||
19 | + "links" | ||
20 | + ], | ||
21 | + "properties": { | ||
22 | + "cost": { | ||
23 | + "type": "integer", | ||
24 | + "format": "int64", | ||
25 | + "example": 2 | ||
26 | + }, | ||
27 | + "links": { | ||
28 | + "type": "array", | ||
29 | + "xml": { | ||
30 | + "name": "links", | ||
31 | + "wrapped": true | ||
32 | + }, | ||
33 | + "items": { | ||
34 | + "type": "object", | ||
35 | + "title": "link", | ||
36 | + "required": [ | ||
37 | + "src", | ||
38 | + "dst", | ||
39 | + "type", | ||
40 | + "state" | ||
41 | + ], | ||
42 | + "properties": { | ||
43 | + "src": { | ||
44 | + "type": "object", | ||
45 | + "title": "src", | ||
46 | + "required": [ | ||
47 | + "port", | ||
48 | + "device" | ||
49 | + ], | ||
50 | + "properties": { | ||
51 | + "port": { | ||
52 | + "type": "string", | ||
53 | + "example": "3" | ||
54 | + }, | ||
55 | + "device": { | ||
56 | + "type": "string", | ||
57 | + "example": "of:0000000000000002" | ||
58 | + } | ||
59 | + } | ||
60 | + }, | ||
61 | + "dst": { | ||
62 | + "type": "object", | ||
63 | + "title": "dst", | ||
64 | + "required": [ | ||
65 | + "port", | ||
66 | + "device" | ||
67 | + ], | ||
68 | + "properties": { | ||
69 | + "port": { | ||
70 | + "type": "string", | ||
71 | + "example": "2" | ||
72 | + }, | ||
73 | + "device": { | ||
74 | + "type": "string", | ||
75 | + "example": "of:0000000000000003" | ||
76 | + } | ||
77 | + } | ||
78 | + }, | ||
79 | + "type": { | ||
80 | + "type": "string", | ||
81 | + "example": "DIRECT" | ||
82 | + }, | ||
83 | + "state": { | ||
84 | + "type": "string", | ||
85 | + "example": "ACTIVE" | ||
86 | + } | ||
87 | + } | ||
88 | + } | ||
89 | + } | ||
90 | + } | ||
91 | + } | ||
92 | + } | ||
93 | + } | ||
94 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "loads", | ||
4 | + "required": [ | ||
5 | + "loads" | ||
6 | + ], | ||
7 | + "properties": { | ||
8 | + "loads": { | ||
9 | + "type": "array", | ||
10 | + "required": [ | ||
11 | + "loads" | ||
12 | + ], | ||
13 | + "xml": { | ||
14 | + "name": "loads", | ||
15 | + "wrapped": true | ||
16 | + }, | ||
17 | + "items": { | ||
18 | + "type": "object", | ||
19 | + "title": "loads", | ||
20 | + "required": [ | ||
21 | + "rate", | ||
22 | + "latest", | ||
23 | + "valid", | ||
24 | + "time", | ||
25 | + "link" | ||
26 | + ], | ||
27 | + "properties": { | ||
28 | + "rate": { | ||
29 | + "type": "integer", | ||
30 | + "format": "int64", | ||
31 | + "example": 0 | ||
32 | + }, | ||
33 | + "latest": { | ||
34 | + "type": "string", | ||
35 | + "example": "of:0000000000000001" | ||
36 | + }, | ||
37 | + "valid": { | ||
38 | + "type": "boolean", | ||
39 | + "example": false | ||
40 | + }, | ||
41 | + "time": { | ||
42 | + "type": "integer", | ||
43 | + "format": "int64", | ||
44 | + "example": 1447980119542 | ||
45 | + }, | ||
46 | + "link": { | ||
47 | + "type": "string", | ||
48 | + "example": "http://10.128.12.1:8181/onos/v1/links?device=of:0000000000000002&port=3" | ||
49 | + } | ||
50 | + } | ||
51 | + } | ||
52 | + } | ||
53 | + } | ||
54 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "statistics", | ||
4 | + "required": [ | ||
5 | + "statistics" | ||
6 | + ], | ||
7 | + "properties": { | ||
8 | + "statistics": { | ||
9 | + "type": "array", | ||
10 | + "required": [ | ||
11 | + "statistics" | ||
12 | + ], | ||
13 | + "xml": { | ||
14 | + "name": "statistics", | ||
15 | + "wrapped": true | ||
16 | + }, | ||
17 | + "items": { | ||
18 | + "type": "object", | ||
19 | + "title": "statistics", | ||
20 | + "required": [ | ||
21 | + "table" | ||
22 | + ], | ||
23 | + "properties": { | ||
24 | + "deviceId": { | ||
25 | + "type": "string", | ||
26 | + "example": "of:0000000000000001" | ||
27 | + }, | ||
28 | + "table": { | ||
29 | + "type": "array", | ||
30 | + "xml": { | ||
31 | + "name": "table", | ||
32 | + "wrapped": true | ||
33 | + }, | ||
34 | + "items": { | ||
35 | + "type": "object", | ||
36 | + "title": "tables", | ||
37 | + "required": [ | ||
38 | + "tableId", | ||
39 | + "deviceId", | ||
40 | + "activeEntries", | ||
41 | + "packetsLookedUp", | ||
42 | + "packetsMathced" | ||
43 | + ], | ||
44 | + "properties": { | ||
45 | + "tableId": { | ||
46 | + "type": "integer", | ||
47 | + "format": "int64", | ||
48 | + "example": 0 | ||
49 | + }, | ||
50 | + "deviceId": { | ||
51 | + "type": "string", | ||
52 | + "example": "of:0000000000000001" | ||
53 | + }, | ||
54 | + "activeEntries": { | ||
55 | + "type": "integer", | ||
56 | + "format": "int64", | ||
57 | + "example": 3 | ||
58 | + }, | ||
59 | + "packetsLookedUp": { | ||
60 | + "type": "integer", | ||
61 | + "format": "int64", | ||
62 | + "example": 458530 | ||
63 | + }, | ||
64 | + "packetsMathced": { | ||
65 | + "type": "integer", | ||
66 | + "format": "int64", | ||
67 | + "example": 458501 | ||
68 | + } | ||
69 | + } | ||
70 | + } | ||
71 | + } | ||
72 | + } | ||
73 | + } | ||
74 | + } | ||
75 | + } | ||
76 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "device-table-statistics", | ||
4 | + "required": [ | ||
5 | + "table-statistics" | ||
6 | + ], | ||
7 | + "properties": { | ||
8 | + "device-table-statistics": { | ||
9 | + "type": "array", | ||
10 | + "required": [ | ||
11 | + "device-table-statistics" | ||
12 | + ], | ||
13 | + "xml": { | ||
14 | + "name": "table-statistics", | ||
15 | + "wrapped": true | ||
16 | + }, | ||
17 | + "items": { | ||
18 | + "type": "object", | ||
19 | + "title": "table-statistics", | ||
20 | + "required": [ | ||
21 | + "device-table-statistics" | ||
22 | + ], | ||
23 | + "properties": { | ||
24 | + "deviceId": { | ||
25 | + "type": "string", | ||
26 | + "example": "of:0000000000000001" | ||
27 | + }, | ||
28 | + "table-statistics": { | ||
29 | + "type": "array", | ||
30 | + "xml": { | ||
31 | + "name": "table", | ||
32 | + "wrapped": true | ||
33 | + }, | ||
34 | + "items": { | ||
35 | + "type": "object", | ||
36 | + "title": "table-statistics", | ||
37 | + "required": [ | ||
38 | + "tableId", | ||
39 | + "deviceId", | ||
40 | + "activeEntries", | ||
41 | + "packetsLookedUp", | ||
42 | + "packetsMathced" | ||
43 | + ], | ||
44 | + "properties": { | ||
45 | + "tableId": { | ||
46 | + "type": "integer", | ||
47 | + "format": "int64", | ||
48 | + "example": 0 | ||
49 | + }, | ||
50 | + "deviceId": { | ||
51 | + "type": "string", | ||
52 | + "example": "of:0000000000000001" | ||
53 | + }, | ||
54 | + "activeEntries": { | ||
55 | + "type": "integer", | ||
56 | + "format": "int64", | ||
57 | + "example": 3 | ||
58 | + }, | ||
59 | + "packetsLookedUp": { | ||
60 | + "type": "integer", | ||
61 | + "format": "int64", | ||
62 | + "example": 458530 | ||
63 | + }, | ||
64 | + "packetsMathced": { | ||
65 | + "type": "integer", | ||
66 | + "format": "int64", | ||
67 | + "example": 458501 | ||
68 | + } | ||
69 | + } | ||
70 | + } | ||
71 | + } | ||
72 | + } | ||
73 | + } | ||
74 | + } | ||
75 | + } | ||
76 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "topology", | ||
4 | + "required": [ | ||
5 | + "time", | ||
6 | + "devices", | ||
7 | + "links", | ||
8 | + "clusters" | ||
9 | + ], | ||
10 | + "properties": { | ||
11 | + "time": { | ||
12 | + "type": "integer", | ||
13 | + "format": "int64", | ||
14 | + "example": 183004405835967 | ||
15 | + }, | ||
16 | + "devices": { | ||
17 | + "type": "integer", | ||
18 | + "format": "int64", | ||
19 | + "example": 3 | ||
20 | + }, | ||
21 | + "links": { | ||
22 | + "type": "integer", | ||
23 | + "format": "int64", | ||
24 | + "example": 4 | ||
25 | + }, | ||
26 | + "clusters": { | ||
27 | + "type": "integer", | ||
28 | + "format": "int64", | ||
29 | + "example": 1 | ||
30 | + } | ||
31 | + } | ||
32 | +} |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "device", | ||
4 | + "required": [ | ||
5 | + "id", | ||
6 | + "deviceCount", | ||
7 | + "linkCount", | ||
8 | + "root" | ||
9 | + ], | ||
10 | + "properties": { | ||
11 | + "id": { | ||
12 | + "type": "integer", | ||
13 | + "format": "int64", | ||
14 | + "example": 1 | ||
15 | + }, | ||
16 | + "deviceCount": { | ||
17 | + "type": "integer", | ||
18 | + "format": "int64", | ||
19 | + "example": 3 | ||
20 | + }, | ||
21 | + "linkCount": { | ||
22 | + "type": "integer", | ||
23 | + "format": "int64", | ||
24 | + "example": 4 | ||
25 | + }, | ||
26 | + "root": { | ||
27 | + "type": "string", | ||
28 | + "example": "of:0000000000000001" | ||
29 | + } | ||
30 | + } | ||
31 | +} |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "clusters", | ||
4 | + "required": [ | ||
5 | + "clusters" | ||
6 | + ], | ||
7 | + "properties": { | ||
8 | + "clusters": { | ||
9 | + "type": "array", | ||
10 | + "xml": { | ||
11 | + "name": "cluster", | ||
12 | + "wrapped": true | ||
13 | + }, | ||
14 | + "items": { | ||
15 | + "type": "object", | ||
16 | + "title": "cluster", | ||
17 | + "required": [ | ||
18 | + "id", | ||
19 | + "deviceCount", | ||
20 | + "linkCount", | ||
21 | + "root" | ||
22 | + ], | ||
23 | + "properties": { | ||
24 | + "id": { | ||
25 | + "type": "integer", | ||
26 | + "format": "int64", | ||
27 | + "example": 1 | ||
28 | + }, | ||
29 | + "deviceCount": { | ||
30 | + "type": "integer", | ||
31 | + "format": "int64", | ||
32 | + "example": 3 | ||
33 | + }, | ||
34 | + "linkCount": { | ||
35 | + "type": "integer", | ||
36 | + "format": "int64", | ||
37 | + "example": 4 | ||
38 | + }, | ||
39 | + "root": { | ||
40 | + "type": "string", | ||
41 | + "example": "of:0000000000000001" | ||
42 | + } | ||
43 | + } | ||
44 | + } | ||
45 | + } | ||
46 | + } | ||
47 | +} | ||
48 | + |
1 | +{ | ||
2 | + "type": "object", | ||
3 | + "title": "devices", | ||
4 | + "required": [ | ||
5 | + "devices" | ||
6 | + ], | ||
7 | + "properties": { | ||
8 | + "devices": { | ||
9 | + "type": "array", | ||
10 | + "xml": { | ||
11 | + "name": "cluster", | ||
12 | + "wrapped": true | ||
13 | + }, | ||
14 | + "items": { | ||
15 | + "type": "string", | ||
16 | + "title": "device", | ||
17 | + "example": "of:0000000000000001" | ||
18 | + } | ||
19 | + } | ||
20 | + } | ||
21 | +} | ||
22 | + |
-
Please register or login to post a comment