mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
security/tinc: minor style fixes for https://github.com/opnsense/plugins/pull/3528
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<model>
|
||||
<mount>//OPNsense/Tinc</mount>
|
||||
<version>1.0.3</version>
|
||||
<version>1.0.4</version>
|
||||
<description>
|
||||
OPNsense Tinc VPN
|
||||
</description>
|
||||
@@ -60,10 +60,10 @@
|
||||
<MaximumValue>65535</MaximumValue>
|
||||
<ValidationMessage>Ping timeout must be between 1...65535</ValidationMessage>
|
||||
</pingtimeout>
|
||||
<StrictSubnets type="BooleanField">
|
||||
<default>0</default>
|
||||
<Required>N</Required>
|
||||
</StrictSubnets>
|
||||
<StrictSubnets type="BooleanField">
|
||||
<default>0</default>
|
||||
<Required>Y</Required>
|
||||
</StrictSubnets>
|
||||
<privkey type="TextField">
|
||||
<Required>Y</Required>
|
||||
</privkey>
|
||||
|
||||
@@ -82,10 +82,7 @@ class Network(NetwConfObject):
|
||||
return self._payload['mode']
|
||||
|
||||
def get_debuglevel(self):
|
||||
if len(self._payload['debuglevel']) > 1:
|
||||
return self._payload['debuglevel'][1]
|
||||
else:
|
||||
return '0'
|
||||
return self._payload['debuglevel'][1] if len(self._payload['debuglevel']) > 1 else '0'
|
||||
|
||||
def set_hosts(self, hosts):
|
||||
for host in hosts:
|
||||
@@ -95,16 +92,10 @@ class Network(NetwConfObject):
|
||||
self._hosts.append(hostObj)
|
||||
|
||||
def set_PMTUDiscovery(self, value):
|
||||
if value.text != '1':
|
||||
self._payload['PMTUDiscovery'] = 'no'
|
||||
else:
|
||||
self._payload['PMTUDiscovery'] = 'yes'
|
||||
self._payload['PMTUDiscovery'] = 'no' if value.text != '1' else 'yes'
|
||||
|
||||
def set_StrictSubnets(self, value):
|
||||
if value.text != '1':
|
||||
self._payload['StrictSubnets'] = 'no'
|
||||
else:
|
||||
self._payload['StrictSubnets'] = 'yes'
|
||||
self._payload['StrictSubnets'] = 'no' if value.text != '1' else 'yes'
|
||||
|
||||
def config_text(self):
|
||||
result = list()
|
||||
|
||||
Reference in New Issue
Block a user