From ce998b5957b72f75488d600a19ff2815362e2941 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Thu, 22 Aug 2024 11:45:45 +0200 Subject: [PATCH] VR: remove vpn user info when apply vpn users list 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 2ee631a89d60..a60b6c6ad2ee 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsFile.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsFile.py @@ -153,7 +153,6 @@ def searchString(self, search, ignoreLinesStartWith): 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 3bef1fec239a..7188741d5185 100755 --- a/systemvm/debian/opt/cloud/bin/cs_vpnusers.py +++ b/systemvm/debian/opt/cloud/bin/cs_vpnusers.py @@ -22,8 +22,6 @@ def merge(dbag, data): dbagc = copy.deepcopy(dbag) - print dbag - print data if "vpn_users" not in data: return dbagc