Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bgp peer properties are flipped #583

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rgangam-PAN
Copy link

@rgangam-PAN rgangam-PAN commented Nov 19, 2024

Description

Reorder the peer-group properties.

Motivation and Context

We see that the order of BGP peer-group properties is important, otherwise the FW/Panorama will think there is a config change. By fixing the order same as how PANOS expects, there will be no additional commit required, if there is no change in BGP peer-group.

an_cfg_engine_execute_request(): set: Before str_len 5080, str: <virtual-router>
  <entry name="Main-Router">
    ...................
        <peer-group>
          <entry name="Prisma">
            <type>
              <ebgp>
                <remove-private-as>yes</remove-private-as>
                <import-nexthop>original</import-nexthop>
                <export-nexthop>resolve</export-nexthop>
              </ebgp>
            </type>
            <peer>

pan_cfg_engine_execute_request(): set: After str_len 5376, str: <virtual-router>
  <entry name="Main-Router">
      ............................
        <peer-group>
          <entry name="Prisma">
            <type>
              <ebgp>
                <export-nexthop>resolve</export-nexthop>
                <import-nexthop>original</import-nexthop>
                <remove-private-as>yes</remove-private-as>
              </ebgp>
            </type>
            <peer>

How Has This Been Tested?

  1. Configure Peergroup
    BgpPeerGroup(name="pg-test", enable=True, aggregated_confed_as_path=True, soft_reset_with_stored_info=False, type="ebgp", remove_private_as=True, import_nexthop="original", export_nexthop="resolve")
  2. Commit the changes
  3. Try to change any other config like adding a static route
  4. Without fix, PANOS thinks there is a change in config due to incorrect order of parameters.
    With fix, We dont see any such config change request

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [x ] I have updated the documentation accordingly.
  • [x ] I have read the CONTRIBUTING document.
  • [x ] I have added tests to cover my changes if appropriate.
  • [ x] All new and existing tests passed.

Copy link

@H4irBear H4irBear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes ebgp parameter reordering leading to unintended xml changes when performing commit. Tested and working.

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