modified: netbox_dns_bridge/dns_server.py modified: netbox_dns_bridge/management/commands/dns-export-zone.py modified: netbox_dns_bridge/management/commands/dns-export-zones.py modified: netbox_dns_bridge/management/commands/dns-settings.py modified: netbox_dns_bridge/management/commands/dns-transfer-endpoint.py modified: netbox_dns_bridge/migrations/0001_initial.py modified: netbox_dns_bridge/models.py modified: netbox_dns_bridge/request_handler.py modified: netbox_dns_bridge/signals.py modified: netbox_dns_bridge/utils.py Black code formating corrected
34 lines
693 B
Python
34 lines
693 B
Python
from django.db import models
|
|
import netbox.models
|
|
import netbox_dns.models
|
|
|
|
|
|
class IntegerKeyValueSetting(models.Model):
|
|
key = models.CharField(max_length=64)
|
|
value = models.IntegerField()
|
|
|
|
def __str__(self):
|
|
return f"{self.key}: {str(self.value)}"
|
|
|
|
class Meta:
|
|
default_permissions = ()
|
|
|
|
|
|
class CatalogZoneMemberIdentifier(models.Model):
|
|
name = models.CharField(
|
|
max_length=26,
|
|
unique=True,
|
|
)
|
|
|
|
zone = models.OneToOneField(
|
|
to=netbox_dns.models.Zone,
|
|
on_delete=models.CASCADE,
|
|
related_name="catz_identifier",
|
|
)
|
|
|
|
class Meta:
|
|
ordering = ("name",)
|
|
|
|
def __str__(self):
|
|
return self.name
|