We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3db644c + f6e16e8 commit 3767027Copy full SHA for 3767027
validate/validate.go
@@ -687,6 +687,23 @@ func (v *Validator) CheckLinuxResources() (msgs []string) {
687
}
688
689
690
+ for index := 0; index < len(r.Devices); index++ {
691
+ switch r.Devices[index].Type {
692
+ case "a", "b", "c":
693
+ default:
694
+ msgs = append(msgs, fmt.Sprintf("type of devices %s is invalid", r.Devices[index].Type))
695
+ }
696
+
697
+ access := []byte(r.Devices[index].Access)
698
+ for i := 0; i < len(access); i++ {
699
+ switch access[i] {
700
+ case 'r', 'w', 'm':
701
702
+ msgs = append(msgs, fmt.Sprintf("access %s is invalid", r.Devices[index].Access))
703
+ return
704
705
706
707
708
return
709
0 commit comments