Added vni field in VRF Yang for VxLAN L3 VNI Support #13456 (#13735)

Why I did it
Added vni field in VRF Yang for VxLAN L3 VNI Support.

The VRF table schema as per EVPN HLD is below
https://github.com/sonic-net/SONiC/blob/master/doc/vxlan/EVPN/EVPN_VXLAN_HLD.md

Addresses Issue #13456
This commit is contained in:
Tapash Das 2023-02-23 12:19:16 +05:30 committed by GitHub
parent ee1b6b3751
commit 95ce31971c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 41 additions and 1 deletions

View File

@ -1883,6 +1883,7 @@ table allow to change properties of a virtual router. Attributes:
packets with IP options
- 'l3_mc_action' contains packet action. Defines the action for
unknown L3 multicast packets
- 'vni' contains L3 VNI value. VNI associated Virtual router instance.
The packet action could be:
@ -1904,7 +1905,8 @@ The packet action could be:
'src_mac': '02:04:05:06:07:08',
'ttl_action': 'copy',
'ip_opt_action': 'deny',
'l3_mc_action': 'drop'
'l3_mc_action': 'drop',
'vni': '100'
}
```

View File

@ -2,6 +2,7 @@
"SAMPLE_CONFIG_DB_JSON": {
"VRF": {
"Vrf_blue": {
"vni" : "100"
}
},
"DHCP_SERVER": {

View File

@ -8,5 +8,12 @@
},
"VRF_TEST_WITH_FALLBACK": {
"desc": "Configure VRF with fallback in VRF table."
},
"VRF_TEST_WITH_VNI": {
"desc": "Configure VRF with VNI in VRF table."
},
"VRF_TEST_WITH_VNI_OOR": {
"desc": "Configure VRF with out of range VNI in VRF table.",
"eStrKey": "Range"
}
}

View File

@ -28,5 +28,27 @@
}]
}
}
},
"VRF_TEST_WITH_VNI": {
"sonic-vrf:sonic-vrf": {
"sonic-vrf:VRF": {
"VRF_LIST": [{
"name": "Vrf_blue",
"vni": "100"
}]
}
}
},
"VRF_TEST_WITH_VNI_OOR": {
"sonic-vrf:sonic-vrf": {
"sonic-vrf:VRF": {
"VRF_LIST": [{
"name": "Vrf_blue",
"vni": "16777216"
}]
}
}
}
}

View File

@ -43,6 +43,14 @@ module sonic-vrf {
"Enable/disable fallback feature which is useful for specified VRF user to access internet through global/main route.";
}
leaf vni {
type uint32 {
range "0..16777215";
}
default 0;
description
"VNI mapped to VRF";
}
} /* end of list VRF_LISt */
} /* end of container VRf */
} /* end of container sonic-vrf */