From 64d1c0ee33e9d6c2a551503fc23cc7653a9e5361 Mon Sep 17 00:00:00 2001 From: Alessio Ababilov Date: Fri, 21 Jun 2013 11:19:45 +0300 Subject: [PATCH] Fix pylint errors for quantum configuration fixes Change-Id: I89f7b4185e5bbe288b08283f7fea61b01b807015 --- .../configurators/quantum_plugins/openvswitch.py | 4 ++++ anvil/components/openvswitch.py | 3 --- anvil/components/quantum.py | 10 +++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) 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):