Skip to content

Commit

Permalink
schema: rearrange and split out linux specifics
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 449073a commit 3d58754
Show file tree
Hide file tree
Showing 2 changed files with 320 additions and 314 deletions.
291 changes: 291 additions & 0 deletions schema/schema-linux.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,291 @@
{
"linux": {
"description": "Linux platform-specific configurations",
"id": "https://www.opencontainers.org/jsonschema/linux",
"type": "object",
"properties": {
"apparmorProfile": {
"id": "https://www.opencontainers.org/jsonschema/linux/apparmorProfile",
"type": "string"
},
"capabilities": {
"id": "https://www.opencontainers.org/jsonschema/linux/capabilities",
"$ref": "defs.json#/definitions/ArrayOfStrings"
},
"devices": {
"id": "https://www.opencontainers.org/jsonschema/linux/devices",
"type": "array",
"items": {
"oneOf": [ { "$ref": "defs-linux.json#/definitions/Device" } ]
}
},
"uidMappings": {
"id": "https://www.opencontainers.org/jsonschema/linux/uidMappings",
"oneOf": [
{
"type": "array",
"items": {
"oneOf": [ { "$ref": "defs.json#/definitions/IDMapping" } ]
}
},
{ "type": "null" }
]
},
"gidMappings": {
"id": "https://www.opencontainers.org/jsonschema/linux/gidMappings",
"oneOf": [
{
"type": "array",
"items": {
"oneOf": [ { "$ref": "defs.json#/definitions/IDMapping" } ]
}
},
{ "type": "null" }
]
},
"namespaces": {
"id": "https://www.opencontainers.org/jsonschema/linux/namespaces",
"type": "array",
"items": {
"anyOf": [ { "$ref": "defs-linux.json#/definitions/NamespaceReference" } ]
}
},
"resources": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources",
"type": "object",
"properties": {
"blockIO": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO",
"type": "object",
"properties": {
"blkioWeight": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO/blkioWeight",
"$ref": "defs-linux.json#/definitions/blkioWeightPointer"
},
"blkioLeafWeight": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO/blkioLeafWeight",
"$ref": "defs-linux.json#/definitions/blkioWeightPointer"
},
"blkioThrottleReadBpsDevice": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO/blkioThrottleReadBpsDevice",
"oneOf": [
{
"type": "array",
"items": [ { "$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer" } ]
},
{ "type": "null" }
]
},
"blkioThrottleWriteBpsDevice": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO/blkioThrottleWriteBpsDevice",
"oneOf": [
{
"type": "array",
"items": [ { "$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer" } ]
},
{ "type": "null" }
]
},
"blkioThrottleReadIopsDevice": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO/blkioThrottleReadIopsDevice",
"oneOf": [
{
"type": "array",
"items": [ { "$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer" } ]
},
{ "type": "null" }
]
},
"blkioThrottleWriteIopsDevice": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO/blkioThrottleWriteIopsDevice",
"oneOf": [
{
"type": "array",
"items": [ { "$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer" } ]
},
{ "type": "null" }
]
},
"blkioWeightDevice": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO/blkioWeightDevice",
"type": "array",
"items": [
{ "$ref": "defs-linux.json#/definitions/blockIODeviceWeightPointer" }
]
}
}
},
"cpu": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu",
"properties": {
"cpus": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/cpus",
"$ref": "defs.json#/definitions/stringPointer"
},
"mems": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/mems",
"$ref": "defs.json#/definitions/stringPointer"
},
"period": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/period",
"$ref": "defs.json#/definitions/uint64Pointer"
},
"quota": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/quota",
"$ref": "defs.json#/definitions/uint64Pointer"
},
"realtimePeriod": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/realtimePeriod",
"$ref": "defs.json#/definitions/uint64Pointer"
},
"realtimeRuntime": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/realtimeRuntime",
"$ref": "defs.json#/definitions/uint64Pointer"
},
"shares": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/shares",
"$ref": "defs.json#/definitions/uint64Pointer"
}
},
"type": "object"
},
"disableOOMKiller": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/disableOOMKiller",
"type": "boolean"
},
"hugepageLimits": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/hugepageLimits",
"oneOf": [
{
"type": "object",
"properties": {
"pageSize": { "type": "string" },
"limit": { "$ref": "defs.json#/definitions/uint64" }
}
},
{ "type": "null" }
]
},
"memory": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/memory",
"type": "object",
"properties": {
"kernel": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/memory/kernel",
"$ref": "defs.json#/definitions/uint64Pointer"
},
"limit": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/memory/limit",
"$ref": "defs.json#/definitions/uint64Pointer"
},
"reservation": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/memory/reservation",
"$ref": "defs.json#/definitions/uint64Pointer"
},
"swap": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/memory/swap",
"$ref": "defs.json#/definitions/uint64Pointer"
},
"swappiness": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/memory/swappiness",
"$ref": "defs.json#/definitions/uint64Pointer"
}
}
},
"network": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/network",
"type": "object",
"properties": {
"classId": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/network/classId",
"type": "string"
},
"priorities": {
"id": "https://www.opencontainers.org/jsonschema/linux/resources/network/priorities",
"oneOf": [
{
"type": "array",
"items": {
"oneOf": [ { "$ref": "defs-linux.json#/definitions/NetworkInterfacePriority" } ]
}
},
{ "type": "null" }
]
}
}
}
}
},
"rlimits": {
"id": "https://www.opencontainers.org/jsonschema/linux/rlimits",
"items": [
{
"id": "https://www.opencontainers.org/jsonschema/linux/rlimits/0",
"properties": {
"hard": {
"id": "https://www.opencontainers.org/jsonschema/linux/rlimits/0/hard",
"type": "integer"
},
"soft": {
"id": "https://www.opencontainers.org/jsonschema/linux/rlimits/0/soft",
"type": "integer"
},
"type": {
"id": "https://www.opencontainers.org/jsonschema/linux/rlimits/0/type",
"type": "integer"
}
},
"type": "object"
}
],
"type": "array"
},
"cgroupsPath": {
"oneOf": [
{ "type": "null" },
{ "type": "string" }
]
},
"rootfsPropagation": {
"id": "https://www.opencontainers.org/jsonschema/linux/rootfsPropagation",
"type": "string"
},
"seccomp": {
"id": "https://www.opencontainers.org/jsonschema/linux/seccomp",
"properties": {
"defaultAction": {
"id": "https://www.opencontainers.org/jsonschema/linux/seccomp/defaultAction",
"type": "string"
},
"architectures": {
"id": "https://www.opencontainers.org/jsonschema/linux/seccomp/architectures",
"type": "array",
"items": {
"oneOf": [ { "$ref": "defs-linux.json#/definitions/SeccompArch" } ]
}

},
"syscalls": {
"id": "https://www.opencontainers.org/jsonschema/linux/seccomp/syscalls",
"type": "array",
"items": {
"oneOf": [ { "$ref": "defs-linux.json#/definitions/Syscall" } ]
}
}
},
"type": "object"
},
"selinuxProcessLabel": {
"id": "https://www.opencontainers.org/jsonschema/linux/selinuxProcessLabel",
"type": "string"
},
"sysctl": {
"id": "https://www.opencontainers.org/jsonschema/linux/sysctl",
"oneOf" : [
{ "$ref": "defs.json#/definitions/mapStringString" },
{ "type": "null" }
]
}
}
}
}
Loading

0 comments on commit 3d58754

Please sign in to comment.