File tree Expand file tree Collapse file tree 7 files changed +7
-334
lines changed Expand file tree Collapse file tree 7 files changed +7
-334
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,10 @@ require (
99 github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
1010 github.com/xeipuuv/gojsonschema v1.2.0 // indirect
1111 golang.org/x/mod v0.19.0 // indirect
12+ golang.org/x/sys v0.19.0 // indirect
1213 gopkg.in/yaml.v2 v2.4.0 // indirect
1314 sigs.k8s.io/yaml v1.3.0 // indirect
14- tags.cncf.io/container-device-interface v0.0 .0 // indirect
15+ tags.cncf.io/container-device-interface/api/producer v0.8 .0 // indirect
1516 tags.cncf.io/container-device-interface/specs-go v0.8.0 // indirect
1617)
1718
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQ
1919golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8 =
2020golang.org/x/mod v0.19.0 /go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c =
2121golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o =
22+ golang.org/x/sys v0.19.0 /go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA =
2223gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM =
2324gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 /go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0 =
2425gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY =
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ require (
77 github.com/xeipuuv/gojsonschema v1.2.0
88 sigs.k8s.io/yaml v1.3.0
99 tags.cncf.io/container-device-interface v0.0.0
10+ tags.cncf.io/container-device-interface/api/producer v0.8.0
1011 tags.cncf.io/container-device-interface/specs-go v0.8.0
1112)
1213
@@ -23,7 +24,6 @@ require (
2324 golang.org/x/sys v0.19.0 // indirect
2425 gopkg.in/yaml.v2 v2.4.0 // indirect
2526 gopkg.in/yaml.v3 v3.0.1 // indirect
26- tags.cncf.io/container-device-interface/api/producer v0.8.0 // indirect
2727)
2828
2929replace (
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ import (
3131 "sigs.k8s.io/yaml"
3232
3333 schema "github.com/xeipuuv/gojsonschema"
34- "tags.cncf.io/container-device-interface/internal/validation "
34+ "tags.cncf.io/container-device-interface/api/producer "
3535 cdi "tags.cncf.io/container-device-interface/specs-go"
3636)
3737
@@ -315,7 +315,7 @@ func (s *Schema) validateContents(any map[string]interface{}) error {
315315 contents := schemaContents (any )
316316
317317 if specAnnotations , ok := contents .getAnnotations (); ok {
318- if err := validation .ValidateSpecAnnotations ("" , specAnnotations ); err != nil {
318+ if err := producer .ValidateSpecAnnotations ("" , specAnnotations ); err != nil {
319319 return err
320320 }
321321 }
@@ -328,7 +328,7 @@ func (s *Schema) validateContents(any map[string]interface{}) error {
328328 for _ , device := range devices {
329329 name , _ := device .getFieldAsString ("name" )
330330 if annotations , ok := device .getAnnotations (); ok {
331- if err := validation .ValidateSpecAnnotations (name , annotations ); err != nil {
331+ if err := producer .ValidateSpecAnnotations (name , annotations ); err != nil {
332332 return err
333333 }
334334 }
You can’t perform that action at this time.
0 commit comments