Skip to content

Conversation

@smigopal
Copy link
Contributor

@smigopal smigopal commented Feb 8, 2016

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:

  • name - agent-lab11-nx
  • type - N9K-NXOSV
  • image - bootflash:///nxos.7.0.3.I2.1.bin

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$

@mikewiebe mikewiebe self-assigned this Feb 9, 2016
no_cmd = (state ? '' : 'no')
config_set('interface',
'fabric_forwarding_anycast_gateway', @name, no_cmd)
expected_state = state
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@mikewiebe
Copy link
Contributor

@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.

@glennmatthews
Copy link
Member

See #220

end

def fabric_forwarding_anycast_gateway=(state)
begin
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

mikewiebe added a commit that referenced this pull request Feb 11, 2016
Adding property - fabric forwarding mode anycast-gateway, to Cisco_Interface
@mikewiebe mikewiebe merged commit 710ed7a into cisco:release_1.2.0 Feb 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants