Merge pull request #87 from vatesfr/pvargs
PV args can be specified at VM creation.
This commit is contained in:
@@ -40,6 +40,7 @@ create = $coroutine ({
|
|||||||
name_description
|
name_description
|
||||||
name_label
|
name_label
|
||||||
template
|
template
|
||||||
|
pv_args
|
||||||
VDIs
|
VDIs
|
||||||
VIFs
|
VIFs
|
||||||
}) ->
|
}) ->
|
||||||
@@ -47,6 +48,7 @@ create = $coroutine ({
|
|||||||
installRepository: installation && installation.repository,
|
installRepository: installation && installation.repository,
|
||||||
nameDescription: name_description,
|
nameDescription: name_description,
|
||||||
nameLabel: name_label,
|
nameLabel: name_label,
|
||||||
|
pvArgs: pv_args,
|
||||||
vdis: VDIs,
|
vdis: VDIs,
|
||||||
vifs: VIFs
|
vifs: VIFs
|
||||||
})
|
})
|
||||||
@@ -69,6 +71,9 @@ create.params = {
|
|||||||
name_label: { type: 'string' }
|
name_label: { type: 'string' }
|
||||||
name_description: { type: 'string', optional: true }
|
name_description: { type: 'string', optional: true }
|
||||||
|
|
||||||
|
# PV Args
|
||||||
|
pv_args: { type: 'string', optional: true }
|
||||||
|
|
||||||
# TODO: add the install repository!
|
# TODO: add the install repository!
|
||||||
# VBD.insert/eject
|
# VBD.insert/eject
|
||||||
# Also for the console!
|
# Also for the console!
|
||||||
|
|||||||
@@ -223,6 +223,7 @@ export function vm (obj) {
|
|||||||
other: otherConfig,
|
other: otherConfig,
|
||||||
os_version: guestMetrics && guestMetrics.os_version || null,
|
os_version: guestMetrics && guestMetrics.os_version || null,
|
||||||
power_state: obj.power_state,
|
power_state: obj.power_state,
|
||||||
|
PV_args: obj.PV_args,
|
||||||
PV_drivers: Boolean(guestMetrics),
|
PV_drivers: Boolean(guestMetrics),
|
||||||
PV_drivers_up_to_date: Boolean(guestMetrics && guestMetrics.PV_drivers_up_to_date),
|
PV_drivers_up_to_date: Boolean(guestMetrics && guestMetrics.PV_drivers_up_to_date),
|
||||||
snapshot_time: toTimestamp(obj.snapshot_time),
|
snapshot_time: toTimestamp(obj.snapshot_time),
|
||||||
|
|||||||
@@ -470,6 +470,7 @@ export default class Xapi extends XapiBase {
|
|||||||
async createVm (templateId, {
|
async createVm (templateId, {
|
||||||
nameDescription = undefined,
|
nameDescription = undefined,
|
||||||
nameLabel = undefined,
|
nameLabel = undefined,
|
||||||
|
pvArgs = undefined,
|
||||||
cpus = undefined,
|
cpus = undefined,
|
||||||
installRepository = undefined,
|
installRepository = undefined,
|
||||||
vdis = [],
|
vdis = [],
|
||||||
@@ -508,6 +509,7 @@ export default class Xapi extends XapiBase {
|
|||||||
// Set VMs params.
|
// Set VMs params.
|
||||||
this._setObjectProperties(vm, {
|
this._setObjectProperties(vm, {
|
||||||
nameDescription,
|
nameDescription,
|
||||||
|
PV_args: pvArgs,
|
||||||
VCPUs_at_startup: cpus
|
VCPUs_at_startup: cpus
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user