mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[wip] Only list name of repository by default
This commit is contained in:
parent
9a6723dcb2
commit
5f4fd01f62
2 changed files with 11 additions and 2 deletions
|
@ -929,6 +929,10 @@ backup:
|
|||
list:
|
||||
action_help: List available repositories where put archives
|
||||
api: GET /backup/repositories
|
||||
arguments:
|
||||
--full:
|
||||
help: Show more details
|
||||
action: store_true
|
||||
|
||||
### backup_repository_info()
|
||||
info:
|
||||
|
|
|
@ -44,11 +44,16 @@ from yunohost.log import OperationLogger
|
|||
logger = getActionLogger('yunohost.repository')
|
||||
REPOSITORIES_PATH = '/etc/yunohost/repositories.yml'
|
||||
|
||||
def backup_repository_list(name):
|
||||
def backup_repository_list(name, full=False):
|
||||
"""
|
||||
List available repositories where put archives
|
||||
"""
|
||||
return _get_repositories()
|
||||
repositories = _get_repositories()
|
||||
|
||||
if full:
|
||||
return repositories
|
||||
else:
|
||||
return repositories.keys()
|
||||
|
||||
def backup_repository_info(name, human_readable=True, space_used=False):
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue