4d53ba03 |
#
# Copyright (C) 2015 vmware inc.
#
# Author: Touseef Liaqat <tliaqat@vmware.com>
from installer import Installer |
81b4c250 |
from ostreeinstaller import OstreeInstaller |
4d53ba03 |
from ostreeserverinstaller import OstreeServerInstaller
class InstallerContainer(object): |
c533b308 |
def __init__(self, install_config, maxy=0, maxx=0,
iso_installer=False, rpm_path="../stage/RPMS",
log_path="../stage/LOGS"): |
1b11aa2d |
|
4d53ba03 |
self.install_config = install_config
self.maxy = maxy
self.maxx = maxx
self.iso_installer = iso_installer
self.rpm_path = rpm_path
self.log_path = log_path
def install(self, params):
installer = None |
81b4c250 |
if self.install_config['type'] == "ostree_host": |
c533b308 |
installer = OstreeInstaller(self.install_config, self.maxy, self.maxx,
self.iso_installer, self.rpm_path, self.log_path) |
81b4c250 |
elif self.install_config['type'] == "ostree_server": |
c533b308 |
installer = OstreeServerInstaller(self.install_config, self.maxy, self.maxx,
self.iso_installer, self.rpm_path,
self.log_path) |
4d53ba03 |
else: |
c533b308 |
installer = Installer(self.install_config, self.maxy, self.maxx,
self.iso_installer, self.rpm_path, self.log_path) |
4d53ba03 |
|
c533b308 |
return installer.install(params) |