PaloAltoNetworks / PaloAltoNetworks/pan-os-python
Rename overridden address object issue
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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