Skip to content

Commit

Permalink
schema: completed more of the linux resources
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
  • Loading branch information
vbatts committed Jan 25, 2016
1 parent f3ec8a1 commit 449073a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 32 deletions.
12 changes: 6 additions & 6 deletions schema/defs-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@
},
"blkioWeightPointer": {
"oneOf": [
{ "type": "null" },
{ "$ref": "#/definitions/blkioWeight" }
{ "$ref": "#/definitions/blkioWeight" },
{ "type": "null" }
]
},
"blockIODevice": {
Expand All @@ -125,8 +125,8 @@
},
"blockIODeviceWeightPointer": {
"oneOf": [
{ "type": "null" },
{ "$ref": "#/definitions/blockIODeviceWeight" }
{ "$ref": "#/definitions/blockIODeviceWeight" },
{ "type": "null" }
]
},
"blockIODeviceThrottle": {
Expand All @@ -141,8 +141,8 @@
},
"blockIODeviceThrottlePointer": {
"oneOf": [
{ "type": "null" },
{ "$ref": "#/definitions/blockIODeviceThrottle" }
{ "$ref": "#/definitions/blockIODeviceThrottle" },
{ "type": "null" }
]
},
"NetworkInterfacePriority": {
Expand Down
14 changes: 10 additions & 4 deletions schema/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,20 @@
},
"uint16Pointer": {
"oneOf": [
{ "type": "null" },
{ "$ref": "#/definitions/uint16" }
{ "$ref": "#/definitions/uint16" },
{ "type": "null" }
]
},
"uint64Pointer": {
"oneOf": [
{ "type": "null" },
{ "$ref": "#/definitions/uint64" }
{ "$ref": "#/definitions/uint64" },
{ "type": "null" }
]
},
"stringPointer": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
]
},
"mapStringString": {
Expand Down
44 changes: 22 additions & 22 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,41 +91,41 @@
"blkioThrottleReadBpsDevice": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO/blkioThrottleReadBpsDevice",
"oneOf": [
{ "type": "null" },
{
"type": "array",
"items": [ { "$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer" } ]
}
},
{ "type": "null" }
]
},
"blkioThrottleWriteBpsDevice": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO/blkioThrottleWriteBpsDevice",
"oneOf": [
{ "type": "null" },
{
"type": "array",
"items": [ { "$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer" } ]
}
},
{ "type": "null" }
]
},
"blkioThrottleReadIopsDevice": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO/blkioThrottleReadIopsDevice",
"oneOf": [
{ "type": "null" },
{
"type": "array",
"items": [ { "$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer" } ]
}
},
{ "type": "null" }
]
},
"blkioThrottleWriteIopsDevice": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO/blkioThrottleWriteIopsDevice",
"oneOf": [
{ "type": "null" },
{
"type": "array",
"items": [ { "$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer" } ]
}
},
{ "type": "null" }
]
},
"blkioWeightDevice": {
Expand All @@ -142,31 +142,31 @@
"properties": {
"cpus": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/cpus",
"type": "string"
"$ref": "defs.json#/definitions/stringPointer"
},
"mems": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/mems",
"type": "string"
"$ref": "defs.json#/definitions/stringPointer"
},
"period": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/period",
"$ref": "defs.json#/definitions/uint64"
"$ref": "defs.json#/definitions/uint64Pointer"
},
"quota": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/quota",
"$ref": "defs.json#/definitions/uint64"
"$ref": "defs.json#/definitions/uint64Pointer"
},
"realtimePeriod": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/realtimePeriod",
"$ref": "defs.json#/definitions/uint64"
"$ref": "defs.json#/definitions/uint64Pointer"
},
"realtimeRuntime": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/realtimeRuntime",
"$ref": "defs.json#/definitions/uint64"
"$ref": "defs.json#/definitions/uint64Pointer"
},
"shares": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/shares",
"$ref": "defs.json#/definitions/uint64"
"$ref": "defs.json#/definitions/uint64Pointer"
}
},
"type": "object"
Expand All @@ -190,29 +190,29 @@
},
"memory": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/memory",
"type": "object",
"properties": {
"kernel": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/memory/kernel",
"type": "integer"
"$ref": "defs.json#/definitions/uint64Pointer"
},
"limit": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/memory/limit",
"type": "integer"
"$ref": "defs.json#/definitions/uint64Pointer"
},
"reservation": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/memory/reservation",
"type": "integer"
"$ref": "defs.json#/definitions/uint64Pointer"
},
"swap": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/memory/swap",
"type": "integer"
"$ref": "defs.json#/definitions/uint64Pointer"
},
"swappiness": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/memory/swappiness",
"type": "integer"
"$ref": "defs.json#/definitions/uint64Pointer"
}
},
"type": "object"
}
},
"network": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/network",
Expand Down

0 comments on commit 449073a

Please sign in to comment.