mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
VR: remove vpn user info when apply vpn users list (#9568)
Prior to this PR
```
root@r-663-VM:/var/cache/cloud# gzip -dk vpn_user_list.json.aae73e2c-32ba-44f3-bf47-426933a67bcb.gz
root@r-663-VM:/var/cache/cloud# /opt/cloud/bin/update_config.py vpn_user_list.json.aae73e2c-32ba-44f3-bf47-426933a67bcb
{'id': 'vpnuserlist', 'test': {'add': True, 'password': 'test', 'user': 'test'}}
{'vpn_users': [{'user': 'test', 'password': 'test', 'add': True}], 'type': 'vpnuserlist', 'delete_from_processed_cache': False}
line = # Secrets for authentication using CHAP
line = # client server secret IP addresses
line =
line =
line = test * test *
```
with this PR
```
root@r-663-VM:/var/cache/cloud# gzip -dk vpn_user_list.json.aae73e2c-32ba-44f3-bf47-426933a67bcb.gz
root@r-663-VM:/var/cache/cloud# /opt/cloud/bin/update_config.py vpn_user_list.json.aae73e2c-32ba-44f3-bf47-426933a67bcb
root@r-663-VM:/var/cache/cloud#
```
This commit is contained in:
parent
2143559020
commit
1ca9a10912
@ -153,7 +153,6 @@ class CsFile:
|
||||
logging.debug("Searching for %s string " % search)
|
||||
|
||||
for index, line in enumerate(self.new_config):
|
||||
print ' line = ' + line
|
||||
if line.lstrip().startswith(ignoreLinesStartWith):
|
||||
continue
|
||||
if search in line:
|
||||
|
||||
@ -22,8 +22,6 @@ import copy
|
||||
def merge(dbag, data):
|
||||
dbagc = copy.deepcopy(dbag)
|
||||
|
||||
print dbag
|
||||
print data
|
||||
if "vpn_users" not in data:
|
||||
return dbagc
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user