From a98bf1747db2894394da929d07bde78a1ec19015 Mon Sep 17 00:00:00 2001 From: Szilard Cserey Date: Tue, 18 Aug 2015 19:47:50 +0200 Subject: Autodeployer support for ODL Plugin installation + Fuel 6.1 - Opendaylight plugin installation - Adapting Autodeployer to Fuel 6.1 - restarting blades that couldn't be discovered Fuel in time BGS-87 Autodeployment restarts blade if that has not been discovered by Fuel BGS-90 Fuel 6.1 and Opendaylight Fuel plugin install support for Autodeployer Change-Id: I83aab3f8caf368a70fd3f2b67c7ba1b6191993c6 Signed-off-by: Szilard Cserey --- fuel/deploy/environments/execution_environment.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'fuel/deploy/environments/execution_environment.py') diff --git a/fuel/deploy/environments/execution_environment.py b/fuel/deploy/environments/execution_environment.py index 4f612a6..63be5cd 100644 --- a/fuel/deploy/environments/execution_environment.py +++ b/fuel/deploy/environments/execution_environment.py @@ -1,3 +1,13 @@ +############################################################################### +# Copyright (c) 2015 Ericsson AB and others. +# szilard.cserey@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################### + + from lxml import etree import common @@ -10,6 +20,7 @@ check_dir_exists = common.check_dir_exists check_file_exists = common.check_file_exists check_if_root = common.check_if_root + class ExecutionEnvironment(object): def __init__(self, storage_dir, dha_file, root_dir): @@ -54,8 +65,8 @@ class ExecutionEnvironment(object): uuid.getparent().remove(uuid) disks = vm_xml.xpath('/domain/devices/disk') for disk in disks: - if (disk.get('type') == 'file' - and disk.get('device') == 'disk'): + if (disk.get('type') == 'file' and + disk.get('device') == 'disk'): sources = disk.xpath('source') for source in sources: disk.remove(source) @@ -64,4 +75,4 @@ class ExecutionEnvironment(object): disk.append(source) with open(temp_vm_file, 'w') as f: vm_xml.write(f, pretty_print=True, xml_declaration=True) - exec_cmd('virsh define %s' % temp_vm_file) \ No newline at end of file + exec_cmd('virsh define %s' % temp_vm_file) -- cgit 1.2.3-korg