summaryrefslogtreecommitdiffstats
path: root/odl-pipeline/lib/test_environment
diff options
context:
space:
mode:
authorNikolas Hermanns <nikolas.hermanns@ericsson.com>2016-12-13 15:29:34 +0100
committerNikolas Hermanns <nikolas.hermanns@ericsson.com>2016-12-13 15:33:20 +0100
commitffd8e8b0ec3e301980b4a0c3a49adf38d70060d1 (patch)
treeb9353dde85a3b862abbb98254b32d904e0cd87c7 /odl-pipeline/lib/test_environment
parentedff2695d6956d59b22951043f970fc55cddbe16 (diff)
small bugfixes for test_environment
Change-Id: Ic3af41c1a0f635bea4222a7a37103bdd8b57cef3 Signed-off-by: Nikolas Hermanns <nikolas.hermanns@ericsson.com>
Diffstat (limited to 'odl-pipeline/lib/test_environment')
-rwxr-xr-xodl-pipeline/lib/test_environment/test_environment.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/odl-pipeline/lib/test_environment/test_environment.py b/odl-pipeline/lib/test_environment/test_environment.py
index 8af6b58..ed961d2 100755
--- a/odl-pipeline/lib/test_environment/test_environment.py
+++ b/odl-pipeline/lib/test_environment/test_environment.py
@@ -22,7 +22,7 @@ class TestEnvironment(Service):
self.cleanup()
if sys_args.cleanup:
return
- if not sys_args.cloner_info or not sys_args.snapshot_disk\
+ if not sys_args.cloner_info or not sys_args.snapshot_disks\
or not sys_args.vjump_hosts:
LOG.error('--cloner-info, --snapshot-disks and --vjump-hosts '
' have to be given if not only --cleanup.')
@@ -88,20 +88,20 @@ class TestEnvironment(Service):
'host_cpu': cores})
# Upload cloner_info to jenkins slave
- jenkins_slaves = NodeManager(
- utils_yaml.read_dict_from_yaml(
- sys_args.vjump_hosts)['servers']).get_nodes()
- if 'CLONER_INFO' in os.environ:
- cloner_info_path = os.environ['CLONER_INFO']
- else:
- cloner_info_path = '/home/jenkins/cloner-info/'
node_name = 'jenkins%s' % self.env
- if node_name not in jenkins_slaves:
+ jenkins_node_config = utils_yaml.read_dict_from_yaml(
+ sys_args.vjump_hosts)['servers']
+ if node_name not in jenkins_node_config:
raise Exception('Jenkins host %s not provided in %s'
% (node_name,
sys_args.vjump_hosts))
- jenkins_slaves[node_name].copy('to', sys_args.cloner_info,
- cloner_info_path)
+ jenkins_slave = NodeManager(jenkins_node_config).get_node(node_name)
+ if 'CLONER_INFO' in os.environ:
+ cloner_info_path = os.environ['CLONER_INFO']
+ else:
+ cloner_info_path = '/home/jenkins/cloner-info/'
+ jenkins_slave.copy('to', sys_args.cloner_info,
+ cloner_info_path)
def check_if_br_exists(self, bridge):
_, (_, rc) = execute('ovs-vsctl br-exists %s' % bridge,