Skip to content

Commit f978ce3

Browse files
committed
Make encryptionMethod an enum in the schema for system/storage
1 parent 9ffd71e commit f978ce3

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

rust/share/system.storage.schema.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@
3939
"encryptionMethods": {
4040
"description": "Possible encryption methods for the current system and product",
4141
"type": "array",
42-
"items": { "type": "string" }
42+
"items": {
43+
"enum": [
44+
"luks1", "luks2", "pervasiveLuks2", "tmpFde", "protectedSwap", "secureSwap", "randomSwap"
45+
]
46+
}
4347
},
4448
"volumeTemplates": {
4549
"description": "Volumes defined by the product as templates",

web/src/api/storage/system.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,15 @@ export interface System {
3838
/**
3939
* Possible encryption methods for the current system and product
4040
*/
41-
encryptionMethods?: string[];
41+
encryptionMethods?: (
42+
| "luks1"
43+
| "luks2"
44+
| "pervasiveLuks2"
45+
| "tmpFde"
46+
| "protectedSwap"
47+
| "secureSwap"
48+
| "randomSwap"
49+
)[];
4250
/**
4351
* Volumes defined by the product as templates
4452
*/

0 commit comments

Comments
 (0)