forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[minigraph][dualtor] Support parsing
soc_ip
out of dpg (sonic-net#1…
…1207) Why I did it To further support parse out soc_ipv4 and soc_ipv6 out of Dpg: <DeviceDataPlaneInfo> <IPSecTunnels /> <LoopbackIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"> <a:LoopbackIPInterface> <ElementType>LoopbackInterface</ElementType> <Name>HostIP</Name> <AttachTo>Loopback0</AttachTo> <a:Prefix xmlns:b="Microsoft.Search.Autopilot.NetMux"> <b:IPPrefix>10.10.10.2/32</b:IPPrefix> </a:Prefix> <a:PrefixStr>10.10.10.2/32</a:PrefixStr> </a:LoopbackIPInterface> <a:LoopbackIPInterface> <ElementType>LoopbackInterface</ElementType> <Name>HostIP1</Name> <AttachTo>Loopback0</AttachTo> <a:Prefix xmlns:b="Microsoft.Search.Autopilot.NetMux"> <b:IPPrefix>fe80::0002/128</b:IPPrefix> </a:Prefix> <a:PrefixStr>fe80::0002/128</a:PrefixStr> </a:LoopbackIPInterface> <a:LoopbackIPInterface> <ElementType>LoopbackInterface</ElementType> <Name>SoCHostIP0</Name> <AttachTo>server2SOC</AttachTo> <a:Prefix xmlns:b="Microsoft.Search.Autopilot.NetMux"> <b:IPPrefix>10.10.10.3/32</b:IPPrefix> </a:Prefix> <a:PrefixStr>10.10.10.3/32</a:PrefixStr> </a:LoopbackIPInterface> <a:LoopbackIPInterface> <ElementType>LoopbackInterface</ElementType> <Name>SoCHostIP1</Name> <AttachTo>server2SOC</AttachTo> <a:Prefix xmlns:b="Microsoft.Search.Autopilot.NetMux"> <b:IPPrefix>fe80::0003/128</b:IPPrefix> </a:Prefix> <a:PrefixStr>fe80::0003/128</a:PrefixStr> </a:LoopbackIPInterface> </LoopbackIPInterfaces> </DeviceDataPlaneInfo> Signed-off-by: Longxiang Lyu [email protected] How I did it For servers loopback definitions in Dpg, if they contain LoopbackIPInterface with tags AttachTo, which has value of format like <server_name>SOC, the address will be regarded as a SoC IP, and sonic-cfggen now will treat the port connected to the server as active-active if the redundancy_type is either Libra or Mixed. How to verify it Pass the unittest. Signed-off-by: Longxiang Lyu <[email protected]>
- Loading branch information
Showing
3 changed files
with
143 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters