Merge pull request #141 from dreamhost/fix-quantum-subsystems
Fix quantum subsystems
This commit is contained in:
commit
29c9ff69b0
conf
devstack
@ -585,6 +585,8 @@ components:
|
||||
subsystems:
|
||||
openvswitch:
|
||||
packages:
|
||||
- name: linux-headers-server
|
||||
removable: true
|
||||
- name: openvswitch-datapath-dkms
|
||||
removable: true
|
||||
version: 1.2*
|
||||
|
@ -38,6 +38,8 @@ subsystems:
|
||||
- sched
|
||||
- vol
|
||||
- xvnc
|
||||
quantum:
|
||||
- openvswitch
|
||||
supports:
|
||||
- rhel-6
|
||||
- ubuntu-oneiric
|
||||
|
@ -109,7 +109,7 @@ class ComponentBase(object):
|
||||
LOG.warning("Unknown option %r provided for (%s)" % (s, self))
|
||||
|
||||
def __str__(self):
|
||||
return "%r: %s" % (self.__class__.__name__, self.component_name)
|
||||
return "%s: %s" % (self.__class__.__name__, self.component_name)
|
||||
|
||||
def known_subsystems(self):
|
||||
return set()
|
||||
|
@ -60,22 +60,16 @@ APP_OPTIONS = {
|
||||
APP_Q_AGENT: ["%OVS_CONFIG_FILE%", "-v"],
|
||||
}
|
||||
|
||||
class QuantumMixin(object):
|
||||
|
||||
class QuantumUninstaller(comp.PkgUninstallComponent):
|
||||
def __init__(self, *args, **kargs):
|
||||
comp.PkgUninstallComponent.__init__(self, *args, **kargs)
|
||||
def known_options(self):
|
||||
return set(['no-ovs-db-init', 'no-ovs-bridge-init'])
|
||||
|
||||
def known_subsystems(self):
|
||||
return set(['openvswitch'])
|
||||
|
||||
class QuantumInstaller(comp.PkgInstallComponent):
|
||||
def __init__(self, *args, **kargs):
|
||||
comp.PkgInstallComponent.__init__(self, *args, **kargs)
|
||||
self.q_vswitch_agent = False
|
||||
self.q_vswitch_service = False
|
||||
plugin = self.cfg.getdefaulted("quantum", "q_plugin", VSWITCH_PLUGIN)
|
||||
if plugin == VSWITCH_PLUGIN:
|
||||
# FIXME: Make these subsystems
|
||||
self.q_vswitch_agent = True
|
||||
self.q_vswitch_service = True
|
||||
def _get_config_files(self):
|
||||
return list(CONFIG_FILES)
|
||||
|
||||
def _get_download_locations(self):
|
||||
places = list()
|
||||
@ -85,11 +79,22 @@ class QuantumInstaller(comp.PkgInstallComponent):
|
||||
})
|
||||
return places
|
||||
|
||||
def known_options(self):
|
||||
return set(['no-ovs-db-init', 'no-ovs-bridge-init'])
|
||||
|
||||
def _get_config_files(self):
|
||||
return list(CONFIG_FILES)
|
||||
class QuantumUninstaller(QuantumMixin, comp.PkgUninstallComponent):
|
||||
def __init__(self, *args, **kargs):
|
||||
comp.PkgUninstallComponent.__init__(self, *args, **kargs)
|
||||
|
||||
|
||||
class QuantumInstaller(QuantumMixin, comp.PkgInstallComponent):
|
||||
def __init__(self, *args, **kargs):
|
||||
comp.PkgInstallComponent.__init__(self, *args, **kargs)
|
||||
self.q_vswitch_agent = False
|
||||
self.q_vswitch_service = False
|
||||
plugin = self.cfg.getdefaulted("quantum", "q_plugin", VSWITCH_PLUGIN)
|
||||
if plugin == VSWITCH_PLUGIN:
|
||||
# FIXME: Make these subsystems
|
||||
self.q_vswitch_agent = True
|
||||
self.q_vswitch_service = True
|
||||
|
||||
def _get_target_config_name(self, config_fn):
|
||||
if config_fn == PLUGIN_CONF:
|
||||
@ -181,7 +186,7 @@ class QuantumInstaller(comp.PkgInstallComponent):
|
||||
return comp.PkgInstallComponent._get_source_config(self, config_fn)
|
||||
|
||||
|
||||
class QuantumRuntime(comp.ProgramRuntime):
|
||||
class QuantumRuntime(QuantumMixin, comp.ProgramRuntime):
|
||||
def __init__(self, *args, **kargs):
|
||||
comp.ProgramRuntime.__init__(self, *args, **kargs)
|
||||
self.q_vswitch_agent = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user