Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: yaroslavborbat <[email protected]>
  • Loading branch information
yaroslavborbat committed Nov 12, 2024
1 parent dbdd41a commit 57ca88f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ func (b *KVVM) SetKVVMIAnnotation(annoKey, annoValue string) {
}

func (b *KVVM) SetCPUModel(class *virtv2.VirtualMachineClass) error {
cpu := b.Resource.Spec.Template.Spec.Domain.CPU
if cpu == nil {
cpu = &virtv1.CPU{}
if b.Resource.Spec.Template.Spec.Domain.CPU == nil {
b.Resource.Spec.Template.Spec.Domain.CPU = &virtv1.CPU{}
}
cpu := b.Resource.Spec.Template.Spec.Domain.CPU

switch class.Spec.CPU.Type {
case virtv2.CPUTypeHost:
Expand Down

0 comments on commit 57ca88f

Please sign in to comment.