diff options
Diffstat (limited to 'lib/python/apex/common')
-rw-r--r-- | lib/python/apex/common/constants.py | 1 | ||||
-rw-r--r-- | lib/python/apex/common/utils.py | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/python/apex/common/constants.py b/lib/python/apex/common/constants.py index 741bb4f8..3aa28eab 100644 --- a/lib/python/apex/common/constants.py +++ b/lib/python/apex/common/constants.py @@ -27,3 +27,4 @@ COMPUTE_PRE = "OS::TripleO::ComputeExtraConfigPre" CONTROLLER_PRE = "OS::TripleO::ControllerExtraConfigPre" PRE_CONFIG_DIR = "/usr/share/openstack-tripleo-heat-templates/puppet/" \ "extraconfig/pre_deploy/" +DEFAULT_ROOT_DEV = 'sda' diff --git a/lib/python/apex/common/utils.py b/lib/python/apex/common/utils.py index d623638c..8e6896fa 100644 --- a/lib/python/apex/common/utils.py +++ b/lib/python/apex/common/utils.py @@ -21,3 +21,11 @@ def parse_yaml(yaml_file): with open(yaml_file) as f: parsed_dict = yaml.safe_load(f) return parsed_dict + + +def write_str(bash_str, path=None): + if path: + with open(path, 'w') as file: + file.write(bash_str) + else: + print(bash_str) |