Merge "Replace yaml with fuelmenu module as yaml parser"

This commit is contained in:
Jenkins 2016-01-19 14:01:32 +00:00 committed by Gerrit Code Review
commit ff8e7242e5
1 changed files with 6 additions and 4 deletions

View File

@ -275,8 +275,9 @@ make_ubuntu_bootstrap_stub () {
get_bootstrap_flavor () {
local ASTUTE_YAML='/etc/fuel/astute.yaml'
python <<-EOF
from fuelmenu.fuelmenu import Settings
conf = Settings().read("$ASTUTE_YAML").get('BOOTSTRAP', {})
from yaml import safe_load
with open("$ASTUTE_YAML", 'r') as f:
conf = safe_load(f).get('BOOTSTRAP', {})
print(conf.get('flavor', 'centos').lower())
EOF
}
@ -284,8 +285,9 @@ get_bootstrap_flavor () {
get_bootstrap_skip () {
local ASTUTE_YAML='/etc/fuel/astute.yaml'
python <<-EOF
from fuelmenu.fuelmenu import Settings
conf = Settings().read("$ASTUTE_YAML").get('BOOTSTRAP', {})
from yaml import safe_load
with open("$ASTUTE_YAML", 'r') as f:
conf = safe_load(f).get('BOOTSTRAP', {})
print(conf.get('skip_default_img_build', False))
EOF
}