Skip to content

Commit 8d4848f

Browse files
author
Networks Engineering & Operations Advanced Technology (Disney)
authored
Merge pull request #69 from AMWA-TV/garethsb-network-link-1
Tighten up network-links endpoint to describe inter-switch links only
2 parents e8380c6 + 0833c37 commit 8d4848f

10 files changed

+54
-21
lines changed

APIs/NetworkControlAPI.raml

+20-3
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ documentation:
172172
The network controller _may_ verify these details. If the details are invalid, the network controller _may_ reject the request.
173173
When the attached network device details are not included in the request, the network controller _may_ attempt to determine them and include them in the registered Endpoint.
174174
However, if the network controller cannot determine them, it may reject the the request.
175-
The network controller _should_ create a corresponding Network Link with this Endpoint as the peer device.
176175
Subsequent PUT requests should receive an error response. Updates should be done using PATCH.
177176
body:
178177
type: Endpoint
@@ -222,7 +221,7 @@ documentation:
222221
body:
223222
type: ErrorSchema
224223
delete:
225-
description: Delete an existing Endpoint. On a successful request, the network controller _must_ also delete the corresponding Network Link.
224+
description: Delete an existing Endpoint.
226225
responses:
227226
204:
228227
description: >
@@ -241,9 +240,9 @@ documentation:
241240
is: [paged]
242241
description: |
243242
List Network Links.
244-
Get all links in the network. Network Links are always bidirectional. The implementation of the API must ensure that query results are independent of how a bi-directional link is persisted.
245243
NB: Query parameters should be implemented for all permitted resource attributes.
246244
queryParameters:
245+
id:
247246
peers.device_id:
248247
peers.port_id:
249248
speed:
@@ -256,6 +255,24 @@ documentation:
256255
description: The query parameters specified are not currently supported by this implementation.
257256
body:
258257
type: ErrorSchema
258+
/{networkLinkId}:
259+
uriParameters:
260+
networkLinkId:
261+
type: string
262+
pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
263+
description: The globally unique identifier for the Network Link.
264+
example: 9468239c-afae-43eb-b711-bb7b8e817a83
265+
get:
266+
description: Get a single Network Link
267+
responses:
268+
200:
269+
body:
270+
type: NetworkLink
271+
example: !include ../examples/netctrl-network-link-id-get-200.json
272+
404:
273+
description: Returned when the Network Link ID does not exist.
274+
body:
275+
type: ErrorSchema
259276
/network-flows:
260277
displayName: Network Flows
261278
get:

