Skip to content

Commit 979be40

Browse files
semantic-release-botbtorresgil
authored andcommitted
chore(release): 1.1.0
## [1.1.0](v1.0.2...v1.1.0) (2021-05-06) ### Features * Add `PanDevice.plugins()` ([fa1e4a6](fa1e4a6)), closes [#263](#263) * Add audit comment support for rules ([#323](#323)) ([350840f](350840f)), closes [#272](#272) [#209](#209) * Add Authentication profile/sequance ([#286](#286)) ([a66a01d](a66a01d)) * Add device group hierarchy support ([#321](#321)) ([ef90979](ef90979)) * Add DHCP relay support ([#319](#319)) ([fde1fe4](fde1fe4)), closes [#251](#251) [#259](#259) * Add hit count support (opstate) ([#310](#310)) ([ba1f4d5](ba1f4d5)), closes [#239](#239) * Add PanDevice.whoami() ([#318](#318)) ([f00d587](f00d587)), closes [#261](#261) * Add static route path monitoring ([7662496](7662496)), closes [#296](#296) * Add Zone 8.0+ support ([21f7026](21f7026)), closes [#158](#158) * Content version by refresh_system_info() ([00f982f](00f982f)) * Save versions during device refresh ([7d7a7f9](7d7a7f9)) ### Bug Fixes * Add missing tag colors ([d021922](d021922)), closes [#267](#267) * Anti-replay specified twice ([#274](#274)) ([aa30205](aa30205)) * AuthenticationSequence class name ([9632c93](9632c93)) * Correct `clock()` parsing ([48faab5](48faab5)), closes [#278](#278) * correct user-id tag_user / untag_user ([#299](#299)) ([1de69f8](1de69f8)), closes [#287](#287) * Correcting profile xpaths ([#333](#333)) ([c1ac9c4](c1ac9c4)), closes [#266](#266) * Fix placement of default PAN-OS version const ([6fd6ae3](6fd6ae3)) * Fix show_system_resource parsing ([83ab35d](83ab35d)), closes [#280](#280)
1 parent 720a78e commit 979be40

File tree

4 files changed

+217
-4
lines changed

4 files changed

+217
-4
lines changed

