agama/rust/agama-lib/share/profile.schema.json

907 lines
30 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"] }
]
}
}
]
},
"dasd": {
"title": "DASD device actiation (s390x only)",
"type": "object",
"properties": {
"devices": {
"title": "List of DASD devices",
"type": "array",
"items": {
"type": "object",
"properties": {
"channel": {
"title": "DASD device channel",
"type": "string"
},
"state": {
"title": "Specify target state of device. Either activate it or deactivate it.",
"type": "string",
"enum": ["active", "offline"],
"default": "active"
},
"format": {
"title": "If device should be formatted. If not specified then it format device only if not already formatted.",
"type": "boolean"
},
"diag": {
"title": "If device have set diag flag. If not specified then it keep what device has before.",
"type": "boolean"
}
},
"required": ["channel"]
}
}
}
},
"hostname": {
"title": "Hostname settings",
"type": "object",
"properties": {
"static": {
"title": "System static hostname.",
"type": "string"
},
"transient": {
"title": "System transient hostname.",
"type": "string"
}
}
},
"security": {
"title": "Security settings",
"type": "object",
"properties": {
"sslCertificates": {
"title": "List of SSL certificates to add to system",
"type": "array",
"items": {
"type": "object",
"properties": {
"fingerprint": {
"title": "fingerprint of ssl certificate",
"type": "string",
"examples": [
"A8:DE:08:B1:57:52:FE:70:DF:D5:31:EA:E3:53:BB:39:EE:01:FF:B9"
]
},
"algorithm": {
"title": "Fingerprint algorithm used to compute it",
"type": "string",
"enum": ["SHA1", "SHA256"],
"examples": ["SHA1"]
}
},
"required": ["fingerprint", "algorithm"]
}
}
}
},
"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"]
}
},
"onlyRequired": {
"title": "Flag if only minimal hard dependecies should be used in solver",
"type": "boolean"
},
"extraRepositories": {
"title": "List of user specified repositories that will be used on top of default ones",
"type": "array",
"items": {
"type": "object",
"required": ["alias", "url"],
"properties": {
"alias": {
"title": "alias used for repository. Acting as identifier",
"type": "string"
},
"url": {
"title": "URL pointing to repository",
"type": "string"
},
"priority": {
"title": "Repository priority",
"type": "integer"
},
"name": {
"title": "User visible name. Defaults to alias",
"type": "string"
},
"productDir": {
"title": "product directory on multi repo DVD. Usually not needed",
"type": "string"
},
"enabled": {
"title": "If repository should be enabled. Defaults to true. Useful when adding additional repo that should not be immediatelly use.",
"type": "boolean"
},
"allowUnsigned": {
"title": "If unsigned repositories are allowed. Mainly useful for repositories that is hand crafted without GPG signature.",
"type": "boolean"
},
"gpgFingerprints": {
"title": "List of GPG fingerprints that is accepted for this repository. Useful for own repositories with proper GPG signature.",
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9a-fA-F ]+"
}
}
}
}
}
}
},
"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"
},
"registrationUrl": {
"title": "URL of the registration server",
"type": "string"
},
"addons": {
"title": "List of add-ons to activate",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["id"],
"properties": {
"id": {
"title": "Add-on identifier",
"type": "string",
"examples": ["sle-ha"]
},
"version": {
"title": "Version of the add-on",
"description": "It is mandatory if there are multiple available versions",
"type": "string"
},
"registrationCode": {
"title": "Add-on registration code",
"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"
},
"customMacAddress": {
"title": "Custom MAC address to use",
"description": "Can also be 'preserve', 'permanent', 'random' or 'stable'.",
"type": "string"
},
"macAddress": {
"title": "The MAC address of the interface bound to this connection",
"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"
}
},
"dnsSearchlist": {
"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"
},
"persistent": {
"title": "Persistent",
"description": "Whether the connection should be written to disk permanently",
"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"
}
}
}
},
"bridge": {
"type": "object",
"title": "Bridge configuration",
"additionalProperties": false,
"properties": {
"stp": {
"title": "whether the Spanning Tree Protocol is enabled or not",
"type": "boolean"
},
"forwardDelay": {
"title": "Spanning Tree Protocol forward delay, in seconds",
"type": "integer",
"minimum": 0
},
"priority": {
"title": "Spanning Tree Protocol priority (lower values are 'better')",
"type": "integer",
"minimum": 0
},
"maxAge": {
"title": "Spanning Tree Protocol maximum message age, in seconds",
"type": "integer",
"minimum": 0
},
"helloTime": {
"title": "Spanning Tree Protocol hello time, in seconds",
"type": "integer",
"minimum": 0
},
"ports": {
"type": "array",
"items": {
"title": "A list of the interface(s) or connection(s) to be part of the bridge",
"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"
}
},
"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 reference",
"description": "Absolute or relative 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 reference",
"description": "Absolute or relative 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 reference",
"description": "Absolute or relative 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 reference",
"description": "Absolute or relative 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 reference",
"description": "Absolute or relative 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"] }]
}
}
}