On Tue, Dec 29, 2009 at 8:29 PM, Iustin Pop <[email protected]> wrote: > The chroot and fake hypervisors were missing: > > - the powercycle node functionality > - proper handling of migration requests > > The powercycle was just used as in the other hypervisors (use the > standard linux powercycle). The migration for chroot was disabled > explicitly, whereas for the fake one it was implemented to simulate > correctly. This required some work on the fake hypervisor, but now the > implementation of start/stop/etc. is much more clean. > --- > lib/hypervisor/hv_base.py | 4 +- > lib/hypervisor/hv_chroot.py | 20 +++++++++ > lib/hypervisor/hv_fake.py | 100 +++++++++++++++++++++++++++++++++++++----- > 3 files changed, 110 insertions(+), 14 deletions(-) > > diff --git a/lib/hypervisor/hv_chroot.py b/lib/hypervisor/hv_chroot.py > index 69b9fe2..e30ddf1 100644 > --- a/lib/hypervisor/hv_chroot.py > +++ b/lib/hypervisor/hv_chroot.py > @@ -255,3 +255,23 @@ class ChrootManager(hv_base.BaseHypervisor): > """ > if not os.path.exists(self._ROOT_DIR): > return "The required directory '%s' does not exist." % self._ROOT_DIR > + > + �...@classmethod > + def PowercycleNode(cls): > + """Chroot powercycle, just a wrapper over Linux powercycle. > + > + """ > + cls.LinuxPowercycle() > + > + def MigrateInstance(self, instance, target, live): > + """Migrate an instance. > + > + �...@type instance: L{object.Instance} > + �...@param instance: the instance to be migrated > + �...@type target: string > + �...@param target: hostname (usually ip) of the target node > + �...@type live: boolean > + �...@param live: whether to do a live or non-live migration > + > + """ > + raise HypervisorError("Migration not supported the chroot hypervisor")
"Not supported *by*" perhaps? Otherwise LGTM -- olive