README.rst

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
2+
Palo Alto Networks PAN-OS SDK for Python
3+
========================================
4+
5+
The PAN-OS SDK for Python (pan-os-python) is a package to help interact with
6+
Palo Alto Networks devices (including physical and virtualized Next-generation
7+
Firewalls and Panorama). The pan-os-python SDK is object oriented and mimics
8+
the traditional interaction with the device via the GUI or CLI/API.
9+
10+
11+
* Documentation: http://pan-os-python.readthedocs.io
12+
13+
----
14+
15+
16+
.. image:: https://img.shields.io/pypi/v/pan-os-python.svg
17+
:target: https://pypi.python.org/pypi/pan-os-python
18+
:alt: Latest version released on PyPi
19+
20+
21+
.. image:: https://img.shields.io/badge/python-3.5%20%7C%203.6%20%7C%203.7%20%7C%203.8-blueviolet
22+
:target: https://pypi.python.org/pypi/pan-os-python
23+
:alt: Python versions
24+
25+
26+
.. image:: https://img.shields.io/pypi/l/pan-os-python
27+
:target: https://github.com/PaloAltoNetworks/pan-os-python/blob/develop/LICENSE
28+
:alt: License
29+
30+
31+
.. image:: https://img.shields.io/badge/docs-latest-brightgreen.svg
32+
:target: http://pan-os-python.readthedocs.io/en/latest/?badge=latest
33+
:alt: Documentation Status
34+
35+
36+
.. image:: https://img.shields.io/badge/chat%20on-GitHub%20Discussions-brightgreen
37+
:target: https://github.com/PaloAltoNetworks/pan-os-python/discussions
38+
:alt: Chat on GitHub Discussions
39+
40+
41+
42+
.. image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
43+
:target: https://github.com/semantic-release/semantic-release
44+
:alt: semantic-release
45+
46+
47+
.. image:: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg
48+
:target: https://conventionalcommits.org/
49+
:alt: Conventional Commits
50+
51+
52+
.. image:: https://img.shields.io/badge/Powered%20by-DepHell-red
53+
:target: https://github.com/dephell/dephell
54+
:alt: Powered by DepHell
55+
56+
57+
.. image:: https://img.shields.io/github/contributors/PaloAltoNetworks/pan-os-python
58+
:target: https://github.com/PaloAltoNetworks/pan-os-python/graphs/contributors/
59+
:alt: GitHub contributors
60+
61+
62+
----
63+
64+
Features
65+
--------
66+
67+
68+
* Object model of Firewall and Panorama configuration
69+
* Multiple connection methods including Panorama as a proxy
70+
* All operations natively vsys-aware
71+
* Support for high availability pairs and retry/recovery during node failure
72+
* Batch User-ID operations
73+
* Device API exception classification
74+
75+
Status
76+
------
77+
78+
Palo Alto Networks PAN-OS SDK for Python is considered stable. It is fully tested
79+
and used in many production environments. Semantic versioning is applied to indicate
80+
bug fixes, new features, and breaking changes in each version.
81+
82+
Install
83+
-------
84+
85+
Install using pip:
86+
87+
.. code-block:: shell
88+
89+
pip install pan-os-python
90+
91+
Upgrade to the latest version:
92+
93+
.. code-block:: shell
94+
95+
pip install --upgrade pan-os-python
96+
97+
If you have poetry installed, you can also add pan-os-python to your project:
98+
99+
.. code-block:: shell
100+
101+
poetry add pan-os-python
102+
103+
How to import
104+
-------------
105+
106+
To use pan-os-python in a project:
107+
108+
.. code-block:: python
109+
110+
import panos
111+
112+
You can also be more specific about which modules you want to import:
113+
114+
.. code-block:: python
115+
116+
from panos import firewall
117+
from panos import network
118+
119+
A few examples
120+
--------------
121+
122+
For configuration tasks, create a tree structure using the classes in
123+
each module. Nodes hierarchy must follow the model in the
124+
`Configuration Tree <http://pan-os-python.readthedocs.io/en/latest/configtree.html>`_.
125+
126+
The following examples assume the modules were imported as such:
127+
128+
.. code-block:: python
129+
130+
from panos import firewall
131+
from panos import network
132+
133+
Create an interface and commit:
134+
135+
.. code-block:: python
136+
137+
fw = firewall.Firewall("10.0.0.1", api_username="admin", api_password="admin")
138+
eth1 = network.EthernetInterface("ethernet1/1", mode="layer3")
139+
fw.add(eth1)
140+
eth1.create()
141+
fw.commit()
142+
143+
Operational commands leverage the 'op' method of the device:
144+
145+
.. code-block:: python
146+
147+
fw = firewall.Firewall("10.0.0.1", api_username="admin", api_password="admin")
148+
print fw.op("show system info")
149+
150+
Some operational commands have methods to refresh the variables in an object:
151+
152+
.. code-block:: python
153+
154+
# populates the version, serial, and model variables from the live device
155+
fw.refresh_system_info()
156+
157+
See more examples in the `Usage Guide <http://pan-os-python.readthedocs.io/en/latest/usage.html>`_.
158+
159+
Upgrade from pandevice
160+
----------------------
161+
162+
This ``pan-os-python`` package is the evolution of the older ``pandevice`` package. To
163+
upgrade from ``pandevice`` to ``pan-os-python``\ , follow these steps.
164+
165+
Step 1. Ensure you are using python3
166+
167+
`Python2 is end-of-life <https://www.python.org/doc/sunset-python-2/>`_ and not
168+
supported by ``pan-os-python``.
169+
170+
Step 2. Uninstall pandevice:
171+
172+
.. code-block:: shell
173+
174+
pip uninstall pandevice
175+
# or
176+
poetry remove pandevice
177+
178+
Step 3. Install pan-os-python:
179+
180+
.. code-block:: shell
181+
182+
pip3 install pan-os-python
183+
# or
184+
poetry add pan-os-python
185+
186+
Step 4. Change the import statements in your code from ``pandevice`` to ``panos``. For example:
187+
188+
.. code-block:: python
189+
190+
import pandevice
191+
from pandevice.firewall import Firewall
192+
193+
# would change to
194+
195+
import panos
196+
from panos.firewall import Firewall
197+
198+
Step 5. Test your script or application
199+
200+
There are no known breaking changes
201+
between ``pandevice v0.14.0`` and ``pan-os-python v1.0.0``\ , but it is a major
202+
upgrade so please verify everything works as expected.
203+
204+
Contributors
205+
------------
206+
207+
208+
* Brian Torres-Gil - `btorresgil <https://github.com/btorresgil>`_
209+
* Garfield Freeman - `shinmog <https://github.com/shinmog>`_
210+
* John Anderson - `lampwins <https://github.com/lampwins>`_
211+
* Aditya Sripal - `AdityaSripal <https://github.com/AdityaSripal>`_
212+
213+
Thank you to `Kevin Steves <https://github.com/kevinsteves>`_\ , creator of the `pan-python library <https://github.com/kevinsteves/pan-python>`_

panos/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
__author__ = "Palo Alto Networks"
2828
__email__ = "[email protected]"
29-
__version__ = "1.0.2"
29+
__version__ = "1.1.0"
3030

3131

3232
import logging

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pan-os-python"
3-
version = "1.0.2"
3+
version = "1.1.0"
44
description = "Framework for interacting with Palo Alto Networks devices via API"
55
authors = ["Palo Alto Networks <[email protected]>"]
66
license = "ISC"

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
setup(
2424
long_description=readme,
2525
name="pan-os-python",
26-
version="1.0.2",
26+
version="1.1.0",
2727
description="Framework for interacting with Palo Alto Networks devices via API",
2828
python_requires="!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,<4.0,>=2.7",
2929
project_urls={
@@ -48,7 +48,7 @@
4848
],
4949
packages=["examples", "panos"],
5050
package_dir={"": "."},
51-
package_data={"examples": ["*.rst"]},
51+
package_data={"examples": ["*.md"]},
5252
install_requires=["pan-python==0.*,>=0.16.0"],
5353
extras_require={
5454
"dev": [

0 commit comments

Comments
 (0)