PaloAltoNetworks / PaloAltoNetworks/pan-os-python

Rename overridden address object issue

Open
#225 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
400
Forks
199
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

The issue occurs when using the rename method to rename an address object that is overridden from a parent device group object (it has the same name). Any reference to the parent DG object in a parent DG address groups gets renamed, causing the config to fail validation.

Expected behavior

The parent DG address group references should not be renamed, they should remain unchanged.

Steps to reproduce

pan_device = Panorama('10.10.10.10', 'username', 'password')
pan_device.add(DeviceGroup('TestDG1')).refresh()
addr_obj = pan_device.children[0].find('server15', AddressObject)
addr_obj.rename(f'TEST123_{addr_obj.name}')

Screenshots

For some reason this form isn't letting me upload screenshots :(
I'll try and upload screenshots after submitting this form

Your Environment

  • Version used:
  • python 3.8.1
  • Windows 10
  • Latest version of pandevice and pan-python

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the AddressObject rename method and reproduce the issue using the supplied Panorama, DeviceGroup, and address-object example. Trace how references in parent device-group address groups are updated; done means references to the parent object remain unchanged and the resulting configuration passes validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.