diff --git a/ironic/drivers/raid_config_schema.json b/ironic/drivers/raid_config_schema.json index 65ef10e337..bdfb3a0126 100644 --- a/ironic/drivers/raid_config_schema.json +++ b/ironic/drivers/raid_config_schema.json @@ -9,8 +9,8 @@ "properties": { "raid_level": { "type": "string", - "enum": [ "0", "1", "2", "5", "6", "1+0", "5+0", "6+0" ], - "description": "RAID level for the logical disk. Valid values are '0', '1', '2', '5', '6', '1+0', '5+0' and '6+0'. Required." + "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": [{ diff --git a/ironic/tests/unit/common/test_raid.py b/ironic/tests/unit/common/test_raid.py index bcd57cfd80..0b47470a6a 100644 --- a/ironic/tests/unit/common/test_raid.py +++ b/ironic/tests/unit/common/test_raid.py @@ -141,6 +141,11 @@ class ValidateRaidConfigurationTestCase(base.TestCase): raid_config, raid_config_schema=self.schema) + def test_validate_configuration_with_jbod_volume(self): + raid_config = json.loads(raid_constants.RAID_CONFIG_JBOD_VOLUME) + raid.validate_configuration(raid_config, + raid_config_schema=self.schema) + def test_validate_configuration_custom_schema(self): raid_config = json.loads(raid_constants.CUSTOM_SCHEMA_RAID_CONFIG) schema = json.loads(raid_constants.CUSTOM_RAID_SCHEMA) diff --git a/ironic/tests/unit/raid_constants.py b/ironic/tests/unit/raid_constants.py index c3db74f4d3..ba37f84a73 100644 --- a/ironic/tests/unit/raid_constants.py +++ b/ironic/tests/unit/raid_constants.py @@ -196,6 +196,17 @@ RAID_CONFIG_ADDITIONAL_PROP = ''' } ''' +RAID_CONFIG_JBOD_VOLUME = ''' +{ + "logical_disks": [ + { + "raid_level": "JBOD", + "size_gb": 100 + } + ] +} +''' + CUSTOM_SCHEMA_RAID_CONFIG = ''' { "logical_disks": [ diff --git a/releasenotes/notes/raid-to-support-jbod-568f88207b9216e2.yaml b/releasenotes/notes/raid-to-support-jbod-568f88207b9216e2.yaml new file mode 100644 index 0000000000..a20ba7d563 --- /dev/null +++ b/releasenotes/notes/raid-to-support-jbod-568f88207b9216e2.yaml @@ -0,0 +1,3 @@ +--- +features: + - Added support for JBOD volumes in RAID configuration.