Skip to content

Commit

Permalink
fix blkio related validation
Browse files Browse the repository at this point in the history
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
  • Loading branch information
Ma Shimiao committed Jan 12, 2017
1 parent aad1f38 commit 055f3fa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 33 deletions.
14 changes: 7 additions & 7 deletions schema/config-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@
"properties": {
"blkioWeight": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioWeight",
"$ref": "defs-linux.json#/definitions/blkioWeightPointer"
"$ref": "defs-linux.json#/definitions/blkioWeight"
},
"blkioLeafWeight": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioLeafWeight",
"$ref": "defs-linux.json#/definitions/blkioWeightPointer"
"$ref": "defs-linux.json#/definitions/blkioWeight"
},
"blkioThrottleReadBpsDevice": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleReadBpsDevice",
Expand All @@ -113,7 +113,7 @@
"type": "array",
"items": [
{
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer"
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
}
]
},
Expand All @@ -128,7 +128,7 @@
{
"type": "array",
"items": {
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer"
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
}
},
{
Expand All @@ -142,7 +142,7 @@
{
"type": "array",
"items": {
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer"
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
}
},
{
Expand All @@ -156,7 +156,7 @@
{
"type": "array",
"items": {
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer"
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
}
},
{
Expand All @@ -168,7 +168,7 @@
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioWeightDevice",
"type": "array",
"items": {
"$ref": "defs-linux.json#/definitions/blockIODeviceWeightPointer"
"$ref": "defs-linux.json#/definitions/blockIODeviceWeight"
}
}
}
Expand Down
30 changes: 4 additions & 26 deletions schema/defs-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,7 @@
}
},
"blkioWeight": {
"type": "integer",
"minimum": 10,
"maximum": 1000
},
"blkioWeightPointer": {
"oneOf": [
{
"$ref": "#/definitions/blkioWeight"
},
{
"type": "null"
}
]
"$ref": "defs.json#/definitions/uint16Pointer"
},
"blockIODevice": {
"type": "object",
Expand All @@ -179,10 +167,10 @@
"type": "object",
"properties": {
"weight": {
"$ref": "#/definitions/blkioWeightPointer"
"$ref": "#/definitions/blkioWeight"
},
"leafWeight": {
"$ref": "#/definitions/blkioWeightPointer"
"$ref": "#/definitions/blkioWeight"
}
}
}
Expand All @@ -207,22 +195,12 @@
"type": "object",
"properties": {
"rate": {
"$ref": "defs.json#/definitions/uint64Pointer"
"$ref": "defs.json#/definitions/uint64"
}
}
}
]
},
"blockIODeviceThrottlePointer": {
"oneOf": [
{
"$ref": "#/definitions/blockIODeviceThrottle"
},
{
"type": "null"
}
]
},
"DeviceCgroup": {
"type": "object",
"properties": {
Expand Down

0 comments on commit 055f3fa

Please sign in to comment.