Skip to content

Commit

Permalink
Merge branch 'main' into add_evpn_evi_plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
PadminiSivaraj authored Nov 8, 2023
2 parents 1fee16a + 40f17ef commit 75897fa
Show file tree
Hide file tree
Showing 5 changed files with 327 additions and 54 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ jobs:
name: Ansible Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ansible-lint
uses: ansible/ansible-lint@main
3 changes: 3 additions & 0 deletions changelogs/fragments/bgp_global_evpn_fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- ios_bgp_global - remote_as not mendatory for neighbors.
3 changes: 3 additions & 0 deletions changelogs/fragments/bgp_global_evpn_fix_2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- ios_bgp_global - Explicitly add neighbor address to every parser.
11 changes: 9 additions & 2 deletions plugins/module_utils/network/ios/facts/bgp_global/bgp_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ def populate_facts(self, connection, ansible_facts, data=None):
data = self.get_bgp_global_data(connection)

# parse native config using the Bgp_global template
bgp_global_parser = Bgp_globalTemplate(lines=data.splitlines(), module=self._module)
bgp_global_parser = Bgp_globalTemplate(
lines=data.splitlines(),
module=self._module,
)
objs = bgp_global_parser.parse()
neighbor_list = objs.get("neighbors", {})
if neighbor_list:
Expand All @@ -64,7 +67,11 @@ def populate_facts(self, connection, ansible_facts, data=None):

ansible_facts["ansible_network_resources"].pop("bgp_global", None)
params = utils.remove_empties(
bgp_global_parser.validate_config(self.argument_spec, {"config": obj}, redact=True),
bgp_global_parser.validate_config(
self.argument_spec,
{"config": obj},
redact=True,
),
)

facts["bgp_global"] = params.get("config", {})
Expand Down
Loading

0 comments on commit 75897fa

Please sign in to comment.