From b3ca02a16670fc79c94f61186e5926cb63fe0d1a Mon Sep 17 00:00:00 2001 From: Olivier Lambert Date: Thu, 17 Sep 2015 16:14:30 +0200 Subject: [PATCH] add PV args for VM --- src/api/vm.coffee | 5 +++++ src/xapi-objects-to-xo.js | 1 + src/xapi.js | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/api/vm.coffee b/src/api/vm.coffee index 89e5f8a34..d5107f5f0 100644 --- a/src/api/vm.coffee +++ b/src/api/vm.coffee @@ -40,6 +40,7 @@ create = $coroutine ({ name_description name_label template + pv_args VDIs VIFs }) -> @@ -47,6 +48,7 @@ create = $coroutine ({ installRepository: installation && installation.repository, nameDescription: name_description, nameLabel: name_label, + pvArgs: pv_args, vdis: VDIs, vifs: VIFs }) @@ -69,6 +71,9 @@ create.params = { name_label: { type: 'string' } name_description: { type: 'string', optional: true } + # PV Args + pv_args: { type: 'string', optional: true } + # TODO: add the install repository! # VBD.insert/eject # Also for the console! diff --git a/src/xapi-objects-to-xo.js b/src/xapi-objects-to-xo.js index 7cd8612f7..c892501d1 100644 --- a/src/xapi-objects-to-xo.js +++ b/src/xapi-objects-to-xo.js @@ -223,6 +223,7 @@ export function vm (obj) { other: otherConfig, os_version: guestMetrics && guestMetrics.os_version || null, power_state: obj.power_state, + PV_args: obj.PV_args, PV_drivers: Boolean(guestMetrics), PV_drivers_up_to_date: Boolean(guestMetrics && guestMetrics.PV_drivers_up_to_date), snapshot_time: toTimestamp(obj.snapshot_time), diff --git a/src/xapi.js b/src/xapi.js index cc8d2aba9..7c19d4b12 100644 --- a/src/xapi.js +++ b/src/xapi.js @@ -470,6 +470,7 @@ export default class Xapi extends XapiBase { async createVm (templateId, { nameDescription = undefined, nameLabel = undefined, + pvArgs = undefined, cpus = undefined, installRepository = undefined, vdis = [], @@ -508,6 +509,7 @@ export default class Xapi extends XapiBase { // Set VMs params. this._setObjectProperties(vm, { nameDescription, + PV_args: pvArgs, VCPUs_at_startup: cpus })