-
Notifications
You must be signed in to change notification settings - Fork 192
Feat: Additional ARE Bindings #611
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
Closed
Closed
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c6dfbf6
fix: Added check for commit_response text parsing (#557)
horiagunica 66db30e
fix: bgp peer properties no longer flipped (#583)
rgangam-PAN cecf2df
chore: Update bgp object docstring (#596)
adambaumeister 97e62a7
fix: logical routers attachable to vsys objects #605
adambaumeister 641489d
fix: Force commit now correctly performs a 'commit force' operation
pavelrn 00d6e23
chore: Add AGENTS.md file
btorresgil 7286b09
feat: Network interfaces now support ARE #610
adambaumeister 6d8fb9a
chore: Linting
adambaumeister 84df42c
fix: Improve VRF handling to make simpler
adambaumeister 8c0f1b7
fix: Support moves between LR
adambaumeister cb055cf
chore: fix linting and tests
adambaumeister 24c8d08
chore: Fix annotations
adambaumeister 61c84fc
chore: more minor fixes
adambaumeister b364e1f
fix: LR Is created by update function
adambaumeister File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # AGENTS.md | ||
|
|
||
| This file provides guidance to AI agents when working with code in this | ||
| repository. | ||
|
|
||
| ## Commands | ||
|
|
||
| Dependencies are managed with Poetry. Prefix commands with `poetry run` (or | ||
| activate the venv). | ||
|
|
||
| - `poetry install` — set up the dev environment | ||
| - `poetry run make test` — run pytest | ||
| - `poetry run pytest tests/test_firewall.py::TestClass::test_name` — run a | ||
| single test | ||
| - `poetry run make lint` — flake8 over `panos` and `tests` | ||
| - `poetry run make check-format` / `make format` — check / apply black + isort | ||
| - `poetry run make bandit` — security scan | ||
| - `poetry run make test-all` — run the full tox matrix | ||
|
|
||
| ## Architecture | ||
|
|
||
| `pan-os-python` is an object-oriented SDK that mirrors the PAN-OS configuration | ||
| tree. Users build a tree of objects rooted at a device, then call CRUD methods | ||
| that translate to XML API calls against a firewall or Panorama. | ||
|
|
||
| Core abstractions live in `panos/base.py`: | ||
|
|
||
| - `PanObject` — base node. Every config object has an `XPATH`, optional `SUFFIX` | ||
| (`ENTRY`/`MEMBER`), a `ROOT` (DEVICE / VSYS / PANORAMA / …), and a | ||
| `CHILDTYPES` tuple declaring which classes may be added under it. `add()` / | ||
| `remove()` / `find()` build and traverse the tree; `xpath()` is composed by | ||
| walking parents up to the `PanDevice` at the root. | ||
| - `VersionedPanObject` — subclass used for almost all real config objects. | ||
| Parameters are declared via `_setup()` using `VersionedParamPath` entries, | ||
| each with per-PAN-OS-version XML paths. The object renders different XML | ||
| depending on the connected device's version. | ||
| - `VsysOperations` — mixin behavior for objects that live inside a vsys and need | ||
| import/export handling. | ||
| - `PanDevice` — base for `firewall.Firewall` and `panorama.Panorama`. Owns the | ||
| `pan.xapi` connection, version detection, HA state, commit/op helpers, and is | ||
| always the root of the tree. | ||
|
|
||
| Module layout follows the PAN-OS config hierarchy: `device.py`, `network.py`, | ||
| `objects.py`, `policies.py`, `ha.py`, `panorama.py`, `predefined.py`, | ||
| `plugins.py`, `userid.py`, `updater.py`, `errors.py`. Adding a new config node | ||
| usually means subclassing `VersionedPanObject` (or `VsysOperations`) in the | ||
| right module, defining `_setup()`, and adding it to the parent's `CHILDTYPES`. | ||
|
|
||
| Tests under `tests/` are mostly offline unit tests that mock `pan.xapi`; | ||
| `tests/live/` and `test_integration.py` hit real devices and aren't run by | ||
| default. | ||
|
|
||
| ## Releases & commit style | ||
|
|
||
| This repo uses semantic-release driven by Conventional Commits (`feat:`, `fix:`, | ||
| `chore:`, …). Commit messages determine version bumps and changelog entries — | ||
| keep the prefix correct. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.