From aecf43f259c4a136f463da0581e62220ca0c59a0 Mon Sep 17 00:00:00 2001 From: Kload Date: Thu, 27 Jun 2013 18:03:07 +0000 Subject: [PATCH] Init backup functions --- action_map.yml | 45 +++++++++------------------------------------ yunohost_backup.py | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+), 36 deletions(-) create mode 100644 yunohost_backup.py diff --git a/action_map.yml b/action_map.yml index 4bdd34d8..757a756d 100644 --- a/action_map.yml +++ b/action_map.yml @@ -352,46 +352,19 @@ app: ############################# -# Repository # +# Backup # ############################# -repo: - category_help: Manage app repositories +backup: + category_help: Manage backups actions: - ### repo_list() - list: - action_help: List repositories + ### backup_init() + init: + action_help: Init Tahoe-LAFS configuration arguments: - -f: - full: --filter - help: LDAP filter used to search - -l: - full: --limit - help: Maximum number of repository fetched - -o: - full: --offset - help: Starting number for repository fetching - - ### repo_add() - add: - action_help: Add app repository - arguments: - url: - help: URL of the repository - -n: - full: --name - help: Unique name of the repository - - ### repo_remove() - remove: - action_help: Remove repository - arguments: - repo: - help: Name or URL of the repository - - ### repo_update() - update: - action_help: Update app list from the repositories + --helper: + help: Init as a helper node rather than a "helped" one + action: store_true ############################# diff --git a/yunohost_backup.py b/yunohost_backup.py new file mode 100644 index 00000000..c070be82 --- /dev/null +++ b/yunohost_backup.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + +import os +import sys +import json +import yaml +import glob +from yunohost import YunoHostError, YunoHostLDAP, validate, colorize, win_msg + +def backup_init(helper=False): + """ + Init Tahoe-LAFS configuration + + Keyword arguments: + helper -- Create a helper node rather than a "helped" one + + Returns: + Win | Fail + + """ + pass