diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8bca48ff..1beff75b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,15 +20,15 @@ jobs: os: [ubuntu-latest, macos-latest] python-version: ["3.8", "3.9"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5 with: python-version: ${{ matrix.python-version }} - name: Install Poetry - uses: Gr1N/setup-poetry@v8 + uses: Gr1N/setup-poetry@15821dc8a61bc630db542ae4baf6a7c19a994844 # v8 with: poetry-version: 1.7.1 @@ -37,7 +37,7 @@ jobs: run: echo "dir=$(poetry config cache-dir)" >> $GITHUB_OUTPUT - name: Cache poetry dependencies - uses: actions/cache@v2 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 with: path: ${{ steps.poetry-cache.outputs.dir }} key: @@ -56,15 +56,15 @@ jobs: name: Check Code Format runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5 with: python-version: 3.8 - name: Install Poetry - uses: Gr1N/setup-poetry@v8 + uses: Gr1N/setup-poetry@15821dc8a61bc630db542ae4baf6a7c19a994844 # v8 with: poetry-version: 1.7.1 @@ -73,7 +73,7 @@ jobs: run: echo "dir=$(poetry config cache-dir)" >> $GITHUB_OUTPUT - name: Cache poetry dependencies - uses: actions/cache@v1 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 with: path: ${{ steps.poetry-cache.outputs.dir }} key: ${{ runner.os }}-poetry-3.8-${{ hashFiles('**/poetry.lock') }} @@ -93,15 +93,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@0f07f7f756721ebd886c2462646a35f78a8bc4de # v1 with: python-version: 3.8 - name: Install Poetry - uses: Gr1N/setup-poetry@v8 + uses: Gr1N/setup-poetry@15821dc8a61bc630db542ae4baf6a7c19a994844 # v8 with: poetry-version: 1.7.1 @@ -110,7 +110,7 @@ jobs: run: echo "dir=$(poetry config cache-dir)" >> $GITHUB_OUTPUT - name: Cache poetry dependencies - uses: actions/cache@v1 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 with: path: ${{ steps.poetry-cache.outputs.dir }} key: ${{ runner.os }}-poetry-3.8-${{ hashFiles('**/poetry.lock') }} @@ -122,7 +122,7 @@ jobs: - name: Create release and publish id: release - uses: cycjimmy/semantic-release-action@v2 + uses: cycjimmy/semantic-release-action@5982a02995853159735cb838992248c4f0f16166 # v2 with: semantic_version: 17.1.1 extra_plugins: | diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 000526e4..d47e8faa 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,6 +10,8 @@ build: os: ubuntu-22.04 tools: python: "3.7" + apt_packages: + - graphviz # Build documentation in the docs/ directory with Sphinx sphinx: diff --git a/docs/conf.py b/docs/conf.py index 88a27bce..f5ff9c2e 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -127,10 +127,8 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -if on_rtd: - html_theme = "default" -else: - html_theme = "sphinx_rtd_theme" +html_theme = "sphinx_rtd_theme" +if not on_rtd: html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # Theme options are theme-specific and customize the look and feel of a diff --git a/docs/module-base.rst b/docs/module-base.rst index 10c8c679..69761e55 100644 --- a/docs/module-base.rst +++ b/docs/module-base.rst @@ -11,3 +11,5 @@ Class Reference --------------- .. automodule:: panos.base + :members: PanObject + :no-index: \ No newline at end of file diff --git a/docs/module-device.rst b/docs/module-device.rst index 338ed5d2..2f1e7e70 100644 --- a/docs/module-device.rst +++ b/docs/module-device.rst @@ -16,3 +16,4 @@ Class Reference --------------- .. automodule:: panos.device + :members: diff --git a/docs/module-errors.rst b/docs/module-errors.rst index d6bfb661..5a1ab4c7 100644 --- a/docs/module-errors.rst +++ b/docs/module-errors.rst @@ -11,3 +11,4 @@ Class Reference --------------- .. automodule:: panos.errors + :members: diff --git a/docs/module-firewall.rst b/docs/module-firewall.rst index c99c5588..80f196ea 100644 --- a/docs/module-firewall.rst +++ b/docs/module-firewall.rst @@ -16,3 +16,4 @@ Class Reference --------------- .. automodule:: panos.firewall + :members: diff --git a/docs/module-ha.rst b/docs/module-ha.rst index c4953e7e..5fc755ba 100644 --- a/docs/module-ha.rst +++ b/docs/module-ha.rst @@ -16,3 +16,4 @@ Class Reference --------------- .. automodule:: panos.ha + :members: \ No newline at end of file diff --git a/docs/module-network.rst b/docs/module-network.rst index 20d88bc4..92f0c461 100644 --- a/docs/module-network.rst +++ b/docs/module-network.rst @@ -16,3 +16,4 @@ Class Reference --------------- .. automodule:: panos.network + :members: diff --git a/docs/module-objects.rst b/docs/module-objects.rst index 554a67a6..cd4daf33 100644 --- a/docs/module-objects.rst +++ b/docs/module-objects.rst @@ -11,3 +11,4 @@ Class Reference --------------- .. automodule:: panos.objects + :members: diff --git a/docs/module-panorama.rst b/docs/module-panorama.rst index 79fb6355..401b89bf 100644 --- a/docs/module-panorama.rst +++ b/docs/module-panorama.rst @@ -16,3 +16,4 @@ Class Reference --------------- .. automodule:: panos.panorama + :members: diff --git a/docs/module-plugins.rst b/docs/module-plugins.rst index d6bf644b..f1122d9e 100644 --- a/docs/module-plugins.rst +++ b/docs/module-plugins.rst @@ -16,3 +16,4 @@ Class Reference --------------- .. automodule:: panos.plugins + :members: diff --git a/docs/module-policies.rst b/docs/module-policies.rst index e8f5f4c1..8bd55e2a 100644 --- a/docs/module-policies.rst +++ b/docs/module-policies.rst @@ -16,3 +16,4 @@ Class Reference --------------- .. automodule:: panos.policies + :members: diff --git a/docs/module-predefined.rst b/docs/module-predefined.rst index d94a8e6e..f7d320b3 100644 --- a/docs/module-predefined.rst +++ b/docs/module-predefined.rst @@ -11,3 +11,4 @@ Class Reference --------------- .. automodule:: panos.predefined + :members: diff --git a/docs/module-updater.rst b/docs/module-updater.rst index 05294331..22dfb21e 100644 --- a/docs/module-updater.rst +++ b/docs/module-updater.rst @@ -11,3 +11,4 @@ Class Reference --------------- .. automodule:: panos.updater + :members: diff --git a/docs/module-userid.rst b/docs/module-userid.rst index 64d7c52b..4ad9d240 100644 --- a/docs/module-userid.rst +++ b/docs/module-userid.rst @@ -11,3 +11,4 @@ Class Reference --------------- .. automodule:: panos.userid + :members: diff --git a/panos/base.py b/panos/base.py index cf57259a..d8505e91 100644 --- a/panos/base.py +++ b/panos/base.py @@ -5157,7 +5157,7 @@ def _parse_job_results(self, show_job_xml, get_devices=True): "name": device["devicename"], "result": device["result"], "starttime": device["tstart"], - "endtime": device["tfin"], + "endtime": device.get("tfin"), } # Errors and warnings might not have a full structure. If it is just a string, then # a TypeError will be produced, so in that case, just grab the string.