diff --git a/anvil/components/configurators/quantum_plugins/openvswitch.py b/anvil/components/configurators/quantum_plugins/openvswitch.py index 20afe9f6..634b8f64 100644 --- a/anvil/components/configurators/quantum_plugins/openvswitch.py +++ b/anvil/components/configurators/quantum_plugins/openvswitch.py @@ -35,3 +35,7 @@ class OpenvswitchConfigurator(quantum_plugins.Configurator): "DATABASE", "sql_connection", self.fetch_dbdsn()) + + @property + def get_plugin_config_file_path(self): + return "plugins/%s/%s" % (self.core_plugin, PLUGIN_CONF) diff --git a/anvil/components/openvswitch.py b/anvil/components/openvswitch.py index c9c5e49c..590a37cb 100644 --- a/anvil/components/openvswitch.py +++ b/anvil/components/openvswitch.py @@ -24,9 +24,6 @@ LOG = logging.getLogger(__name__) class OpenvswitchRuntime(bruntime.ServiceRuntime): - def __init__(self, *args, **kargs): - super(OpenvswitchRuntime, self).__init__(*args, **kargs) - @property def applications(self): return ["openvswitch"] diff --git a/anvil/components/quantum.py b/anvil/components/quantum.py index add20bf4..12dd5d82 100644 --- a/anvil/components/quantum.py +++ b/anvil/components/quantum.py @@ -16,6 +16,7 @@ from anvil import colorizer from anvil import log as logging +from anvil import shell as sh from anvil.components import base from anvil.components import base_install as binstall @@ -52,9 +53,12 @@ class QuantumInstaller(binstall.PythonInstallComponent, QuantumPluginMixin): def _sync_db(self): LOG.info("Syncing quantum to database: %s", colorizer.quote(self.configurator.DB_NAME)) - #cmds = [{"cmd": SYNC_DB_CMD}] - #utils.execute_template(*cmds, cwd=self.bin_dir, - # params=self.config_params(None)) + # TODO(aababilov): update db if required + + def create_symlink_to_conf_file(self): + sh.symlink(self.configurator.get_path_to_plugin_config, + "/etc/quantum/plugin.ini", + force=True) class QuantumUninstaller(binstall.PkgUninstallComponent, QuantumPluginMixin):