Dryd7 bootdata (#19)

get YAML formatted correctly
This commit is contained in:
Scott Hussey 2017-06-23 10:06:55 -05:00 committed by GitHub
parent deaf53f4d1
commit 8e5389b07d
2 changed files with 4 additions and 3 deletions

View File

@ -30,7 +30,7 @@ class BootdataResource(StatefulResource):
resp.content_type = 'text/plain'
return
elif data_key == 'prominit':
resp.boy = BootdataResource.prom_init
resp.body = BootdataResource.prom_init
resp.content_type = 'text/plain'
return
elif data_key == 'promconfig':
@ -64,7 +64,7 @@ class BootdataResource(StatefulResource):
if t is not None:
part_list.extend([i.document for i in tag_parts])
resp.body = "---\n" + "---\n".join(part_list) + "\n..."
resp.body = "---\n" + "---\n".join(part_list) + "...\n"
return
systemd_definition = \

View File

@ -371,6 +371,7 @@ class YamlIngester(IngesterPlugin):
target = metadata.get('target', 'all')
name = metadata.get('name', None)
model = objects.PromenadeConfig(target=target, name=name, kind=kind, document=yaml.dump(d))
model = objects.PromenadeConfig(target=target, name=name, kind=kind,
document=yaml.dump(d, default_flow_style=False).replace('\n\n','\n'))
models.append(model)
return models