onboarding.models ================= .. py:module:: onboarding.models .. autoapi-nested-parse:: This module contains models related to onboarding configurations. Module Contents --------------- .. py:class:: AbstractPkiProtocolModel Extends a model for IntegerChoices stored as bitwise flags. .. py:attribute:: pki_protocol_class :type: type[AbstractPkiProtocolModel.T] .. py:method:: add_pki_protocol(pki_protocol) Adds the provided PkiProtocol to the allowed protocols for onboarded devices. :param pki_protocol: The PkiProtocol to allow. .. py:method:: remove_pki_protocol(pki_protocol) Removes the provided PkiProtocol from the allowed protocols if it is allowed.. :param pki_protocol: The PkiProtocol to forbid. .. py:method:: clear_pki_protocols() Clears all allowed PkiProtocols, that is, it deactivates application certificate issuance. .. py:method:: has_pki_protocol(pki_protocol) Checks if the provided PkiProtocol is allowed. :param pki_protocol: The PkiProtocol that is checked against the allowed ones. :returns: Returns True if the provided PkiProtocol is allowed, False otherwise. .. py:method:: get_pki_protocols() Gets all allowed PkiProtocols. :returns: Retruns the allowed PkiProtocols as list. .. py:method:: set_pki_protocols(pki_protocols) Sets all allowed PkiProtocols exactly matching the provided list. .. py:class:: OnboardingConfigModel(*args, **kwargs) Bases: :py:obj:`AbstractPkiProtocolModel`\ [\ :py:obj:`onboarding.enums.OnboardingPkiProtocol`\ ], :py:obj:`django.db.models.Model` Onboarding Configuration Model. .. py:attribute:: pki_protocol_class .. py:attribute:: pki_protocols .. py:attribute:: onboarding_status .. py:attribute:: onboarding_protocol .. py:attribute:: est_password .. py:attribute:: cmp_shared_secret .. py:attribute:: opc_user .. py:attribute:: opc_password .. py:attribute:: idevid_trust_store .. py:attribute:: trust_store .. py:attribute:: opc_trust_store .. py:method:: save(*args, **kwargs) Executes full_clean() before saving. :param \*args: Positional arguments are passed to super().save(). :param \*\*kwargs: Keyword arguments are passed to super().save(). .. py:method:: clean() Validation before saving the model. .. py:class:: NoOnboardingConfigModel(*args, **kwargs) Bases: :py:obj:`AbstractPkiProtocolModel`\ [\ :py:obj:`onboarding.enums.NoOnboardingPkiProtocol`\ ], :py:obj:`django.db.models.Model` No Onboarding Configuration Model. .. py:attribute:: pki_protocol_class .. py:attribute:: pki_protocols .. py:attribute:: est_password .. py:attribute:: cmp_shared_secret .. py:attribute:: trust_store .. py:method:: save(*args, **kwargs) Executes full_clean() before saving. :param \*args: Positional arguments are passed to super().save(). :param \*\*kwargs: Keyword arguments are passed to super().save(). .. py:method:: clean() Validation before saving the model.