X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=fuel%2Fdeploy%2Fenvironments%2Fexecution_environment.py;h=63be5cd118846ee0e792c9183fc743af1dd7fd9c;hb=563547b4a9f44090f32c0e17d040114854563760;hp=4f612a6d4f960f31d06aeb9530ac18ecbb000329;hpb=fbac78cb5277b044f3318c831d4da92663097a6c;p=genesis.git 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)