From 9e45a0dda4cfa26b531a423fc8b1c4b10d382a0f Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 8 Sep 2014 15:55:34 -0400 Subject: Refactor the data store a bit Reduce code duplication, and clearly separates admin and user dbs. Move plugin wrapper away and let plugin code use native functions. This patch also changes the indexed data to use a uuid and assumes 2 identical uuid cannot be created concurrently. Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- ipsilon/admin/common.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'ipsilon/admin/common.py') diff --git a/ipsilon/admin/common.py b/ipsilon/admin/common.py index 2c8ff89..85bd5fd 100755 --- a/ipsilon/admin/common.py +++ b/ipsilon/admin/common.py @@ -18,7 +18,6 @@ # along with this program. If not, see . import cherrypy -from ipsilon.util.data import Store from ipsilon.util.page import Page from ipsilon.util.page import admin_protect @@ -83,9 +82,7 @@ class AdminPluginPage(Page): if len(new_values) != 0: # First we try to save in the database try: - store = Store() - store.save_plugin_config(self.facility, - self._obj.name, new_values) + self._obj.save_plugin_config(self.facility, new_values) message = "New configuration saved." message_type = "success" except Exception: # pylint: disable=broad-except -- cgit