]> review.fuel-infra Code Review - openstack-build/heat-build.git/commit
Refactor loguserdata.py so it can be tested.
authorSteve Baker <sbaker@redhat.com>
Mon, 4 Feb 2013 21:10:11 +0000 (10:10 +1300)
committerSteve Baker <sbaker@redhat.com>
Wed, 6 Feb 2013 19:45:18 +0000 (08:45 +1300)
commitc598d0d3e81b0dbd46fe9239a49ffda16ced5378
treedde2722aa18f8ccf1b821bfd8a72fa29e1368ee6
parented14ca1426eaacbfb1ebdf224b2e9ac058619f81
Refactor loguserdata.py so it can be tested.

- Use distutils.version.LooseVersion for cloud-init version check
- Fix bug 1100287 by setting the following modes:
  - 0600 /var/log/heat-provision.log
  - 0700 /var/lib/heat
  - 0700 /var/lib/cloud/data/cfn-userdata (was 0111!)
- Full test coverage except for where __name__ == '__main__'
- File size has gone from 1218 bytes to 1636. If necessary we could reduce size in the future by using short names

This works for me when launching a template. At least if there are any regressions they can have a test written for the fix.
Change-Id: I04e773a743ec210e90394e50d2bb70c70664e80e
heat/cloudinit/__init__.py [new file with mode: 0644]
heat/cloudinit/loguserdata.py
heat/tests/test_loguserdata.py [new file with mode: 0644]