help_pages.base

This module contains classes and functions used by all help pages.

Module Contents

class help_pages.base.HelpPageStrategy[source]

Bases: abc.ABC

Abstract base class for help page strategies.

abstractmethod build_sections(help_context)[source]

Builds the required sections.

Parameters:

help_context (HelpContext)

Return type:

tuple[list[help_pages.help_section.HelpSection], str]

class help_pages.base.HelpContext[source]

Holds shared context data.

domain: pki.models.domain.DomainModel[source]
domain_unique_name: str[source]
allowed_app_profiles: list[pki.models.domain.DomainAllowedCertificateProfileModel][source]
public_key_info: trustpoint_core.oid.PublicKeyInfo[source]
host_base: str[source]
host_cmp_path: str[source]
host_est_path: str[source]
cred_count: int[source]
device: None | devices.models.DeviceModel = None[source]
devid_registration: None | pki.models.DevIdRegistration = None[source]
get_device_or_http_404()[source]

Gets the device or throws an HTTP404 error.

Raises:

Http404 – If the device does not exist.

Returns:

The DeviceModel.

Return type:

devices.models.DeviceModel

get_devid_registration_or_http_404()[source]

Gets the DevidRegistration or throws an HTTP404 error.

Raises:

Http404 – If the DevidRegistration does not exist.

Returns:

The DevidRegistration.

Return type:

pki.models.DevIdRegistration

help_pages.base.build_keygen_section(help_context, file_name)[source]

Builds the key-generation section.

Parameters:
  • help_context (HelpContext) – The help context which will

  • file_name (str) – The file_name to use if the default shall not be used. Defaults to None.

Returns:

The key-generation section.

Return type:

help_pages.help_section.HelpSection

help_pages.base.build_profile_select_section(app_cert_profiles)[source]

Builds the profile select section.

Returns:

The profile select section.

Parameters:

app_cert_profiles (list[pki.models.domain.DomainAllowedCertificateProfileModel])

Return type:

help_pages.help_section.HelpSection

help_pages.base.build_tls_trust_store_section()[source]

Builds the TLS trust-store section.

Raises:

Http404 – If no active Trustpoint TLS-server credential is found or the root CA cert is missing.

Returns:

The TLS trust-store section.

Return type:

help_pages.help_section.HelpSection

help_pages.base.build_cmp_signer_trust_store_section(domain)[source]

Builds the CMP-signer trust-store section.

Returns:

The CMP-signer trust-store section.

Parameters:

domain (pki.models.domain.DomainModel)

Return type:

help_pages.help_section.HelpSection

help_pages.base.build_issuing_ca_cert_section(domain)[source]

Builds the Issuing CA Certificate section.

Returns:

The Issuing CA Certificate section.

Parameters:

domain (pki.models.domain.DomainModel)

Return type:

help_pages.help_section.HelpSection

help_pages.base.build_extract_files_from_p12_section()[source]

Builds the extract files form P12 section.

Returns:

The extract files form P12 section.

Return type:

help_pages.help_section.HelpSection