standardize ssh auth 43/34243/1
authorRoss Brattain <ross.b.brattain@intel.com>
Thu, 2 Mar 2017 01:28:46 +0000 (17:28 -0800)
committerJing Lu <lvjing5@huawei.com>
Thu, 4 May 2017 12:54:00 +0000 (12:54 +0000)
commit150481286dcf3c3c1fedd8213070cff48e5ad61d
treea8fc477a69e0a747612de328faaed57f55231973
parent478a499e8cb048abf434559c8d47259ec238ed24
standardize ssh auth

we need to be following defautl paramiko rules,
first use pkey, then key_filenames (autodetecting ~/.ssh/ keys),
then password

We have too much boilerplate redudant code everywhere, we need
to standardize on a factory function that takes a node dict.

Using Python3 ChainMap we can layer overrides and defaults.

VNF descriptors have to default key_filename, password to Python None.
The only way to do this is to omit key values if the variable is not
defined, this way the dict will not have the value and it will
default to Python None

Add python2 chainmap backport

Updated unittest mocking to use ssh.SSH.from_node

Change-Id: I80b0cb606e593b33e317c9e5e8ed0b74da591514
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
(cherry picked from commit 99abbb424007da2e01762f3c040a39c0157cbe1f)
88 files changed:
requirements.txt
samples/vnf_samples/vnf_descriptors/tg_ping_tpl.yaml
samples/vnf_samples/vnf_descriptors/tg_rfc2544_tpl.yaml
samples/vnf_samples/vnf_descriptors/tg_rfc2544_tpl_4port.yaml [new file with mode: 0644]
samples/vnf_samples/vnf_descriptors/tg_trex_tpl.yaml
samples/vnf_samples/vnf_descriptors/vpe_vnf.yaml
samples/vnf_samples/vnf_descriptors/vpe_vnf_4port.yaml [new file with mode: 0644]
tests/unit/benchmark/core/test_plugin.py
tests/unit/benchmark/scenarios/availability/test_attacker_baremetal.py
tests/unit/benchmark/scenarios/availability/test_attacker_general.py
tests/unit/benchmark/scenarios/availability/test_attacker_process.py
tests/unit/benchmark/scenarios/availability/test_monitor_command.py
tests/unit/benchmark/scenarios/availability/test_monitor_general.py
tests/unit/benchmark/scenarios/availability/test_monitor_process.py
tests/unit/benchmark/scenarios/availability/test_operation_general.py
tests/unit/benchmark/scenarios/availability/test_result_checker_general.py
tests/unit/benchmark/scenarios/compute/test_cachestat.py
tests/unit/benchmark/scenarios/compute/test_computecapacity.py
tests/unit/benchmark/scenarios/compute/test_cpuload.py
tests/unit/benchmark/scenarios/compute/test_cyclictest.py
tests/unit/benchmark/scenarios/compute/test_lmbench.py
tests/unit/benchmark/scenarios/compute/test_memload.py
tests/unit/benchmark/scenarios/compute/test_plugintest.py
tests/unit/benchmark/scenarios/compute/test_ramspeed.py
tests/unit/benchmark/scenarios/compute/test_unixbench.py
tests/unit/benchmark/scenarios/networking/test_iperf3.py
tests/unit/benchmark/scenarios/networking/test_netperf.py
tests/unit/benchmark/scenarios/networking/test_netperf_node.py
tests/unit/benchmark/scenarios/networking/test_netutilization.py
tests/unit/benchmark/scenarios/networking/test_networkcapacity.py
tests/unit/benchmark/scenarios/networking/test_nstat.py
tests/unit/benchmark/scenarios/networking/test_ping.py
tests/unit/benchmark/scenarios/networking/test_ping6.py
tests/unit/benchmark/scenarios/networking/test_pktgen.py
tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py
tests/unit/benchmark/scenarios/networking/test_sfc.py
tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
tests/unit/benchmark/scenarios/networking/test_vsperf.py
tests/unit/benchmark/scenarios/storage/test_fio.py
tests/unit/benchmark/scenarios/storage/test_storagecapacity.py
tests/unit/network_services/nfvi/test_resource.py
tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py
tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py
tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py
tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py
tests/unit/test_ssh.py
yardstick/benchmark/contexts/node.py
yardstick/benchmark/core/plugin.py
yardstick/benchmark/scenarios/availability/attacker/attacker_baremetal.py
yardstick/benchmark/scenarios/availability/attacker/attacker_general.py
yardstick/benchmark/scenarios/availability/attacker/attacker_process.py
yardstick/benchmark/scenarios/availability/monitor/monitor_command.py
yardstick/benchmark/scenarios/availability/monitor/monitor_general.py
yardstick/benchmark/scenarios/availability/monitor/monitor_process.py
yardstick/benchmark/scenarios/availability/operation/operation_general.py
yardstick/benchmark/scenarios/availability/result_checker/result_checker_general.py
yardstick/benchmark/scenarios/compute/cachestat.py
yardstick/benchmark/scenarios/compute/computecapacity.py
yardstick/benchmark/scenarios/compute/cpuload.py
yardstick/benchmark/scenarios/compute/cyclictest.py
yardstick/benchmark/scenarios/compute/lmbench.py
yardstick/benchmark/scenarios/compute/memload.py
yardstick/benchmark/scenarios/compute/perf.py
yardstick/benchmark/scenarios/compute/plugintest.py
yardstick/benchmark/scenarios/compute/ramspeed.py
yardstick/benchmark/scenarios/compute/unixbench.py
yardstick/benchmark/scenarios/networking/iperf3.py
yardstick/benchmark/scenarios/networking/netperf.py
yardstick/benchmark/scenarios/networking/netperf_node.py
yardstick/benchmark/scenarios/networking/netutilization.py
yardstick/benchmark/scenarios/networking/networkcapacity.py
yardstick/benchmark/scenarios/networking/nstat.py
yardstick/benchmark/scenarios/networking/ping.py
yardstick/benchmark/scenarios/networking/ping6.py
yardstick/benchmark/scenarios/networking/pktgen.py
yardstick/benchmark/scenarios/networking/pktgen_dpdk.py
yardstick/benchmark/scenarios/networking/sfc.py
yardstick/benchmark/scenarios/networking/vnf_generic.py
yardstick/benchmark/scenarios/networking/vsperf.py
yardstick/benchmark/scenarios/storage/fio.py
yardstick/benchmark/scenarios/storage/storagecapacity.py
yardstick/network_services/nfvi/resource.py
yardstick/network_services/vnf_generic/vnf/tg_ping.py
yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py
yardstick/network_services/vnf_generic/vnf/tg_trex.py
yardstick/network_services/vnf_generic/vnf/vpe_vnf.py
yardstick/network_services/vnf_generic/vnfdgen.py
yardstick/ssh.py