summaryrefslogtreecommitdiffstats
path: root/lib/python/apex/deploy_settings.py
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-12-21 19:39:51 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-21 19:39:51 +0000
commit6a6e2dee30562e14a99bf979b65e6817ad08d75a (patch)
treeb257d9833d2623a619341d5de7c25964f80b029f /lib/python/apex/deploy_settings.py
parentffb4f46e5ea022e0688cce672395f2dde409e88e (diff)
parent4e1320c4235476d7e2a0a90f80997e8371c5f399 (diff)
Merge "Adds declaring disk device to use on overcloud nodes"
Diffstat (limited to 'lib/python/apex/deploy_settings.py')
-rw-r--r--lib/python/apex/deploy_settings.py9
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):