finalize all needed XAPI to XO objects for VGPU management

This commit is contained in:
Olivier Lambert 2017-10-23 15:21:35 +02:00
parent e714303f96
commit f419cd6ac8

View File

@ -673,7 +673,12 @@ const TRANSFORMS = {
return { return {
type: 'PGPU', type: 'PGPU',
dom0Access: obj.dom0_access,
enabledVgpuTypes: link(obj, 'enabled_VGPU_types'),
isSystemDisplayDevice: Boolean(obj.is_system_display_device),
pci: link(obj, 'PCI'), pci: link(obj, 'PCI'),
supportedVgpuMaxCapcities: link(obj, 'supported_VGPU_max_capacities'),
supportedVgpuTypes: link(obj, 'supported_VGPU_types'),
// TODO: dedupe. // TODO: dedupe.
host: link(obj, 'host'), host: link(obj, 'host'),
@ -692,6 +697,7 @@ const TRANSFORMS = {
currentlyAttached: Boolean(obj.currently_attached), currentlyAttached: Boolean(obj.currently_attached),
device: obj.device, device: obj.device,
gpuGroup: link(obj, 'GPU_group'), gpuGroup: link(obj, 'GPU_group'),
otherConfig: obj.other_config,
resident_on: link(obj, 'resident_on'), resident_on: link(obj, 'resident_on'),
vgpuType: link(obj, '$type'), vgpuType: link(obj, '$type'),
vm: link(obj, 'VM') vm: link(obj, 'VM')
@ -705,13 +711,14 @@ const TRANSFORMS = {
type: 'gpuGroup', type: 'gpuGroup',
allocation: obj.allocation_algorithm, allocation: obj.allocation_algorithm,
supportedVgpuTypes: obj.supported_VGPU_types, enabledVgpuTypes: link(obj, 'enabled_VGPU_types'),
enabledVgpuTypes: obj.enabled_VGPU_types, gpuTypes: obj.GPU_types,
name_description: obj.name_description, name_description: obj.name_description,
name_label: obj.name_label, name_label: obj.name_label,
other_config: obj.other_config, other_config: obj.other_config,
$vgpus: link(obj, 'VGPUs'), pgpus: link(obj, 'PGPUs'),
$pgpus: link(obj, 'PGPUs') supportedVgpuTypes: link(obj, 'supported_VGPU_types'),
vgpus: link(obj, 'VGPUs')
} }
}, },
@ -722,11 +729,15 @@ const TRANSFORMS = {
type: 'vgpuType', type: 'vgpuType',
experimental: Boolean(obj.experimental), experimental: Boolean(obj.experimental),
framebufferSize: obj.framebuffer_size,
gpuGroup: link(obj, 'GPU_group'),
maxHeads: obj.max_heads, maxHeads: obj.max_heads,
maxResolutionX: obj.max_resolution_x,
maxResolutionY: obj.max_resolution_y,
modelName: obj.model_name, modelName: obj.model_name,
pgpu: link(obj, 'PGPU'),
vendorName: obj.vendor_name, vendorName: obj.vendor_name,
$vgpus: link(obj, 'VGPUs'), vgpus: link(obj, 'VGPUs')
$pgpu: link(obj, 'PGPU')
} }
} }
} }