mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Skeleton / draft of API
This commit is contained in:
parent
5882bf89db
commit
f987e7872c
2 changed files with 94 additions and 0 deletions
|
@ -1861,3 +1861,53 @@ log:
|
|||
--share:
|
||||
help: Share the full log using yunopaste
|
||||
action: store_true
|
||||
|
||||
|
||||
#############################
|
||||
# Diagnosis #
|
||||
#############################
|
||||
diagnosis:
|
||||
category_help: Look for possible issues on the server
|
||||
actions:
|
||||
|
||||
list:
|
||||
action_help: List diagnosis categories
|
||||
api: GET /diagnosis/list
|
||||
|
||||
report:
|
||||
action_help: Show most recents diagnosis results
|
||||
api: GET /diagnosis/report
|
||||
arguments:
|
||||
categories:
|
||||
help: Diagnosis categories to display (all by default)
|
||||
nargs: "*"
|
||||
--full:
|
||||
help: Display additional information
|
||||
action: store_true
|
||||
|
||||
run:
|
||||
action_help: Show most recents diagnosis results
|
||||
api: POST /diagnosis/run
|
||||
arguments:
|
||||
categories:
|
||||
help: Diagnosis categories to run (all by default)
|
||||
nargs: "*"
|
||||
--force:
|
||||
help: Display additional information
|
||||
action: store_true
|
||||
-a:
|
||||
help: Serialized arguments for diagnosis scripts (e.g. "domain=domain.tld")
|
||||
full: --args
|
||||
|
||||
ignore:
|
||||
action_help: Configure some diagnosis results to be ignored
|
||||
api: PUT /diagnosis/ignore
|
||||
arguments:
|
||||
category:
|
||||
help: Diagnosis category to be affected
|
||||
-a:
|
||||
help: Arguments, to be used to ignore only some parts of a report (e.g. "domain=domain.tld")
|
||||
full: --args
|
||||
--unignore:
|
||||
help: Unignore a previously ignored report
|
||||
action: store_true
|
||||
|
|
44
src/yunohost/diagnosis.py
Normal file
44
src/yunohost/diagnosis.py
Normal file
|
@ -0,0 +1,44 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
""" License
|
||||
|
||||
Copyright (C) 2018 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
|
||||
|
||||
"""
|
||||
|
||||
""" diagnosis.py
|
||||
|
||||
Look for possible issues on the server
|
||||
"""
|
||||
|
||||
from moulinette import m18n
|
||||
from moulinette.core import MoulinetteError
|
||||
from moulinette.utils import log
|
||||
|
||||
logger = log.getActionLogger('yunohost.diagnosis')
|
||||
|
||||
def diagnosis_list():
|
||||
pass
|
||||
|
||||
def diagnosis_report(categories=[], full=False):
|
||||
pass
|
||||
|
||||
def diagnosis_run(categories=[], force=False, args=""):
|
||||
pass
|
||||
|
||||
def diagnosis_ignore(category, args="", unignore=False):
|
||||
pass
|
||||
|
Loading…
Add table
Reference in a new issue