diff --git a/tests/unit/modules/network/ios/test_ios_bgp_global.py b/tests/unit/modules/network/ios/test_ios_bgp_global.py index 67fd77e1d..7716bd021 100644 --- a/tests/unit/modules/network/ios/test_ios_bgp_global.py +++ b/tests/unit/modules/network/ios/test_ios_bgp_global.py @@ -790,3 +790,50 @@ def test_ios_bgp_global_action_states_no_default(self): commands = ["router bgp 6500", "no neighbor 192.0.2.2 shutdown"] result = self.execute_module(changed=True) self.assertEqual(sorted(result["commands"]), sorted(commands)) + + + def test_ios_bgp_global_asdot_parsed(self): + set_module_args( + dict( + running_config=dedent( + """\ + router bgp 65000 + bgp asnotation dot + bgp log-neighbor-changes + bgp graceful-shutdown all neighbors 50 local-preference 100 community 100 + neighbor 192.0.2.1 remote-as 500.65083 + neighbor 192.0.2.1 local-as 501.65083 no-prepend replace-as + """, + ), + state="parsed", + ), + ) + result = self.execute_module(changed=False) + parsed_list = { + "as_number": "65000", + "bgp": { + "asnotation": True, + "log_neighbor_changes": True, + "default": {'ipv4_unicast': True, 'route_target': {'filter': True}}, + "graceful_shutdown": { + "neighbors": {"time": 50}, + "local_preference": 100, + "community": "100" + } + }, + "neighbors": [ + { + "neighbor_address": "192.0.2.1", + "remote_as": "500.65083", + "local_as": { + "number": "501.65083", + "no_prepend": { + "replace_as": True, + "set": True + }, + "set": True + } + } + ] + } + self.assertEqual(parsed_list, result["parsed"])