Make sure Quantum installer knows about the subsystem defined in the distro file.
Add missing dependency for openvswitch. Fix the quantum components to understand the openvswitch subcomponent.
This commit is contained in:
parent
c6fe8d4a37
commit
5a34a7cbb9
@ -585,6 +585,8 @@ components:
|
|||||||
subsystems:
|
subsystems:
|
||||||
openvswitch:
|
openvswitch:
|
||||||
packages:
|
packages:
|
||||||
|
- name: linux-headers-server
|
||||||
|
removable: true
|
||||||
- name: openvswitch-datapath-dkms
|
- name: openvswitch-datapath-dkms
|
||||||
removable: true
|
removable: true
|
||||||
version: 1.2*
|
version: 1.2*
|
||||||
|
@ -38,6 +38,8 @@ subsystems:
|
|||||||
- sched
|
- sched
|
||||||
- vol
|
- vol
|
||||||
- xvnc
|
- xvnc
|
||||||
|
quantum:
|
||||||
|
- openvswitch
|
||||||
supports:
|
supports:
|
||||||
- rhel-6
|
- rhel-6
|
||||||
- ubuntu-oneiric
|
- ubuntu-oneiric
|
||||||
|
@ -60,22 +60,16 @@ APP_OPTIONS = {
|
|||||||
APP_Q_AGENT: ["%OVS_CONFIG_FILE%", "-v"],
|
APP_Q_AGENT: ["%OVS_CONFIG_FILE%", "-v"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class QuantumMixin(object):
|
||||||
|
|
||||||
class QuantumUninstaller(comp.PkgUninstallComponent):
|
def known_options(self):
|
||||||
def __init__(self, *args, **kargs):
|
return set(['no-ovs-db-init', 'no-ovs-bridge-init'])
|
||||||
comp.PkgUninstallComponent.__init__(self, *args, **kargs)
|
|
||||||
|
|
||||||
|
def known_subsystems(self):
|
||||||
|
return set(['openvswitch'])
|
||||||
|
|
||||||
class QuantumInstaller(comp.PkgInstallComponent):
|
def _get_config_files(self):
|
||||||
def __init__(self, *args, **kargs):
|
return list(CONFIG_FILES)
|
||||||
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_download_locations(self):
|
def _get_download_locations(self):
|
||||||
places = list()
|
places = list()
|
||||||
@ -85,11 +79,22 @@ class QuantumInstaller(comp.PkgInstallComponent):
|
|||||||
})
|
})
|
||||||
return places
|
return places
|
||||||
|
|
||||||
def known_options(self):
|
|
||||||
return set(['no-ovs-db-init', 'no-ovs-bridge-init'])
|
|
||||||
|
|
||||||
def _get_config_files(self):
|
class QuantumUninstaller(QuantumMixin, comp.PkgUninstallComponent):
|
||||||
return list(CONFIG_FILES)
|
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):
|
def _get_target_config_name(self, config_fn):
|
||||||
if config_fn == PLUGIN_CONF:
|
if config_fn == PLUGIN_CONF:
|
||||||
@ -181,7 +186,7 @@ class QuantumInstaller(comp.PkgInstallComponent):
|
|||||||
return comp.PkgInstallComponent._get_source_config(self, config_fn)
|
return comp.PkgInstallComponent._get_source_config(self, config_fn)
|
||||||
|
|
||||||
|
|
||||||
class QuantumRuntime(comp.ProgramRuntime):
|
class QuantumRuntime(QuantumMixin, comp.ProgramRuntime):
|
||||||
def __init__(self, *args, **kargs):
|
def __init__(self, *args, **kargs):
|
||||||
comp.ProgramRuntime.__init__(self, *args, **kargs)
|
comp.ProgramRuntime.__init__(self, *args, **kargs)
|
||||||
self.q_vswitch_agent = False
|
self.q_vswitch_agent = False
|
||||||
|
Loading…
Reference in New Issue
Block a user