devices.formsΒΆ
Forms exclusively used in the device application.
AttributesΒΆ
ClassesΒΆ
Form to download a credential. |
|
Base form for issuing credentials. |
|
Base form for issuing server credentials. |
|
Form to issue a new domain credential. |
|
Form to issue a new TLS client credential. |
|
Form to issue a new TLS server credential. |
|
Adds a application_uri field to the form. |
|
Form to issue a new OPC UA client credential. |
|
Form to issue a new OPC UA server credential. |
|
Form to issue a new OPC UA GDS Push domain credential. |
|
Form for the browser login via OTP for remote credential download. |
|
Form to revoke a specific issued credential. |
|
Form to revoke a issued credentials associated with a specific device. |
|
Form to delete the requested devices. |
|
Form for device or OPC UA GDS object creation without onboarding. |
|
Form for device or OPC UA GDS object creation with onboarding. |
|
Form for OPC UA GDS Push device creation with onboarding. |
|
CLM Device Model form for devices that use onboarding. |
|
CLM Device Model form for OPC UA GDS Push devices that use onboarding. |
|
CLM Device Model form for devices that do not use onboarding. |
|
Form for associating a truststore with an OPC UA GDS Push device's onboarding configuration. |
FunctionsΒΆ
|
Generates a secret with the number of symbols provided. |
Module ContentsΒΆ
- devices.forms._get_secret(number_of_symbols=16)[source]ΒΆ
Generates a secret with the number of symbols provided.
- Parameters:
number_of_symbols (int) β Number of symbols of the generated secret. Defaults to 16.
- Returns:
The generated secret.
- Return type:
str
- class devices.forms.CredentialDownloadForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None, bound_field_class=None)[source]ΒΆ
Bases:
django.forms.FormForm to download a credential.
- class devices.forms.BaseCredentialForm(*args, device, **kwargs)[source]ΒΆ
Bases:
django.forms.FormBase form for issuing credentials.
- Parameters:
args (Any)
device (devices.models.DeviceModel)
kwargs (Any)
- class devices.forms.BaseServerCredentialForm(*args, device, **kwargs)[source]ΒΆ
Bases:
BaseCredentialFormBase form for issuing server credentials.
- Parameters:
args (Any)
device (devices.models.DeviceModel)
kwargs (Any)
- clean_ipv4_addresses()[source]ΒΆ
Checks the IPv4 addresses.
- Return type:
list[ipaddress.IPv4Address]
- class devices.forms.IssueDomainCredentialForm(*args, device, **kwargs)[source]ΒΆ
Bases:
BaseCredentialFormForm to issue a new domain credential.
- Parameters:
args (Any)
device (devices.models.DeviceModel)
kwargs (Any)
- class devices.forms.IssueTlsClientCredentialForm(*args, device, **kwargs)[source]ΒΆ
Bases:
BaseCredentialFormForm to issue a new TLS client credential.
- Parameters:
args (Any)
device (devices.models.DeviceModel)
kwargs (Any)
- class devices.forms.IssueTlsServerCredentialForm(*args, device, **kwargs)[source]ΒΆ
Bases:
BaseServerCredentialFormForm to issue a new TLS server credential.
- Parameters:
args (Any)
device (devices.models.DeviceModel)
kwargs (Any)
- class devices.forms.ApplicationUriFormMixin(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None, bound_field_class=None)[source]ΒΆ
Bases:
django.forms.FormAdds a application_uri field to the form.
- class devices.forms.IssueOpcUaClientCredentialForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None, bound_field_class=None)[source]ΒΆ
Bases:
ApplicationUriFormMixin,BaseCredentialFormForm to issue a new OPC UA client credential.
- class devices.forms.IssueOpcUaServerCredentialForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None, bound_field_class=None)[source]ΒΆ
Bases:
ApplicationUriFormMixin,BaseServerCredentialFormForm to issue a new OPC UA server credential.
- class devices.forms.IssueOpcUaGdsPushDomainCredentialForm(*args, device, **kwargs)[source]ΒΆ
Bases:
ApplicationUriFormMixin,BaseCredentialFormForm to issue a new OPC UA GDS Push domain credential.
- Parameters:
args (Any)
device (devices.models.DeviceModel)
kwargs (Any)
- class devices.forms.BrowserLoginForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None, bound_field_class=None)[source]ΒΆ
Bases:
django.forms.FormForm for the browser login via OTP for remote credential download.
- class devices.forms.RevokeIssuedCredentialForm[source]ΒΆ
Bases:
django.forms.ModelForm[pki.models.certificate.RevokedCertificateModel]Form to revoke a specific issued credential.
- class devices.forms.RevokeDevicesForm[source]ΒΆ
Bases:
django.forms.ModelForm[pki.models.certificate.RevokedCertificateModel]Form to revoke a issued credentials associated with a specific device.
- class devices.forms.DeleteDevicesForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None, bound_field_class=None)[source]ΒΆ
Bases:
django.forms.FormForm to delete the requested devices.
- class devices.forms.NoOnboardingCreateForm(*args, **kwargs)[source]ΒΆ
Bases:
django.forms.FormForm for device or OPC UA GDS object creation without onboarding.
- Parameters:
args (Any)
kwargs (Any)
- domain_queryset: django.db.models.query.QuerySet[pki.models.domain.DomainModel][source]ΒΆ
- clean_common_name()[source]ΒΆ
Validates the device name, i.e. checks if it is unique.
- Parameters:
common_name β The desired name of the new device.
- Returns:
The device name if it passed the checks.
- Return type:
str
- save(device_type)[source]ΒΆ
Stores the form as devie model object in the db.
- Parameters:
device_type (devices.models.DeviceModel.DeviceType) β The device type to set. Defaults to None.
- Returns:
_description_
- Return type:
- class devices.forms.OnboardingCreateForm(*args, **kwargs)[source]ΒΆ
Bases:
django.forms.FormForm for device or OPC UA GDS object creation with onboarding.
- Parameters:
args (Any)
kwargs (Any)
- domain_queryset: django.db.models.query.QuerySet[pki.models.domain.DomainModel][source]ΒΆ
- clean_common_name()[source]ΒΆ
Validates the device name, i.e. checks if it is unique.
- Parameters:
common_name β The desired name of the new device.
- Returns:
The device name if it passed the checks.
- Return type:
str
- save(device_type)[source]ΒΆ
Stores the form as device model object in the db.
- Parameters:
device_type (devices.models.DeviceModel.DeviceType) β The device type to set. Defaults to None.
- Returns:
_description_
- Return type:
- class devices.forms.OpcUaGdsPushCreateForm(*args, **kwargs)[source]ΒΆ
Bases:
django.forms.FormForm for OPC UA GDS Push device creation with onboarding.
- Parameters:
args (Any)
kwargs (Any)
- domain_queryset: django.db.models.query.QuerySet[pki.models.domain.DomainModel][source]ΒΆ
- clean_common_name()[source]ΒΆ
Validates the device name, i.e. checks if it is unique.
- Parameters:
common_name β The desired name of the new device.
- Returns:
The device name if it passed the checks.
- Return type:
str
- save(device_type)[source]ΒΆ
Stores the form as device model object in the db.
- Parameters:
device_type (devices.models.DeviceModel.DeviceType) β The device type to set.
- Returns:
The created DeviceModel.
- Return type:
- class devices.forms.ClmDeviceModelOnboardingForm(*args, **kwargs)[source]ΒΆ
Bases:
django.forms.FormCLM Device Model form for devices that use onboarding.
- Parameters:
args (Any)
kwargs (Any)
- domain_queryset: django.db.models.query.QuerySet[pki.models.domain.DomainModel][source]ΒΆ
- instance: devices.models.DeviceModel[source]ΒΆ
- clean_common_name()[source]ΒΆ
Validates the device name, i.e. checks if it is unique.
- Returns:
The device name if it passed the checks.
- Return type:
str
- save(onboarding_protocol)[source]ΒΆ
Saves the changes to DB.
- Parameters:
onboarding_protocol (onboarding.models.OnboardingProtocol)
- Return type:
None
- class devices.forms.ClmDeviceModelOpcUaGdsPushOnboardingForm(*args, **kwargs)[source]ΒΆ
Bases:
django.forms.FormCLM Device Model form for OPC UA GDS Push devices that use onboarding.
- Parameters:
args (Any)
kwargs (Any)
- domain_queryset: django.db.models.query.QuerySet[pki.models.domain.DomainModel][source]ΒΆ
- truststore_queryset: django.db.models.query.QuerySet[pki.models.truststore.TruststoreModel][source]ΒΆ
- instance: devices.models.DeviceModel[source]ΒΆ
- class devices.forms.ClmDeviceModelNoOnboardingForm(*args, **kwargs)[source]ΒΆ
Bases:
django.forms.FormCLM Device Model form for devices that do not use onboarding.
- Parameters:
args (Any)
kwargs (Any)
- domain_queryset: django.db.models.query.QuerySet[pki.models.domain.DomainModel][source]ΒΆ
- instance: devices.models.DeviceModel[source]ΒΆ
- class devices.forms.OpcUaGdsPushTruststoreAssociationForm(*args, **kwargs)[source]ΒΆ
Bases:
django.forms.FormForm for associating a truststore with an OPC UA GDS Push deviceβs onboarding configuration.
- Parameters:
args (Any)
kwargs (Any)
- truststore_queryset: django.db.models.query.QuerySet[pki.models.truststore.TruststoreModel][source]ΒΆ
- instance: devices.models.DeviceModel[source]ΒΆ