[Yang] Add Yang Model and tests for VNET_ROUTE_TUNNEL table - v2#21939
[Yang] Add Yang Model and tests for VNET_ROUTE_TUNNEL table - v2#21939qiluo-msft merged 24 commits intosonic-net:masterfrom
Conversation
…st cases (2) Fix sample data name constraints
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
d85d0a9 to
f7e11e2
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run Azure.sonic-buildimage |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
03/07 a0be257 passed all pipeline checks. |
| type yang:mac-address; | ||
| } | ||
|
|
||
| leaf vxlanid { |
There was a problem hiding this comment.
could you change this to vni. Upon checking sonic-swss I see that this should be called vni:
https://github.com/sonic-net/sonic-swss/blob/master/orchagent/vnetorch.cpp#L2733
@prsunny should we update the HLD https://github.com/sonic-net/SONiC/blob/gh-pages/doc/vxlan/Vxlan_hld.md to say that the tunnel route field is vni vs vxlandid?

There was a problem hiding this comment.
The vni in VNET_ROUTE_TUNNEL_TABLE overrides the base vni in VNET_TABLE for any traffic destined to the IP of prefix in VNET_ROUTE_TUNNEL_TABLE. It is also an optional field, so if none is provided the default VNET_TABLE vni is used for the traffic.
There was a problem hiding this comment.
agree Anish. good to update HLD
There was a problem hiding this comment.
Sounds good, will raise a PR!
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
|
||
| leaf prefix { | ||
| description "IPv4 prefix in CIDR format"; | ||
| type stypes:sonic-ip4-prefix; |
There was a problem hiding this comment.
Today, we do not use ipv6 prefixes so ipv4 only is fine, in the future if we need to support ipv6 prefix we will need to look into including ipv6 prefix stype here. Same comment on supporting ipv6 endpoints.
There was a problem hiding this comment.
Thank you Anish! I will make a note of this.
|
Checked the testbed failures due to infra issue, not related to code. |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Follow manager's suggestion mentioned during the VNET_ROUTE_TUNNEL PR review. See: sonic-net/sonic-buildimage#21939 (comment)
|
@miatttao , https://github.com/sonic-net/sonic-gnmi repo PR validation break after March 14, seems related with change in this PR, can you check? HEAD is now at 4607fd1 Merge pull request #54 from openconfig/fix-lists-no-sibling-check Copy sonic yangs specified in SONICYANG_IMPORTS, from SONICYANG_IMPORT_DIR../../tools/pyang/import_yang.py |
Hi @liuh-80, Thanks for pointing this out! Could you please clarify the exact commands used for your build? Are they run within the Also, if possible, could you share a link to the relevant pipeline or job? |
I have some clues now.
|


Why I did it
Added YANG model and tests for VNET_ROUTE_TUNNEL table to provide schema validation and testing capabilities for VNET route tunnel configurations.
Work item tracking
How I did it
How to verify it
Test Cases Validated
Yang Model Validated (assertionError can be ignored)
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md/VNET_ROUTE_TUNNEL
Note Anish's note
Today, we do not use ipv6 prefixes so ipv4 only is fine, in the future if we need to support ipv6 prefix we will need to look into including ipv6 prefix stype here. Same comment on supporting ipv6 endpoints.