Skip to content

Commit

Permalink
schema: 'default' and 'mandatory' volume keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed Sep 24, 2024
1 parent 1e736e3 commit a73acce
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
23 changes: 23 additions & 0 deletions rust/agama-lib/share/examples/storage_default_volumes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"storage": {
"drives": [
{
"partitions": [
{
"alias": "pv1",
"id": "lvm",
"size": { "min": "10 GiB" }
}
]
}
],
"volumeGroups": [
{
"name": "system",
"physicalVolumes": ["pv1"],
"extentSize": "8 MiB",
"logicalVolumes": ["default"]
}
]
}
}
34 changes: 34 additions & 0 deletions rust/agama-lib/share/examples/storage_mandatory_volumes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"storage": {
"drives": [
{
"partitions": [
"mandatory",
{
"alias": "pv1",
"id": "lvm",
"size": { "min": "10 GiB" }
}
]
}
],
"volumeGroups": [
{
"name": "data",
"physicalVolumes": ["pv1"],
"extentSize": "8 MiB",
"logicalVolumes": [
{
"name": "photos",
"size": {
"min": "10 GiB"
},
"filesystem": {
"type": "xfs"
}
}
]
}
]
}
}
22 changes: 22 additions & 0 deletions rust/agama-lib/share/profile.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,12 @@
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/$defs/defaultVolumes"
},
{
"$ref": "#/$defs/mandatoryVolumes"
},
{
"title": "Logical volume",
"type": "object",
Expand Down Expand Up @@ -1206,11 +1212,27 @@
}
}
},
"defaultVolumes": {
"title": "Default volumes",
"description": "Creates the default volumes configured by the selected product.",
"const": "default"
},
"mandatoryVolumes": {
"title": "Mandatory volumes",
"description": "Creates the mandatory volumes configured by the selected product.",
"const": "mandatory"
},
"partitions": {
"title": "Partitions",
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/$defs/defaultVolumes"
},
{
"$ref": "#/$defs/mandatoryVolumes"
},
{
"title": "Partition to create or reuse",
"type": "object",
Expand Down

0 comments on commit a73acce

Please sign in to comment.