agama/rust/share/iscsi.schema.json

52 lines
1.4 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://github.com/agama-project/agama/blob/master/rust/share/iscsi.schema.json",
"title": "Config",
"description": "iSCSI config.",
"type": "object",
"additionalProperties": false,
"properties": {
"initiator": {
"description": "Initiator name.",
"type": "string"
},
"targets": {
"description": "List of targets.",
"type": "array",
"items": { "$ref": "#/$defs/target" }
}
},
"$defs": {
"target": {
"type": "object",
"additionalProperties": false,
"required": ["address", "port", "name", "interface"],
"properties": {
"address": {
"description": "IP address.",
"type": "string"
},
"port": {
"type": "integer",
"minimum": 0
},
"name": { "type": "string" },
"interface": { "type": "string" },
"startup": {
"enum": ["onboot", "manual", "automatic"]
},
"authByTarget": { "$ref": "#/$defs/authentication" },
"authByInitiator": { "$ref": "#/$defs/authentication" }
}
},
"authentication": {
"type": "object",
"additionalProperties": false,
"required": ["username", "password"],
"properties": {
"username": { "type": "string" },
"password": { "type": "string" }
}
}
}
}