diff --git a/ocp_resources/plan.py b/ocp_resources/plan.py index 948f39c446..f4f1bbe06e 100644 --- a/ocp_resources/plan.py +++ b/ocp_resources/plan.py @@ -42,6 +42,10 @@ class Plan(NamespacedResource): rules should be applied to the target VM resource. enable_nested_virtualization (bool, optional): Whether to enable nested virtualization on migrated VMs. When False, CPU features vmx/svm are disabled on the target VM. + rdm_as_lun (bool, optional): Whether to map RDM (Raw Device Mapping) disks as LUN devices + with SCSI bus on the target VM. When True, RDM disks use + lun.bus: scsi instead of the default disk.bus: virtio. + Only applies to vSphere source providers. """ api_group = NamespacedResource.ApiGroup.FORKLIFT_KONVEYOR_IO @@ -78,6 +82,7 @@ def __init__( target_labels: dict[str, str] | None = None, target_affinity: dict[str, Any] | None = None, enable_nested_virtualization: bool | None = None, + rdm_as_lun: bool | None = None, **kwargs: Any, ) -> None: super().__init__(**kwargs) @@ -112,6 +117,7 @@ def __init__( self.target_labels = target_labels self.target_affinity = target_affinity self.enable_nested_virtualization = enable_nested_virtualization + self.rdm_as_lun = rdm_as_lun if self.pre_hook_name and self.pre_hook_namespace: self.hooks_array.append( @@ -214,6 +220,9 @@ def to_dict(self) -> None: if self.enable_nested_virtualization is not None: spec["enableNestedVirtualization"] = self.enable_nested_virtualization + if self.rdm_as_lun is not None: + spec["rdmAsLun"] = self.rdm_as_lun + def _generate_hook_spec(self, hook_name: str, hook_namespace: str, hook_type: str) -> dict[str, Any]: return { "hook": {