mbligh | 321b1f5 | 2008-04-09 16:23:43 +0000 | [diff] [blame] | 1 | """This class defines the Remote host class, mixing in the SiteHost class |
| 2 | if it is available.""" |
| 3 | |
| 4 | # site_host.py may be non-existant or empty, make sure that an appropriate |
| 5 | # SiteHost class is created nevertheless |
| 6 | try: |
| 7 | from site_host import SiteHost |
| 8 | except ImportError: |
mbligh | 12e2b21 | 2008-05-06 20:49:18 +0000 | [diff] [blame] | 9 | import base_classes |
mbligh | 321b1f5 | 2008-04-09 16:23:43 +0000 | [diff] [blame] | 10 | class SiteHost(base_classes.Host): |
| 11 | def __init__(self): |
| 12 | super(SiteHost, self).__init__() |
| 13 | |
| 14 | |
| 15 | class RemoteHost(SiteHost): |
| 16 | """This class represents a remote machine on which you can run |
| 17 | programs. |
| 18 | |
| 19 | It may be accessed through a network, a serial line, ... |
| 20 | It is not the machine autoserv is running on. |
| 21 | |
| 22 | Implementation details: |
| 23 | This is an abstract class, leaf subclasses must implement the methods |
| 24 | listed here and in parent classes which have no implementation. They |
| 25 | may reimplement methods which already have an implementation. You |
| 26 | must not instantiate this class but should instantiate one of those |
| 27 | leaf subclasses.""" |
| 28 | |
| 29 | hostname= None |
| 30 | |
| 31 | def __init__(self): |
| 32 | super(RemoteHost, self).__init__() |