From 205c1c36758592e1922fe4a628ac62292c280a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Iv=C3=A1n=20L=C3=B3pez=20Gonz=C3=A1lez?= Date: Tue, 20 Aug 2024 06:51:31 +0100 Subject: [PATCH] schema: restore btrfs schema --- rust/agama-lib/share/examples/storage.json | 7 +-- rust/agama-lib/share/profile.schema.json | 63 ++++++++++------------ 2 files changed, 32 insertions(+), 38 deletions(-) diff --git a/rust/agama-lib/share/examples/storage.json b/rust/agama-lib/share/examples/storage.json index afb83ccb05..6ca4a04824 100644 --- a/rust/agama-lib/share/examples/storage.json +++ b/rust/agama-lib/share/examples/storage.json @@ -20,9 +20,10 @@ }, "filesystem": { "reuse": false, - "type": "btrfs", - "btrfsOptions": { - "snapshots": true + "type": { + "btrfs": { + "snapshots": true + } }, "path": "/", "mountOptions": ["ro"] diff --git a/rust/agama-lib/share/profile.schema.json b/rust/agama-lib/share/profile.schema.json index 1dd67588f0..baa9e1eadb 100644 --- a/rust/agama-lib/share/profile.schema.json +++ b/rust/agama-lib/share/profile.schema.json @@ -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" @@ -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.", @@ -851,9 +847,6 @@ "type": "string", "examples": ["/dev/vda"] }, - "btrfsOptions": { - "$ref": "#/$defs/btrfsOptions" - }, "mkfsOptions": { "title": "Options for creating the file system.", "type": "array",