APIs/schemas/network-link.json

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
{
22
"$schema": "http://json-schema.org/draft-04/schema#",
33
"type": "object",
4-
"description": "Describes a network link. A network link consists of two peers. A peer is either a network device or an endpoint. But a link cannot have two endpoints as peers. Links are always bidirectional. That is, the order of the peers in this entity carries no special meaning. When a link is between a network device (switch) and an endpoint, the port_id for the endpoint peer must be null.",
4+
"description": "Describes a network link. A network link consists of two peers. Each peer in the link must be a network device, links between network devices and endpoints are not represented. Links are always bidirectional. That is, the order of the peers in this entity carries no special meaning.",
55
"required": [
6+
"id",
67
"peers",
78
"speed"
89
],
910
"properties": {
11+
"id": {
12+
"description": "Globally unique identifier for the network link",
13+
"type": "string",
14+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
15+
},
1016
"peers": {
11-
"description": "List of peer devices in a link. Peer can be a network device (switch) or an endpoint. There must be exactly two peers in the list.",
17+
"description": "List of peers in a link. Each peer is a network device (switch). There must be exactly two peers in the list.",
1218
"type": "array",
1319
"items": {
1420
"type": "object",
@@ -18,12 +24,12 @@
1824
],
1925
"properties": {
2026
"device_id": {
21-
"description": "Globally unique identifier of a network device or an endpoint.",
27+
"description": "Globally unique identifier of a network device.",
2228
"type": "string",
2329
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
2430
},
2531
"port_id": {
26-
"description": "When the peer is a network device, matches the port_id of the interface on the network device to which the link is connected. When the peer is an endpoint, this value must be null.",
32+
"description": "Matches the port_id of the interface of the network device to which the link is connected.",
2733
"anyOf": [
2834
{
2935
"type": "string",
@@ -34,10 +40,6 @@
3440
"type": "string",
3541
"pattern": "^.+$",
3642
"description": "When the Port ID is anything other than a MAC address, a freeform string may be used."
37-
},
38-
{
39-
"type": "null",
40-
"description": "When the peer is an endpoint (instead of network device) the port_id MUST be null. A null value will explicitly identify this peer as an endpoint. An endpoint has only one port, so a port_id value is redundant."
4143
}
4244
]
4345
}

docs/2.3. APIs - Query Parameters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ GET /x-nmos/netctrl/v1.0/endpoints?role=sender&chassis_id=2d-af-a9-41-01-b4
367367
```
368368

369369
***Response***
370-
* Returns all Endpoint objects which have an attribute of 'role' which exactly matches 'sender' AND a 'chassi_is' attribute which exactly matches '2d-af-a9-41-01-b4'.
370+
* Returns all Endpoint objects which have an attribute of 'role' which exactly matches 'sender' AND a 'chassis_id' attribute which exactly matches '2d-af-a9-41-01-b4'.
371371

372372
**Example 3: Querying Within Objects**
373373

docs/3.0. Data Model.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ The `chassis_id` parameter may be used to generate a persistent, unique `id` for
3636

3737
### Network Link
3838

39-
Network Links do not have a unique `id`. They are identified by the peer devices in the link.
39+
The `chassis_id` and `port_id` of the `peers` may be used to generate a persistent, unique `id` for a Network Link.

docs/3.4. Data Model - Network Link.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@
22

33
_(c) AMWA 2017, CC Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)_
44

5-
A Network Link represents the bidirectional link between a [Network Device](3.3.%20Data%20Model%20-%20Network%20Device.md) and another Network Device or the link between the Network Device and the [Endpoint](3.1.%20Data%20Model%20-%20Endpoint.md).
5+
A Network Link represents the bidirectional link between a [Network Device](3.3.%20Data%20Model%20-%20Network%20Device.md) and another Network Device.
66

77
The parameters of a Network Link are:
88

9-
* `peers`: an array of exactly two objects identifying a network device interface (by its `device_id` and `port_id`) or endpoint (by id) and the peer network device
9+
* `peers`: an array of exactly two objects identifying a network device interface (by its `device_id` and `port_id`) and the peer network device interface
1010
* `speed`: the speed of the link
1111

12-
![Class Diagram](images/Network-Link.png)
13-
14-
The only operation permitted for this resource is GET. When a broadcast controller performs a GET operation with a `device_id` query parameter, the network controller returns all the links that originate/terminate in the specified network device or endpoint.
15-
As these links are bi-directional, the same link information will be reported by both network devices when a GET operation is performed for neighboring network devices.
16-
17-
![Class Diagram](images/Bidirectional-Links.png)
12+
The only operation permitted for this resource is GET. When a broadcast controller performs a GET operation with a `device_id` query parameter, the network controller returns all the links that originate/terminate in the specified network device.
13+
As these links are bi-directional, a link will be reported when a GET operation is performed for either peer network device.

docs/images/Bidirectional-Links.png

-71.3 KB
Binary file not shown.

docs/images/EP-Auth.png

-22.6 KB
Binary file not shown.

docs/images/Network-Link.png

-91.8 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"id": "9468239c-afae-43eb-b711-bb7b8e817a83",
3+
"peers": [
4+
{
5+
"device_id": "f3841396-1cbf-4a8a-915c-dd1034121532",
6+
"port_id": "Ethernet 1/2"
7+
},
8+
{
9+
"device_id": "2c516096-4fa6-4b93-8b84-248ad79dff3a",
10+
"port_id": "Ethernet 2/1"
11+
}
12+
],
13+
"speed": "100Gbit/s"
14+
}

examples/netctrl-network-links-get-200.json

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[
22
{
3+
"id": "9468239c-afae-43eb-b711-bb7b8e817a83",
34
"peers": [
45
{
56
"device_id": "f3841396-1cbf-4a8a-915c-dd1034121532",
@@ -13,6 +14,7 @@
1314
"speed": "100Gbit/s"
1415
},
1516
{
17+
"id": "a5b16a69-b64c-4bb4-816d-07c9701140eb",
1618
"peers": [
1719
{
1820
"device_id": "aa4df211-284e-4417-9827-b1ceda12a4ff",
@@ -26,6 +28,7 @@
2628
"speed": "100Gbit/s"
2729
},
2830
{
31+
"id": "abc0ca32-f723-45e4-a143-b23e3b3ad7e7",
2932
"peers": [
3033
{
3134
"device_id": "cf333591-82ac-456a-898b-f56ff83d1d22",
@@ -39,6 +42,7 @@
3942
"speed": "1Gbit/s"
4043
},
4144
{
45+
"id": "b7bacccd-d433-4133-a0e3-b4d383212ba1",
4246
"peers": [
4347
{
4448
"device_id": "71706c18-49f2-481d-914a-d711d773dacb",

0 commit comments

Comments
 (0)