sort and style
diff --git a/xos/services/vpn/admin.py b/xos/services/vpn/admin.py
index 26887078..3fba955 100644
--- a/xos/services/vpn/admin.py
+++ b/xos/services/vpn/admin.py
@@ -124,7 +124,8 @@
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(required=False, queryset=VPNTenant.get_tenant_objects())
+ failover_servers = forms.ModelMultipleChoiceField(
+ required=False, queryset=VPNTenant.get_tenant_objects())
protocol = forms.ChoiceField(required=True, choices=[
("tcp", "tcp"), ("udp", "udp")])
use_ca_from = forms.ModelChoiceField(
@@ -268,18 +269,18 @@
certificate = self.certificate_name(obj)
# If the client has already been reovked don't do it again
if (os.path.isfile(obj.tenant.pki_dir +
- "/issued/" + certificate + ".crt")):
+ "/issued/" + certificate + ".crt")):
VPNService.execute_easyrsa_command(
obj.tenant.pki_dir, "revoke " + certificate)
# Revoking a client cert does not delete any of the files
# to make sure that we can add this user again we need to
# delete all of the files created by easyrsa
os.remove(obj.tenant.pki_dir +
- "/issued/" + certificate + ".crt")
+ "/issued/" + certificate + ".crt")
os.remove(obj.tenant.pki_dir +
- "/private/" + certificate + ".key")
+ "/private/" + certificate + ".key")
os.remove(obj.tenant.pki_dir +
- "/reqs/" + certificate + ".req")
+ "/reqs/" + certificate + ".req")
obj.tenant.enacted = None
obj.tenant.save()
@@ -295,7 +296,7 @@
certificate = self.certificate_name(obj)
# Only add a certificate if ones does not yet exist
if (not os.path.isfile(obj.tenant.pki_dir +
- "/issued/" + certificate + ".crt")):
+ "/issued/" + certificate + ".crt")):
VPNService.execute_easyrsa_command(
obj.tenant.pki_dir,
"build-client-full " + certificate + " nopass")
diff --git a/xos/services/vpn/models.py b/xos/services/vpn/models.py
index 0070d76..77705d0 100644
--- a/xos/services/vpn/models.py
+++ b/xos/services/vpn/models.py
@@ -295,10 +295,10 @@
"key " + client_name + ".key\n" +
"verb 3\n" +
self.get_remote_line(
- self.nat_ip, self.port_number, self.protocol))
+ self.nat_ip, self.port_number, self.protocol))
for remote in self.failover_servers:
conf += self.get_remote_line(
- remote.nat_ip, remote.port_number, remote.protocol)
+ remote.nat_ip, remote.port_number, remote.protocol)
if self.is_persistent:
conf += "persist-tun\n"