|
76 | 76 | from utilities.bitwarden import get_cnv_tests_secret_by_name |
77 | 77 | from utilities.constants import ( |
78 | 78 | AAQ_NAMESPACE_LABEL, |
79 | | - AMD, |
80 | 79 | ARM_64, |
81 | 80 | ARQ_QUOTA_HARD_SPEC, |
82 | 81 | AUDIT_LOGS_PATH, |
|
90 | 89 | HCO_SUBSCRIPTION, |
91 | 90 | HOTFIX_STR, |
92 | 91 | INSTANCE_TYPE_STR, |
93 | | - INTEL, |
94 | 92 | KMP_ENABLED_LABEL, |
95 | 93 | KMP_VM_ASSIGNMENT_LABEL, |
96 | 94 | KUBECONFIG, |
|
105 | 103 | OVS_BRIDGE, |
106 | 104 | POD_SECURITY_NAMESPACE_LABELS, |
107 | 105 | PREFERENCE_STR, |
108 | | - RHEL9_PREFERENCE, |
109 | 106 | RHEL9_STR, |
110 | | - RHEL_WITH_INSTANCETYPE_AND_PREFERENCE, |
111 | 107 | RHSM_SECRET_NAME, |
112 | 108 | SSP_CR_COMMON_TEMPLATES_LIST_KEY_NAME, |
113 | 109 | TIMEOUT_3MIN, |
114 | 110 | TIMEOUT_4MIN, |
115 | 111 | TIMEOUT_5MIN, |
116 | | - U1_SMALL, |
117 | 112 | UNPRIVILEGED_PASSWORD, |
118 | 113 | UNPRIVILEGED_USER, |
119 | 114 | UTILITY, |
|
196 | 191 | verify_boot_sources_reimported, |
197 | 192 | ) |
198 | 193 | from utilities.virt import ( |
199 | | - VirtualMachineForCloning, |
200 | 194 | VirtualMachineForTests, |
201 | | - create_vm_cloning_job, |
202 | 195 | fedora_vm_body, |
203 | 196 | get_all_virt_pods_with_running_status, |
204 | 197 | get_base_templates_list, |
|
208 | 201 | kubernetes_taint_exists, |
209 | 202 | running_vm, |
210 | 203 | start_and_fetch_processid_on_linux_vm, |
211 | | - target_vm_from_cloning_job, |
212 | 204 | vm_instance_from_template, |
213 | 205 | wait_for_kv_stabilize, |
214 | 206 | wait_for_windows_vm, |
@@ -742,11 +734,6 @@ def workers_type(workers_utility_pods, installing_cnv): |
742 | 734 | return virtual |
743 | 735 |
|
744 | 736 |
|
745 | | -@pytest.fixture(scope="session") |
746 | | -def is_psi_cluster(): |
747 | | - return Infrastructure(name="cluster").instance.status.platform == "OpenStack" |
748 | | - |
749 | | - |
750 | 737 | @pytest.fixture() |
751 | 738 | def data_volume_multi_storage_scope_function( |
752 | 739 | request, |
@@ -1097,16 +1084,6 @@ def skip_access_mode_rwo_scope_class(storage_class_matrix__class__): |
1097 | 1084 | _skip_access_mode_rwo(storage_class_matrix=storage_class_matrix__class__) |
1098 | 1085 |
|
1099 | 1086 |
|
1100 | | -@pytest.fixture(scope="session") |
1101 | | -def nodes_cpu_vendor(schedulable_nodes): |
1102 | | - if schedulable_nodes[0].labels.get(f"cpu-vendor.node.kubevirt.io/{AMD}"): |
1103 | | - return AMD |
1104 | | - elif schedulable_nodes[0].labels.get(f"cpu-vendor.node.kubevirt.io/{INTEL}"): |
1105 | | - return INTEL |
1106 | | - else: |
1107 | | - return None |
1108 | | - |
1109 | | - |
1110 | 1087 | @pytest.fixture(scope="session") |
1111 | 1088 | def nodes_cpu_architecture(nodes): |
1112 | 1089 | return get_nodes_cpu_architecture(nodes=nodes) |
@@ -2340,11 +2317,6 @@ def migration_policy_with_bandwidth_scope_class(): |
2340 | 2317 | yield mp |
2341 | 2318 |
|
2342 | 2319 |
|
2343 | | -@pytest.fixture(scope="session") |
2344 | | -def gpu_nodes(nodes): |
2345 | | - return get_nodes_with_label(nodes=nodes, label="nvidia.com/gpu.present") |
2346 | | - |
2347 | | - |
2348 | 2320 | @pytest.fixture(scope="session") |
2349 | 2321 | def worker_machine1(worker_node1): |
2350 | 2322 | machine = Machine( |
@@ -2400,21 +2372,6 @@ def vm_for_test(request, namespace, unprivileged_client): |
2400 | 2372 | yield vm |
2401 | 2373 |
|
2402 | 2374 |
|
2403 | | -@pytest.fixture(scope="class") |
2404 | | -def rhel_vm_with_instancetype_and_preference_for_cloning(namespace, unprivileged_client): |
2405 | | - with VirtualMachineForCloning( |
2406 | | - name=RHEL_WITH_INSTANCETYPE_AND_PREFERENCE, |
2407 | | - image=Images.Rhel.RHEL9_REGISTRY_GUEST_IMG, |
2408 | | - namespace=namespace.name, |
2409 | | - client=unprivileged_client, |
2410 | | - vm_instance_type=VirtualMachineClusterInstancetype(name=U1_SMALL), |
2411 | | - vm_preference=VirtualMachineClusterPreference(name=RHEL9_PREFERENCE), |
2412 | | - os_flavor=OS_FLAVOR_RHEL, |
2413 | | - ) as vm: |
2414 | | - running_vm(vm=vm) |
2415 | | - yield vm |
2416 | | - |
2417 | | - |
2418 | 2375 | @pytest.fixture(scope="class") |
2419 | 2376 | def migrated_vm_multiple_times(request, vm_for_migration_test): |
2420 | 2377 | vmim = [] |
@@ -2468,25 +2425,6 @@ def hyperconverged_status_templates_scope_class( |
2468 | 2425 | return hyperconverged_resource_scope_class.instance.status.dataImportCronTemplates |
2469 | 2426 |
|
2470 | 2427 |
|
2471 | | -@pytest.fixture() |
2472 | | -def cloning_job_scope_function(request, unprivileged_client, namespace): |
2473 | | - with create_vm_cloning_job( |
2474 | | - name=f"clone-job-{request.param['source_name']}", |
2475 | | - client=unprivileged_client, |
2476 | | - namespace=namespace.name, |
2477 | | - source_name=request.param["source_name"], |
2478 | | - label_filters=request.param.get("label_filters"), |
2479 | | - annotation_filters=request.param.get("annotation_filters"), |
2480 | | - ) as vmc: |
2481 | | - yield vmc |
2482 | | - |
2483 | | - |
2484 | | -@pytest.fixture() |
2485 | | -def target_vm_scope_function(unprivileged_client, cloning_job_scope_function): |
2486 | | - with target_vm_from_cloning_job(client=unprivileged_client, cloning_job=cloning_job_scope_function) as target_vm: |
2487 | | - yield target_vm |
2488 | | - |
2489 | | - |
2490 | 2428 | @pytest.fixture(scope="module") |
2491 | 2429 | def snapshot_storage_class_name_scope_module( |
2492 | 2430 | storage_class_matrix_snapshot_matrix__module__, |
@@ -2623,18 +2561,6 @@ def ssp_resource_scope_class(admin_client, hco_namespace): |
2623 | 2561 | return get_ssp_resource(admin_client=admin_client, namespace=hco_namespace) |
2624 | 2562 |
|
2625 | 2563 |
|
2626 | | -@pytest.fixture(scope="session") |
2627 | | -def skip_test_if_no_odf_cephfs_sc(cluster_storage_classes_names): |
2628 | | - """ |
2629 | | - Skip test if no odf cephfs storage class available |
2630 | | - """ |
2631 | | - if StorageClassNames.CEPHFS not in cluster_storage_classes_names: |
2632 | | - pytest.skip( |
2633 | | - f"Skipping test, {StorageClassNames.CEPHFS} storage class is not deployed," |
2634 | | - f"deployed storage classes: {cluster_storage_classes_names}" |
2635 | | - ) |
2636 | | - |
2637 | | - |
2638 | 2564 | @pytest.fixture(scope="session") |
2639 | 2565 | def sriov_unused_ifaces(sriov_ifaces): |
2640 | 2566 | """ |
|
0 commit comments