Skip to content

Commit

Permalink
[req-changes] Updated zerotier & openvpn __netjson_vpn method code co…
Browse files Browse the repository at this point in the history
…mment
  • Loading branch information
Aryamanz29 committed Jul 27, 2023
1 parent d1c39a6 commit db1a216
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion netjsonconfig/backends/openwrt/converters/openvpn.py
Expand Up @@ -18,7 +18,7 @@ def __intermediate_vpn(self, vpn):
def __netjson_vpn(self, vpn):
if vpn.get('server_bridge') == '1':
vpn['server_bridge'] = ''
# 'enabled' defaults to False in OpenWRT
# 'disabled' defaults to False in OpenWRT
vpn['disabled'] = vpn.pop('enabled', '0') == '0'
vpn['name'] = vpn.pop('.name')
del vpn['.type']
Expand Down
2 changes: 1 addition & 1 deletion netjsonconfig/backends/openwrt/converters/zerotier.py
Expand Up @@ -21,7 +21,7 @@ def __intermediate_vpn(self, vpn):
def __netjson_vpn(self, vpn):
vpn['id'] = vpn.pop('join')
vpn['name'] = vpn.pop('.name').replace('_', '-')
# 'enabled' defaults to False in OpenWRT
# 'disabled' defaults to False in OpenWRT
vpn['disabled'] = vpn.pop('enabled', '0') == '0'
del vpn['.type']
return super().__netjson_vpn(vpn)

0 comments on commit db1a216

Please sign in to comment.