Unable to remove a single BGP neighbor [cisco.nxos]

Hi! I’ve recently detailed my problem with cisco.nxos.nxos_bgp_global module and removing a neighbor from a VRF that’s under a specific BGP.

Long story short, it fails with an error:

VRF mmsc_radius has address-family configurations. Please use the nxos_bgp_af module to remove those first.

You can read the technical details here: Unable to remove a single BGP neighbor · Issue #1017 · ansible-collections/cisco.nxos

I would love to help as much as I can. (Even though my contribution history is empty on this account, I do contribute to OS projects.) However, I’d like your input since looking at the error, code and documentation, it looks like it might be intentional? Could you help me out here and point me in the correct direction and maybe the steps I can take to help you solve this issue?

Thanks for all the great work on this module. We really appreciate it.

I perhaps do not understand the need for the self-fails that the nxos_bgp_global module raises. Is that a safety measure so that user doesn’t remove something by accident? Because by removing them, I got the desired outcome. :slight_smile: Here are the mentioned self._module.fail_json() :

cisco.nxos/plugins/module_utils/network/nxos/config/bgp_global/bgp_global.py at main · ansible-collections/cisco.nxos

cisco.nxos/plugins/module_utils/network/nxos/config/bgp_global/bgp_global.py at main · ansible-collections/cisco.nxos

@nilashishc His question related to a PR you submitted:

We are trying to figure out if there might be a bug or if the current behavior here is intended.