Skip to content

Commit

Permalink
Merge pull request #34 from cdot65/33-typeerror-on-cli-invocation-pos…
Browse files Browse the repository at this point in the history
…t-typer-integration-missing-required-positional-arguments

33 typeerror on cli invocation post typer integration missing required positional arguments
  • Loading branch information
cdot65 authored Jan 21, 2024
2 parents 255386a + 4b2e3a8 commit 9e4fe14
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion pan_os_upgrade/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@
from pan_os_upgrade.models import SnapshotReport, ReadinessCheckReport


# ----------------------------------------------------------------------------
# Define Typer command-line interface
# ----------------------------------------------------------------------------
app = typer.Typer(help="PAN-OS Upgrade script")


# ----------------------------------------------------------------------------
# Define logging levels
# ----------------------------------------------------------------------------
Expand Down Expand Up @@ -1504,6 +1510,7 @@ def perform_reboot(firewall: Firewall, ha_details: Optional[dict] = None) -> Non
# ----------------------------------------------------------------------------
# Primary execution of the script
# ----------------------------------------------------------------------------
@app.command()
def main(
ip_address: Annotated[
str,
Expand Down Expand Up @@ -1721,4 +1728,4 @@ def main(


if __name__ == "__main__":
typer.run(main)
app()
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pan-os-upgrade"
version = "0.2.0"
version = "0.2.1"
description = "Python script to automate the upgrade process of PAN-OS firewalls."
authors = ["Calvin Remsburg <[email protected]>"]
license = "Apache 2.0"
Expand All @@ -23,7 +23,7 @@ mkdocs-material = "^9.5.4"
mkdocstrings = "^0.24.0"

[tool.poetry.scripts]
pan-os-upgrade = 'pan_os_upgrade.upgrade:main'
pan-os-upgrade = 'pan_os_upgrade.upgrade:app'

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 9e4fe14

Please sign in to comment.