Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/storage/cdi_clone/test_clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
check_disk_count_in_vm,
create_dv,
create_vm_from_dv,
data_volume_template_dict,
data_volume_template_dict_with_pvc_source,
get_dv_size_from_datasource,
overhead_size_for_dv,
sc_volume_binding_mode_is_wffc,
Expand Down Expand Up @@ -48,7 +48,7 @@ def create_vm_from_clone_dv_template(
os_flavor=OS_FLAVOR_FEDORA,
client=client,
memory_guest=Images.Fedora.DEFAULT_MEMORY_SIZE,
data_volume_template=data_volume_template_dict(
data_volume_template=data_volume_template_dict_with_pvc_source(
target_dv_name=dv_name,
target_dv_namespace=namespace_name,
source_dv=source_dv,
Expand Down
16 changes: 8 additions & 8 deletions utilities/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,14 +645,14 @@ def delete(self, wait=False, timeout=TIMEOUT_3MIN, body=None):
)


def data_volume_template_dict(
target_dv_name,
target_dv_namespace,
source_dv,
volume_mode=None,
size=None,
storage_class=None,
):
def data_volume_template_dict_with_pvc_source(
target_dv_name: str,
target_dv_namespace: str,
source_dv: DataVolume,
volume_mode: str | None = None,
size: str | None = None,
storage_class: str | None = None,
) -> dict[str, Any]:
source_dv_pvc_spec = source_dv.pvc.instance.spec
dv = DataVolume(
name=target_dv_name,
Expand Down
Loading