Skip to content

Commit

Permalink
feat(schema): guided and AutoYaST storage proposals (#1263)
Browse files Browse the repository at this point in the history
Schema definition for the guided and AutoYaST storage proposals:

~~~json
{
  "storage": {
    "guided": { }
  },
  "legacyAutoyastStorage": [ ]
}
~~~

Based on
[auto_storage.md](https://github.com/openSUSE/agama/blob/master/doc/auto_storage.md)
which is expected to change over time.

Bonus: This includes a commit revisiting how `title` and `description`
are used, to be more compliant with
https://json-schema.org/understanding-json-schema/reference/annotations

Note for reviewers: you can easily check your JSON config files by using
`agama profile validate config.json`
  • Loading branch information
joseivanlopez committed Jul 4, 2024
2 parents a72fdf6 + 25585ac commit 7101d0d
Show file tree
Hide file tree
Showing 4 changed files with 454 additions and 64 deletions.
7 changes: 6 additions & 1 deletion rust/agama-lib/share/examples/profile_tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
"id": "Tumbleweed"
},
"storage": {
"bootDevice": "/dev/dm-1"
"guided": {
"boot": {
"configure": true,
"device": "/dev/dm-1"
}
}
},
"user": {
"fullName": "Jane Doe",
Expand Down
63 changes: 63 additions & 0 deletions rust/agama-lib/share/examples/storage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"storage": {
"guided": {
"target": {
"disk": "/dev/vdc"
},
"boot": {
"configure": true,
"device": "/dev/vda"
},
"encryption": {
"password": "notsecret",
"method": "luks2",
"pbkdFunction": "argon2i"
},
"space": {
"policy": "custom",
"actions": [
{ "resize": "/dev/vda" },
{ "forceDelete": "/dev/vdb1" }
]
},
"volumes": [
{
"mount": {
"path": "/",
"options": ["ro"]
},
"filesystem": {
"btrfs": {
"snapshots": true
}
},
"size": [1024, "5 Gib"],
"target": "default"
},
{
"mount": {
"path": "/home"
},
"filesystem": "xfs",
"size": {
"min": "5 GiB",
"max": "20 GiB"
},
"target": {
"newVg": "/dev/vda"
}
},
{
"mount": {
"path": "swap"
},
"filesystem": "swap",
"size": "8 GiB",
"target": {
"newPartition": "/dev/vda"
}
}
]
}
}
}
Loading

0 comments on commit 7101d0d

Please sign in to comment.