Code Review
/
apex.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
Adds declaring disk device to use on overcloud nodes
[apex.git]
/
lib
/
python
/
apex
/
common
/
utils.py
diff --git
a/lib/python/apex/common/utils.py
b/lib/python/apex/common/utils.py
index
d623638
..
8e6896f
100644
(file)
--- 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)