[YANG] Update range of supported port speeds to support 800G ports (#10687)

- Why I did it
To add support for 800G speed for port in the yang.

- How I did it
Change limitation from 400G to 800G.

- How to verify it
Set a port speed to 800G and run the yang DB validation. e.g. by using dynamic port breakout.
This commit is contained in:
DavidZagury 2022-05-04 16:56:21 +03:00 committed by GitHub
parent 243d0c73f9
commit 799d0c0313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 60 additions and 2 deletions

View File

@ -24,6 +24,13 @@
"eStrKey" : "Pattern", "eStrKey" : "Pattern",
"eStr": ["on|off"] "eStr": ["on|off"]
}, },
"PORT_VALID_SPEEDS_TEST_1": {
"desc": "PORT_VALID_SPEEDS_TEST_1 no failure."
},
"PORT_INVALID_SPEEDS_TEST_1": {
"desc": "PORT_INVALID_SPEEDS_TEST_1 InvalidValue condition failure.",
"eStr": ["pattern", "does not satisfy"]
},
"PORT_VALID_ADVSPEEDS_TEST_1": { "PORT_VALID_ADVSPEEDS_TEST_1": {
"desc": "PORT_VALID_ADVSPEEDS_TEST_1 no failure." "desc": "PORT_VALID_ADVSPEEDS_TEST_1 no failure."
}, },

View File

@ -90,6 +90,40 @@
} }
}, },
"PORT_VALID_SPEEDS_TEST_1": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"name": "Ethernet8",
"alias": "eth8",
"lanes": "65",
"speed": 800000,
"autoneg": "on",
"adv_speeds": [400000, 800000]
}
]
}
}
},
"PORT_INVALID_SPEEDS_TEST_1": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"name": "Ethernet8",
"alias": "eth8",
"lanes": "65",
"speed": 900000,
"autoneg": "on",
"adv_speeds": [25000,40000]
}
]
}
}
},
"PORT_VALID_ADVSPEEDS_TEST_1": { "PORT_VALID_ADVSPEEDS_TEST_1": {
"sonic-port:sonic-port": { "sonic-port:sonic-port": {
"sonic-port:PORT": { "sonic-port:PORT": {
@ -124,6 +158,23 @@
} }
}, },
"PORT_VALID_ADVSPEEDS_TEST_3": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"name": "Ethernet8",
"alias": "eth8",
"lanes": "65",
"speed": 25000,
"autoneg": "on",
"adv_speeds": [25000,800000]
}
]
}
}
},
"PORT_INVALID_ADVSPEEDS_TEST_1": { "PORT_INVALID_ADVSPEEDS_TEST_1": {
"sonic-port:sonic-port": { "sonic-port:sonic-port": {
"sonic-port:PORT": { "sonic-port:PORT": {

View File

@ -61,7 +61,7 @@ module sonic-port{
leaf speed { leaf speed {
mandatory true; mandatory true;
type uint32 { type uint32 {
range 1..400000; range 1..800000;
} }
} }
@ -78,7 +78,7 @@ module sonic-port{
type union { type union {
type uint32 { type uint32 {
range 1..400000; range 1..800000;
} }
type string { type string {
pattern "all"; pattern "all";