diff --git a/docs/settings/settings-properties-rootoperatingsystems-rootoperatingsystemsitems-properties-firmware.md b/docs/settings/settings-properties-rootoperatingsystems-rootoperatingsystemsitems-properties-firmware.md new file mode 100644 index 00000000..5182ccb7 --- /dev/null +++ b/docs/settings/settings-properties-rootoperatingsystems-rootoperatingsystemsitems-properties-firmware.md @@ -0,0 +1,36 @@ +# Untitled string in root Schema + +```txt +https://github.com/dm-drogeriemarkt/lisa/blob/master/src/settings/schema.json#/properties/operatingsystems/items/properties/firmware +``` + +Firmware + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [settings.schema.json\*](../../src/settings/settings.schema.json "open original schema") | + +## firmware Type + +`string` + +## firmware Constraints + +**enum**: the value of this property must be equal to one of the following values: + +| Value | Explanation | +| :------------ | :---------- | +| `"automatic"` | | +| `"bios"` | | +| `"efi"` | | +| `"uefi"` | | + +## firmware Examples + +```json +"automatic" +``` + +```json +"efi" +``` diff --git a/docs/settings/settings-properties-rootoperatingsystems-rootoperatingsystemsitems.md b/docs/settings/settings-properties-rootoperatingsystems-rootoperatingsystemsitems.md index 214bd18d..cc94009d 100644 --- a/docs/settings/settings-properties-rootoperatingsystems-rootoperatingsystemsitems.md +++ b/docs/settings/settings-properties-rootoperatingsystems-rootoperatingsystemsitems.md @@ -20,6 +20,7 @@ https://github.com/dm-drogeriemarkt/lisa/blob/master/src/settings/schema.json#/p | :---------------------- | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | [id](#id) | `string` | Required | cannot be null | [root](settings-properties-rootoperatingsystems-rootoperatingsystemsitems-properties-id.md "https://github.com/dm-drogeriemarkt/lisa/blob/master/src/settings/schema.json#/properties/operatingsystems/items/properties/id") | | [name](#name) | `string` | Required | cannot be null | [root](settings-properties-rootoperatingsystems-rootoperatingsystemsitems-properties-name.md "https://github.com/dm-drogeriemarkt/lisa/blob/master/src/settings/schema.json#/properties/operatingsystems/items/properties/name") | +| [firmware](#firmware) | `string` | Optional | cannot be null | [root](settings-properties-rootoperatingsystems-rootoperatingsystemsitems-properties-firmware.md "https://github.com/dm-drogeriemarkt/lisa/blob/master/src/settings/schema.json#/properties/operatingsystems/items/properties/firmware") | | [relations](#relations) | `object` | Required | cannot be null | [root](settings-properties-rootoperatingsystems-rootoperatingsystemsitems-properties-rootoperatingsystemsitemsrelations.md "https://github.com/dm-drogeriemarkt/lisa/blob/master/src/settings/schema.json#/properties/operatingsystems/items/properties/relations") | ## id @@ -70,6 +71,45 @@ Operating system name "RedHat 7.6" ``` +## firmware + +Firmware + +`firmware` + +* is optional + +* Type: `string` + +* cannot be null + +* defined in: [root](settings-properties-rootoperatingsystems-rootoperatingsystemsitems-properties-firmware.md "https://github.com/dm-drogeriemarkt/lisa/blob/master/src/settings/schema.json#/properties/operatingsystems/items/properties/firmware") + +### firmware Type + +`string` + +### firmware Constraints + +**enum**: the value of this property must be equal to one of the following values: + +| Value | Explanation | +| :------------ | :---------- | +| `"automatic"` | | +| `"bios"` | | +| `"efi"` | | +| `"uefi"` | | + +### firmware Examples + +```json +"automatic" +``` + +```json +"efi" +``` + ## relations diff --git a/src/helpers/hostsCreateParams.js b/src/helpers/hostsCreateParams.js index 671e0d4f..17ae2229 100644 --- a/src/helpers/hostsCreateParams.js +++ b/src/helpers/hostsCreateParams.js @@ -59,6 +59,9 @@ const hostsCreateParams = (formValues, { computeResource }) => { set(data, 'computeAttributes.path', location.computeAttributes.path) set(data, 'computeAttributes.cluster', location.relations.cluster) set(data, 'computeAttributes.guest_id', operatingsystem.relations.guestOperatingsystemId) + if(operatingsystem.firmware) { + set(data, 'computeAttributes.firmware', operatingsystem.firmware) + } const networkId = get(network, 'id') set(data, 'interfacesAttributes.0.computeAttributes.network', networkId) diff --git a/src/settings/settings.schema.json b/src/settings/settings.schema.json index ef01276b..340fed1d 100644 --- a/src/settings/settings.schema.json +++ b/src/settings/settings.schema.json @@ -509,6 +509,12 @@ "description": "Operating system name", "examples": ["RedHat 7.6"] }, + "firmware": { + "type": "string", + "description": "Firmware", + "enum": ["automatic", "bios", "efi", "uefi"], + "examples": ["automatic", "efi"] + }, "relations": { "type": "object", "title": "root.operatingsystems.items.relations",