mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-14 12:56:30 +00:00
Data disk APIs use UDisks2 info (#1727)
This commit is contained in:
parent
dab13a9432
commit
4b1a500956
@ -2035,7 +2035,7 @@ Returns information about the OS.
|
||||
"update_available": true,
|
||||
"board": "ova",
|
||||
"boot": "slot1",
|
||||
"data_disk": "/dev/sda"
|
||||
"data_disk": "BJTD4R-0x123456789"
|
||||
}
|
||||
```
|
||||
|
||||
@ -2059,17 +2059,38 @@ Returns possible targets for the new data partition.
|
||||
|
||||
**Returned data:**
|
||||
|
||||
| key | type | description |
|
||||
| ---------------- | ------- | ------------------------------------------------------------ |
|
||||
| devices | list | List with devices paths of possible disk targets |
|
||||
| key | type | description |
|
||||
| ---------------- | ------- | ----------------------------------------------------------------------------------- |
|
||||
| devices | list | List of IDs of possible data disk targets |
|
||||
| disks | list | List of [disks](api/supervisor/models.md#disk) which are possible data disk targets |
|
||||
|
||||
**Example response:**
|
||||
|
||||
```json
|
||||
{
|
||||
"devices": [
|
||||
"/dev/sda",
|
||||
"/dev/sdb"
|
||||
"Generic-Flash-Disk-123ABC456",
|
||||
"SSK-SSK-Storage-ABC123DEF"
|
||||
],
|
||||
"disks": [
|
||||
{
|
||||
"name": "Generic Flash Disk (123ABC456)",
|
||||
"vendor": "Generic",
|
||||
"model": "Flash Disk",
|
||||
"serial": "123ABC456",
|
||||
"size": 8054112256,
|
||||
"id": "Generic-Flash-Disk-123ABC456",
|
||||
"dev_path": "/dev/sda"
|
||||
},
|
||||
{
|
||||
"name": "SSK SSK Storage (ABC123DEF)",
|
||||
"vendor": "SSK",
|
||||
"model": "SSK Storage",
|
||||
"serial": "ABC123DEF",
|
||||
"size": 250059350016,
|
||||
"id": "SSK-SSK-Storage-ABC123DEF",
|
||||
"dev_path": "/dev/sdb"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
@ -2084,7 +2105,7 @@ Move datadisk to a new location, **This will also reboot the device!**
|
||||
|
||||
| key | type | description |
|
||||
| ------- | ------ | ----------------------------------------------------------------- |
|
||||
| device | string | Path to the new device which should be use as the target for the data migration |
|
||||
| device | string | ID of the disk device which should be used as the target for the data migration |
|
||||
|
||||
</ApiEndpoint>
|
||||
|
||||
|
@ -254,3 +254,15 @@ The `content` key of a backup object contains the following keys:
|
||||
| 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 |
|
||||
|
||||
## Disk
|
||||
|
||||
| key | type | description |
|
||||
| ---------- | -------------- | ---------------------------------------------------------------------- |
|
||||
| name | string | Name of the disk device |
|
||||
| vendor | string | Vendor of the disk device |
|
||||
| model | string | Model of the disk device |
|
||||
| serial | string | Serial number of the disk device |
|
||||
| size | int | Size of disk in bytes |
|
||||
| id | string | Unique ID for the disk device (either UDisks2 drive ID or device path) |
|
||||
| dev_path | string | Device path for the disk device |
|
||||
|
Loading…
x
Reference in New Issue
Block a user