提交 0f31b6d8 编写于 作者: L lifeng68

blk: add blkiops define

Signed-off-by: Nlifeng68 <lifeng68@huawei.com>
上级 3f790442
...@@ -42,8 +42,7 @@ ...@@ -42,8 +42,7 @@
"maximum": 18446744073709552000 "maximum": 18446744073709552000
}, },
"int32Pointer": { "int32Pointer": {
"oneOf": [ "oneOf": [{
{
"$ref": "#/definitions/int32" "$ref": "#/definitions/int32"
}, },
{ {
...@@ -52,8 +51,7 @@ ...@@ -52,8 +51,7 @@
] ]
}, },
"uint16Pointer": { "uint16Pointer": {
"oneOf": [ "oneOf": [{
{
"$ref": "#/definitions/uint16" "$ref": "#/definitions/uint16"
}, },
{ {
...@@ -62,8 +60,7 @@ ...@@ -62,8 +60,7 @@
] ]
}, },
"uint64Pointer": { "uint64Pointer": {
"oneOf": [ "oneOf": [{
{
"$ref": "#/definitions/uint64" "$ref": "#/definitions/uint64"
}, },
{ {
...@@ -72,8 +69,7 @@ ...@@ -72,8 +69,7 @@
] ]
}, },
"stringPointer": { "stringPointer": {
"oneOf": [ "oneOf": [{
{
"type": "string" "type": "string"
}, },
{ {
...@@ -104,6 +100,40 @@ ...@@ -104,6 +100,40 @@
"Env": { "Env": {
"$ref": "#/definitions/ArrayOfStrings" "$ref": "#/definitions/ArrayOfStrings"
}, },
"BlkioDevice": {
"type": "object",
"properties": {
"Path": {
"$ref": "#/definitions/FilePath"
},
"Rate": {
"$ref": "#/definitions/uint64"
}
}
},
"ArrayOfBlkioDevice": {
"type": "array",
"items": {
"$ref": "#/definitions/BlkioDevice"
}
},
"BlkioWeightDevice": {
"type": "object",
"properties": {
"Path": {
"$ref": "#/definitions/FilePath"
},
"Weight": {
"$ref": "#/definitions/uint16"
}
}
},
"ArrayOfBlkioWeightDevice": {
"type": "array",
"items": {
"$ref": "#/definitions/BlkioWeightDevice"
}
},
"Hook": { "Hook": {
"type": "object", "type": "object",
"properties": { "properties": {
...@@ -250,9 +280,9 @@ ...@@ -250,9 +280,9 @@
"type": "string" "type": "string"
}, },
"runtime-args": { "runtime-args": {
"type":"array", "type": "array",
"items": { "items": {
"type":"string" "type": "string"
} }
} }
} }
...@@ -273,8 +303,8 @@ ...@@ -273,8 +303,8 @@
} }
}, },
"digest": { "digest": {
"type": "string", "type": "string",
"pattern": "^[a-z0-9]+(?:[+._-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$" "pattern": "^[a-z0-9]+(?:[+._-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$"
}, },
"ociVersion": { "ociVersion": {
"description": "The version of Open Container Runtime Specification that the document complies with", "description": "The version of Open Container Runtime Specification that the document complies with",
...@@ -340,7 +370,7 @@ ...@@ -340,7 +370,7 @@
} }
} }
}, },
"filters": { "filters": {
"type": "object", "type": "object",
"patternProperties": { "patternProperties": {
".{1,}": { ".{1,}": {
...@@ -366,7 +396,7 @@ ...@@ -366,7 +396,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"name": { "name": {
"type":"string" "type": "string"
}, },
"offset": { "offset": {
"$ref": "#/definitions/uint8" "$ref": "#/definitions/uint8"
...@@ -607,8 +637,7 @@ ...@@ -607,8 +637,7 @@
}, },
"blockIODeviceWeight": { "blockIODeviceWeight": {
"type": "object", "type": "object",
"allOf": [ "allOf": [{
{
"$ref": "#/definitions/blockIODevice" "$ref": "#/definitions/blockIODevice"
}, },
{ {
...@@ -625,8 +654,7 @@ ...@@ -625,8 +654,7 @@
] ]
}, },
"blockIODeviceThrottle": { "blockIODeviceThrottle": {
"allOf": [ "allOf": [{
{
"$ref": "#/definitions/blockIODevice" "$ref": "#/definitions/blockIODevice"
}, },
{ {
...@@ -865,184 +893,184 @@ ...@@ -865,184 +893,184 @@
} }
} }
}, },
"resources": { "resources": {
"id": "https://opencontainers.org/schema/bundle/linux/resources", "id": "https://opencontainers.org/schema/bundle/linux/resources",
"type": "object", "type": "object",
"properties": { "properties": {
"devices": { "devices": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/devices", "id": "https://opencontainers.org/schema/bundle/linux/resources/devices",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/DeviceCgroup" "$ref": "#/definitions/DeviceCgroup"
} }
}, },
"pids": { "pids": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/pids", "id": "https://opencontainers.org/schema/bundle/linux/resources/pids",
"type": "object", "type": "object",
"properties": { "properties": {
"limit": { "limit": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/pids/limit", "id": "https://opencontainers.org/schema/bundle/linux/resources/pids/limit",
"$ref": "#/definitions/int64" "$ref": "#/definitions/int64"
} }
}, },
"required": [ "required": [
"limit" "limit"
] ]
}, },
"blockIO": { "blockIO": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO", "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO",
"type": "object", "type": "object",
"properties": { "properties": {
"weight": { "weight": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/weight", "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/weight",
"$ref": "#/definitions/weight" "$ref": "#/definitions/weight"
}, },
"leafWeight": { "leafWeight": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/leafWeight", "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/leafWeight",
"$ref": "#/definitions/weight" "$ref": "#/definitions/weight"
}, },
"throttleReadBpsDevice": { "throttleReadBpsDevice": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleReadBpsDevice", "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleReadBpsDevice",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/blockIODeviceThrottle" "$ref": "#/definitions/blockIODeviceThrottle"
} }
}, },
"throttleWriteBpsDevice": { "throttleWriteBpsDevice": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleWriteBpsDevice", "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleWriteBpsDevice",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/blockIODeviceThrottle" "$ref": "#/definitions/blockIODeviceThrottle"
} }
}, },
"throttleReadIOPSDevice": { "throttleReadIOPSDevice": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleReadIOPSDevice", "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleReadIOPSDevice",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/blockIODeviceThrottle" "$ref": "#/definitions/blockIODeviceThrottle"
} }
}, },
"throttleWriteIOPSDevice": { "throttleWriteIOPSDevice": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleWriteIOPSDevice", "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleWriteIOPSDevice",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/blockIODeviceThrottle" "$ref": "#/definitions/blockIODeviceThrottle"
} }
}, },
"weightDevice": { "weightDevice": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/weightDevice", "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/weightDevice",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/blockIODeviceWeight" "$ref": "#/definitions/blockIODeviceWeight"
} }
} }
} }
}, },
"cpu": { "cpu": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu", "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu",
"type": "object", "type": "object",
"properties": { "properties": {
"cpus": { "cpus": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/cpus", "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/cpus",
"type": "string" "type": "string"
}, },
"mems": { "mems": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/mems", "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/mems",
"type": "string" "type": "string"
}, },
"period": { "period": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/period", "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/period",
"$ref": "#/definitions/uint64" "$ref": "#/definitions/uint64"
}, },
"quota": { "quota": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/quota", "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/quota",
"$ref": "#/definitions/int64" "$ref": "#/definitions/int64"
}, },
"realtimePeriod": { "realtimePeriod": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/realtimePeriod", "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/realtimePeriod",
"$ref": "#/definitions/uint64" "$ref": "#/definitions/uint64"
}, },
"realtimeRuntime": { "realtimeRuntime": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/realtimeRuntime", "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/realtimeRuntime",
"$ref": "#/definitions/int64" "$ref": "#/definitions/int64"
}, },
"shares": { "shares": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/shares", "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/shares",
"$ref": "#/definitions/uint64" "$ref": "#/definitions/uint64"
} }
} }
}, },
"hugepageLimits": { "hugepageLimits": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/hugepageLimits", "id": "https://opencontainers.org/schema/bundle/linux/resources/hugepageLimits",
"type": "array", "type": "array",
"items": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
"pageSize": { "pageSize": {
"type": "string" "type": "string"
}, },
"limit": { "limit": {
"$ref": "#/definitions/uint64" "$ref": "#/definitions/uint64"
} }
}, },
"required": [ "required": [
"pageSize", "pageSize",
"limit" "limit"
] ]
} }
}, },
"memory": { "memory": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory", "id": "https://opencontainers.org/schema/bundle/linux/resources/memory",
"type": "object", "type": "object",
"properties": { "properties": {
"kernel": { "kernel": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/kernel", "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/kernel",
"$ref": "#/definitions/int64" "$ref": "#/definitions/int64"
}, },
"kernelTCP": { "kernelTCP": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/kernelTCP", "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/kernelTCP",
"$ref": "#/definitions/int64" "$ref": "#/definitions/int64"
}, },
"limit": { "limit": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/limit", "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/limit",
"$ref": "#/definitions/int64" "$ref": "#/definitions/int64"
}, },
"reservation": { "reservation": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/reservation", "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/reservation",
"$ref": "#/definitions/int64" "$ref": "#/definitions/int64"
}, },
"swap": { "swap": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swap", "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swap",
"$ref": "#/definitions/int64" "$ref": "#/definitions/int64"
}, },
"swappiness": { "swappiness": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swappiness", "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swappiness",
"$ref": "#/definitions/uint64" "$ref": "#/definitions/uint64"
}, },
"disableOOMKiller": { "disableOOMKiller": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/disableOOMKiller", "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/disableOOMKiller",
"type": "boolean" "type": "boolean"
} }
} }
}, },
"network": { "network": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/network", "id": "https://opencontainers.org/schema/bundle/linux/resources/network",
"type": "object", "type": "object",
"properties": { "properties": {
"classID": { "classID": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/network/classId", "id": "https://opencontainers.org/schema/bundle/linux/resources/network/classId",
"$ref": "#/definitions/uint32" "$ref": "#/definitions/uint32"
}, },
"priorities": { "priorities": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/network/priorities", "id": "https://opencontainers.org/schema/bundle/linux/resources/network/priorities",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/NetworkInterfacePriority" "$ref": "#/definitions/NetworkInterfacePriority"
} }
} }
} }
} }
} }
} }
} }
} }
\ No newline at end of file
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
"Sysctls": { "Sysctls": {
"$ref": "defs.json#/definitions/mapStringString" "$ref": "defs.json#/definitions/mapStringString"
}, },
"Runtime":{ "Runtime": {
"type":"string" "type": "string"
}, },
"RestartPolicy": { "RestartPolicy": {
"type": "object", "type": "object",
...@@ -119,46 +119,19 @@ ...@@ -119,46 +119,19 @@
"type": "uint16" "type": "uint16"
}, },
"BlkioWeightDevice": { "BlkioWeightDevice": {
"type": "array", "$ref": "defs.json#/definitions/ArrayOfBlkioWeightDevice"
"items": {
"type": "object",
"properties": {
"Path": {
"type": "string"
},
"Weight": {
"type": "uint16"
}
}
}
}, },
"BlkioDeviceReadBps": { "BlkioDeviceReadBps": {
"type": "array", "$ref": "defs.json#/definitions/ArrayOfBlkioDevice"
"items": {
"type": "object",
"properties": {
"Path": {
"type": "string"
},
"Rate": {
"type": "uint64"
}
}
}
}, },
"BlkioDeviceWriteBps": { "BlkioDeviceWriteBps": {
"type": "array", "$ref": "defs.json#/definitions/ArrayOfBlkioDevice"
"items": { },
"type": "object", "BlkioDeviceReadIops": {
"properties": { "$ref": "defs.json#/definitions/ArrayOfBlkioDevice"
"Path": { },
"type": "string" "BlkioDeviceWriteIops": {
}, "$ref": "defs.json#/definitions/ArrayOfBlkioDevice"
"Rate": {
"type": "uint64"
}
}
}
}, },
"CPUPeriod": { "CPUPeriod": {
"type": "int64" "type": "int64"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册