summaryrefslogtreecommitdiffstats
path: root/cli/objects/repo.py
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2023-11-30 22:17:39 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-11-30 22:22:45 +0100
commit6b4a7a64eedc3f4feb4a8be0177de059c99507d3 (patch)
tree08c47df5e8951384d7be062e7e05653faa97b4f4 /cli/objects/repo.py
parent4286c45877630c7c5614d5cbd32d2a22302d472a (diff)
repository: delete commandv0.3.3-3
Allow to delete a repository with: $ ogcli delete repo --id 10
Diffstat (limited to 'cli/objects/repo.py')
-rw-r--r--cli/objects/repo.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/objects/repo.py b/cli/objects/repo.py
index 9728f33..9f37591 100644
--- a/cli/objects/repo.py
+++ b/cli/objects/repo.py
@@ -42,6 +42,17 @@ class OgRepo():
rest.post('/repository/add', payload=payload)
@staticmethod
+ def delete_repo(rest, args):
+ parser = argparse.ArgumentParser(prog='ogcli delete repo')
+ parser.add_argument('--id',
+ nargs='?',
+ required=True,
+ help='room id in scopes')
+ parsed_args = parser.parse_args(args)
+ payload = {'id': parsed_args.id}
+ rest.post('/repository/delete', payload=payload)
+
+ @staticmethod
def set_repo(rest, args):
parser = argparse.ArgumentParser(prog='ogcli set repo')
parser.add_argument('--id',