File tree Expand file tree Collapse file tree
images/virtualization-artifact/pkg/controller/kvbuilder Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ func (b *KVVM) SetCPUModel(class *v1alpha2.VirtualMachineClass) error {
163163 cpu .Model = virtv1 .CPUModeHostPassthrough
164164 case v1alpha2 .CPUTypeModel :
165165 cpu .Model = class .Spec .CPU .Model
166- cpu .Features = []virtv1.CPUFeature {{Name : HTCPUFeature , Policy : "require " }}
166+ cpu .Features = []virtv1.CPUFeature {{Name : HTCPUFeature , Policy : "optional " }}
167167 case v1alpha2 .CPUTypeDiscovery , v1alpha2 .CPUTypeFeatures :
168168 cpu .Model = GenericCPUModel
169169 features := make ([]virtv1.CPUFeature , 0 , len (class .Status .CpuFeatures .Enabled )+ 1 )
Original file line number Diff line number Diff line change @@ -242,12 +242,11 @@ func TestSetCPUModel(t *testing.T) {
242242 }
243243
244244 features := builder .Resource .Spec .Template .Spec .Domain .CPU .Features
245- if ! containsCPUFeature (features , virtv1.CPUFeature {Name : HTCPUFeature , Policy : "require " }) {
246- t .Fatalf ("expected required ht feature to be added for model cpu, got %#v" , features )
245+ if ! containsCPUFeature (features , virtv1.CPUFeature {Name : HTCPUFeature , Policy : "optional " }) {
246+ t .Fatalf ("expected optional ht feature to be added for model cpu, got %#v" , features )
247247 }
248248 })
249249
250-
251250 t .Run ("should keep existing ht feature policy when already present" , func (t * testing.T ) {
252251 builder := NewEmptyKVVM (types.NamespacedName {Name : name , Namespace : namespace }, KVVMOptions {})
253252 class := & v1alpha2.VirtualMachineClass {
You can’t perform that action at this time.
0 commit comments