summaryrefslogtreecommitdiffstats
path: root/cli/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'cli/cli.py')
-rw-r--r--cli/cli.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/cli/cli.py b/cli/cli.py
index 11d1521..0e34cd0 100644
--- a/cli/cli.py
+++ b/cli/cli.py
@@ -113,7 +113,7 @@ class OgCLI():
elif parsed_args.item == 'servers':
ret = OgServer.list_servers(self.rest)
elif parsed_args.item == 'live':
- ret = OgLive.list_live(self.rest)
+ ret = OgLive.list_live(self.rest, args[1:])
return ret
def set(self, args):
@@ -231,7 +231,7 @@ class OgCLI():
return ret
def delete(self, args):
- choices = ['server', 'repo', 'center', 'room', 'client', 'folder']
+ choices = ['server', 'repo', 'center', 'room', 'client', 'folder', 'live']
parser = argparse.ArgumentParser(prog='ogcli delete')
parser.add_argument('delete_obj', choices=choices)
@@ -253,6 +253,8 @@ class OgCLI():
ret = OgClient.delete_client(self.rest, args[1:])
elif parsed_args.delete_obj == 'folder':
ret = OgFolder.delete_folder(self.rest, args[1:])
+ elif parsed_args.delete_obj == 'live':
+ ret = OgLive.delete_live(self.rest, args[1:])
return ret
def add(self, args):
@@ -280,3 +282,19 @@ class OgCLI():
elif parsed_args.add_obj == 'folder':
ret = OgFolder.add_folder(self.rest, args[1:])
return ret
+
+ def install(self, args):
+ choices = ['live']
+ parser = argparse.ArgumentParser(prog='ogcli install')
+ parser.add_argument('install_obj', choices=choices)
+
+ if not args:
+ print('Missing install subcommand', file=sys.stderr)
+ parser.print_help(file=sys.stderr)
+ return 1
+
+ parsed_args = parser.parse_args([args[0]])
+ ret = 0
+ if parsed_args.install_obj == 'live':
+ ret = OgLive.install_live(self.rest, args[1:])
+ return ret