Skip to content

Conversation

Ruchip16
Copy link
Member

@Ruchip16 Ruchip16 commented Jun 21, 2025

SUMMARY

fixes the issue customer is facing while deleting neighbors in bgp_global, when the customer provides just one neighbor (e.g., 192.168.253.4), the module deletes all neighbors not present in want, even though the user intends to delete just that one.

The proposed changes in this PR, only delete explicitly defined neighbors in the want dictionary and do not infer deletion of other neighbors.

Fixes ANA-733

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

iosxr_bgp_global

ADDITIONAL INFORMATION

Problem user facing when using state deleted:

- name: Delete only one BGP neighbor
  cisco.iosxr.iosxr_bgp_global:
    config:
      as_number: 65137
      neighbors:
        - neighbor_address: 192.168.253.4
    state: deleted

user configuration on device:

router bgp 65137
  neighbor 192.168.253.1
  neighbor 192.168.253.2
  neighbor 192.168.253.3
  neighbor 192.168.253.4

Expected outcome (Now the output is this after the changes done in PR):

router bgp 65137
no neighbor 192.168.253.4

Actual outcome (before the changes made in PR):

router bgp 65137
no neighbor 192.168.253.1
no neighbor 192.168.253.2
no neighbor 192.168.253.3
no neighbor 192.168.253.4

@Ruchip16
Copy link
Member Author

pre-commit.ci autofix

@KB-perByte KB-perByte self-requested a review June 25, 2025 09:14
@KB-perByte
Copy link
Contributor

Hold merge, as we disussed not to include granular deletion for this module at this stage.

@KB-perByte KB-perByte marked this pull request as draft June 25, 2025 09:14
@rohitthakur2590 rohitthakur2590 changed the title fix deleted state for bgp_global [DNM]fix deleted state for bgp_global Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants