devices.modelsΒΆ
This modules contains all models specific to the device abstractions.
Module ContentsΒΆ
- class devices.models.DeviceModel(*args, **kwargs)[source]ΒΆ
Bases:
util.db.CustomDeleteActionModelThe DeviceModel.
- class DeviceType(*args, **kwds)[source]ΒΆ
Bases:
django.db.models.IntegerChoicesEnum for device type.
- pre_delete()[source]ΒΆ
Delete all issued credentials for this device before deleting the device itself.
- Return type:
None
- schedule_next_gds_push_update()[source]ΒΆ
Schedule the next periodic GDS Push server certificate and trustlist update using Django-Q2.
Creates a one-off scheduled task in Django-Q2 that will execute at the calculated time based on the configured renewal interval. Does nothing when periodic updates are disabled or the device is not of type OPC UA GDS Push.
- Return type:
None
- class devices.models.RemoteDeviceCredentialDownloadModel(*args, **kwargs)[source]ΒΆ
Bases:
django.db.models.ModelModel to associate a credential model with an OTP and token for unauthenticated remoted download.
- save(*args, **kwargs)[source]ΒΆ
Generates a new random OTP on initial save of the model.
- Parameters:
args (Any)
kwargs (Any)
- Return type:
None
- get_otp_display()[source]ΒΆ
Return the OTP in the format βcredential_id.otpβ for display within the admin view.
- Returns:
The str to display.
- Return type:
str