Merge lp:~smoser/cloud-init/landscape-client.lp857366 into lp:~cloud-init-dev/cloud-init/trunk

Proposed by Scott Moser
Status: Merged
Merged at revision: 496
Proposed branch: lp:~smoser/cloud-init/landscape-client.lp857366
Merge into: lp:~cloud-init-dev/cloud-init/trunk
Diff against target: 0 lines
To merge this branch: bzr merge lp:~smoser/cloud-init/landscape-client.lp857366
Reviewer Review Type Date Requested Status
Mike Milner (community) Approve
Andreas Hasenack Pending
Review via email: mp+86468@code.launchpad.net

Commit message

support configuration of landscape-client via cloud-config (LP: #857366)

This adds the ability to configure landscape client code from
cloud-config. The fields available are those that were populated to
/etc/landscape/client.conf when I ran landscape-config on precise
('11.07.1.1-0ubuntu2')

To post a comment you must log in.
Revision history for this message
Mike Milner (milner) wrote :

Looks great!

[1]
63 + if len(objs) == 0:
64 + return { }
65 + cfg = ConfigObj(objs[1])
66 + for obj in objs[1:]:
67 + if isinstance(obj, ConfigObj):
68 + cfg.merge(obj)
69 + else:
70 + cfg.merge(ConfigObj(obj))

On line 65, should that be objs[0]? Otherwise it seems like the first entry will be ignored.

[2]
The lsc_builtincfg constant has the same settings as the default landscape-client configuration file. Since this branch also loads that default config file, it might be better to leave the defaults out of cloud-init - that way if we change the defaults in landscape-client's config file we won't have to update cloud-init as well.

review: Approve
Revision history for this message
Scott Moser (smoser) wrote :

for 1, you're right. i will fix that.
For 2, i considered that. I wanted to address the possibility of there not being a config file there. If you change the defaults in landscape (and it is updated in the config file), those will still trump the built-in from cloud-init.

What do you think?

497. By Scott Moser

fix bug where first entry in the list presented to mergeTogether was ignored

Preview Diff

Empty