Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use yaml tags in pongo2 templates #63

Merged
merged 7 commits into from Mar 14, 2018

Conversation

2 participants
@monstermunchkin
Copy link
Member

commented Mar 14, 2018

Use the yaml tags instead of the struct names in the templates.

Serial: "testing",
var lxdDef = shared.Definition{
Image: shared.DefinitionImage{
Description: "{{ image. distribution|capfirst }} {{ image.release }}",

This comment has been minimized.

Copy link
@stgraber

stgraber Mar 14, 2018

Member

The space between "image." and "distribution" looks wrong. I guess it doesn't matter since it was broken before, but probably worth fixing :)

This comment has been minimized.

Copy link
@monstermunchkin

monstermunchkin Mar 14, 2018

Author Member

Interestingly, this doesn't fail since pongo appears to still outputs the correct value. I'll fix it anyway since it looks weird.

@stgraber

This comment has been minimized.

Copy link
Member

commented Mar 14, 2018

Shouldn't the README also be updated to use the lowercase variable names in the templates?

@monstermunchkin

This comment has been minimized.

Copy link
Member Author

commented Mar 14, 2018

Yes, the README.md needs to be updated. It didn't include templating an hour ago, but now I see it does ;-)

monstermunchkin added some commits Mar 14, 2018

*: Use yaml tags in templates
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
*: Fix tests
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
definition: Rename arch to architecture (yaml)
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
test: Verify LXC create-message
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
shared: Clean up tarball if tar fails
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
test: Fix weird looking template
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
Update README.md
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>

@monstermunchkin monstermunchkin force-pushed the monstermunchkin:issues/template-map branch from a05c374 to 8de7423 Mar 14, 2018

@monstermunchkin

This comment has been minimized.

Copy link
Member Author

commented Mar 14, 2018

Updated

@stgraber stgraber merged commit 3e77322 into lxc:master Mar 14, 2018

3 checks passed

Branch target Branch target is correct
Details
DCO All commits signed-off
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@monstermunchkin monstermunchkin deleted the monstermunchkin:issues/template-map branch Mar 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.