mbligh | dcd57a8 | 2007-07-11 23:06:47 +0000 | [diff] [blame] | 1 | #!/usr/bin/python |
| 2 | # |
| 3 | # Copyright 2007 Google Inc. Released under the GPL v2 |
| 4 | |
mbligh | dc735a2 | 2007-08-02 16:54:37 +0000 | [diff] [blame] | 5 | """ |
| 6 | This module defines the Hypervisor class |
mbligh | dcd57a8 | 2007-07-11 23:06:47 +0000 | [diff] [blame] | 7 | |
| 8 | Hypervisor: a virtual machine monitor |
| 9 | """ |
| 10 | |
mbligh | dc735a2 | 2007-08-02 16:54:37 +0000 | [diff] [blame] | 11 | __author__ = """ |
| 12 | mbligh@google.com (Martin J. Bligh), |
mbligh | dcd57a8 | 2007-07-11 23:06:47 +0000 | [diff] [blame] | 13 | poirier@google.com (Benjamin Poirier), |
mbligh | dc735a2 | 2007-08-02 16:54:37 +0000 | [diff] [blame] | 14 | stutsman@google.com (Ryan Stutsman) |
| 15 | """ |
mbligh | dcd57a8 | 2007-07-11 23:06:47 +0000 | [diff] [blame] | 16 | |
| 17 | |
| 18 | import installable_object |
| 19 | |
| 20 | |
| 21 | class Hypervisor(installable_object.InstallableObject): |
mbligh | dc735a2 | 2007-08-02 16:54:37 +0000 | [diff] [blame] | 22 | """ |
| 23 | This class represents a virtual machine monitor. |
| 24 | |
mbligh | dcd57a8 | 2007-07-11 23:06:47 +0000 | [diff] [blame] | 25 | Implementation details: |
| 26 | This is an abstract class, leaf subclasses must implement the methods |
| 27 | listed here and in parent classes which have no implementation. They |
| 28 | may reimplement methods which already have an implementation. You |
| 29 | must not instantiate this class but should instantiate one of those |
mbligh | dc735a2 | 2007-08-02 16:54:37 +0000 | [diff] [blame] | 30 | leaf subclasses. |
| 31 | """ |
| 32 | |
mbligh | dcd57a8 | 2007-07-11 23:06:47 +0000 | [diff] [blame] | 33 | host = None |
| 34 | guests = None |
mbligh | dc735a2 | 2007-08-02 16:54:37 +0000 | [diff] [blame] | 35 | |
mbligh | dcd57a8 | 2007-07-11 23:06:47 +0000 | [diff] [blame] | 36 | def __init__(self, host): |
| 37 | super(Hypervisor, self).__init__() |
| 38 | self.host= host |
mbligh | dc735a2 | 2007-08-02 16:54:37 +0000 | [diff] [blame] | 39 | |
| 40 | |
mbligh | dcd57a8 | 2007-07-11 23:06:47 +0000 | [diff] [blame] | 41 | def new_guest(self): |
| 42 | pass |
mbligh | dc735a2 | 2007-08-02 16:54:37 +0000 | [diff] [blame] | 43 | |
| 44 | |
mbligh | 34169c2 | 2007-07-23 16:38:51 +0000 | [diff] [blame] | 45 | def delete_guest(self, guest_hostname): |
mbligh | dcd57a8 | 2007-07-11 23:06:47 +0000 | [diff] [blame] | 46 | pass |
mbligh | dc735a2 | 2007-08-02 16:54:37 +0000 | [diff] [blame] | 47 | |
| 48 | |
mbligh | 34169c2 | 2007-07-23 16:38:51 +0000 | [diff] [blame] | 49 | def reset_guest(self, guest_hostname): |
mbligh | dcd57a8 | 2007-07-11 23:06:47 +0000 | [diff] [blame] | 50 | pass |