Commit Graph

35 Commits

Author SHA1 Message Date
Stéphane Graber
be0f1011c6
Allow dump generator to add LXC templates
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2019-01-12 12:52:22 +02:00
Thomas Hipp
cdac765d15
tests: Use testify
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-07-03 11:46:54 +02:00
Thomas Hipp
209ebeec86
generators: Append empty line to template files
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-06-28 18:29:10 +02:00
Robbert Müller
0e9f2c29f7
Fixed default handling for when
Signed-off-by: Robbert Müller <spam.me@grols.ch>
2018-05-19 14:01:44 +02:00
Robbert Müller
cdd6c0ad68
Fixed comment
Signed-off-by: Robbert Müller <spam.me@grols.ch>
2018-05-19 13:38:38 +02:00
Robbert Müller
77735dbe97
Reorder imports
Signed-off-by: Robbert Müller <spam.me@grols.ch>
2018-05-19 13:37:59 +02:00
Robbert Müller
269cf6e086
Added basic testcase
Signed-off-by: Robbert Müller <spam.me@grols.ch>
2018-05-15 21:17:08 +02:00
Robbert Müller
3d740e81a7
rename settings to template
Signed-off-by: Robbert Müller <spam.me@grols.ch>
2018-05-15 21:17:07 +02:00
Robbert Müller
b366c2f18a
Rename dump-template to template
Signed-off-by: Robbert Müller <spam.me@grols.ch>
2018-05-15 21:17:06 +02:00
Robbert Müller
00b7960175
Added properties and when for template settings
Signed-off-by: Robbert Müller <spam.me@grols.ch>
2018-05-15 21:17:05 +02:00
Robbert Müller
5caea3a384
add dump-template generator to add templates to the image
This generator tries to follow to dump generator but for templates.

Changes:
- added name field `files: []` for the name of the template.
  .tpl is appended automaticly
- added dump-template to the generator code/definition

Signed-off-by: Robbert Müller <spam.me@grols.ch>
2018-05-15 21:17:04 +02:00
Stéphane Graber
cf9a51df82
More consistent new-line handling
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-14 21:26:50 -04:00
Stéphane Graber
4985f88024
generator: Also prepend host entry on LXD
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-14 14:52:33 -04:00
Thomas Hipp
a2c72417fc
*: Fix tests
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-03-14 17:19:21 +01:00
Stéphane Graber
d248b6782d
generators: Make more robust
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-13 18:07:13 -04:00
Stéphane Graber
b6cb7c9150
generators: Add upstart-tty generator
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-13 16:55:06 -04:00
Stéphane Graber
b233e6a315
Improve /etc/hosts generator
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-13 12:39:10 -04:00
Thomas Hipp
9674157c83
test: Fix test
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-03-09 10:36:27 +01:00
Thomas Hipp
4a3902cf0f
*: Fix minor issues
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-03-09 10:30:28 +01:00
Thomas Hipp
7ad2f482cd
generators: Simplify code
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-03-08 17:13:25 +01:00
Thomas Hipp
d4c62c74ac
generators: Extend generators by Run() command
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-03-08 17:04:47 +01:00
Thomas Hipp
23c736ba58
generators: Add dump generator
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-03-07 17:35:28 +01:00
Thomas Hipp
64ca66571f
generators: Add generator for removing files
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-03-07 17:24:41 +01:00
Thomas Hipp
ba33cd231c
generators: Change interface functions
Rename to RunLX{C,D} since they are not only for file creation.
Change signature for possible future arguments.

Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-03-07 17:10:37 +01:00
Thomas Hipp
3520763f54
Update tests
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-03-07 11:01:36 +01:00
Thomas Hipp
5164681635
generators: Add sourceDir to generators
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-03-07 09:38:23 +01:00
Stéphane Graber
501ff22c41
Merge pull request #26 from monstermunchkin/issues/13
*: Switch to cobra CLI
2018-03-06 11:33:57 +01:00
Thomas Hipp
3530b9b87d
*: Fix imports
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-03-06 11:16:22 +01:00
Thomas Hipp
5f4b4b25c5
*: Switch to cobra CLI
Resolves #13

Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-03-05 17:49:56 +01:00
Thomas Hipp
6d41725ead
generators: Add tests
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-03-05 12:06:23 +01:00
Thomas Hipp
9f78ca37b4
generators: Fix Restore
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-03-05 12:06:10 +01:00
Thomas Hipp
629f62715e
*: Don't redefine structs
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-02-22 16:43:57 +01:00
Thomas Hipp
3ee4993f42
generators: Copy files instead of moving them
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-02-22 16:43:57 +01:00
Thomas Hipp
5353fb62ca
*: Improve comments and error handling
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-02-22 16:43:57 +01:00
Thomas Hipp
c748c3849a
generators: Add generators
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-02-22 10:15:19 +01:00