From 1ca9a10912d3a7014bb355a015cdf440f837b1ba Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Wed, 4 Sep 2024 08:27:28 +0200 Subject: [PATCH] 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# ``` --- systemvm/debian/opt/cloud/bin/cs/CsFile.py | 1 - systemvm/debian/opt/cloud/bin/cs_vpnusers.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/cs/CsFile.py b/systemvm/debian/opt/cloud/bin/cs/CsFile.py index 2ee631a89d6..a60b6c6ad2e 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsFile.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsFile.py @@ -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: diff --git a/systemvm/debian/opt/cloud/bin/cs_vpnusers.py b/systemvm/debian/opt/cloud/bin/cs_vpnusers.py index 3bef1fec239..7188741d518 100755 --- a/systemvm/debian/opt/cloud/bin/cs_vpnusers.py +++ b/systemvm/debian/opt/cloud/bin/cs_vpnusers.py @@ -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