cli: rename ogcli list scopes to ogcli list scope

Use the word "scope" to keep the format coherent with the other
commands.
master
Alejandro Sirgo Rica 2024-09-12 13:03:14 +02:00
parent 175a38606a
commit 8f5b709212
3 changed files with 4 additions and 4 deletions

View File

@ -143,7 +143,7 @@ ogcli setup disk --type dos --part 1,LINUX,EXT4,40G --part 4,CACHE,CACHE,10G --f
##### Fetching a classroom id
```
ogcli list scopes
ogcli list scope
{'scope': [{'name': 'Unidad Organizativa (Default)', 'type': 'center', 'id': 1, 'scope': [{'name': 'Aula virtual', 'type': 'room', 'id': 1, ...
```

View File

@ -76,7 +76,7 @@ class OgCLI():
self.rest = OgREST(cfg['ip'], cfg['port'], cfg['api_token'])
def list(self, args):
choices = ['clients', 'scopes', 'modes', 'hardware',
choices = ['clients', 'scope', 'modes', 'hardware',
'client', 'images', 'disks', 'servers', 'repos', 'live']
parser = argparse.ArgumentParser(prog='ogcli list')
parser.add_argument('item', choices=choices)
@ -95,7 +95,7 @@ class OgCLI():
OgClient.list_client_hardware(self.rest, args[1:])
elif parsed_args.item == 'modes':
OgModes.list_available_modes(self.rest)
elif parsed_args.item == 'scopes':
elif parsed_args.item == 'scope':
OgScope.list_scopes(self.rest, args[1:])
elif parsed_args.item == 'images':
OgImage.list_images(self.rest)

View File

@ -38,7 +38,7 @@ class OgScope():
@staticmethod
def list_scopes(rest, args):
parser = argparse.ArgumentParser(prog='ogcli list scopes')
parser = argparse.ArgumentParser(prog='ogcli list scope')
parser.add_argument('--client-ip',
action='append',
default=[],