Skip to content

Commit 5d47014

Browse files
author
Ma Shimiao
committed
fix blkio related validation
Signed-off-by: Ma Shimiao <[email protected]>
1 parent 069e8e1 commit 5d47014

2 files changed

Lines changed: 17 additions & 10 deletions

File tree

schema/config-linux.json

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"type": "array",
9797
"items": [
9898
{
99-
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer"
99+
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
100100
}
101101
]
102102
},
@@ -111,7 +111,7 @@
111111
{
112112
"type": "array",
113113
"items": {
114-
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer"
114+
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
115115
}
116116
},
117117
{
@@ -125,7 +125,7 @@
125125
{
126126
"type": "array",
127127
"items": {
128-
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer"
128+
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
129129
}
130130
},
131131
{
@@ -139,7 +139,7 @@
139139
{
140140
"type": "array",
141141
"items": {
142-
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer"
142+
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
143143
}
144144
},
145145
{
@@ -149,10 +149,17 @@
149149
},
150150
"blkioWeightDevice": {
151151
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioWeightDevice",
152-
"type": "array",
153-
"items": {
154-
"$ref": "defs-linux.json#/definitions/blockIODeviceWeightPointer"
155-
}
152+
"oneOf": [
153+
{
154+
"type": "array",
155+
"items": {
156+
"$ref": "defs-linux.json#/definitions/blockIODeviceWeight"
157+
}
158+
},
159+
{
160+
"type": "null"
161+
}
162+
]
156163
}
157164
}
158165
},

schema/defs-linux.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@
8484
},
8585
"Major": {
8686
"description": "major device number",
87-
"$ref": "defs.json#/definitions/uint16"
87+
"$ref": "defs.json#/definitions/int16"
8888
},
8989
"Minor": {
9090
"description": "minor device number",
91-
"$ref": "defs.json#/definitions/uint16"
91+
"$ref": "defs.json#/definitions/int16"
9292
},
9393
"FileMode": {
9494
"description": "File permissions mode (typically an octal value)",

0 commit comments

Comments
 (0)