Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YANG][Bugfix] Fix incorrect pattern of nexthop-vrf in sonic-static-route.yang #21642

Merged
merged 3 commits into from
Feb 7, 2025
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
"STATIC_ROUTE_TEST_ECMP_NEXTHOP_VRF_INVALID": {
"desc": "Configure with invalid vrf for ECMP",
"eStrKey": "Pattern"
},
"STATIC_ROUTE_TEST_NEXTHOP_EMPTY_VRF": {
"desc": "Configure with null value for VRF"
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,53 @@
}]
}
}
},
"STATIC_ROUTE_TEST_NEXTHOP_EMPTY_VRF": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth0",
"description": "Ethernet0",
"fec": "rs",
"lanes": "65",
"mtu": 9000,
"name": "Ethernet0",
"speed": 25000
}
]
}
},
"sonic-interface:sonic-interface": {
"sonic-interface:INTERFACE": {
"INTERFACE_IPPREFIX_LIST": [
{
"family": "IPv4",
"ip-prefix": "1.0.0.1/30",
"name": "Ethernet0",
"scope": "global"
}
],
"INTERFACE_LIST": [
{
"name": "Ethernet0"
}
]
}
},
"sonic-static-route:sonic-static-route": {
"sonic-static-route:STATIC_ROUTE": {
"STATIC_ROUTE_LIST": [{
"prefix": "16.16.16.0/24",
"vrf_name": "default",
"nexthop": "1.0.0.5",
"distance": "1",
"nexthop-vrf": "",
"blackhole": "false"
}]
}
}
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ module sonic-static-route {
}
leaf nexthop-vrf {
type string {
pattern "(((Vrf[a-zA-Z0-9_-]+)|(default)|(mgmt)),)*((Vrf[a-zA-Z0-9_-]+)|(default)|(mgmt))";
pattern "((((Vrf[a-zA-Z0-9_-]+)|(default)|(mgmt)),)*((Vrf[a-zA-Z0-9_-]+)|(default)|(mgmt)))?";
}
description
"VRF name of the nexthop. This is for vrf leaking";
Expand Down
Loading