fix nxos_overlay_global idempotence (#28150)

* fix nxos_overlay_global idempotence

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* modify nxos_overlay_global unittest

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha 2017-08-14 16:09:53 +05:30 committed by GitHub
commit 60ce6438e3
3 changed files with 11 additions and 6 deletions

View file

@ -0,0 +1 @@
fabric forwarding anycast-gateway-mac 000B.000B.000B

View file

@ -42,9 +42,10 @@ class TestNxosOverlayGlobalModule(TestNxosModule):
self.mock_get_config.stop()
def load_fixtures(self, commands=None, device=''):
self.get_config.return_value = load_fixture('', 'nxos_overlay_global_config.cfg')
self.load_config.return_value = None
def test_nxos_overlay_global_up(self):
set_module_args(dict(anycast_gateway_mac="b.b.b"))
set_module_args(dict(anycast_gateway_mac="a.a.a"))
result = self.execute_module(changed=True)
self.assertEqual(result['commands'], ['fabric forwarding anycast-gateway-mac 000B.000B.000B'])
self.assertEqual(result['commands'], ['fabric forwarding anycast-gateway-mac 000A.000A.000A'])