|
56 | 56 | import xmlrpc.client
|
57 | 57 | import xs_errors
|
58 | 58 |
|
59 |
| -from cowutil import getVdiTypeFromImageFormat |
| 59 | +from cowutil import getCowUtil, getVdiTypeFromImageFormat |
60 | 60 | from srmetadata import \
|
61 | 61 | NAME_LABEL_TAG, NAME_DESCRIPTION_TAG, IS_A_SNAPSHOT_TAG, SNAPSHOT_OF_TAG, \
|
62 | 62 | TYPE_TAG, VDI_TYPE_TAG, READ_ONLY_TAG, SNAPSHOT_TIME_TAG, \
|
@@ -1297,7 +1297,7 @@ def _get_vdi_path_and_parent(self, vdi_uuid, volume_name):
|
1297 | 1297 |
|
1298 | 1298 | # Otherwise it's a COW and a parent can exist.
|
1299 | 1299 | linstorcowutil = LinstorCowUtil(self.session, self._linstor, vdi_type)
|
1300 |
| - if linstorcowutil.check(vdi_uuid) != cowutil.CheckResult.Success: |
| 1300 | + if linstorcowutil.check(vdi_uuid) != CowUtil.CheckResult.Success: |
1301 | 1301 | return (None, None)
|
1302 | 1302 |
|
1303 | 1303 | image_info = linstorcowutil.get_info(vdi_uuid)
|
@@ -2290,7 +2290,7 @@ def _create_snapshot(self, snap_vdi_type, snap_uuid, snap_of_uuid=None):
|
2290 | 2290 | # 2. Write the snapshot content.
|
2291 | 2291 | is_raw = (self.vdi_type == VdiType.RAW)
|
2292 | 2292 | self.linstorcowutil.snapshot(
|
2293 |
| - snap_path, self.path, is_raw, max(self.size, cowutil.getDefaultPreallocationSizeVirt()) |
| 2293 | + snap_path, self.path, is_raw, max(self.size, self.linstorcowutil.cowutil.getDefaultPreallocationSizeVirt()) |
2294 | 2294 | )
|
2295 | 2295 |
|
2296 | 2296 | # 3. Get snapshot parent.
|
|
0 commit comments