MCPcopy Index your code
hub / github.com/retspen/webvirtcloud / get_storages_images

Method get_storages_images

vrtManager/create.py:16–33  ·  view source on GitHub ↗

Function return all images on all storages

(self)

Source from the content-addressed store, hash-verified

14
15class wvmCreate(wvmConnect):
16 def get_storages_images(self):
17 """
18 Function return all images on all storages
19 """
20 images = []
21 storages = self.get_storages()
22 for storage in storages:
23 stg = self.get_storage(storage)
24 try:
25 stg.refresh(0)
26 except:
27 pass
28 for img in stg.listVolumes():
29 if img.endswith('.iso'):
30 pass
31 else:
32 images.append(img)
33 return images
34
35 def get_os_type(self):
36 """Get guest capabilities"""

Callers 1

create_instanceFunction · 0.80

Calls 3

get_storagesMethod · 0.80
get_storageMethod · 0.80
refreshMethod · 0.80

Tested by

no test coverage detected