diff options
author | Tim Rozet <trozet@redhat.com> | 2016-11-30 11:03:02 -0500 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2016-12-20 21:16:31 +0000 |
commit | 4e1320c4235476d7e2a0a90f80997e8371c5f399 (patch) | |
tree | fb3414be4be572f83327720c097308f06510abb6 /lib/python/apex/deploy_settings.py | |
parent | a90e29d412664322bb5b0602ae4870439a0ed038 (diff) |
Adds declaring disk device to use on overcloud nodes
Now in inventory file a user can declare 'disk_device' which will allow
the user to specify which disk on their overcloud server to use for
installation. The variable can be a comma delimited list, which will
search in order post-introspection for the first device on the node that
exists. The default disk used will be sda for deployments.
Currently defining a per node disk is not supported by OSCLI, so
although defined that way in Apex inventory, only the last definition
will be used for all nodes.
Other changes include:
- Various fixes in inventory parsing
- Makes bash writing a common function
- Introspection now enabled for baremetal deployments
JIRA: APEX-296
Change-Id: I330d91eb17408ccfceb7a99c25edbae5ce6d848d
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'lib/python/apex/deploy_settings.py')
-rw-r--r-- | lib/python/apex/deploy_settings.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/python/apex/deploy_settings.py b/lib/python/apex/deploy_settings.py index e2d37c82..3133d7f8 100644 --- a/lib/python/apex/deploy_settings.py +++ b/lib/python/apex/deploy_settings.py @@ -11,6 +11,8 @@ import yaml import logging +from .common import utils + REQ_DEPLOY_SETTINGS = ['sdn_controller', 'odl_version', 'sdn_l3', @@ -165,12 +167,7 @@ class DeploySettings(dict): if 'performance' in self['deploy_options']: bash_str += self._dump_performance() bash_str += self._dump_deploy_options_array() - - if path: - with open(path, 'w') as file: - file.write(bash_str) - else: - print(bash_str) + utils.write_str(bash_str, path) class DeploySettingsException(Exception): |