|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2019-09/schema", |
| 3 | + "$id": "https://github.com/openSUSE/agama/blob/master/rust/share/device.storage.schema.json", |
| 4 | + "title": "Storage device", |
| 5 | + "description": "Schema to describe a device both in 'system' and 'proposal'.", |
| 6 | + "type": "object", |
| 7 | + "additionalProperties": false, |
| 8 | + "required": ["sid", "name"], |
| 9 | + "properties": { |
| 10 | + "sid": { "type": "integer" }, |
| 11 | + "name": { "type": "string" }, |
| 12 | + "description": { "type": "string" }, |
| 13 | + "block": { "$ref": "#/$defs/block" }, |
| 14 | + "drive": { "$ref": "#/$defs/drive" }, |
| 15 | + "filesystem": { "$ref": "#/$defs/filesystem" }, |
| 16 | + "md": { "$ref": "#/$defs/md" }, |
| 17 | + "multipath": { "$ref": "#/$defs/multipath" }, |
| 18 | + "partitionTable": { "$ref": "#/$defs/partitionTable" }, |
| 19 | + "partition": { "$ref": "#/$defs/partition" }, |
| 20 | + "partitions": { |
| 21 | + "type": "array", |
| 22 | + "items": { "$ref": "#" } |
| 23 | + }, |
| 24 | + "volumeGroup": { "$ref": "#/$defs/volumeGroup" }, |
| 25 | + "logicalVolumes": { |
| 26 | + "type": "array", |
| 27 | + "items": { "$ref": "#" } |
| 28 | + } |
| 29 | + }, |
| 30 | + "$defs": { |
| 31 | + "block": { |
| 32 | + "type": "object", |
| 33 | + "additionalProperties": false, |
| 34 | + "required": ["start", "size", "shrinking"], |
| 35 | + "properties": { |
| 36 | + "start": { "type": "integer" }, |
| 37 | + "size": { "type": "integer" }, |
| 38 | + "active": { "type": "boolean" }, |
| 39 | + "encrypted": { "type": "boolean" }, |
| 40 | + "udevIds": { |
| 41 | + "type": "array", |
| 42 | + "items": { "type": "string" } |
| 43 | + }, |
| 44 | + "udevPaths": { |
| 45 | + "type": "array", |
| 46 | + "items": { "type": "string" } |
| 47 | + }, |
| 48 | + "systems": { |
| 49 | + "type": "array", |
| 50 | + "items": { "type": "string" } |
| 51 | + }, |
| 52 | + "shrinking": { |
| 53 | + "anyOf": [ |
| 54 | + { "$ref": "#/$defs/shrinkingSupported" }, |
| 55 | + { "$ref": "#/$defs/shrinkingUnsupported" } |
| 56 | + ] |
| 57 | + } |
| 58 | + } |
| 59 | + }, |
| 60 | + "shrinkingSupported": { |
| 61 | + "type": "object", |
| 62 | + "additionalProperties": false, |
| 63 | + "properties": { |
| 64 | + "supported": { "type": "integer" } |
| 65 | + } |
| 66 | + }, |
| 67 | + "shrinkingUnsupported": { |
| 68 | + "type": "object", |
| 69 | + "additionalProperties": false, |
| 70 | + "properties": { |
| 71 | + "unsupported": { |
| 72 | + "type": "array", |
| 73 | + "items": { "type": "string" } |
| 74 | + } |
| 75 | + } |
| 76 | + }, |
| 77 | + "drive": { |
| 78 | + "type": "object", |
| 79 | + "additionalProperties": false, |
| 80 | + "properties": { |
| 81 | + "type": { "enum": ["disk", "raid", "multipath", "dasd"] }, |
| 82 | + "vendor": { "type": "string" }, |
| 83 | + "model": { "type": "string" }, |
| 84 | + "transport": { "type": "string" }, |
| 85 | + "bus": { "type": "string" }, |
| 86 | + "busId": { "type": "string" }, |
| 87 | + "driver": { |
| 88 | + "type": "array", |
| 89 | + "items": { "type": "string" } |
| 90 | + }, |
| 91 | + "info": { "$ref": "#/$defs/driveInfo" } |
| 92 | + } |
| 93 | + }, |
| 94 | + "driveInfo": { |
| 95 | + "type": "object", |
| 96 | + "additionalProperties": false, |
| 97 | + "properties": { |
| 98 | + "sdCard": { "type": "boolean" }, |
| 99 | + "dellBoss": { "type": "boolean" } |
| 100 | + } |
| 101 | + }, |
| 102 | + "filesystem": { |
| 103 | + "type": "object", |
| 104 | + "additionalProperties": false, |
| 105 | + "required": ["sid", "type"], |
| 106 | + "properties": { |
| 107 | + "sid": { "type": "integer" }, |
| 108 | + "type": { "$ref": "#/$defs/filesystemType" }, |
| 109 | + "mountPath": { "type": "string" }, |
| 110 | + "label": { "type": "string" } |
| 111 | + } |
| 112 | + }, |
| 113 | + "filesystemType": { |
| 114 | + "enum": [ |
| 115 | + "bcachefs", |
| 116 | + "btrfs", |
| 117 | + "exfat", |
| 118 | + "ext2", |
| 119 | + "ext3", |
| 120 | + "ext4", |
| 121 | + "f2fs", |
| 122 | + "jfs", |
| 123 | + "nfs", |
| 124 | + "nilfs2", |
| 125 | + "ntfs", |
| 126 | + "reiserfs", |
| 127 | + "swap", |
| 128 | + "tmpfs", |
| 129 | + "vfat", |
| 130 | + "xfs" |
| 131 | + ] |
| 132 | + }, |
| 133 | + "md": { |
| 134 | + "type": "object", |
| 135 | + "additionalProperties": false, |
| 136 | + "required": ["level", "devices"], |
| 137 | + "properties": { |
| 138 | + "level": { "$ref": "#/$defs/mdRaidLevel" }, |
| 139 | + "devices": { |
| 140 | + "type": "array", |
| 141 | + "items": { "type": "integer" } |
| 142 | + }, |
| 143 | + "uuid": { "type": "string" } |
| 144 | + } |
| 145 | + }, |
| 146 | + "mdRaidLevel": { |
| 147 | + "title": "MD level", |
| 148 | + "enum": [ |
| 149 | + "raid0", |
| 150 | + "raid1", |
| 151 | + "raid5", |
| 152 | + "raid6", |
| 153 | + "raid10" |
| 154 | + ] |
| 155 | + }, |
| 156 | + "multipath": { |
| 157 | + "type": "object", |
| 158 | + "additionalProperties": false, |
| 159 | + "required": ["wireNames"], |
| 160 | + "properties": { |
| 161 | + "wireNames": { |
| 162 | + "type": "array", |
| 163 | + "items": { "type": "string" } |
| 164 | + } |
| 165 | + } |
| 166 | + }, |
| 167 | + "partitionTable": { |
| 168 | + "type": "object", |
| 169 | + "additionalProperties": false, |
| 170 | + "required": ["type", "unusedSlots"], |
| 171 | + "properties": { |
| 172 | + "type": { "$ref": "#/$defs/ptableType" }, |
| 173 | + "unusedSlots": { |
| 174 | + "type": "array", |
| 175 | + "items": { |
| 176 | + "type": "array", |
| 177 | + "items": { "type": "integer" } |
| 178 | + } |
| 179 | + } |
| 180 | + } |
| 181 | + }, |
| 182 | + "ptableType": { |
| 183 | + "enum": ["gpt", "msdos", "dasd"] |
| 184 | + }, |
| 185 | + "partition": { |
| 186 | + "type": "object", |
| 187 | + "additionalProperties": false, |
| 188 | + "required": ["efi"], |
| 189 | + "properties": { |
| 190 | + "efi": { "type": "boolean" } |
| 191 | + } |
| 192 | + }, |
| 193 | + "volumeGroup": { |
| 194 | + "type": "object", |
| 195 | + "additionalProperties": false, |
| 196 | + "required": ["size", "physicalVolumes"], |
| 197 | + "properties": { |
| 198 | + "size": { "type": "integer" }, |
| 199 | + "physicalVolumes": { |
| 200 | + "type": "array", |
| 201 | + "items": { "type": "integer" } |
| 202 | + } |
| 203 | + } |
| 204 | + } |
| 205 | + } |
| 206 | +} |
0 commit comments