From eef247d34b856397806c4fd83444b5d4259200c0 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Fri, 24 Jun 2016 02:07:28 +0200 Subject: [PATCH] [enh] start to work on journals --- data/actionsmap/yunohost.yml | 12 ++++++++++ src/yunohost/journals.py | 46 ++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 src/yunohost/journals.py diff --git a/data/actionsmap/yunohost.yml b/data/actionsmap/yunohost.yml index 966de21df..ea7f5e14f 100644 --- a/data/actionsmap/yunohost.yml +++ b/data/actionsmap/yunohost.yml @@ -1588,3 +1588,15 @@ hook: -d: full: --chdir help: The directory from where the script will be executed + +############################# +# Journals # +############################# +journals: + category_help: Manage debug journals + actions: + + ### domain_list() + list: + action_help: List journals + api: GET /journals diff --git a/src/yunohost/journals.py b/src/yunohost/journals.py new file mode 100644 index 000000000..086af2113 --- /dev/null +++ b/src/yunohost/journals.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- + +""" License + + Copyright (C) 2016 YunoHost + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program; if not, see http://www.gnu.org/licenses + +""" + +""" yunohost_journals.py + + Manage debug journals +""" + +import os + +from moulinette.utils.log import getActionLogger + +JOURNALS_PATH = '/var/log/journals/' + +logger = getActionLogger('yunohost.journals') + + +def journals_list(): + """ + List domains + + Keyword argument: + filter -- LDAP filter used to search + offset -- Starting number for domain fetching + limit -- Maximum number of domain fetched + + """ + return {}