Skip to content

Commit

Permalink
Make VSphereUsesEl9VirtV2v more extensible
Browse files Browse the repository at this point in the history
Signed-off-by: Arik Hadas <[email protected]>
  • Loading branch information
ahadas committed Jul 26, 2023
1 parent a1f96ee commit d80ee2f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pkg/apis/forklift/v1beta1/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,12 @@ func (p *Plan) VSphereUsesEl9VirtV2v() (bool, error) {
return false, liberr.New("Cannot analyze plan, destination provider is missing.")
}

if source.Type() != VSphere {
switch source.Type() {
case VSphere:
return !p.Spec.Warm && destination.IsHost(), nil
default:
return false, nil
}

if !p.Spec.Warm && destination.IsHost() {
return true, nil
}
return false, nil
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down

0 comments on commit d80ee2f

Please sign in to comment.