[Kimchi-devel] [PATCH] [WoK 6/6] reload API: adding user log messages
dhbarboza82 at gmail.com
dhbarboza82 at gmail.com
Tue Jan 24 13:19:48 UTC 2017
From: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>
This patch added user log support for the '/config/reload'
action.
Signed-off-by: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>
---
src/wok/control/config.py | 8 ++++++++
src/wok/i18n.py | 1 +
2 files changed, 9 insertions(+)
diff --git a/src/wok/control/config.py b/src/wok/control/config.py
index b7291c4..419abc0 100644
--- a/src/wok/control/config.py
+++ b/src/wok/control/config.py
@@ -21,12 +21,20 @@ from wok.control.base import Resource
from wok.control.utils import UrlSubNode
+CONFIG_REQUESTS = {
+ 'POST': {
+ 'reload': "WOKCONFIG0001L",
+ },
+}
+
+
@UrlSubNode("config")
class Config(Resource):
def __init__(self, model, id=None):
super(Config, self).__init__(model, id)
self.uri_fmt = '/config/%s'
self.admin_methods = ['POST']
+ self.log_map = CONFIG_REQUESTS
self.reload = self.generate_action_handler('reload')
@property
diff --git a/src/wok/i18n.py b/src/wok/i18n.py
index dc101eb..dd866fb 100644
--- a/src/wok/i18n.py
+++ b/src/wok/i18n.py
@@ -61,6 +61,7 @@ messages = {
"WOKASYNC0001L": _("Successfully completed task '%(target_uri)s'"),
"WOKASYNC0002L": _("Failed to complete task '%(target_uri)s'"),
"WOKCOL0001L": _("Request made on collection"),
+ "WOKCONFIG0001L": _("Reload WoK request."),
"WOKRES0001L": _("Request made on resource"),
"WOKROOT0001L": _("User '%(username)s' login"),
"WOKROOT0002L": _("User '%(username)s' logout"),
--
2.7.4
More information about the Kimchi-devel
mailing list