mirror of
https://github.com/Telecominfraproject/ols-ucentral-schema.git
synced 2026-03-20 03:39:31 +00:00
Compare commits
9 Commits
lacp
...
link_aggre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bcde6a7155 | ||
|
|
82f5eb7740 | ||
|
|
ceccdef561 | ||
|
|
81e8cd5706 | ||
|
|
8a4815187f | ||
|
|
e8da89616e | ||
|
|
5da5b090be | ||
|
|
5dc634f78e | ||
|
|
4d03a432c1 |
@@ -161,6 +161,11 @@ properties:
|
||||
type: integer
|
||||
minimum: 1
|
||||
maximum: 4094
|
||||
trunk-group:
|
||||
description: Associates this port to a trunk or a port-channel.
|
||||
type: integer
|
||||
minimum: 1
|
||||
maximum: 64
|
||||
lacp-config:
|
||||
description:
|
||||
This section describes the 802.3ad Link Aggregation Control Protocol (LACP) configuration for the current interface.
|
||||
|
||||
@@ -223,3 +223,20 @@ properties:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
trunk-balance-method:
|
||||
description:
|
||||
Sets the load-distribution method among ports in aggregated links for both static and LACP based trunks.
|
||||
type: string
|
||||
enum:
|
||||
- dst-ip
|
||||
- dst-mac
|
||||
- src-dst-ip
|
||||
- src-dst-mac
|
||||
- src-ip
|
||||
- src-mac
|
||||
default: src-dst-mac
|
||||
jumbo-frames:
|
||||
description:
|
||||
Enables Jumbo frames
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
@@ -1215,6 +1215,26 @@ function instantiateEthernet(location, value, errors) {
|
||||
obj.lacp_config = parseLacpConfig(location + "/lacp-config", value["lacp-config"], errors);
|
||||
}
|
||||
|
||||
function parseTrunkGroup(location, value, errors) {
|
||||
if (type(value) in [ "int", "double" ]) {
|
||||
if (value > 64)
|
||||
push(errors, [ location, "must be lower than or equal to 64" ]);
|
||||
|
||||
if (value < 1)
|
||||
push(errors, [ location, "must be bigger than or equal to 1" ]);
|
||||
|
||||
}
|
||||
|
||||
if (type(value) != "int")
|
||||
push(errors, [ location, "must be of type integer" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (exists(value, "trunk-group")) {
|
||||
obj.trunk_group = parseTrunkGroup(location + "/trunk-group", value["trunk-group"], errors);
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
@@ -1849,6 +1869,37 @@ function instantiateSwitch(location, value, errors) {
|
||||
obj.port_isolation = parsePortIsolation(location + "/port-isolation", value["port-isolation"], errors);
|
||||
}
|
||||
|
||||
function parseJumboFrames(location, value, errors) {
|
||||
if (type(value) != "bool")
|
||||
push(errors, [ location, "must be of type boolean" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (exists(value, "jumbo-frames")) {
|
||||
obj.jumbo_frames = parseJumboFrames(location + "/jumbo-frames", value["jumbo-frames"], errors);
|
||||
}
|
||||
else {
|
||||
obj.jumbo_frames = false;
|
||||
}
|
||||
|
||||
function parseTrunkBalanceMethod(location, value, errors) {
|
||||
if (type(value) != "string")
|
||||
push(errors, [ location, "must be of type string" ]);
|
||||
|
||||
if (!(value in [ "dst-ip", "dst-mac", "src-dst-ip", "src-dst-mac", "src-ip", "src-mac" ]))
|
||||
push(errors, [ location, "must be one of \"dst-ip\", \"dst-mac\", \"src-dst-ip\", \"src-dst-mac\", \"src-ip\" or \"src-mac\"" ]);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
if (exists(value, "trunk-balance-method")) {
|
||||
obj.trunk_balance_method = parseTrunkBalanceMethod(location + "/trunk-balance-method", value["trunk-balance-method"], errors);
|
||||
}
|
||||
else {
|
||||
obj.trunk_balance_method = "src-dst-mac";
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ properties:
|
||||
$ref: "https://ucentral.io/state/v1/link-state/"
|
||||
mac-address-list:
|
||||
$ref: "https://ucentral.io/state/v1/mac-address-list/"
|
||||
static-trunks:
|
||||
$ref: "https://ucentral.io/state/v1/static-trunks/"
|
||||
lacp-trunks:
|
||||
$ref: "https://ucentral.io/state/v1/lacp-trunks/"
|
||||
|
||||
18
state/static-trunks.yml
Normal file
18
state/static-trunks.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
description:
|
||||
List of statically created trunks.
|
||||
properties:
|
||||
trunk-identifier:
|
||||
type: integer
|
||||
description:
|
||||
Logical identifier for the trunk.
|
||||
minimum: 1
|
||||
maximum: 64
|
||||
member-ports:
|
||||
type: array
|
||||
description:
|
||||
List of member ports under this static trunk.
|
||||
items:
|
||||
type: string
|
||||
@@ -686,6 +686,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"trunk-group": {
|
||||
"description": "Associates this port to a trunk or a port-channel.",
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 64
|
||||
},
|
||||
"lacp-config": {
|
||||
"description": "This section describes the 802.3ad Link Aggregation Control Protocol (LACP) configuration for the current interface.",
|
||||
"type": "object",
|
||||
@@ -990,6 +996,23 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"trunk-balance-method": {
|
||||
"description": "Sets the load-distribution method among ports in aggregated links for both static and LACP based trunks.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"dst-ip",
|
||||
"dst-mac",
|
||||
"src-dst-ip",
|
||||
"src-dst-mac",
|
||||
"src-ip",
|
||||
"src-mac"
|
||||
],
|
||||
"default": "src-dst-mac"
|
||||
"jumbo-frames": {
|
||||
"description": "Enables Jumbo frames",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -478,6 +478,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"trunk-group": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 64
|
||||
},
|
||||
"lacp-config": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -734,6 +739,22 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"trunk-balance-method": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"dst-ip",
|
||||
"dst-mac",
|
||||
"src-dst-ip",
|
||||
"src-dst-mac",
|
||||
"src-ip",
|
||||
"src-mac"
|
||||
],
|
||||
"default": "src-dst-mac"
|
||||
},
|
||||
"jumbo-frames": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -538,6 +538,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"trunk-group": {
|
||||
"description": "Associates this port to a trunk or a port-channel.",
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 64
|
||||
},
|
||||
"lacp-config": {
|
||||
"description": "This section describes the 802.3ad Link Aggregation Control Protocol (LACP) configuration for the current interface.",
|
||||
"type": "object",
|
||||
@@ -841,6 +847,24 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"trunk-balance-method": {
|
||||
"description": "Sets the load-distribution method among ports in aggregated links for both static and LACP based trunks.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"dst-ip",
|
||||
"dst-mac",
|
||||
"src-dst-ip",
|
||||
"src-dst-mac",
|
||||
"src-ip",
|
||||
"src-mac"
|
||||
],
|
||||
"default": "src-dst-mac"
|
||||
},
|
||||
"jumbo-frames": {
|
||||
"description": "Enables Jumbo frames",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -79,6 +79,9 @@
|
||||
"mac-address-list": {
|
||||
"$ref": "#/$defs/mac-address-list"
|
||||
},
|
||||
"static-trunks": {
|
||||
"$ref": "#/$defs/static-trunks"
|
||||
},
|
||||
"lacp-trunks": {
|
||||
"$ref": "#/$defs/lacp-trunks"
|
||||
}
|
||||
@@ -1102,6 +1105,28 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"static-trunks": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"description": "List of statically created trunks.",
|
||||
"properties": {
|
||||
"trunk-identifier": {
|
||||
"type": "integer",
|
||||
"description": "Logical identifier for the trunk.",
|
||||
"minimum": 1,
|
||||
"maximum": 64
|
||||
},
|
||||
"member-ports": {
|
||||
"type": "array",
|
||||
"description": "List of member ports under this static trunk.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"lacp-trunks": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
||||
Reference in New Issue
Block a user