summaryrefslogtreecommitdiffstats
path: root/cli/cli.py
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2021-05-12 17:14:40 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-05-12 17:23:06 +0200
commita2f1056c40773bb64d8fecafd5b684b94eaed892 (patch)
treeb814d909b529e5813c79dcff1a0e92773e537fee /cli/cli.py
parent01ed5a303963153ae81707fe987b40f90a3e726f (diff)
Add alias "set mode"
"ogcli set modes ..." should be "ogcli set mode ..." because clients only have one mode assigned at a time. To not break the backwards compatibility, this commits adds "set mode" but maintains "set modes".
Diffstat (limited to 'cli/cli.py')
-rw-r--r--cli/cli.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/cli.py b/cli/cli.py
index 61db374..21d69ed 100644
--- a/cli/cli.py
+++ b/cli/cli.py
@@ -74,12 +74,12 @@ class OgCLI():
OgDisk.list_disks(self.rest, args[1:])
def set(self, args):
- choices = ['modes']
+ choices = ['modes', 'mode']
parser = argparse.ArgumentParser(prog='ogcli set')
parser.add_argument('item', choices=choices)
parsed_args = parser.parse_args([args[0]])
- if parsed_args.item == 'modes':
+ if parsed_args.item in choices:
OgModes.set_modes(self.rest, args[1:])
def send(self, args):