blob: c17bb98e87c8dde3fd6673a8957a7de51d61dc98 [file] [log] [blame]
# Copyright 2007 Google Inc. Released under the GPL v2
This module defines the Host class.
Implementation details:
You should import the "hosts" package instead of importing each type of host.
KVMGuest: a KVM virtual machine on which you can run programs
__author__ = """ (Martin J. Bligh), (Benjamin Poirier), (Ryan Stutsman)
import guest
class KVMGuest(guest.Guest):
"""This class represents a KVM virtual machine on which you can run
Implementation details:
This is a leaf class in an abstract class hierarchy, it must
implement the unimplemented methods in parent classes.
def _init(self, controlling_hypervisor, qemu_options, *args, **dargs):
Construct a KVMGuest object
controlling_hypervisor: hypervisor object that is
responsible for the creation and management of
this guest
qemu_options: options to pass to qemu, these should be
appropriately shell escaped, if need be.
hostname= controlling_hypervisor.new_guest(qemu_options)
# bypass Guest's __init__
super(KVMGuest, self)._initialize(hostname, *args, **dargs)
self.controlling_hypervisor= controlling_hypervisor