Skip to content

Commit

Permalink
VR: remove vpn user info when apply vpn users list
Browse files Browse the repository at this point in the history
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#
```
  • Loading branch information
weizhouapache committed Aug 22, 2024
1 parent 1a403f1 commit ce998b5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion systemvm/debian/opt/cloud/bin/cs/CsFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions systemvm/debian/opt/cloud/bin/cs_vpnusers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
def merge(dbag, data):
dbagc = copy.deepcopy(dbag)

print dbag
print data
if "vpn_users" not in data:
return dbagc

Expand Down

0 comments on commit ce998b5

Please sign in to comment.