Datadisk list feature (#1063)

This commit is contained in:
Pascal Vizeli 2021-09-21 15:49:16 +02:00 committed by GitHub
parent 0328ac80a0
commit ce4c675ed4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 1 deletions

View File

@ -1273,9 +1273,13 @@ Get hardware information.
"dev_path": "/dev/ttyACM0",
"by_id": "/dev/serial/by-id/usb-Silicon_Labs-RFUSB_9017F723B061A7C01410CFCF-if00-port1",
"subsystem": "tty",
"parent": null,
"attributes": {
"MINOR": "5"
}
},
"children": [
"/sys/devices/soc/platform/00ef"
]
}
]
}
@ -1828,6 +1832,29 @@ Update Home Assistant OS
| ------- | ------ | -------------------------------------------------------------- |
| version | string | The version you want to install, default is the latest version |
</ApiEndpoint>
<ApiEndpoint path="/os/datadisk/list" method="get">
Returns possible targets for the new data partition.
**Returned data:**
| key | type | description |
| ---------------- | ------- | ------------------------------------------------------------ |
| devices | list | List with devices paths of possible disk targets |
**Example response:**
```json
{
"devices": [
"/dev/sda",
"/dev/sdb"
]
}
```
</ApiEndpoint>
<ApiEndpoint path="/os/datadisk/move" method="post">

View File

@ -248,5 +248,7 @@ The `content` key of a backup object contains the following keys:
| sysfs | string | Path to sysfs device object |
| dev_path | string | Path to devfs |
| subsystem | string or null | Subsystem type of the device (tty, input, sound, block, misc) |
| parent | string or null | Path to the parent sysfs device object |
| by_id | string or null | Udev by ID link |
| attributes | dict | A dict with pure udev device attributes for debug and understanding |
| children | list | A list of path to the children sysfs devices |