LINBIT / linstor-client

Python client for LINSTOR
https://docs.linbit.com/docs/linstor-guide/
GNU General Public License v3.0
22 stars 10 forks source link

linstor --curl snapshot list. IndexError: list index out of range. #34

Closed kvaps closed 4 years ago

kvaps commented 4 years ago
# linstor --curl snapshot list                                        
curl -X GET http://localhost:3370/v1/resource-definitions?with_volume_definitions=true
Traceback (most recent call last):
  File "/usr/bin/linstor", line 24, in <module>
    linstor_client_main.main()
  File "/usr/lib/python3/dist-packages/linstor_client_main.py", line 668, in main
    LinStorCLI().run()
  File "/usr/lib/python3/dist-packages/linstor_client_main.py", line 633, in run
    rc = self.parse_and_execute(sys.argv[1:])
  File "/usr/lib/python3/dist-packages/linstor_client_main.py", line 347, in parse_and_execute
    rc = args.func(args)
  File "/usr/lib/python3/dist-packages/linstor_client/commands/snapshot_cmds.py", line 259, in list
    lstmsg = self._linstor.snapshot_dfn_list()
  File "/usr/lib/python3.6/dist-packages/linstor/linstorapi.py", line 2546, in snapshot_dfn_list
    rsc_dfns = self.resource_dfn_list()[0]
IndexError: list index out of range
rp- commented 4 years ago

This will be fixed, once we have a dedicated snapshot list view, than it will be just a single rest call to get all the snapshots.

rp- commented 4 years ago

should be fixed with release 1.7.0 and 1.1.0