agama/rust/agama-lib/share/profile.schema.json
Josef Reidinger 43f0ac3892
improve text
2025-04-11 08:26:46 +02:00

706 lines
23 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://github.com/openSUSE/agama/blob/master/rust/agama-lib/share/profile.schema.json",
"title": "Profile",
"description": "Profile definition for automated installation",
"type": "object",
"additionalProperties": false,
"properties": {
"files": {
"title": "User-defined files to deploy",
"description": "User-defined files to deploy after installation just before post install scripts",
"type": "array",
"items": {
"$ref": "#/$defs/file"
}
},
"scripts": {
"title": "User-defined installation scripts",
"description": "User-defined scripts to run at different points of the installation",
"type": "object",
"additionalProperties": false,
"properties": {
"pre": {
"title": "Pre-installation scripts",
"description": "User-defined scripts to run before the installation starts",
"type": "array",
"items": {
"$ref": "#/$defs/preScript"
}
},
"postPartitioning": {
"title": "Post-partitioning scripts",
"description": "User-defined scripts to run after the partitioning finishes",
"type": "array",
"items": {
"$ref": "#/$defs/postPartitioning"
}
},
"post": {
"title": "Post-installation scripts",
"description": "User-defined scripts to run after the installation finishes",
"type": "array",
"items": {
"$ref": "#/$defs/postScript"
}
},
"init": {
"title": "Init scripts",
"description": "User-defined scripts to run booting the installed system",
"type": "array",
"items": {
"$ref": "#/$defs/initScript"
}
}
}
},
"bootloader": {
"title": "Bootloader settings",
"type": "object",
"properties": {
"stopOnBootMenu": {
"title": "Specify if bootloader should stop on menu during boot.",
"type": "boolean"
},
"timeout": {
"title": "Specify how long bootloader should wait on menu before going with default entry.",
"type": "integer",
"minimum": 0
},
"extraKernelParams": {
"title": "Specify additional kernel parameters that are added beside ones added by the installer.",
"type": "string"
}
},
"oneOf": [
{ "required": [ "stopOnBootMenu" ]},
{ "required": [ "timeout" ]},
{ "not": {
"anyOf": [
{ "required": [ "stopOnBootMenu" ]},
{ "required": [ "timeout" ]}
]
}}
]
},
"hostname": {
"title": "Hostname settings",
"type": "object",
"properties": {
"static": {
"title": "System static hostname.",
"type": "string"
},
"transient": {
"title": "System transient hostname.",
"type": "string"
}
}
},
"software": {
"title": "Software settings",
"type": "object",
"properties": {
"patterns": {
"title": "List of patterns to install",
"type": "array",
"items": {
"type": "string",
"examples": ["minimal_base"]
}
},
"packages": {
"title": "List of packages to install",
"type": "array",
"items": {
"type": "string",
"examples": ["vim"]
}
}
}
},
"product": {
"title": "Product to install",
"type": "object",
"additionalProperties": false,
"required": ["id"],
"properties": {
"id": {
"title": "Product identifier",
"description": "The id field from a products.d/foo.yaml file",
"icon": "Product Icon path specified in products.d/foo.yaml file",
"type": "string"
},
"registrationCode": {
"title": "Product registration code",
"type": "string"
},
"registrationEmail": {
"title": "Product registration email",
"type": "string"
}
}
},
"network": {
"title": "Network settings",
"type": "object",
"additionalProperties": false,
"properties": {
"connections": {
"title": "Network connections to be defined",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["id"],
"properties": {
"id": {
"title": "Connection ID",
"type": "string"
},
"interface": {
"title": "The name of the network interface bound to this connection",
"type": "string"
},
"macAddress": {
"title": "Custom MAC address",
"description": "Can also be 'preserve', 'permanent', 'random' or 'stable'.",
"type": "string"
},
"mtu": {
"description": "Connection MTU",
"type": "integer",
"minimum": 0
},
"method4": {
"title": "IPv4 configuration method",
"type": "string",
"enum": ["auto", "manual", "link-local", "disabled"]
},
"method6": {
"title": "IPv6 configuration method",
"type": "string",
"enum": ["auto", "manual", "link-local", "disabled"]
},
"gateway4": {
"title": "Connection gateway address",
"type": "string",
"examples": ["192.168.122.1"]
},
"gateway6": {
"title": "Connection gateway address",
"type": "string",
"examples": ["::ffff:c0a8:7a01"]
},
"addresses": {
"type": "array",
"items": {
"title": "Connection addresses",
"type": "string"
}
},
"nameservers": {
"type": "array",
"items": {
"title": "Nameservers",
"description": "IPv4 and/or IPv6 are allowed.",
"type": "string"
}
},
"dns_searchlist": {
"type": "array",
"items": {
"description": "DNS search domains",
"type": "string",
"additionalProperties": false
}
},
"ignoreAutoDns": {
"description": "Whether DNS options provided via DHCP are used or not",
"type": "boolean"
},
"status": {
"title": "Connection status",
"description": "The status of the connection",
"type": "string",
"enum": ["up", "down", "removed"]
},
"autoconnect": {
"title": "Auto-connected",
"description": "Whether the connection should be automatically connected",
"type": "boolean"
},
"wireless": {
"type": "object",
"title": "Wireless configuration",
"additionalProperties": false,
"properties": {
"password": {
"title": "Password of the wireless network",
"type": "string"
},
"security": {
"title": "Security method/key management",
"type": "string",
"enum": [
"none",
"owe",
"ieee8021x",
"wpa-psk",
"sae",
"wpa-eap",
"wpa-eap-suite-b-192"
]
},
"ssid": {
"title": "SSID of the wireless network",
"type": "string"
},
"mode": {
"title": "Wireless network mode",
"type": "string",
"enum": ["infrastructure", "adhoc", "mesh", "ap"]
},
"hidden": {
"title": "Indicates that the wireless network is not broadcasting its SSID",
"type": "boolean"
},
"band": {
"title": "Frequency band of the wireless network",
"type": "string",
"enum": ["a", "bg"]
},
"channel": {
"title": "Wireless channel of the wireless network",
"type": "integer",
"minimum": 0
},
"bssid": {
"title": "Only allow connection to this mac address",
"type": "string"
},
"groupAlgorithms": {
"type": "array",
"items": {
"title": "A list of group/broadcast encryption algorithms",
"type": "string",
"enum": ["wep40", "wep104", "tkip", "ccmp"]
}
},
"pairwiseAlgorithms": {
"type": "array",
"items": {
"title": "A list of pairwise encryption algorithms",
"type": "string",
"enum": ["tkip", "ccmp"]
}
},
"wpaProtocolVersions": {
"type": "array",
"items": {
"title": "A list of allowed WPA protocol versions",
"type": "string",
"enum": ["wpa", "rsn"]
}
},
"pmf": {
"title": "Indicates whether Protected Management Frames must be enabled for the connection",
"type": "integer"
}
}
},
"bond": {
"type": "object",
"title": "Bonding configuration",
"additionalProperties": false,
"properties": {
"mode": {
"type": "string",
"enum": [
"balance-rr",
"active-backup",
"balance-xor",
"broadcast",
"802.3ad",
"balance-tlb",
"balance-alb"
]
},
"options": {
"type": "string"
},
"ports": {
"type": "array",
"items": {
"title": "A list of the interfaces or connections to be bonded",
"type": "string"
}
}
}
},
"match": {
"type": "object",
"title": "Match settings",
"description": "Identifies the network interface to apply the connection settings to",
"additionalProperties": false,
"properties": {
"kernel": {
"type": "array",
"items": {
"title": "A list of kernel command line arguments to match",
"type": "string"
}
},
"interface": {
"type": "array",
"items": {
"title": "A list of interface names to match",
"type": "string"
}
},
"driver": {
"type": "array",
"items": {
"title": "A list of driver names to match",
"type": "string"
}
},
"path": {
"type": "array",
"items": {
"title": "A list of paths to match against the ID_PATH udev property of devices",
"type": "string"
}
}
}
},
"ieee-8021x": {
"type": "object",
"title": "IEEE 802.1x (EAP) settings",
"properties": {
"eap": {
"type": "array",
"items": {
"title": "List of EAP methods used",
"type": "string",
"enum": [
"leap",
"md5",
"tls",
"peap",
"ttls",
"pwd",
"fast"
]
}
},
"phase2Auth": {
"title": "Phase 2 inner auth method",
"type": "string",
"enum": [
"pap",
"chap",
"mschap",
"mschapv2",
"gtc",
"otp",
"md5",
"tls"
]
},
"identity": {
"title": "Identity string, often for example the user's login name",
"type": "string"
},
"password": {
"title": "Password string used for EAP authentication",
"type": "string"
},
"caCert": {
"title": "Path to CA certificate",
"type": "string"
},
"caCertPassword": {
"title": "Password string for CA certificate if it is encrypted",
"type": "string"
},
"clientCert": {
"title": "Path to client certificate",
"type": "string"
},
"clientCertPassword": {
"title": "Password string for client certificate if it is encrypted",
"type": "string"
},
"privateKey": {
"title": "Path to private key",
"type": "string"
},
"privateKeyPassword": {
"title": "Password string for private key if it is encrypted",
"type": "string"
},
"anonymousIdentity": {
"title": "Anonymous identity string for EAP authentication methods",
"type": "string"
},
"peapVersion": {
"title": "Which PEAP version is used when PEAP is set as the EAP method in the 'eap' property",
"type": "string",
"enum": ["0", "1"]
},
"peapLabel": {
"title": "Force the use of the new PEAP label during key derivation",
"type": "boolean"
}
}
}
}
}
}
}
},
"user": {
"title": "First user settings",
"type": "object",
"additionalProperties": false,
"properties": {
"fullName": {
"title": "Full name",
"type": "string",
"examples": ["Jane Doe"]
},
"userName": {
"title": "User login name",
"type": "string",
"examples": ["jane.doe"]
},
"password": {
"title": "User password (plain text or hashed depending on the \"hashedPassword\" field)",
"type": "string",
"examples": ["nots3cr3t"]
},
"hashedPassword": {
"title": "Flag for hashed password (true) or plain text password (false or not defined)",
"type": "boolean"
},
"autologin": {
"title": "Automatic user login",
"description": "Whether the user should be automatically logged in (only relevant in desktop systems)",
"type": "boolean"
}
},
"required": ["fullName", "userName", "password"]
},
"root": {
"title": "Root authentication settings",
"type": "object",
"additionalProperties": false,
"properties": {
"password": {
"title": "Root password (plain text or hashed depending on the \"hashedPassword\" field)",
"type": "string"
},
"hashedPassword": {
"title": "Flag for hashed password (true) or plain text password (false or not defined)",
"type": "boolean"
},
"sshPublicKey": {
"title": "SSH public key",
"type": "string"
}
}
},
"localization": {
"title": "Localization settings",
"type": "object",
"properties": {
"language": {
"title": "System language ID",
"type": "string",
"examples": ["en_US.UTF-8", "en_US"]
},
"keyboard": {
"title": "Keyboard layout ID",
"type": "string"
},
"timezone": {
"title": "Time zone identifier such as 'Europe/Berlin'",
"type": "string",
"examples": ["Europe/Berlin"]
}
}
},
"storage": {
"$ref": "storage.schema.json"
},
"legacyAutoyastStorage": {
"title": "Legacy AutoYaST storage settings",
"description": "Accepts all options of the AutoYaST partitioning section (i.e., XML to JSON)",
"type": "array",
"items": {
"type": "object"
}
},
"iscsi": {
"$ref": "iscsi.schema.json"
}
},
"$defs": {
"preScript": {
"title": "User-defined installation script that runs before the installation starts",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "Script name, to be used as file name",
"type": "string"
},
"body": {
"title": "Script content",
"description": "Script content, starting with the shebang. DEPRECATED: replaced by 'content'",
"type": "string",
"deprecated": true
},
"content": {
"title": "Script content",
"description": "Script content, starting with the shebang.",
"type": "string"
},
"url": {
"title": "Script URL",
"description": "URL to fetch the script from"
}
},
"required": ["name"],
"oneOf": [{ "required": ["body"] }, { "required": ["url"] }, { "required": ["content"]}]
},
"postPartitioning": {
"title": "User-defined installation script that runs after the partitioning finishes",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "Script name, to be used as file name",
"type": "string"
},
"body": {
"title": "Script content",
"description": "Script content, starting with the shebang. DEPRECATED: replaced by 'content'",
"type": "string",
"deprecated": true
},
"content": {
"title": "Script content",
"description": "Script content, starting with the shebang.",
"type": "string"
},
"url": {
"title": "Script URL",
"description": "URL to fetch the script from"
}
},
"required": ["name"],
"oneOf": [{ "required": ["body"] }, { "required": ["url"] }, { "required": ["content"]}]
},
"postScript": {
"title": "User-defined installation script that runs after the installation finishes",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "Script name, to be used as file name",
"type": "string"
},
"body": {
"title": "Script content",
"description": "Script content, starting with the shebang. DEPRECATED: replaced by 'content'",
"type": "string",
"deprecated": true
},
"content": {
"title": "Script content",
"description": "Script content, starting with the shebang.",
"type": "string"
},
"url": {
"title": "Script URL",
"description": "URL to fetch the script from"
},
"chroot": {
"title": "Whether it should run in the installed system using a chroot environment",
"description": "whether to chroot to the target system (default: yes) or not",
"type": "boolean"
}
},
"required": ["name"],
"oneOf": [{ "required": ["body"] }, { "required": ["url"] }, { "required": ["content"]}]
},
"initScript": {
"title": "User-defined installation script that runs during the first boot of the target system, once the installation is finished",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "Script name, to be used as file name",
"type": "string"
},
"body": {
"title": "Script content",
"description": "Script content, starting with the shebang. DEPRECATED: replaced by 'content'",
"type": "string",
"deprecated": true
},
"content": {
"title": "Script content",
"description": "Script content, starting with the shebang.",
"type": "string"
},
"url": {
"title": "Script URL",
"description": "URL to fetch the script from"
}
},
"required": ["name"],
"oneOf": [{ "required": ["body"] }, { "required": ["url"] }, { "required": ["content"]}]
},
"file": {
"title": "User-defined file to deploy",
"type": "object",
"additionalProperties": false,
"properties": {
"destination": {
"description": "path where file should be deployed",
"type": "string"
},
"content": {
"title": "File content",
"description": "File content",
"type": "string"
},
"url": {
"title": "File URL",
"description": "URL to fetch the file from"
},
"permissions": {
"title": "File permissions",
"description": "file permissions on installed system",
"type": "string"
},
"user": {
"title": "File owner user",
"description": "User owning the file on installed system. User has to already exist",
"type": "string"
},
"group": {
"title": "File owner group",
"description": "Group owning the file on installed system. User has to already exist",
"type": "string"
}
},
"required": ["destination"],
"oneOf": [{ "required": ["url"] }, { "required": ["content"]}]
}
}
}