diff options
author | Jeremy Katz <katzj@redhat.com> | 2007-01-18 15:25:49 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2007-01-18 15:25:49 +0000 |
commit | 87c25642b55cc7be581c06931a7fc739628a36f8 (patch) | |
tree | a27b74c4802506a57790d78a76f1953cd0b2ae18 /installclass.py | |
parent | abb6ec58462064d9874945efb8215e1b6cd76d71 (diff) | |
download | anaconda-87c25642b55cc7be581c06931a7fc739628a36f8.tar.gz anaconda-87c25642b55cc7be581c06931a7fc739628a36f8.tar.xz anaconda-87c25642b55cc7be581c06931a7fc739628a36f8.zip |
2007-01-18 Jeremy Katz <katzj@redhat.com>
* installclasses/fedora.py: Implement getMethod/getBackend
* installclasses/rhel.py: Likewise.
* anaconda (Anaconda.setMethod): Use installclass to determine method
(Anaconda.setBackend): And backend
* installclass.py (BaseInstallClass.getMethod): Add a method to
parse the method str and return an InstallMethod constructor
(BaseInstallClass.getBackend): For backend as well
Diffstat (limited to 'installclass.py')
-rw-r--r-- | installclass.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/installclass.py b/installclass.py index 0503e9516..dcb41bb60 100644 --- a/installclass.py +++ b/installclass.py @@ -406,6 +406,30 @@ class BaseInstallClass: mouse.set(mouseName, emulThree, device) id.setMouse(mouse) + def getMethod(self, methodstr): + if methodstr.startswith('cdrom://'): + from image import CdromInstallMethod + return CdromInstallMethod + elif methodstr.startswith('nfs:/'): + from image import NfsInstallMethod + return NfsInstallMethod + elif methodstr.startswith('nfsiso:/'): + from image import NfsIsoInstallMethod + return NfsIsoInstallMethod + elif methodstr.startswith('ftp://') or methodstr.startswith('http://'): + from urlinstall import UrlInstallMethod + return UrlInstallMethod + elif methodstr.startswith('hd://'): + from harddrive import HardDriveInstallMethod + return HardDriveInstallMethod + else: + return None + + def getBackend(self, methodstr): + # this should be overriden in distro install classes + from backend import AnacondaBackend + return AnacondaBackend + def setDefaultPartitioning(self, partitions, clear = CLEARPART_TYPE_LINUX, doClear = 1): autorequests = [ ("/", None, 1024, None, 1, 1, 1) ] |