summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@intel.com>2021-07-16 11:40:11 +0200
committerLuc Provoost <luc.provoost@intel.com>2021-07-16 11:40:11 +0200
commit8a12bf3b9202cfb02102c9f179dc2cc15be79a63 (patch)
tree4881c61876131a6c7eb24ecfa53b7a2f2927c1c0 /VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
parent1c4e666aef045b3aa5eb9999e66b44db00cd47c7 (diff)
Using paramiko for all ssh & scp
By using paramiko, we can now also use differnt credentials to login into the PROX instances. In the ssh section of the environment file, you can now also add the password parameter. Change-Id: I08d31cbf0d02d7e82b7fbe34268851f73ff5dde0 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py')
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
index d7d8fabc..eba71d96 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
@@ -53,14 +53,21 @@ class RapidConfigParser(object):
config = configparser.RawConfigParser()
config.read(test_params['environment_file'])
test_params['vim_type'] = config.get('Varia', 'vim')
- test_params['key'] = config.get('ssh', 'key')
test_params['user'] = config.get('ssh', 'user')
- if test_params['user'] in ['rapid']:
- if test_params['key'] != 'rapid_rsa_key':
- RapidLog.debug(("Key file {} for user {} overruled by key file:"
- " rapid_rsa_key").format(test_params['key'],
- test_params['user']))
- test_params['key'] = 'rapid_rsa_key'
+ if config.has_option('ssh', 'key'):
+ test_params['key'] = config.get('ssh', 'key')
+ if test_params['user'] in ['rapid']:
+ if test_params['key'] != 'rapid_rsa_key':
+ RapidLog.debug(("Key file {} for user {} overruled by key file:"
+ " rapid_rsa_key").format(test_params['key'],
+ test_params['user']))
+ test_params['key'] = 'rapid_rsa_key'
+ else:
+ test_params['key'] = None
+ if config.has_option('ssh', 'password'):
+ test_params['password'] = config.get('ssh', 'password')
+ else:
+ test_params['password'] = None
test_params['total_number_of_machines'] = int(config.get('rapid',
'total_number_of_machines'))
tests = []