diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/README.md b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/README.md index 4491b511b9..9be309b60b 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/README.md +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/README.md @@ -64,6 +64,7 @@ Class | Method | HTTP request | Description - [CpuTopology](docs/CpuTopology.md) - [CpusConfig](docs/CpusConfig.md) - [DeviceConfig](docs/DeviceConfig.md) + - [DeviceNode](docs/DeviceNode.md) - [DiskConfig](docs/DiskConfig.md) - [FsConfig](docs/FsConfig.md) - [InitramfsConfig](docs/InitramfsConfig.md) diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/api/openapi.yaml b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/api/openapi.yaml index 6a22d1eeb0..87a354d4af 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/api/openapi.yaml +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/api/openapi.yaml @@ -504,6 +504,16 @@ components: id: id mac: mac mask: 255.255.255.0 + device_tree: + key: + children: + - children + - children + pci_bdf: 6 + resources: + - '{}' + - '{}' + id: id properties: config: $ref: '#/components/schemas/VmConfig' @@ -517,10 +527,39 @@ components: memory_actual_size: format: int64 type: integer + device_tree: + additionalProperties: + $ref: '#/components/schemas/DeviceNode' + type: object required: - config - state type: object + DeviceNode: + example: + children: + - children + - children + pci_bdf: 6 + resources: + - '{}' + - '{}' + id: id + properties: + id: + type: string + resources: + items: + type: object + type: array + children: + items: + type: string + type: array + pci_bdf: + format: int32 + type: integer + type: object VmCounters: additionalProperties: additionalProperties: diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/DeviceNode.md b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/DeviceNode.md new file mode 100644 index 0000000000..1a2e0ac777 --- /dev/null +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/DeviceNode.md @@ -0,0 +1,14 @@ +# DeviceNode + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] +**Resources** | **[]map[string]interface{}** | | [optional] +**Children** | **[]string** | | [optional] +**PciBdf** | **int32** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/VmInfo.md b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/VmInfo.md index 8b590757e3..8e2f4e9d64 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/VmInfo.md +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/VmInfo.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **Config** | [**VmConfig**](VmConfig.md) | | **State** | **string** | | **MemoryActualSize** | **int64** | | [optional] +**DeviceTree** | [**map[string]DeviceNode**](DeviceNode.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_device_node.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_device_node.go new file mode 100644 index 0000000000..f584d9a3f9 --- /dev/null +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_device_node.go @@ -0,0 +1,17 @@ +/* + * Cloud Hypervisor API + * + * Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine. + * + * API version: 0.3.0 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// DeviceNode struct for DeviceNode +type DeviceNode struct { + Id string `json:"id,omitempty"` + Resources []map[string]interface{} `json:"resources,omitempty"` + Children []string `json:"children,omitempty"` + PciBdf int32 `json:"pci_bdf,omitempty"` +} diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_info.go b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_info.go index ba3098768f..0f1597286b 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_info.go +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/client/model_vm_info.go @@ -13,4 +13,5 @@ type VmInfo struct { Config VmConfig `json:"config"` State string `json:"state"` MemoryActualSize int64 `json:"memory_actual_size,omitempty"` + DeviceTree map[string]DeviceNode `json:"device_tree,omitempty"` } diff --git a/src/runtime/virtcontainers/pkg/cloud-hypervisor/cloud-hypervisor.yaml b/src/runtime/virtcontainers/pkg/cloud-hypervisor/cloud-hypervisor.yaml index 06a9bb3f59..dbadba734a 100644 --- a/src/runtime/virtcontainers/pkg/cloud-hypervisor/cloud-hypervisor.yaml +++ b/src/runtime/virtcontainers/pkg/cloud-hypervisor/cloud-hypervisor.yaml @@ -363,8 +363,30 @@ components: memory_actual_size: type: integer format: int64 + device_tree: + type: object + additionalProperties: + $ref: '#/components/schemas/DeviceNode' description: Virtual Machine information + DeviceNode: + type: object + properties: + id: + type: string + resources: + type: array + items: + # Rust enum type (with data) which can't be better represented here + type: object + children: + type: array + items: + type: string + pci_bdf: + type: integer + format: int32 + VmCounters: type: object additionalProperties: diff --git a/versions.yaml b/versions.yaml index 6b33e62654..a4479513cb 100644 --- a/versions.yaml +++ b/versions.yaml @@ -75,7 +75,7 @@ assets: url: "https://github.com/cloud-hypervisor/cloud-hypervisor" uscan-url: >- https://github.com/cloud-hypervisor/cloud-hypervisor/tags.*/v?(\d\S+)\.tar\.gz - version: "270631922deee9bdea13635a104e111768446c7b" + version: "v0.12.0" firecracker: description: "Firecracker micro-VMM"