-
Notifications
You must be signed in to change notification settings - Fork 50
Adding property - fabric forwarding mode anycast-gateway, to Cisco_Interface #215
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
Conversation
lib/cisco_node_utils/interface.rb
Outdated
| no_cmd = (state ? '' : 'no') | ||
| config_set('interface', | ||
| 'fabric_forwarding_anycast_gateway', @name, no_cmd) | ||
| expected_state = state |
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 line expected_state = state is unnecessary. Just use state.
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.
Done.
|
@smigopal, @glennmatthews is refactoring VxlanGlobal a bit which will result in a few changes to this code as well. He should have a PR out soon, but let's wait on that before we continue with this code review. |
|
See #220 |
lib/cisco_node_utils/interface.rb
Outdated
| end | ||
|
|
||
| def fabric_forwarding_anycast_gateway=(state) | ||
| begin |
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.
begin...end is unnecessary here.
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.
Done
| fail TypeError unless mac_addr.is_a?(String) | ||
|
|
||
| Feature.nv_overlay_evpn_enable unless Feature.nv_overlay_evpn_enabled? | ||
| Feature.nv_overlay_evpn_enable |
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.
Why this change?
Adding property - fabric forwarding mode anycast-gateway, to Cisco_Interface
Description:
Supporting property fabric forwarding mode anycast-gateway under Interface
Minitests:
rtpfe1@agent-lab11-ws:~/smigopal/feb_interface/cisco-network-node-utils$ ruby tests/test_interface.rb -v -n test_interface_fabric_forwarding_anycast_gateway -- 10.122.197.125 admin admin
Run options: -v -n test_interface_fabric_forwarding_anycast_gateway -- --seed 26306
Running:
Node under test:
conf : ["interface vlan11"]
conf : [" fabric forwarding anycast-gateway-mac 1223.3445.5668"]
conf : ["interface vlan11", "no fabric forwarding mode anycast-gateway"]
conf : ["interface vlan11", " fabric forwarding mode anycast-gateway"]
conf : ["interface vlan11", "no fabric forwarding mode anycast-gateway"]
conf : ["no fabric forwarding anycast-gateway-mac "]
conf : ["interface vlan11", " fabric forwarding mode anycast-gateway"]
conf : ["feature fabric forwarding"]
conf : ["interface vlan11", " fabric forwarding mode anycast-gateway"]
conf : ["interface ethernet1/1"]
conf : ["interface ethernet1/1", " fabric forwarding mode anycast-gateway"]
TestInterface#test_interface_fabric_forwarding_anycast_gateway = 10.29 s = .
Finished in 10.289229s, 0.0972 runs/s, 0.5831 assertions/s.
1 runs, 6 assertions, 0 failures, 0 errors, 0 skips
Coverage report generated for MiniTest to /home/rtpfe1/smigopal/feb_interface/cisco-network-node-utils/coverage. 669 / 1287 LOC (51.98%) covered.
rtpfe1@agent-lab11-ws:~/smigopal/feb_interface/cisco-network-node-utils$
Rubocop:
rtpfe1@agent-lab11-ws:~/smigopal/feb_interface/cisco-network-node-utils$ rubocop tests/test_interface.rb
warning: parser/current is loading parser/ruby22, which recognizes
warning: 2.2.3-compliant syntax, but you are running 2.2.1.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
Inspecting 1 file
.
1 file inspected, no offenses detected
rtpfe1@agent-lab11-ws:~/smigopal/feb_interface/cisco-network-node-utils$ rubocop lib/cisco_node_utils/interface.rb
warning: parser/current is loading parser/ruby22, which recognizes
warning: 2.2.3-compliant syntax, but you are running 2.2.1.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
Inspecting 1 file
.
1 file inspected, no offenses detected
rtpfe1@agent-lab11-ws:~/smigopal/feb_interface/cisco-network-node-utils$