Skip to content

Commit

Permalink
feat: Add device.CertificateProfileCaCertificate
Browse files Browse the repository at this point in the history
  • Loading branch information
shinmog committed Oct 4, 2021
1 parent 55159e9 commit afd6b8b
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions panos/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -2124,6 +2124,7 @@ class CertificateProfile(VersionedPanObject):
# users to choose between /config/panorama and /config/shared right now.
ROOT = Root.PANORAMA_VSYS
SUFFIX = ENTRY
CHILDTYPES = ("device.CertificateProfileCaCertificate",)

def _setup(self):
# xpaths
Expand Down Expand Up @@ -2197,3 +2198,36 @@ def _setup(self):
)

self._params = tuple(params)


class CertificateProfileCaCertificate(VersionedPanObject):
"""CA certificate for a certificate profile.
Args:
name (str): The name.
default_ocsp_url (str): Default URL for OCSP verification.
ocsp_verify_certificate (str): Certificate to verify signature in OCSP response.
template_name (str): (PAN-OS 9.0+) Template name / OID for the certificate.
"""

ROOT = Root.PANORAMA_VSYS
SUFFIX = ENTRY

def _setup(self):
# xpaths
self._xpaths.add_profile(value="/CA")

# params
params = []

params.append(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[-1].add_profile(
"9.0.0", path="template-name",
)

self._params = tuple(params)

0 comments on commit afd6b8b

Please sign in to comment.