@@ -24,7 +24,7 @@ import (
24
24
"github.com/google/go-cmp/cmp/cmpopts"
25
25
26
26
apiv1 "k8s.io/api/core/v1"
27
- resourceapi "k8s.io/api/resource/v1beta1 "
27
+ resourceapi "k8s.io/api/resource/v1 "
28
28
"k8s.io/apimachinery/pkg/api/resource"
29
29
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
30
30
"k8s.io/apimachinery/pkg/types"
@@ -220,19 +220,17 @@ func testResourceSlicesWithPartionableDevices(driverName, poolName, nodeName str
220
220
devices ,
221
221
resourceapi.Device {
222
222
Name : fmt .Sprintf ("gpu-0-partition-%d" , i ),
223
- Basic : & resourceapi.BasicDevice {
224
- Capacity : map [resourceapi.QualifiedName ]resourceapi.DeviceCapacity {
225
- "memory" : {
226
- Value : resource .MustParse ("10Gi" ),
227
- },
223
+ Capacity : map [resourceapi.QualifiedName ]resourceapi.DeviceCapacity {
224
+ "memory" : {
225
+ Value : resource .MustParse ("10Gi" ),
228
226
},
229
- ConsumesCounters : []resourceapi. DeviceCounterConsumption {
230
- {
231
- CounterSet : "gpu-0-counter-set" ,
232
- Counters : map [ string ]resourceapi. Counter {
233
- "memory" : {
234
- Value : resource . MustParse ( "10Gi" ),
235
- } ,
227
+ },
228
+ ConsumesCounters : []resourceapi. DeviceCounterConsumption {
229
+ {
230
+ CounterSet : "gpu-0-counter-set" ,
231
+ Counters : map [ string ]resourceapi. Counter {
232
+ "memory" : {
233
+ Value : resource . MustParse ( "10Gi" ) ,
236
234
},
237
235
},
238
236
},
@@ -243,19 +241,17 @@ func testResourceSlicesWithPartionableDevices(driverName, poolName, nodeName str
243
241
devices = append (devices ,
244
242
resourceapi.Device {
245
243
Name : "gpu-0" ,
246
- Basic : & resourceapi.BasicDevice {
247
- Capacity : map [resourceapi.QualifiedName ]resourceapi.DeviceCapacity {
248
- "memory" : {
249
- Value : resource .MustParse (fmt .Sprintf ("%dGi" , 10 * partitionCount )),
250
- },
244
+ Capacity : map [resourceapi.QualifiedName ]resourceapi.DeviceCapacity {
245
+ "memory" : {
246
+ Value : resource .MustParse (fmt .Sprintf ("%dGi" , 10 * partitionCount )),
251
247
},
252
- ConsumesCounters : []resourceapi. DeviceCounterConsumption {
253
- {
254
- CounterSet : "gpu-0-counter-set" ,
255
- Counters : map [ string ]resourceapi. Counter {
256
- "memory" : {
257
- Value : resource . MustParse ( fmt . Sprintf ( "%dGi" , 10 * partitionCount )),
258
- } ,
248
+ },
249
+ ConsumesCounters : []resourceapi. DeviceCounterConsumption {
250
+ {
251
+ CounterSet : "gpu-0-counter-set" ,
252
+ Counters : map [ string ]resourceapi. Counter {
253
+ "memory" : {
254
+ Value : resource . MustParse ( fmt . Sprintf ( "%dGi" , 10 * partitionCount )) ,
259
255
},
260
256
},
261
257
},
@@ -266,7 +262,7 @@ func testResourceSlicesWithPartionableDevices(driverName, poolName, nodeName str
266
262
ObjectMeta : metav1.ObjectMeta {Name : sliceName , UID : types .UID (sliceName )},
267
263
Spec : resourceapi.ResourceSliceSpec {
268
264
Driver : driverName ,
269
- NodeName : nodeName ,
265
+ NodeName : & nodeName ,
270
266
Pool : resourceapi.ResourcePool {Name : poolName , Generation : int64 (poolGen ), ResourceSliceCount : 1 },
271
267
Devices : devices ,
272
268
SharedCounters : []resourceapi.CounterSet {
0 commit comments