Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/sonic-yang-models/tests/yang_model_tests/tests/port.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
"eStrKey" : "Pattern",
"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": {
"desc": "PORT_VALID_ADVSPEEDS_TEST_1 no failure."
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
Expand Down Expand Up @@ -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": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
Expand Down
4 changes: 2 additions & 2 deletions src/sonic-yang-models/yang-models/sonic-port.yang
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module sonic-port{
leaf speed {
mandatory true;
type uint32 {
range 1..400000;
range 1..800000;
}
}

Expand All @@ -78,7 +78,7 @@ module sonic-port{

type union {
type uint32 {
range 1..400000;
range 1..800000;
}
type string {
pattern "all";
Expand Down