mirror of https://git.48k.eu/ogcli/
parent
59f2f501aa
commit
ea8210a805
|
@ -143,7 +143,7 @@ ogcli setup disk --type dos --part 1,LINUX,EXT4,40G --part 4,CACHE,CACHE,10G --f
|
||||||
##### Fetching a classroom id
|
##### Fetching a classroom id
|
||||||
|
|
||||||
```
|
```
|
||||||
ogcli list scope
|
ogcli list scopes
|
||||||
|
|
||||||
{'scope': [{'name': 'Unidad Organizativa (Default)', 'type': 'center', 'id': 1, 'scope': [{'name': 'Aula virtual', 'type': 'room', 'id': 1, ...
|
{'scope': [{'name': 'Unidad Organizativa (Default)', 'type': 'center', 'id': 1, 'scope': [{'name': 'Aula virtual', 'type': 'room', 'id': 1, ...
|
||||||
```
|
```
|
||||||
|
|
|
@ -76,7 +76,7 @@ class OgCLI():
|
||||||
self.rest = OgREST(cfg['ip'], cfg['port'], cfg['api_token'])
|
self.rest = OgREST(cfg['ip'], cfg['port'], cfg['api_token'])
|
||||||
|
|
||||||
def list(self, args):
|
def list(self, args):
|
||||||
choices = ['clients', 'scope', 'modes', 'hardware',
|
choices = ['clients', 'scopes', 'modes', 'hardware',
|
||||||
'client', 'images', 'disks', 'servers', 'repos', 'live']
|
'client', 'images', 'disks', 'servers', 'repos', 'live']
|
||||||
parser = argparse.ArgumentParser(prog='ogcli list')
|
parser = argparse.ArgumentParser(prog='ogcli list')
|
||||||
parser.add_argument('item', choices=choices)
|
parser.add_argument('item', choices=choices)
|
||||||
|
@ -95,7 +95,7 @@ class OgCLI():
|
||||||
OgClient.list_client_hardware(self.rest, args[1:])
|
OgClient.list_client_hardware(self.rest, args[1:])
|
||||||
elif parsed_args.item == 'modes':
|
elif parsed_args.item == 'modes':
|
||||||
OgModes.list_available_modes(self.rest)
|
OgModes.list_available_modes(self.rest)
|
||||||
elif parsed_args.item == 'scope':
|
elif parsed_args.item == 'scopes':
|
||||||
OgScope.list_scopes(self.rest, args[1:])
|
OgScope.list_scopes(self.rest, args[1:])
|
||||||
elif parsed_args.item == 'images':
|
elif parsed_args.item == 'images':
|
||||||
OgImage.list_images(self.rest)
|
OgImage.list_images(self.rest)
|
||||||
|
|
|
@ -41,7 +41,7 @@ class OgScope():
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def list_scopes(rest, args):
|
def list_scopes(rest, args):
|
||||||
parser = argparse.ArgumentParser(prog='ogcli list scope')
|
parser = argparse.ArgumentParser(prog='ogcli list scopes')
|
||||||
group = parser.add_mutually_exclusive_group(required=False)
|
group = parser.add_mutually_exclusive_group(required=False)
|
||||||
group.add_argument('--client-ip',
|
group.add_argument('--client-ip',
|
||||||
action='append',
|
action='append',
|
||||||
|
|
Loading…
Reference in New Issue