4 Commits

Author SHA1 Message Date
Jakob Meng
69947cd9fd Fix volume_info result for SDK < 0.19
With openstacksdk prior to version 0.19, module volume_info fails with:
  TypeError: Value of unknown type: <class
  'openstack.block_storage.v2.volume.Volume'> ...

The call to 'self.conn.block_storage.volumes()' returns an instance
of class 'openstack.block_storage.v2.volume.Volume'. This class
inherits from 'openstack.resource.Resource', which is a 'dict'
subclass since 0.19. For older sdk versions prior to 0.19 it was
not, hence we have to use the 'to_dict' function to convert each
'Volume' to 'dict' explicitly.

Ref.: 2f97394847

Task: 41571
Story: 2008136
Change-Id: I5b7adc399f19da08f02202af64a226c92bb9bf41
2021-01-13 14:17:58 +01:00
Sagi Shnaidman
e504d807de Fix docs-args mismatch in modules
Change-Id: I51105f11565c5ff33b04add36259c8703af11240
2020-12-08 12:06:42 +02:00
Sagi Shnaidman
80abd782da Fix volume_info arguments for SDK 0.19
all_projects is not supported before openstacksdk 0.19,
use min_ver for using it.

Task: 40865
Story: 2008136
Change-Id: I0f02a47c11122c5b07ca650a830044bca56c3610
2020-11-24 19:48:19 +02:00
Sagi Shnaidman
33ce7ab9c7 Add volume_info module
Add module for retrieving information about volumes in a cloud.

Story: #2007817
Task: #40095
Change-Id: Ic7551c1737b08b967613e42923f5ea4ec0b606a4
2020-08-16 20:56:45 +03:00