Merge lp://staging/~vila/u1-test-utils/lxc into lp://staging/u1-test-utils
Proposed by
Vincent Ladeuil
Status: | Merged |
---|---|
Approved by: | Vincent Ladeuil |
Approved revision: | 119 |
Merged at revision: | 93 |
Proposed branch: | lp://staging/~vila/u1-test-utils/lxc |
Merge into: | lp://staging/u1-test-utils |
Diff against target: |
1423 lines (+556/-280) 3 files modified
setup_vm/bin/setup_vm.py (+364/-171) setup_vm/tests/test_setup_vm.py (+176/-109) setup_vm/vms.conf (+16/-0) |
To merge this branch: | bzr merge lp://staging/~vila/u1-test-utils/lxc |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Leo Arias (community) | code review. | Approve | |
Review via email: mp+179236@code.staging.launchpad.net |
Commit message
Start implementing lxc support.
Description of the change
Here comes lxc support \o/
vms should now declare which class they are (kvm or lxc) via vm.class.
I thought about keeping kvm as a default for hiterycal raisins but... that
doesn't seem to be the most appropriate default ;)
I've yet to implement vm.backing for lxc so don't search for it.
Expect for that everything else should work but may need to be polished (doc
included).
To post a comment you must log in.
I think LXC would be a good default for vm.class.
29 + help='''Where lxc definitions are stored.'''
Why does it have three quotes?
94 + :return: False if the file is in the download cache, True if a download
95 + occurred.
This is more like: True if a download ocurred. False if the file is in the download cache and we are not forcing the download.
137 + def download(self): rror(self. download)
138 + raise NotImplementedE
Shouldn't this be the same call to wget you do on _download_in_cache?
If this should be implemented on the children classes, I think that would be a better errror message for the exception raised.
526 + # Create an lxc, relying on cloud-init to customize the base image.
This would be better as a docstring.
951 + tests.requires_ feature( self, tests.sudo_feature)
This is already on the setUp.
1395 +[lxc1]
What's this lxc machine for? If you are using it for something, it should have a better name.
The branch looks really good. There are things I don't yet understand, from the libraries you are using or from cloud-init. But you have my +1. Next week I hope I will be able to give it a try.