feat(vm): expose vendor device features in advanced tab. Fixes #2883 (#2894)

This commit is contained in:
Olivier Lambert 2018-04-23 15:02:40 +02:00 committed by GitHub
parent f7f26537be
commit b3ae9d88eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 3 deletions

View File

@ -151,10 +151,10 @@ export async function create (params) {
await Promise.all([
params.share
? Promise.all(
map((await this.getResourceSet(resourceSet)).subjects, subjectId =>
this.addAcl(subjectId, vm.id, 'admin')
map((await this.getResourceSet(resourceSet)).subjects, subjectId =>
this.addAcl(subjectId, vm.id, 'admin')
)
)
)
: this.addAcl(user.id, vm.id, 'admin'),
xapi.xo.setData(xapiVm.$id, 'resourceSet', resourceSet),
])
@ -597,6 +597,9 @@ set.params = {
coresPerSocket: { type: ['string', 'number', 'null'], optional: true },
// Emulate HVM C000 PCI device for Windows Update to fetch or update PV drivers
hasVendorDevice: { type: 'boolean', optional: true },
// Move the vm In to/Out of Self Service
resourceSet: { type: ['string', 'null'], optional: true },

View File

@ -327,6 +327,7 @@ const TRANSFORMS = {
other: otherConfig,
os_version: (guestMetrics && guestMetrics.os_version) || null,
power_state: obj.power_state,
hasVendorDevice: obj.has_vendor_device,
resourceSet,
snapshots: link(obj, 'snapshots'),
startTime: metrics && toTimestamp(metrics.start_time),

View File

@ -384,6 +384,8 @@ export default {
tags: true,
hasVendorDevice: true,
vga: {
set (vga, vm) {
if (!includes(XEN_VGA_VALUES, vga)) {

View File

@ -764,6 +764,7 @@ const messages = {
started: 'Started {ago}',
paraVirtualizedMode: 'Paravirtualization (PV)',
hardwareVirtualizedMode: 'Hardware virtualization (HVM)',
windowsUpdateTools: 'Windows Update tools',
// ----- VM stat tab -----
statsCpu: 'CPU usage',

View File

@ -442,6 +442,15 @@ export default connectStore(() => {
/>
</td>
</tr>
<tr>
<th>{_('windowsUpdateTools')}</th>
<td>
<Toggle
value={vm.hasVendorDevice}
onChange={value => editVm(vm, { hasVendorDevice: value })}
/>
</td>
</tr>
<tr>
<th>{_('ha')}</th>
<td>