Skip to content

Commit

Permalink
Allow to configure firmware for operating system (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamils-iRonin authored Nov 20, 2023
1 parent 89d6df0 commit f1b2969
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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"
```
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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


Expand Down
3 changes: 3 additions & 0 deletions src/helpers/hostsCreateParams.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions src/settings/settings.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit f1b2969

Please sign in to comment.