Skip to content

Commit

Permalink
[openvpn] Corrected script-security directive
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Sep 5, 2016
1 parent 2198b9b commit 7bc283a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion netjsonconfig/backends/openvpn/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def _get_openvpn(self):
openvpn = []
for vpn in self.config.get('openvpn', []):
config = deepcopy(vpn)
skip_keys = ['script_security_level', 'remote']
skip_keys = ['script_security', 'remote']
delete_keys = []
for key, value in config.items():
if key in skip_keys:
Expand Down
4 changes: 2 additions & 2 deletions netjsonconfig/backends/openvpn/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@
"pattern": "^(\\S*)$",
"propertyOrder": 29,
},
"script_security_level": {
"title": "script security level",
"script_security": {
"title": "script security",
"type": "integer",
"enum": [0, 1, 2, 3],
"default": 1,
Expand Down
8 changes: 4 additions & 4 deletions tests/openvpn/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_server_mode(self):
"persist_tun": True,
"port": 1194,
"proto": "udp",
"script_security_level": 0,
"script_security": 0,
"secret": "",
"status": "/var/log/openvpn.status 10",
"status_version": 1,
Expand Down Expand Up @@ -85,7 +85,7 @@ def test_server_mode(self):
persist-tun
port 1194
proto udp
script-security-level 0
script-security 0
status /var/log/openvpn.status 10
status-version 1
tls-server
Expand Down Expand Up @@ -139,7 +139,7 @@ def test_client_mode(self):
}
],
"resolv_retry": True,
"script_security_level": 1,
"script_security": 1,
"secret": "",
"status": "/var/log/openvpn.status 30",
"status_version": 1,
Expand Down Expand Up @@ -179,7 +179,7 @@ def test_client_mode(self):
remote vpn1.test.com 1194
remote vpn2.test.com 1195
resolv-retry
script-security-level 1
script-security 1
status /var/log/openvpn.status 30
status-version 1
tls-client
Expand Down
8 changes: 4 additions & 4 deletions tests/openwrt/test_openvpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_server_mode(self):
"persist_tun": True,
"port": 1194,
"proto": "udp",
"script_security_level": 0,
"script_security": 0,
"secret": "",
"status": "/var/log/openvpn.status 10",
"status_version": 1,
Expand Down Expand Up @@ -89,7 +89,7 @@ def test_server_mode(self):
option persist_tun '1'
option port '1194'
option proto 'udp'
option script_security_level '0'
option script_security '0'
option status '/var/log/openvpn.status 10'
option status_version '1'
option tls_server '1'
Expand Down Expand Up @@ -144,7 +144,7 @@ def test_client_mode(self):
}
],
"resolv_retry": True,
"script_security_level": 1,
"script_security": 1,
"secret": "",
"status": "/var/log/openvpn.status 30",
"status_version": 1,
Expand Down Expand Up @@ -186,7 +186,7 @@ def test_client_mode(self):
list remote 'vpn1.test.com 1194'
list remote 'vpn2.test.com 1195'
option resolv_retry '1'
option script_security_level '1'
option script_security '1'
option status '/var/log/openvpn.status 30'
option status_version '1'
option tls_client '1'
Expand Down

0 comments on commit 7bc283a

Please sign in to comment.