nxos_bgp_neighbor_af feature idea disable-peer-as-check (#32665)

* nxos_bgp_neighbor_af feature idea disable-peer-as-check

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

* Add unit test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha 2017-11-13 14:48:31 +00:00 committed by GitHub
parent e4052c1261
commit f49555d494
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View file

@ -136,6 +136,12 @@ options:
or 'default'. or 'default'.
required: false required: false
default: null default: null
disable_peer_as_check:
description:
- Disable checking of peer AS-number while advertising
required: false
choices: ['true', 'false']
version_added: 2.5
filter_list_in: filter_list_in:
description: description:
- Valid values are a string defining a filter-list name, - Valid values are a string defining a filter-list name,
@ -294,6 +300,7 @@ BOOL_PARAMS = [
'allowas_in', 'allowas_in',
'as_override', 'as_override',
'default_originate', 'default_originate',
'disable_peer_as_check',
'next_hop_self', 'next_hop_self',
'next_hop_third_party', 'next_hop_third_party',
'route_reflector_client', 'route_reflector_client',
@ -312,6 +319,7 @@ PARAM_TO_COMMAND_KEYMAP = {
'as_override': 'as-override', 'as_override': 'as-override',
'default_originate': 'default-originate', 'default_originate': 'default-originate',
'default_originate_route_map': 'default-originate route-map', 'default_originate_route_map': 'default-originate route-map',
'disable_peer_as_check': 'disable-peer-as-check',
'filter_list_in': 'filter-list in', 'filter_list_in': 'filter-list in',
'filter_list_out': 'filter-list out', 'filter_list_out': 'filter-list out',
'max_prefix_limit': 'maximum-prefix', 'max_prefix_limit': 'maximum-prefix',
@ -637,6 +645,7 @@ def main():
as_override=dict(required=False, type='bool'), as_override=dict(required=False, type='bool'),
default_originate=dict(required=False, type='bool'), default_originate=dict(required=False, type='bool'),
default_originate_route_map=dict(required=False, type='str'), default_originate_route_map=dict(required=False, type='str'),
disable_peer_as_check=dict(required=False, type='bool'),
filter_list_in=dict(required=False, type='str'), filter_list_in=dict(required=False, type='str'),
filter_list_out=dict(required=False, type='str'), filter_list_out=dict(required=False, type='str'),
max_prefix_limit=dict(required=False, type='str'), max_prefix_limit=dict(required=False, type='str'),

View file

@ -97,3 +97,11 @@ class TestNxosBgpNeighborAfModule(TestNxosModule):
changed=True, sort=False, changed=True, sort=False,
commands=['router bgp 65535', 'neighbor 3.3.3.5', 'address-family ipv4 unicast', 'maximum-prefix 20 20'] commands=['router bgp 65535', 'neighbor 3.3.3.5', 'address-family ipv4 unicast', 'maximum-prefix 20 20']
) )
def test_nxos_bgp_neighbor_af_disable_peer_as_check(self):
set_module_args(dict(asn=65535, neighbor='3.3.3.5', afi='ipv4',
safi='unicast', disable_peer_as_check=True))
self.execute_module(
changed=True,
commands=['router bgp 65535', 'neighbor 3.3.3.5', 'address-family ipv4 unicast', 'disable-peer-as-check']
)