Summary
The prepared_plan fixture fails for OpenShift source-provider runs of TestPlanArchivePvcCleanup before the test can execute.
Problem / Motivation
For ProviderType.OPENSHIFT, conftest.py creates the source VM through create_source_cnv_vms (approximately lines 1143–1165). Later, the generic if not skip_clone path calls clone_provider.get_vm_by_name (approximately line 1267). OCPProvider in libs/providers/openshift.py does not implement get_vm_by_name, so the class fixture fails before the Plan Archive PVC cleanup test starts. This was uncovered during the docstring review for PR #624: #624
Reproduction
On a properly configured cluster with an OpenShift source provider, run the plan_lifecycle test for TestPlanArchivePvcCleanup using that source provider. The prepared_plan class fixture creates the source VM, then reaches the generic clone lookup and fails because OCPProvider has no get_vm_by_name method.
Expected / Actual
- Expected: The test uses the source VM already created by
create_source_cnv_vms and proceeds to the Plan Archive PVC cleanup scenario.
- Actual: Fixture setup fails in the generic cloning path before any test method runs.
Requirements
- For OpenShift source-provider runs, reuse the VM created by
create_source_cnv_vms and skip cloning it.
- Keep the change scoped to the OpenShift source fixture flow; do not alter generic provider cloning paths.
Deliverables
Assisted-by: PI (${PI_MODEL:-unknown})
Summary
The
prepared_planfixture fails for OpenShift source-provider runs ofTestPlanArchivePvcCleanupbefore the test can execute.Problem / Motivation
For
ProviderType.OPENSHIFT,conftest.pycreates the source VM throughcreate_source_cnv_vms(approximately lines 1143–1165). Later, the genericif not skip_clonepath callsclone_provider.get_vm_by_name(approximately line 1267).OCPProviderinlibs/providers/openshift.pydoes not implementget_vm_by_name, so the class fixture fails before the Plan Archive PVC cleanup test starts. This was uncovered during the docstring review for PR #624: #624Reproduction
On a properly configured cluster with an OpenShift source provider, run the
plan_lifecycletest forTestPlanArchivePvcCleanupusing that source provider. Theprepared_planclass fixture creates the source VM, then reaches the generic clone lookup and fails becauseOCPProviderhas noget_vm_by_namemethod.Expected / Actual
create_source_cnv_vmsand proceeds to the Plan Archive PVC cleanup scenario.Requirements
create_source_cnv_vmsand skip cloning it.Deliverables
TestPlanArchivePvcCleanupreproduction on a properly configured clusterAssisted-by: PI (${PI_MODEL:-unknown})