Skip to content

Commit

Permalink
schema: 'generate' section for pvs
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed Sep 30, 2024
1 parent 711aa39 commit a4593ce
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 2 deletions.
39 changes: 39 additions & 0 deletions rust/agama-lib/share/examples/storage/generate_pvs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"storage": {
"drives": [
{
"alias": "first-disk"
},
{
"partitions": [
{
"alias": "pv1",
"id": "lvm",
"size": { "min": "10 GiB" }
}
]
}
],
"volumeGroups": [
{
"name": "system",
"physicalVolumes": [
"pv1",
{
"generate": {
"targetDevices": ["first-disk"],
"encryption": {
"luks2": { "password": "12345" }
}
}
}
],
"logicalVolumes": [
{
"filesystem": { "path": "/" }
}
]
}
]
}
}
34 changes: 32 additions & 2 deletions rust/agama-lib/share/profile.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,38 @@
"description": "Devices to use as physical volumes.",
"type": "array",
"items": {
"title": "Device alias",
"type": "string"
"anyOf": [
{
"title": "Device alias",
"type": "string"
},
{
"title": "Generate physical volumes",
"description": "Automatically creates the needed physical volumes in the indicated devices.",
"type": "object",
"additionalProperties": false,
"required": ["generate"],
"properties": {
"generate": {
"type": "object",
"additionalProperties": false,
"required": ["targetDevices"],
"properties": {
"targetDevices": {
"type": "array",
"items": {
"title": "Device alias",
"type": "string"
}
},
"encryption": {
"$ref": "#/$defs/encryption"
}
}
}
}
}
]
}
},
"logicalVolumes": {
Expand Down

0 comments on commit a4593ce

Please sign in to comment.