Skip to content

Commit

Permalink
Format code with poetry and Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianczech committed Feb 6, 2024
1 parent 2a61842 commit ce0e21b
Show file tree
Hide file tree
Showing 4 changed files with 551 additions and 146 deletions.
149 changes: 122 additions & 27 deletions panos/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,10 @@ def _setup(self):

params.append(
VersionedParamPath(
"enable", default=False, vartype="yesno", path="advance-routing",
"enable",
default=False,
vartype="yesno",
path="advance-routing",
)
)

Expand Down Expand Up @@ -1321,7 +1324,11 @@ def _setup(self):
)
)
params.append(
VersionedParamPath("disabled", vartype="yesno", path="disabled",),
VersionedParamPath(
"disabled",
vartype="yesno",
path="disabled",
),
)

self._params = tuple(params)
Expand Down Expand Up @@ -1467,7 +1474,10 @@ def _setup(self):
"facility",
default="LOG_USER",
path="facility",
values=["LOG_USER",] + ["LOG_LOCAL{0}".format(x) for x in range(8)],
values=[
"LOG_USER",
]
+ ["LOG_LOCAL{0}".format(x) for x in range(8)],
)
)

Expand Down Expand Up @@ -2275,12 +2285,28 @@ def _setup(self):
)
params.append(
VersionedParamPath(
"username_field_value", path="username-field/{username_field}",
"username_field_value",
path="username-field/{username_field}",
)
)
params.append(
VersionedParamPath(
"domain",
path="domain",
)
)
params.append(
VersionedParamPath(
"use_crl",
path="use-crl",
)
)
params.append(
VersionedParamPath(
"use_ocsp",
path="use-ocsp",
)
)
params.append(VersionedParamPath("domain", path="domain",))
params.append(VersionedParamPath("use_crl", path="use-crl",))
params.append(VersionedParamPath("use_ocsp", path="use-ocsp",))
params.append(
VersionedParamPath(
"crl_receive_timeout",
Expand All @@ -2307,27 +2333,50 @@ def _setup(self):
)
params.append(
VersionedParamPath(
"block_unknown_certificate", vartype="yesno", path="block-unknown-cert",
"block_unknown_certificate",
vartype="yesno",
path="block-unknown-cert",
)
)
params.append(
VersionedParamPath(
"block_certificate_timeout", vartype="yesno", path="block-timeout-cert",
"block_certificate_timeout",
vartype="yesno",
path="block-timeout-cert",
)
)
params.append(
VersionedParamPath("block_unauthenticated_certificate", exclude=True,)
VersionedParamPath(
"block_unauthenticated_certificate",
exclude=True,
)
)
params[-1].add_profile(
"7.1.0", vartype="yesno", path="block-unauthenticated-cert",
"7.1.0",
vartype="yesno",
path="block-unauthenticated-cert",
)
params.append(
VersionedParamPath(
"block_expired_certificate",
exclude=True,
)
)
params.append(VersionedParamPath("block_expired_certificate", exclude=True,))
params[-1].add_profile(
"8.1.0", vartype="yesno", path="block-expired-cert",
"8.1.0",
vartype="yesno",
path="block-expired-cert",
)
params.append(
VersionedParamPath(
"ocsp_exclude_nonce",
exclude=True,
)
)
params.append(VersionedParamPath("ocsp_exclude_nonce", exclude=True,))
params[-1].add_profile(
"9.0.0", path="ocsp-exclude-nonce", vartype="yesno",
"9.0.0",
path="ocsp-exclude-nonce",
vartype="yesno",
)

self._params = tuple(params)
Expand All @@ -2354,13 +2403,27 @@ def _setup(self):
# params
params = []

params.append(VersionedParamPath("default_ocsp_url", path="default-ocsp-url",))
params.append(
VersionedParamPath("ocsp_verify_certificate", path="ocsp-verify-cert",)
VersionedParamPath(
"default_ocsp_url",
path="default-ocsp-url",
)
)
params.append(
VersionedParamPath(
"ocsp_verify_certificate",
path="ocsp-verify-cert",
)
)
params.append(
VersionedParamPath(
"template_name",
exclude=True,
)
)
params.append(VersionedParamPath("template_name", exclude=True,))
params[-1].add_profile(
"9.0.0", path="template-name",
"9.0.0",
path="template-name",
)

self._params = tuple(params)
Expand Down Expand Up @@ -2395,7 +2458,8 @@ def _setup(self):

params.append(
VersionedParamPath(
"forward_trust_certificate_rsa", path="forward-trust-certificate/rsa",
"forward_trust_certificate_rsa",
path="forward-trust-certificate/rsa",
)
)
params.append(
Expand All @@ -2418,13 +2482,17 @@ def _setup(self):
)
params.append(
VersionedParamPath(
"root_ca_excludes", vartype="member", path="root-ca-exclude-list",
"root_ca_excludes",
vartype="member",
path="root-ca-exclude-list",
)
)
# Only option present on Panorama.
params.append(
VersionedParamPath(
"trusted_root_cas", vartype="member", path="trusted-root-CA",
"trusted_root_cas",
vartype="member",
path="trusted-root-CA",
)
)
params.append(
Expand Down Expand Up @@ -2459,8 +2527,19 @@ def _setup(self):
# params
params = []

params.append(VersionedParamPath("description", path="description",))
params.append(VersionedParamPath("exclude", vartype="yesno", path="exclude",))
params.append(
VersionedParamPath(
"description",
path="description",
)
)
params.append(
VersionedParamPath(
"exclude",
vartype="yesno",
path="exclude",
)
)

self._params = tuple(params)

Expand Down Expand Up @@ -2490,9 +2569,19 @@ def _setup(self):
params = []

params.append(
VersionedParamPath("password_hash", vartype="encrypted", path="phash",)
VersionedParamPath(
"password_hash",
vartype="encrypted",
path="phash",
)
)
params.append(
VersionedParamPath(
"disabled",
vartype="yesno",
path="disabled",
)
)
params.append(VersionedParamPath("disabled", vartype="yesno", path="disabled",))

self._params = tuple(params)

Expand Down Expand Up @@ -2533,6 +2622,12 @@ def _setup(self):
# params
params = []

params.append(VersionedParamPath("users", vartype="member", path="user",))
params.append(
VersionedParamPath(
"users",
vartype="member",
path="user",
)
)

self._params = tuple(params)
Loading

0 comments on commit ce0e21b

Please sign in to comment.