summaryrefslogtreecommitdiffstats
path: root/fuel
diff options
context:
space:
mode:
Diffstat (limited to 'fuel')
-rw-r--r--fuel/deploy/cloud/configure_nodes.py2
-rw-r--r--fuel/deploy/common.py3
-rw-r--r--fuel/deploy/deploy.py29
-rw-r--r--fuel/deploy/install_fuel_master.py27
4 files changed, 45 insertions, 16 deletions
diff --git a/fuel/deploy/cloud/configure_nodes.py b/fuel/deploy/cloud/configure_nodes.py
index 06199d2..e76d222 100644
--- a/fuel/deploy/cloud/configure_nodes.py
+++ b/fuel/deploy/cloud/configure_nodes.py
@@ -88,7 +88,7 @@ class ConfigureNodes(object):
interface_yaml = ('%s/node_%s/interfaces.yaml'
% (self.yaml_config_dir, node_id))
check_file_exists(interface_yaml)
- backup(interface_yaml)
+ backup('%s/node_%s' % (self.yaml_config_dir, node_id))
with io.open(interface_yaml) as stream:
interfaces = yaml.load(stream)
diff --git a/fuel/deploy/common.py b/fuel/deploy/common.py
index 3472e89..ab2bf68 100644
--- a/fuel/deploy/common.py
+++ b/fuel/deploy/common.py
@@ -13,6 +13,7 @@ import os
import logging
import argparse
import shutil
+import stat
import errno
N = {'id': 0, 'status': 1, 'name': 2, 'cluster': 3, 'ip': 4, 'mac': 5,
@@ -31,7 +32,7 @@ LOG.addHandler(out_handler)
out_handler = logging.FileHandler('autodeploy.log', mode='w')
out_handler.setFormatter(formatter)
LOG.addHandler(out_handler)
-
+os.chmod('autodeploy.log', stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
def exec_cmd(cmd, check=True):
process = subprocess.Popen(cmd,
diff --git a/fuel/deploy/deploy.py b/fuel/deploy/deploy.py
index 304db66..1acce42 100644
--- a/fuel/deploy/deploy.py
+++ b/fuel/deploy/deploy.py
@@ -242,15 +242,26 @@ def parse_arguments():
parser.add_argument('-c', dest='cleanup', action='store_true',
default=False,
help='Cleanup after deploy')
- parser.add_argument('-iso', dest='iso_file', action='store', nargs='?',
- default='%s/OPNFV.iso' % CWD,
- help='ISO File [default: OPNFV.iso]')
- parser.add_argument('-dea', dest='dea_file', action='store', nargs='?',
- default='%s/dea.yaml' % CWD,
- help='Deployment Environment Adapter: dea.yaml')
- parser.add_argument('-dha', dest='dha_file', action='store', nargs='?',
- default='%s/dha.yaml' % CWD,
- help='Deployment Hardware Adapter: dha.yaml')
+ if {'-iso', '-dea', '-dha', '-h'}.intersection(sys.argv):
+ parser.add_argument('-iso', dest='iso_file', action='store', nargs='?',
+ default='%s/OPNFV.iso' % CWD,
+ help='ISO File [default: OPNFV.iso]')
+ parser.add_argument('-dea', dest='dea_file', action='store', nargs='?',
+ default='%s/dea.yaml' % CWD,
+ help='Deployment Environment Adapter: dea.yaml')
+ parser.add_argument('-dha', dest='dha_file', action='store', nargs='?',
+ default='%s/dha.yaml' % CWD,
+ help='Deployment Hardware Adapter: dha.yaml')
+ else:
+ parser.add_argument('iso_file', action='store', nargs='?',
+ default='%s/OPNFV.iso' % CWD,
+ help='ISO File [default: OPNFV.iso]')
+ parser.add_argument('dea_file', action='store', nargs='?',
+ default='%s/dea.yaml' % CWD,
+ help='Deployment Environment Adapter: dea.yaml')
+ parser.add_argument('dha_file', action='store', nargs='?',
+ default='%s/dha.yaml' % CWD,
+ help='Deployment Hardware Adapter: dha.yaml')
parser.add_argument('-s', dest='storage_dir', action='store',
default='%s/images' % CWD,
help='Storage Directory [default: images]')
diff --git a/fuel/deploy/install_fuel_master.py b/fuel/deploy/install_fuel_master.py
index da313b0..9a2599c 100644
--- a/fuel/deploy/install_fuel_master.py
+++ b/fuel/deploy/install_fuel_master.py
@@ -125,12 +125,9 @@ class InstallFuelMaster(object):
return fuel_menu_pid
def get_fuel_menu_pid(self, printout, search):
- fuel_menu_pid = None
for line in printout.splitlines():
- if search in line:
- fuel_menu_pid = clean(line)[1]
- break
- return fuel_menu_pid
+ if line.endswith(search):
+ return clean(line)[1]
def ssh_exec_cmd(self, cmd, check=True):
with self.ssh:
@@ -186,3 +183,23 @@ class InstallFuelMaster(object):
log('Delete deprecated fuel client config %s' % FUEL_CLIENT_CONFIG)
with self.ssh as s:
s.exec_cmd('rm %s' % FUEL_CLIENT_CONFIG, False)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+