onboarding.modelsΒΆ

This module contains models related to onboarding configurations.

Module ContentsΒΆ

class onboarding.models.AbstractPkiProtocolModel[source]ΒΆ

Extends a model for IntegerChoices stored as bitwise flags.

pki_protocol_class: type[AbstractPkiProtocolModel.T][source]ΒΆ
add_pki_protocol(pki_protocol)[source]ΒΆ

Adds the provided PkiProtocol to the allowed protocols for onboarded devices.

Parameters:

pki_protocol (T) – The PkiProtocol to allow.

Return type:

None

remove_pki_protocol(pki_protocol)[source]ΒΆ

Removes the provided PkiProtocol from the allowed protocols if it is allowed..

Parameters:

pki_protocol (T) – The PkiProtocol to forbid.

Return type:

None

clear_pki_protocols()[source]ΒΆ

Clears all allowed PkiProtocols, that is, it deactivates application certificate issuance.

Return type:

None

has_pki_protocol(pki_protocol)[source]ΒΆ

Checks if the provided PkiProtocol is allowed.

Parameters:

pki_protocol (T) – The PkiProtocol that is checked against the allowed ones.

Returns:

Returns True if the provided PkiProtocol is allowed, False otherwise.

Return type:

bool

get_pki_protocols()[source]ΒΆ

Gets all allowed PkiProtocols.

Returns:

Retruns the allowed PkiProtocols as list.

Return type:

list[T]

set_pki_protocols(pki_protocols)[source]ΒΆ

Sets all allowed PkiProtocols exactly matching the provided list.

Parameters:

pki_protocols (list[T])

Return type:

None

class onboarding.models.OnboardingConfigModel(*args, **kwargs)[source]ΒΆ

Bases: AbstractPkiProtocolModel[onboarding.enums.OnboardingPkiProtocol], django.db.models.Model

Onboarding Configuration Model.

pki_protocol_class[source]ΒΆ
pki_protocols[source]ΒΆ
onboarding_status[source]ΒΆ
onboarding_protocol[source]ΒΆ
est_password[source]ΒΆ
cmp_shared_secret[source]ΒΆ
opc_user[source]ΒΆ
opc_password[source]ΒΆ
idevid_trust_store[source]ΒΆ
trust_store[source]ΒΆ
opc_trust_store[source]ΒΆ
save(*args, **kwargs)[source]ΒΆ

Executes full_clean() before saving.

Parameters:
  • *args (Any) – Positional arguments are passed to super().save().

  • **kwargs (Any) – Keyword arguments are passed to super().save().

Return type:

None

clean()[source]ΒΆ

Validation before saving the model.

Return type:

None

class onboarding.models.NoOnboardingConfigModel(*args, **kwargs)[source]ΒΆ

Bases: AbstractPkiProtocolModel[onboarding.enums.NoOnboardingPkiProtocol], django.db.models.Model

No Onboarding Configuration Model.

pki_protocol_class[source]ΒΆ
pki_protocols[source]ΒΆ
est_password[source]ΒΆ
cmp_shared_secret[source]ΒΆ
trust_store[source]ΒΆ
save(*args, **kwargs)[source]ΒΆ

Executes full_clean() before saving.

Parameters:
  • *args (Any) – Positional arguments are passed to super().save().

  • **kwargs (Any) – Keyword arguments are passed to super().save().

Return type:

None

clean()[source]ΒΆ

Validation before saving the model.

Return type:

None