dellemc / dellemc.enterprise_sonic / 2.4.0 / module / sonic_bgp_as_paths Manage BGP autonomous system path (or as-path-list) and its parameters | "added in version" 1.0.0 of dellemc.enterprise_sonic" Authors: Kumaraguru Narayanan (@nkumaraguru) This plugin has a corresponding action plugin.dellemc.enterprise_sonic.sonic_bgp_as_paths (2.4.0) — module
Install with ansible-galaxy collection install dellemc.enterprise_sonic:==2.4.0
collections: - name: dellemc.enterprise_sonic version: 2.4.0
This module provides configuration management of BGP bgp_as_paths for devices running Enterprise SONiC Distribution by Dell Technologies.
# Using deleted # Before state: # ------------- # # show bgp as-path-access-list # AS path list test: # action: permit # members: 808.*,909.* - name: Delete BGP as path list dellemc.enterprise_sonic.sonic_bgp_as_paths: config: - name: test members: - 909.* permit: true state: deleted
# After state: # ------------ # # show bgp as-path-access-list # AS path list test: # action: permit # members: 808.* # Using deleted # Before state: # ------------- # # show bgp as-path-access-list # AS path list test: # action: permit # members: 808.*,909.* # AS path list test1: # action: deny # members: 608.*,709.* - name: Deletes BGP as-path list dellemc.enterprise_sonic.sonic_bgp_as_paths: config: - name: test members: state: deleted
# After state: # ------------ # # show bgp as-path-access-list # AS path list test1: # action: deny # members: 608.*,709.* # Using deleted # Before state: # ------------- # # show bgp as-path-access-list # AS path list test: # action: permit # members: 808.*,909.* - name: Deletes BGP as-path list dellemc.enterprise_sonic.sonic_bgp_as_paths: config: state: deleted
# After state: # ------------ # # show bgp as-path-access-list # (No bgp as-path-access-list configuration present) # Using merged # Before state: # ------------- # # show bgp as-path-access-list # (No bgp as-path-access-list configuration present) - name: Create a BGP as-path list dellemc.enterprise_sonic.sonic_bgp_as_paths: config: - name: test members: - 909.* permit: true state: merged
# After state: # ------------ # # show bgp as-path-access-list # AS path list test: # action: permit # members: 909.* # Using replaced # Before state: # ------------- # # show bgp as-path-access-list # AS path list test: # action: permit # members: 800.*,808.* # AS path list test1: # action: deny # members: 500.* - name: Replace device configuration of specified BGP as-path lists with provided configuration dellemc.enterprise_sonic.sonic_bgp_as_paths: config: - name: test members: - 900.* - 901.* permit: true - name: test1 - name: test2 members: - 100.* permit: true state: replaced
# After state: # ------------ # # show bgp as-path-access-list # AS path list test: # action: permit # members: 900.*,901.* # AS path list test2: # action: permit # members: 100.* # Using overridden # Before state: # ------------- # # show bgp as-path-access-list # AS path list test: # action: permit # members: 800.*,808.* # AS path list test1: # action: deny # members: 500.* - name: Override device configuration of all BGP as-path lists with provided configuration dellemc.enterprise_sonic.sonic_bgp_as_paths: config: - name: test members: - 900.* - 901.* permit: true state: overridden
state: choices: - merged - deleted - replaced - overridden default: merged description: - The state of the configuration after module completion. type: str config: description: A list of 'bgp_as_paths' configurations. elements: dict suboptions: members: description: - Members of this BGP as-path; regular expression string can be provided. elements: str required: false type: list name: description: - Name of as-path-list. required: true type: str permit: description: - Permits or denies this as-path. - Default value while adding a new as-path-list is C(False). required: false type: bool type: list
after: description: The resulting configuration model invocation. returned: when changed sample: 'The configuration returned is always in the same format of the parameters above. ' type: list before: description: The configuration prior to the model invocation. returned: always sample: 'The configuration returned is always in the same format of the parameters above. ' type: list commands: description: The set of commands pushed to the remote device. returned: always sample: - command 1 - command 2 - command 3 type: list