stages/cloud-init: add support for configuring reporting handlers
It's possible the keys "logging" and "telemetry" can be arbitrary names. If that's the case, we can change the schema without breaking backwards compatibility, so defining known keys is safer.
This commit is contained in:
parent
3ee19645a3
commit
4ac004e178
1 changed files with 32 additions and 0 deletions
|
|
@ -24,6 +24,12 @@ import osbuild.api
|
|||
|
||||
|
||||
SCHEMA = r"""
|
||||
"definitions": {
|
||||
"reporting_handlers": {
|
||||
"type": "string",
|
||||
"enum": ["log", "print", "webhook", "hyperv"]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["config", "filename"],
|
||||
"properties": {
|
||||
|
|
@ -58,6 +64,32 @@ SCHEMA = r"""
|
|||
}
|
||||
}
|
||||
},
|
||||
"reporting": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"description": "Define reporting endpoints.",
|
||||
"minProperties": 1,
|
||||
"properties": {
|
||||
"logging": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"type": {
|
||||
"$ref": "#/definitions/reporting_handlers"
|
||||
}
|
||||
}
|
||||
},
|
||||
"telemetry": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"type": {
|
||||
"$ref": "#/definitions/reporting_handlers"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"datasource_list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue