-
Notifications
You must be signed in to change notification settings - Fork 50
Minitest: router_bgp fixes for n6k #618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,7 +55,8 @@ def setup_default | |
| end | ||
|
|
||
| def setup_vrf | ||
| @asnum = 99 | ||
| # nexus does not support multiple BGP instances; VRF AS must be same as default AS | ||
| @asnum = platform == :nexus ? 55 : 99 | ||
| @vrf = 'yamllll' | ||
| create_bgp_vrf(@asnum, @vrf) | ||
| end | ||
|
|
@@ -256,24 +257,18 @@ def test_asnum_dot | |
| end | ||
|
|
||
| def test_nsr | ||
| skip_if_UnsupportedCmdRef('bgp', 'nsr') | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like the nsr stuff was added by the XR team when they were still doing puppet. I see that NSR is supported for OSPFv2 on Nexus but there is no mention of BGP. Did you find documentation that states it's not supported for BGP or is it the absence of the CLI?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Neither. Our yaml excludes it so I added this check to obey the yaml. (sushirol exluded it from nexus when he added the attr) |
||
| nsr(setup_default) | ||
| nsr(setup_vrf) | ||
| end | ||
|
|
||
| def nsr(bgp) | ||
| if (platform == :nexus) || (platform == :ios_xr && !@vrf[/default/]) | ||
| if platform == :nexus | ||
| assert_nil(bgp.default_nsr, | ||
| 'default bgp nsr should be nil on Nexus') | ||
| assert_nil(bgp.nsr, | ||
| 'bgp nsr should be nil on Nexus') | ||
| else | ||
| assert_nil(bgp.default_nsr, | ||
| 'default bgp nsr should return nil on XR with non-default' \ | ||
| ' vrf') | ||
| assert_nil(bgp.nsr, | ||
| 'bgp nsr should return nil on XR with non-default vrf') | ||
| end | ||
| if platform == :ios_xr && !@vrf[/default/] | ||
| assert_nil(bgp.default_nsr, | ||
| 'default bgp nsr should return nil on XR with non-default' \ | ||
| ' vrf') | ||
| assert_nil(bgp.nsr, | ||
| 'bgp nsr should return nil on XR with non-default vrf') | ||
| assert_raises(Cisco::UnsupportedError) do | ||
| bgp.nsr = true | ||
| end | ||
|
|
@@ -1100,6 +1095,7 @@ def test_reconnect_interval_default | |
| assert_nil(bgp.reconnect_interval, | ||
| 'reconnect_interval should return nil on XR') | ||
| else | ||
| skip_if_UnsupportedCmdRef('bgp', 'reconnect_interval') | ||
| skip_incompat_version?('bgp', 'reconnect_interval') | ||
| assert_equal(bgp.default_reconnect_interval, bgp.reconnect_interval, | ||
| "reconnect_interval should be set to default value of '60'") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nice addition.