Skip to content

Commit 055f3fa

Browse files
author
Ma Shimiao
committed
fix blkio related validation
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
1 parent aad1f38 commit 055f3fa

2 files changed

Lines changed: 11 additions & 33 deletions

File tree

schema/config-linux.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@
100100
"properties": {
101101
"blkioWeight": {
102102
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioWeight",
103-
"$ref": "defs-linux.json#/definitions/blkioWeightPointer"
103+
"$ref": "defs-linux.json#/definitions/blkioWeight"
104104
},
105105
"blkioLeafWeight": {
106106
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioLeafWeight",
107-
"$ref": "defs-linux.json#/definitions/blkioWeightPointer"
107+
"$ref": "defs-linux.json#/definitions/blkioWeight"
108108
},
109109
"blkioThrottleReadBpsDevice": {
110110
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleReadBpsDevice",
@@ -113,7 +113,7 @@
113113
"type": "array",
114114
"items": [
115115
{
116-
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer"
116+
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
117117
}
118118
]
119119
},
@@ -128,7 +128,7 @@
128128
{
129129
"type": "array",
130130
"items": {
131-
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer"
131+
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
132132
}
133133
},
134134
{
@@ -142,7 +142,7 @@
142142
{
143143
"type": "array",
144144
"items": {
145-
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer"
145+
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
146146
}
147147
},
148148
{
@@ -156,7 +156,7 @@
156156
{
157157
"type": "array",
158158
"items": {
159-
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer"
159+
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
160160
}
161161
},
162162
{
@@ -168,7 +168,7 @@
168168
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioWeightDevice",
169169
"type": "array",
170170
"items": {
171-
"$ref": "defs-linux.json#/definitions/blockIODeviceWeightPointer"
171+
"$ref": "defs-linux.json#/definitions/blockIODeviceWeight"
172172
}
173173
}
174174
}

schema/defs-linux.json

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,7 @@
140140
}
141141
},
142142
"blkioWeight": {
143-
"type": "integer",
144-
"minimum": 10,
145-
"maximum": 1000
146-
},
147-
"blkioWeightPointer": {
148-
"oneOf": [
149-
{
150-
"$ref": "#/definitions/blkioWeight"
151-
},
152-
{
153-
"type": "null"
154-
}
155-
]
143+
"$ref": "defs.json#/definitions/uint16Pointer"
156144
},
157145
"blockIODevice": {
158146
"type": "object",
@@ -179,10 +167,10 @@
179167
"type": "object",
180168
"properties": {
181169
"weight": {
182-
"$ref": "#/definitions/blkioWeightPointer"
170+
"$ref": "#/definitions/blkioWeight"
183171
},
184172
"leafWeight": {
185-
"$ref": "#/definitions/blkioWeightPointer"
173+
"$ref": "#/definitions/blkioWeight"
186174
}
187175
}
188176
}
@@ -207,22 +195,12 @@
207195
"type": "object",
208196
"properties": {
209197
"rate": {
210-
"$ref": "defs.json#/definitions/uint64Pointer"
198+
"$ref": "defs.json#/definitions/uint64"
211199
}
212200
}
213201
}
214202
]
215203
},
216-
"blockIODeviceThrottlePointer": {
217-
"oneOf": [
218-
{
219-
"$ref": "#/definitions/blockIODeviceThrottle"
220-
},
221-
{
222-
"type": "null"
223-
}
224-
]
225-
},
226204
"DeviceCgroup": {
227205
"type": "object",
228206
"properties": {

0 commit comments

Comments
 (0)