Skip to content

Commit

Permalink
[sonic-cfggen]: Add bgp asn for yang validation (sonic-net#9640)
Browse files Browse the repository at this point in the history
Why I did it
Config db schema generated by minigraph can’t pass yang validation, bgp_asn must not be None.

How I did it
Update sampe-voq-graph.xml to add bgp_asn.

How to verify it
Build sonic-config-engine.
Run command 'sonic-cfggen -m tests/sample-voq-graph.xml -p tests/voq-sample-port-config.ini --print-data', and check bgp_asn.

Signed-off-by: Gang Lv ganglv@microsoft.com
  • Loading branch information
ganglyu authored Jan 12, 2022
1 parent 1564bdd commit c11ab02
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/sonic-config-engine/tests/sample-voq-graph.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<DeviceMiniGraph xmlns="Microsoft.Search.Autopilot.Evolution" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<CpgDec>
<PeeringSessions/>
<Routers xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
<Routers xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
<a:BGPRouterDeclaration>
<a:ASN>65100</a:ASN>
<a:Hostname>linecard-1</a:Hostname>
<a:Peers/>
<a:RouteMaps/>
</a:BGPRouterDeclaration>
</Routers>
</CpgDec>
<DpgDec>
<DeviceDataPlaneInfo>
Expand Down

0 comments on commit c11ab02

Please sign in to comment.