forked from uncloud/uncloud
[vpn] fix urls
This commit is contained in:
parent
096f7e05c0
commit
913e992a48
4 changed files with 34 additions and 19 deletions
|
|
@ -6,31 +6,33 @@ from django.core.validators import MinValueValidator, MaxValueValidator
|
|||
from uncloud_pay.models import Product, RecurringPeriod
|
||||
from uncloud.models import UncloudModel, UncloudStatus
|
||||
|
||||
|
||||
class MACAdress(models.Model):
|
||||
default_prefix = 0x420000000000
|
||||
|
||||
class VPNPool(UncloudModel):
|
||||
"""
|
||||
Network address pools from which VPNs can be created
|
||||
"""
|
||||
|
||||
network = models.GenericIPAddressField(primary_key=True,
|
||||
editable=False)
|
||||
network = models.GenericIPAddressField(primary_key=True)
|
||||
|
||||
network_size = models.IntegerField(validators=[MinValueValidator(0),
|
||||
MaxValueValidator(128)])
|
||||
|
||||
class VPNNetwork(UncloudModel):
|
||||
vpn_hostname = models.CharField(max_length=256)
|
||||
|
||||
wireguard_private_key = models.CharField(max_length=48)
|
||||
|
||||
|
||||
class VPNNetwork(Product):
|
||||
"""
|
||||
A selected network. Used for tracking reservations / used networks
|
||||
"""
|
||||
vpnpool = models.ForeignKey(VPNPool,
|
||||
on_delete=models.CASCADE)
|
||||
|
||||
network = models.GenericIPAddressField(primary_key=True,
|
||||
editable=False)
|
||||
network = models.GenericIPAddressField(editable=False,
|
||||
unique=True)
|
||||
|
||||
class VPNProduct(Product):
|
||||
network = models.ForeignKey(VPNPool,
|
||||
on_delete=models.CASCADE)
|
||||
|
||||
|
||||
class MACAdress(models.Model):
|
||||
default_prefix = 0x420000000000
|
||||
wireguard_public_key = models.CharField(max_length=48)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue