Make synchronizer consistent with server cert naming scheme, create ports automatically, add failover servers to UI
diff --git a/xos/services/vpn/admin.py b/xos/services/vpn/admin.py
index dd6df0e..0f2c476 100644
--- a/xos/services/vpn/admin.py
+++ b/xos/services/vpn/admin.py
@@ -59,7 +59,7 @@
vpn_subnet = forms.GenericIPAddressField(protocol="IPv4", required=True)
is_persistent = forms.BooleanField(required=False)
clients_can_see_each_other = forms.BooleanField(required=False)
- failover_servers = forms.ModelMultipleChoiceField(queryset=VPNTenant.objects.all(), required=False)
+ failover_servers = forms.ModelMultipleChoiceField(queryset=VPNTenant.get_tenant_objects(), required=False)
def __init__(self, *args, **kwargs):
super(VPNTenantForm, self).__init__(*args, **kwargs)
@@ -100,7 +100,7 @@
self.instance.failover_servers = self.cleaned_data.get('failover_servers')
prev = 1000
- for (tenant : VPNTenant.objects.order_by('port_number')):
+ for (tenant : VPNTenant.get_tenant_objects().order_by('port_number')):
if (tenant.port_number != prev):
break
prev++