Skip to content

Commit

Permalink
chore(release): 1.1.0
Browse files Browse the repository at this point in the history
## [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)
  • Loading branch information
semantic-release-bot committed May 6, 2021
1 parent c1ac9c4 commit 01b1ab3
Show file tree
Hide file tree
Showing 4 changed files with 217 additions and 4 deletions.
213 changes: 213 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@

Palo Alto Networks PAN-OS SDK for Python
========================================

The PAN-OS SDK for Python (pan-os-python) is a package to help interact with
Palo Alto Networks devices (including physical and virtualized Next-generation
Firewalls and Panorama). The pan-os-python SDK is object oriented and mimics
the traditional interaction with the device via the GUI or CLI/API.


* Documentation: http://pan-os-python.readthedocs.io

----


.. image:: https://img.shields.io/pypi/v/pan-os-python.svg
:target: https://pypi.python.org/pypi/pan-os-python
:alt: Latest version released on PyPi


.. image:: https://img.shields.io/badge/python-3.5%20%7C%203.6%20%7C%203.7%20%7C%203.8-blueviolet
:target: https://pypi.python.org/pypi/pan-os-python
:alt: Python versions


.. image:: https://img.shields.io/pypi/l/pan-os-python
:target: https://github.com/PaloAltoNetworks/pan-os-python/blob/develop/LICENSE
:alt: License


.. image:: https://img.shields.io/badge/docs-latest-brightgreen.svg
:target: http://pan-os-python.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status


.. image:: https://img.shields.io/badge/chat%20on-GitHub%20Discussions-brightgreen
:target: https://github.com/PaloAltoNetworks/pan-os-python/discussions
:alt: Chat on GitHub Discussions



.. image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
:target: https://github.com/semantic-release/semantic-release
:alt: semantic-release


.. image:: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg
:target: https://conventionalcommits.org/
:alt: Conventional Commits


.. image:: https://img.shields.io/badge/Powered%20by-DepHell-red
:target: https://github.com/dephell/dephell
:alt: Powered by DepHell


.. image:: https://img.shields.io/github/contributors/PaloAltoNetworks/pan-os-python
:target: https://github.com/PaloAltoNetworks/pan-os-python/graphs/contributors/
:alt: GitHub contributors


----

Features
--------


* Object model of Firewall and Panorama configuration
* Multiple connection methods including Panorama as a proxy
* All operations natively vsys-aware
* Support for high availability pairs and retry/recovery during node failure
* Batch User-ID operations
* Device API exception classification

Status
------

Palo Alto Networks PAN-OS SDK for Python is considered stable. It is fully tested
and used in many production environments. Semantic versioning is applied to indicate
bug fixes, new features, and breaking changes in each version.

Install
-------

Install using pip:

.. code-block:: shell
pip install pan-os-python
Upgrade to the latest version:

.. code-block:: shell
pip install --upgrade pan-os-python
If you have poetry installed, you can also add pan-os-python to your project:

.. code-block:: shell
poetry add pan-os-python
How to import
-------------

To use pan-os-python in a project:

.. code-block:: python
import panos
You can also be more specific about which modules you want to import:

.. code-block:: python
from panos import firewall
from panos import network
A few examples
--------------

For configuration tasks, create a tree structure using the classes in
each module. Nodes hierarchy must follow the model in the
`Configuration Tree <http://pan-os-python.readthedocs.io/en/latest/configtree.html>`_.

The following examples assume the modules were imported as such:

.. code-block:: python
from panos import firewall
from panos import network
Create an interface and commit:

.. code-block:: python
fw = firewall.Firewall("10.0.0.1", api_username="admin", api_password="admin")
eth1 = network.EthernetInterface("ethernet1/1", mode="layer3")
fw.add(eth1)
eth1.create()
fw.commit()
Operational commands leverage the 'op' method of the device:

.. code-block:: python
fw = firewall.Firewall("10.0.0.1", api_username="admin", api_password="admin")
print fw.op("show system info")
Some operational commands have methods to refresh the variables in an object:

.. code-block:: python
# populates the version, serial, and model variables from the live device
fw.refresh_system_info()
See more examples in the `Usage Guide <http://pan-os-python.readthedocs.io/en/latest/usage.html>`_.

Upgrade from pandevice
----------------------

This ``pan-os-python`` package is the evolution of the older ``pandevice`` package. To
upgrade from ``pandevice`` to ``pan-os-python``\ , follow these steps.

Step 1. Ensure you are using python3

`Python2 is end-of-life <https://www.python.org/doc/sunset-python-2/>`_ and not
supported by ``pan-os-python``.

Step 2. Uninstall pandevice:

.. code-block:: shell
pip uninstall pandevice
# or
poetry remove pandevice
Step 3. Install pan-os-python:

.. code-block:: shell
pip3 install pan-os-python
# or
poetry add pan-os-python
Step 4. Change the import statements in your code from ``pandevice`` to ``panos``. For example:

.. code-block:: python
import pandevice
from pandevice.firewall import Firewall
# would change to
import panos
from panos.firewall import Firewall
Step 5. Test your script or application

There are no known breaking changes
between ``pandevice v0.14.0`` and ``pan-os-python v1.0.0``\ , but it is a major
upgrade so please verify everything works as expected.

Contributors
------------


* Brian Torres-Gil - `btorresgil <https://github.com/btorresgil>`_
* Garfield Freeman - `shinmog <https://github.com/shinmog>`_
* John Anderson - `lampwins <https://github.com/lampwins>`_
* Aditya Sripal - `AdityaSripal <https://github.com/AdityaSripal>`_

Thank you to `Kevin Steves <https://github.com/kevinsteves>`_\ , creator of the `pan-python library <https://github.com/kevinsteves/pan-python>`_
2 changes: 1 addition & 1 deletion panos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

__author__ = "Palo Alto Networks"
__email__ = "[email protected]"
__version__ = "1.0.2"
__version__ = "1.1.0"


import logging
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pan-os-python"
version = "1.0.2"
version = "1.1.0"
description = "Framework for interacting with Palo Alto Networks devices via API"
authors = ["Palo Alto Networks <[email protected]>"]
license = "ISC"
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
setup(
long_description=readme,
name="pan-os-python",
version="1.0.2",
version="1.1.0",
description="Framework for interacting with Palo Alto Networks devices via API",
python_requires="!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,<4.0,>=2.7",
project_urls={
Expand All @@ -48,7 +48,7 @@
],
packages=["examples", "panos"],
package_dir={"": "."},
package_data={"examples": ["*.rst"]},
package_data={"examples": ["*.md"]},
install_requires=["pan-python==0.*,>=0.16.0"],
extras_require={
"dev": [
Expand Down

0 comments on commit 01b1ab3

Please sign in to comment.