summaryrefslogtreecommitdiffstats
path: root/fuel/deploy/environments/execution_environment.py
diff options
context:
space:
mode:
Diffstat (limited to 'fuel/deploy/environments/execution_environment.py')
-rw-r--r--fuel/deploy/environments/execution_environment.py17
1 files changed, 14 insertions, 3 deletions
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)