Skip to content

Commit

Permalink
schema: restore btrfs schema
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed Aug 20, 2024
1 parent c027e96 commit 205c1c3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 38 deletions.
7 changes: 4 additions & 3 deletions rust/agama-lib/share/examples/storage.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
},
"filesystem": {
"reuse": false,
"type": "btrfs",
"btrfsOptions": {
"snapshots": true
"type": {
"btrfs": {
"snapshots": true
}
},
"path": "/",
"mountOptions": ["ro"]
Expand Down
63 changes: 28 additions & 35 deletions rust/agama-lib/share/profile.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -514,23 +514,7 @@
}
},
"filesystem": {
"title": "File system of the volume.",
"anyOf": [
{
"$ref": "#/$defs/filesystemType"
},
{
"title": "Btrfs file system.",
"type": "object",
"additionalProperties": false,
"required": ["btrfs"],
"properties": {
"btrfs": {
"$ref": "#/$defs/btrfsOptions"
}
}
}
]
"$ref": "#/$defs/filesystemType"
},
"size": {
"$ref": "#/$defs/size"
Expand Down Expand Up @@ -812,22 +796,34 @@
]
},
"filesystemType": {
"title": "File system type.",
"enum": [
"bcachefs", "btrfs", "exfat", "ext2", "ext3", "ext4", "f2fs", "jfs",
"nfs", "nilfs2", "ntfs", "reiserfs", "swap", "tmpfs", "vfat", "xfs"
]
},
"btrfsOptions": {
"title": "Btrfs file system options.",
"type": "object",
"additionalProperties": false,
"properties": {
"snapshots": {
"title": "Whether Btrfs snapshots should be configured.",
"type": "boolean"
"title": "File system type",
"anyOf": [
{
"enum": [
"bcachefs", "btrfs", "exfat", "ext2", "ext3", "ext4", "f2fs", "jfs",
"nfs", "nilfs2", "ntfs", "reiserfs", "swap", "tmpfs", "vfat", "xfs"
]
},
{
"title": "Btrfs file system",
"type": "object",
"additionalProperties": false,
"required": ["btrfs"],
"properties": {
"btrfs": {
"type": "object",
"additionalProperties": false,
"properties": {
"snapshots": {
"title": "Btrfs snapshots",
"description": "Whether Btrfs snapshots should be configured.",
"type": "boolean"
}
}
}
}
}
}
]
},
"filesystem": {
"title": "File system options.",
Expand All @@ -851,9 +847,6 @@
"type": "string",
"examples": ["/dev/vda"]
},
"btrfsOptions": {
"$ref": "#/$defs/btrfsOptions"
},
"mkfsOptions": {
"title": "Options for creating the file system.",
"type": "array",
Expand Down

0 comments on commit 205c1c3

Please sign in to comment.