MCPcopy
hub / github.com/retspen/webvirtcloud / update_volumes

Method update_volumes

vrtManager/storage.py:187–201  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

185 self.pool.refresh(0)
186
187 def update_volumes(self):
188 try:
189 self.refresh()
190 except Exception:
191 pass
192 vols = self.get_volumes()
193 vol_list = []
194
195 for volname in vols:
196 vol_list.append(
197 {'name': volname,
198 'size': self.get_volume_size(volname),
199 'type': self.get_volume_type(volname)}
200 )
201 return vol_list
202
203 def create_volume(self, name, size, vol_fmt='qcow2', metadata=False):
204 size = int(size) * 1073741824

Callers 1

storageFunction · 0.80

Calls 4

refreshMethod · 0.95
get_volumesMethod · 0.95
get_volume_sizeMethod · 0.95
get_volume_typeMethod · 0.95

Tested by

no test coverage detected