[sonic-cfggen]: Update unit test to remove asn 0 (#10454)
Why I did it ASN range is from 1 to 4294967295, need to remove invalid ASN. How I did it Update unit test and replace ASN 0. How to verify it Run unit test for sonic-config-engine. Signed-off-by: Gang Lv ganglv@microsoft.com
This commit is contained in:
parent
ce26c04a09
commit
b152f2a0fc
@ -90,7 +90,7 @@
|
|||||||
</PeeringSessions>
|
</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:BGPRouterDeclaration>
|
||||||
<a:ASN>0</a:ASN>
|
<a:ASN>1</a:ASN>
|
||||||
<a:BgpGroups/>
|
<a:BgpGroups/>
|
||||||
<a:Hostname>BGPMonitor</a:Hostname>
|
<a:Hostname>BGPMonitor</a:Hostname>
|
||||||
<a:Peers>
|
<a:Peers>
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
</PeeringSessions>
|
</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:BGPRouterDeclaration>
|
||||||
<a:ASN>0</a:ASN>
|
<a:ASN>1</a:ASN>
|
||||||
<a:BgpGroups/>
|
<a:BgpGroups/>
|
||||||
<a:Hostname>BGPMonitor</a:Hostname>
|
<a:Hostname>BGPMonitor</a:Hostname>
|
||||||
<a:Peers>
|
<a:Peers>
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
</PeeringSessions>
|
</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:BGPRouterDeclaration>
|
||||||
<a:ASN>0</a:ASN>
|
<a:ASN>1</a:ASN>
|
||||||
<a:BgpGroups/>
|
<a:BgpGroups/>
|
||||||
<a:Hostname>BGPMonitor</a:Hostname>
|
<a:Hostname>BGPMonitor</a:Hostname>
|
||||||
<a:Peers>
|
<a:Peers>
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
</PeeringSessions>
|
</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:BGPRouterDeclaration>
|
||||||
<a:ASN>0</a:ASN>
|
<a:ASN>1</a:ASN>
|
||||||
<a:BgpGroups/>
|
<a:BgpGroups/>
|
||||||
<a:Hostname>BGPMonitor</a:Hostname>
|
<a:Hostname>BGPMonitor</a:Hostname>
|
||||||
<a:Peers>
|
<a:Peers>
|
||||||
|
@ -90,7 +90,7 @@
|
|||||||
</PeeringSessions>
|
</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:BGPRouterDeclaration>
|
||||||
<a:ASN>0</a:ASN>
|
<a:ASN>1</a:ASN>
|
||||||
<a:BgpGroups/>
|
<a:BgpGroups/>
|
||||||
<a:Hostname>BGPMonitor</a:Hostname>
|
<a:Hostname>BGPMonitor</a:Hostname>
|
||||||
<a:Peers>
|
<a:Peers>
|
||||||
|
@ -685,7 +685,7 @@ class TestCfgGen(TestCase):
|
|||||||
output = self.run_script(argument)
|
output = self.run_script(argument)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
utils.to_dict(output.strip()),
|
utils.to_dict(output.strip()),
|
||||||
utils.to_dict("{'10.20.30.40': {'rrclient': 0, 'name': 'BGPMonitor', 'local_addr': '10.1.0.32', 'nhopself': 0, 'holdtime': '10', 'asn': '0', 'keepalive': '3'}}")
|
utils.to_dict("{'10.20.30.40': {'rrclient': 0, 'name': 'BGPMonitor', 'local_addr': '10.1.0.32', 'nhopself': 0, 'holdtime': '10', 'asn': '1', 'keepalive': '3'}}")
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_minigraph_bgp_voq_chassis_peer(self):
|
def test_minigraph_bgp_voq_chassis_peer(self):
|
||||||
|
Reference in New Issue
Block a user