summaryrefslogtreecommitdiff
path: root/ironic/drivers/raid_config_schema.json
blob: 6a36b51b7d19a871f020bbd363d91d3f55581ed7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "raid configuration json schema",
    "type": "object",
    "properties": {
        "logical_disks": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "raid_level": {
                        "type": "string",
                        "enum": [ "JBOD", "0", "1", "2", "5", "6", "1+0", "5+0", "6+0" ],
                        "description": "RAID level for the logical disk. Valid values are 'JBOD', '0', '1', '2', '5', '6', '1+0', '5+0' and '6+0'. Required."
                    },
                    "size_gb": {
                        "anyOf": [{
                                   "type": "integer",
                                   "minimum": 0
                                  },
                                  {
                                   "type": "string",
                                   "enum": [ "MAX" ]
                                  }],
                        "description": "Size in GiB (Integer) for the logical disk. Use 'MAX' as size_gb if this logical disk is supposed to use the rest of the space available. Required."
                    },
                    "volume_name": {
                        "type": "string",
                        "description": "Name of the volume to be created. If this is not specified, it will be auto-generated. Optional."
                    },
                    "is_root_volume": {
                        "type": "boolean",
                        "description": "Specifies whether this disk is a root volume. By default, this is False. Optional."
                    },
                    "share_physical_disks": {
                        "type": "boolean",
                        "description": "Specifies whether other logical disks can share physical disks with this logical disk. By default, this is False. Optional."
                    },
                    "disk_type": {
                        "type": "string",
                        "enum": [ "hdd", "ssd" ],
                        "description": "The type of disk preferred. Valid values are 'hdd' and 'ssd'. If this is not specified, disk type will not be a selection criterion for choosing backing physical disks. Optional."
                    },
                    "interface_type": {
                        "type": "string",
                        "enum": [ "sata", "scsi", "sas" ],
                        "description": "The interface type of disk. Valid values are 'sata', 'scsi' and 'sas'. If this is not specified, interface type will not be a selection criterion for choosing backing physical disks. Optional."
                    },
                    "number_of_physical_disks": {
                        "type": "integer",
                        "minimum": 0,
                        "exclusiveMinimum": true,
                        "description": "Number of physical disks to use for this logical disk. By default, the driver uses the minimum number of disks required for that RAID level. Optional."
                    },
                    "controller": {
                        "type": "string",
                        "description": "Controller to use for this logical disk. If not specified, the driver will choose a suitable RAID controller on the bare metal node. Optional."
                    },
                    "physical_disks": {
                        "type": "array",
                        "items": { "type": "string" },
                        "description": "The physical disks to use for this logical disk. If not specified, the driver will choose suitable physical disks to use. Optional."
                    }
                },
                "required": ["raid_level", "size_gb"],
                "additionalProperties": false,
                "dependencies": {
                    "physical_disks": ["controller"]
                }
            },
            "minItems": 1
        }
    },
    "required": ["logical_disks"],
    "additionalProperties": false
}