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:
Wei Zhou 2024-09-04 08:27:28 +02:00 committed by GitHub
parent 2143559020
commit 1ca9a10912
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 3 deletions

View File

@ -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:

View File

@ -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