PEM

class PEM(api)

Bases: _ApplicationBase

create(name, device, private_key_file, certificate_file, description=None, contacts=None, approvers=None, application_credential=None, port=None, private_key_credential=None, certificate_chain_file=None, overwrite_existing_chain=None, owner=None, owner_permissions=None, group=None, group_permissions=None, attributes=None, get_if_already_exists=True)
Parameters
  • name (str) – Name of the application object.

  • device (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the device object.

  • private_key_file (str) – File location to place the private key file.

  • certificate_file (str) – File location to place the certificate file.

  • description (str) – Description for the application object.

  • contacts (List[Union[ident.Identity, str]]) – List of Identity Object or Prefixed Name as contacts for the application object.

  • approvers (List[Union[ident.Identity, str]]) – List of Identity Object or Prefixed Name as approvers for the application object.

  • application_credential (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the application credential.

  • port (int) – Connection port.

  • private_key_credential (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of private key credential.

  • certificate_chain_file (str) – File location to place the certificate chain file.

  • overwrite_existing_chain (bool) – Overwrite the existing chain.

  • owner (str) – File user owner.

  • owner_permissions (str) – File permissions assigned to the user owner.

  • group (str) – File group owner.

  • group_permissions (str) – File permissions assigned to the group owner.

  • attributes (dict) – Additional attributes pertaining to the application object.

  • get_if_already_exists (bool) – If the objects already exists, just return it as is.

Returns

Config Object of the application.

delete(application)

Deletes an application object.

Parameters

application (Union[Object, str]) – Config Object or Distinguished Name (DN) of the application object.

disable(application)

Disables all processing and provisioning of the application.

Parameters

application (Union[Object, str]) – Config Object or Distinguished Name (DN) of the application object.

enable(application)

Enables all processing and provisioning of the application.

Parameters

application (Union[Object, str]) – Config Object or Distinguished Name (DN) of the application object.

get(application_dn, raise_error_if_not_exists=True)
Parameters
Returns

Config Object of the application

get_associated_certificate(application)
Parameters

application (Union[Object, str]) – Config Object or Distinguished Name (DN) of the application object.

Returns

Config Object of the certificate object associated to the application object.

get_stage(application)
Parameters

application (Union[Object, str]) – Config Object or Distinguished Name (DN) of the application object.

Returns

The current stage if it exists. Otherwise, returns None.

Return type

int

get_status(application)
Parameters

application (Union[Object, str]) – Config Object or Distinguished Name (DN) of the application object.

Returns

The current processing status of the application object or None if a status does not exist.

Return type

str

wait_for_installation_to_complete(application, timeout=60)

Waits for the application object’s “Last Pushed On” attribute to be a date greater than or equal to the “Last Renewed On” date on the associated certificate. If the certificate has not been recently renewed and is simply being associated to the certificate, either clear the “Last Pushed On” date from the application object or use pytpp.pytpp.features.certificate.Certificate.associate_application() with push_to_new=True.

Parameters