chore(xapi): convert to ESM
BREAKING CHANGE
This commit is contained in:
parent
1005e295b2
commit
c3e0308ad0
@ -1,7 +1,5 @@
|
|||||||
'use strict'
|
|
||||||
|
|
||||||
// TODO: remove when Node >=15.0
|
// TODO: remove when Node >=15.0
|
||||||
module.exports = class AggregateError extends Error {
|
export default class AggregateError extends Error {
|
||||||
constructor(errors, message) {
|
constructor(errors, message) {
|
||||||
super(message)
|
super(message)
|
||||||
this.errors = errors
|
this.errors = errors
|
7
@xen-orchestra/xapi/_Mixins.mjs
Normal file
7
@xen-orchestra/xapi/_Mixins.mjs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export { default as host } from './host.mjs'
|
||||||
|
export { default as SR } from './sr.mjs'
|
||||||
|
export { default as task } from './task.mjs'
|
||||||
|
export { default as VBD } from './vbd.mjs'
|
||||||
|
export { default as VDI } from './vdi.mjs'
|
||||||
|
export { default as VIF } from './vif.mjs'
|
||||||
|
export { default as VM } from './vm.mjs'
|
@ -1,9 +1,7 @@
|
|||||||
'use strict'
|
import fromCallback from 'promise-toolbox/fromCallback'
|
||||||
|
import { execFile } from 'node:child_process'
|
||||||
|
|
||||||
const fromCallback = require('promise-toolbox/fromCallback')
|
export async function getCurrentVmUuid() {
|
||||||
const { execFile } = require('node:child_process')
|
|
||||||
|
|
||||||
exports.getCurrentVmUuid = async function getCurrentVmUuid() {
|
|
||||||
const vm = (await read('vm')).trim()
|
const vm = (await read('vm')).trim()
|
||||||
const i = vm.lastIndexOf('/')
|
const i = vm.lastIndexOf('/')
|
||||||
if (i === -1) {
|
if (i === -1) {
|
@ -1,8 +1,6 @@
|
|||||||
'use strict'
|
|
||||||
|
|
||||||
const OPAQUE_REF_RE = /OpaqueRef:[0-9a-z-]+/
|
const OPAQUE_REF_RE = /OpaqueRef:[0-9a-z-]+/
|
||||||
|
|
||||||
module.exports = function extractOpaqueRef(str) {
|
export default function extractOpaqueRef(str) {
|
||||||
const matches = OPAQUE_REF_RE.exec(str)
|
const matches = OPAQUE_REF_RE.exec(str)
|
||||||
if (!matches) {
|
if (!matches) {
|
||||||
const error = new Error('no opaque ref found')
|
const error = new Error('no opaque ref found')
|
@ -1,9 +1,7 @@
|
|||||||
'use strict'
|
|
||||||
|
|
||||||
const RUNNING_POWER_STATES = {
|
const RUNNING_POWER_STATES = {
|
||||||
Running: true,
|
Running: true,
|
||||||
Paused: true,
|
Paused: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = vmOrPowerState =>
|
export default vmOrPowerState =>
|
||||||
(typeof vmOrPowerState === 'string' ? vmOrPowerState : vmOrPowerState.power_state) in RUNNING_POWER_STATES
|
(typeof vmOrPowerState === 'string' ? vmOrPowerState : vmOrPowerState.power_state) in RUNNING_POWER_STATES
|
@ -1,9 +1,7 @@
|
|||||||
'use strict'
|
import { strict as assert } from 'node:assert'
|
||||||
|
import test from 'test'
|
||||||
|
|
||||||
const assert = require('node:assert/strict')
|
import { parseDateTime } from './index.mjs'
|
||||||
const test = require('test')
|
|
||||||
|
|
||||||
const { parseDateTime } = require('./')
|
|
||||||
|
|
||||||
test('parseDateTime()', function () {
|
test('parseDateTime()', function () {
|
||||||
for (const [input, output] of [
|
for (const [input, output] of [
|
@ -1,8 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
const { Xapi } = require('./')
|
|
||||||
require('xen-api/dist/cli.js')
|
|
||||||
.default(opts => new Xapi(opts))
|
|
||||||
.catch(console.error.bind(console, 'FATAL'))
|
|
6
@xen-orchestra/xapi/cli.mjs
Executable file
6
@xen-orchestra/xapi/cli.mjs
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
import { Xapi } from './index.mjs'
|
||||||
|
import CLI from 'xen-api/dist/cli.js'
|
||||||
|
|
||||||
|
CLI.default(opts => new Xapi(opts)).catch(console.error.bind(console, 'FATAL'))
|
@ -1,10 +1,8 @@
|
|||||||
'use strict'
|
import { asyncEach } from '@vates/async-each'
|
||||||
|
import { decorateClass } from '@vates/decorate-with'
|
||||||
|
import { defer } from 'golike-defer'
|
||||||
|
|
||||||
const { asyncEach } = require('@vates/async-each')
|
import { getCurrentVmUuid } from './_XenStore.mjs'
|
||||||
const { decorateClass } = require('@vates/decorate-with')
|
|
||||||
const { defer } = require('golike-defer')
|
|
||||||
|
|
||||||
const { getCurrentVmUuid } = require('./_XenStore.js')
|
|
||||||
|
|
||||||
const waitAgentRestart = (xapi, hostRef, prevAgentStartTime) =>
|
const waitAgentRestart = (xapi, hostRef, prevAgentStartTime) =>
|
||||||
new Promise(resolve => {
|
new Promise(resolve => {
|
||||||
@ -84,7 +82,7 @@ class Host {
|
|||||||
await waitAgentRestart(this, ref, agentStartTime)
|
await waitAgentRestart(this, ref, agentStartTime)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
module.exports = Host
|
export default Host
|
||||||
|
|
||||||
decorateClass(Host, {
|
decorateClass(Host, {
|
||||||
smartReboot: defer,
|
smartReboot: defer,
|
@ -1,22 +1,23 @@
|
|||||||
'use strict'
|
import assert from 'assert'
|
||||||
|
import pRetry from 'promise-toolbox/retry'
|
||||||
|
import { utcFormat, utcParse } from 'd3-time-format'
|
||||||
|
import { Xapi as Base } from 'xen-api'
|
||||||
|
import { createLogger } from '@xen-orchestra/log'
|
||||||
|
|
||||||
const assert = require('assert')
|
import * as Mixins from './_Mixins.mjs'
|
||||||
const pRetry = require('promise-toolbox/retry')
|
|
||||||
const { utcFormat, utcParse } = require('d3-time-format')
|
|
||||||
const { Xapi: Base } = require('xen-api')
|
|
||||||
|
|
||||||
const { warn } = require('@xen-orchestra/log').createLogger('xo:xapi')
|
const { warn } = createLogger('xo:xapi')
|
||||||
|
|
||||||
exports.extractOpaqueRef = require('./_extractOpaqueRef.js')
|
export { default as extractOpaqueRef } from './_extractOpaqueRef.mjs'
|
||||||
exports.isDefaultTemplate = require('./isDefaultTemplate.js')
|
export { default as isDefaultTemplate } from './isDefaultTemplate.mjs'
|
||||||
|
|
||||||
// VDI formats. (Raw is not available for delta vdi.)
|
// VDI formats. (Raw is not available for delta vdi.)
|
||||||
exports.VDI_FORMAT_RAW = 'raw'
|
export const VDI_FORMAT_RAW = 'raw'
|
||||||
exports.VDI_FORMAT_VHD = 'vhd'
|
export const VDI_FORMAT_VHD = 'vhd'
|
||||||
|
|
||||||
// Format a date (pseudo ISO 8601) from one XenServer get by
|
// Format a date (pseudo ISO 8601) from one XenServer get by
|
||||||
// xapi.call('host.get_servertime', host.$ref) for example
|
// xapi.call('host.get_servertime', host.$ref) for example
|
||||||
exports.formatDateTime = utcFormat('%Y%m%dT%H:%M:%SZ')
|
export const formatDateTime = utcFormat('%Y%m%dT%H:%M:%SZ')
|
||||||
|
|
||||||
const parseDateTimeHelper = utcParse('%Y%m%dT%H:%M:%SZ')
|
const parseDateTimeHelper = utcParse('%Y%m%dT%H:%M:%SZ')
|
||||||
|
|
||||||
@ -27,7 +28,7 @@ const parseDateTimeHelper = utcParse('%Y%m%dT%H:%M:%SZ')
|
|||||||
* @returns {number|null} A Unix timestamp in seconds, or null if the field is empty (as encoded by XAPI).
|
* @returns {number|null} A Unix timestamp in seconds, or null if the field is empty (as encoded by XAPI).
|
||||||
* @throws {TypeError} If the input is not a string, number or Date object.
|
* @throws {TypeError} If the input is not a string, number or Date object.
|
||||||
*/
|
*/
|
||||||
exports.parseDateTime = function parseDateTime(input) {
|
export function parseDateTime(input) {
|
||||||
const type = typeof input
|
const type = typeof input
|
||||||
|
|
||||||
// If the value is a number, it is assumed to be a timestamp in seconds
|
// If the value is a number, it is assumed to be a timestamp in seconds
|
||||||
@ -131,7 +132,7 @@ function removeWatcher(predicate, cb) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Xapi extends Base {
|
export class Xapi extends Base {
|
||||||
constructor({
|
constructor({
|
||||||
callRetryWhenTooManyPendingTasks = { delay: 5e3, tries: 10 },
|
callRetryWhenTooManyPendingTasks = { delay: 5e3, tries: 10 },
|
||||||
maxUncoalescedVdis,
|
maxUncoalescedVdis,
|
||||||
@ -276,16 +277,8 @@ function mixin(mixins) {
|
|||||||
})
|
})
|
||||||
defineProperties(xapiProto, descriptors)
|
defineProperties(xapiProto, descriptors)
|
||||||
}
|
}
|
||||||
mixin({
|
|
||||||
host: require('./host.js'),
|
mixin(Mixins)
|
||||||
SR: require('./sr.js'),
|
|
||||||
task: require('./task.js'),
|
|
||||||
VBD: require('./vbd.js'),
|
|
||||||
VDI: require('./vdi.js'),
|
|
||||||
VIF: require('./vif.js'),
|
|
||||||
VM: require('./vm.js'),
|
|
||||||
})
|
|
||||||
exports.Xapi = Xapi
|
|
||||||
|
|
||||||
function getCallRetryOpts() {
|
function getCallRetryOpts() {
|
||||||
return this._callRetryWhenTooManyPendingTasks
|
return this._callRetryWhenTooManyPendingTasks
|
@ -1,3 +0,0 @@
|
|||||||
'use strict'
|
|
||||||
|
|
||||||
module.exports = vmTpl => vmTpl.is_default_template || vmTpl.other_config.default_template === 'true'
|
|
1
@xen-orchestra/xapi/isDefaultTemplate.mjs
Normal file
1
@xen-orchestra/xapi/isDefaultTemplate.mjs
Normal file
@ -0,0 +1 @@
|
|||||||
|
export default vmTpl => vmTpl.is_default_template || vmTpl.other_config.default_template === 'true'
|
@ -9,11 +9,12 @@
|
|||||||
"url": "https://github.com/vatesfr/xen-orchestra.git"
|
"url": "https://github.com/vatesfr/xen-orchestra.git"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"xo-xapi": "./cli.js"
|
"xo-xapi": "./cli.mjs"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
|
"main": "./index.mjs",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"xen-api": "^1.3.3"
|
"xen-api": "^1.3.3"
|
||||||
},
|
},
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
'use strict'
|
import { asyncMap, asyncMapSettled } from '@xen-orchestra/async-map'
|
||||||
|
import { createLogger } from '@xen-orchestra/log'
|
||||||
|
import { decorateClass } from '@vates/decorate-with'
|
||||||
|
import { defer } from 'golike-defer'
|
||||||
|
import { incorrectState } from 'xo-common/api-errors.js'
|
||||||
|
import { VDI_FORMAT_VHD } from './index.mjs'
|
||||||
|
import { strict as assert } from 'node:assert'
|
||||||
|
import peekFooterFromStream from 'vhd-lib/peekFooterFromVhdStream.js'
|
||||||
|
|
||||||
const { asyncMap, asyncMapSettled } = require('@xen-orchestra/async-map')
|
import AggregateError from './_AggregateError.mjs'
|
||||||
const { decorateClass } = require('@vates/decorate-with')
|
|
||||||
const { defer } = require('golike-defer')
|
|
||||||
const { incorrectState } = require('xo-common/api-errors')
|
|
||||||
const { VDI_FORMAT_VHD } = require('./index.js')
|
|
||||||
const assert = require('node:assert').strict
|
|
||||||
const peekFooterFromStream = require('vhd-lib/peekFooterFromVhdStream')
|
|
||||||
|
|
||||||
const AggregateError = require('./_AggregateError.js')
|
const { warn } = createLogger('xo:xapi:sr')
|
||||||
|
|
||||||
const { warn } = require('@xen-orchestra/log').createLogger('xo:xapi:sr')
|
|
||||||
|
|
||||||
const OC_MAINTENANCE = 'xo:maintenanceState'
|
const OC_MAINTENANCE = 'xo:maintenanceState'
|
||||||
|
|
||||||
@ -174,6 +173,6 @@ class Sr {
|
|||||||
return vdiRef
|
return vdiRef
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
module.exports = Sr
|
export default Sr
|
||||||
|
|
||||||
decorateClass(Sr, { enableMaintenanceMode: defer, importVdi: defer })
|
decorateClass(Sr, { enableMaintenanceMode: defer, importVdi: defer })
|
@ -1,8 +1,6 @@
|
|||||||
'use strict'
|
import ignoreErrors from 'promise-toolbox/ignoreErrors'
|
||||||
|
|
||||||
const ignoreErrors = require('promise-toolbox/ignoreErrors')
|
export default class Task {
|
||||||
|
|
||||||
module.exports = class Task {
|
|
||||||
create(name = 'untitled task', description) {
|
create(name = 'untitled task', description) {
|
||||||
return this.createTask(`[XO] ${name}`, description)
|
return this.createTask(`[XO] ${name}`, description)
|
||||||
}
|
}
|
@ -1,16 +1,15 @@
|
|||||||
'use strict'
|
import identity from 'lodash/identity.js'
|
||||||
|
import ignoreErrors from 'promise-toolbox/ignoreErrors'
|
||||||
|
import { createLogger } from '@xen-orchestra/log'
|
||||||
|
import { Ref } from 'xen-api'
|
||||||
|
|
||||||
const identity = require('lodash/identity.js')
|
import isVmRunning from './_isVmRunning.mjs'
|
||||||
const ignoreErrors = require('promise-toolbox/ignoreErrors')
|
|
||||||
const { Ref } = require('xen-api')
|
|
||||||
|
|
||||||
const isVmRunning = require('./_isVmRunning.js')
|
const { warn } = createLogger('xo:xapi:vbd')
|
||||||
|
|
||||||
const { warn } = require('@xen-orchestra/log').createLogger('xo:xapi:vbd')
|
|
||||||
|
|
||||||
const noop = Function.prototype
|
const noop = Function.prototype
|
||||||
|
|
||||||
module.exports = class Vbd {
|
export default class Vbd {
|
||||||
async create({
|
async create({
|
||||||
bootable = false,
|
bootable = false,
|
||||||
currently_attached = false,
|
currently_attached = false,
|
@ -1,16 +1,16 @@
|
|||||||
'use strict'
|
import CancelToken from 'promise-toolbox/CancelToken'
|
||||||
|
import pCatch from 'promise-toolbox/catch'
|
||||||
|
import pRetry from 'promise-toolbox/retry'
|
||||||
|
import { createLogger } from '@xen-orchestra/log'
|
||||||
|
import { decorateClass } from '@vates/decorate-with'
|
||||||
|
import { strict as assert } from 'node:assert'
|
||||||
|
|
||||||
const assert = require('node:assert').strict
|
import extractOpaqueRef from './_extractOpaqueRef.mjs'
|
||||||
const CancelToken = require('promise-toolbox/CancelToken')
|
import NbdClient from '@vates/nbd-client'
|
||||||
const pCatch = require('promise-toolbox/catch')
|
import { createNbdRawStream, createNbdVhdStream } from 'vhd-lib/createStreamNbd.js'
|
||||||
const pRetry = require('promise-toolbox/retry')
|
import { VDI_FORMAT_RAW, VDI_FORMAT_VHD } from './index.mjs'
|
||||||
const { decorateClass } = require('@vates/decorate-with')
|
|
||||||
|
|
||||||
const extractOpaqueRef = require('./_extractOpaqueRef.js')
|
const { warn } = createLogger('xo:xapi:vdi')
|
||||||
const NbdClient = require('@vates/nbd-client')
|
|
||||||
const { createNbdRawStream, createNbdVhdStream } = require('vhd-lib/createStreamNbd.js')
|
|
||||||
const { VDI_FORMAT_RAW, VDI_FORMAT_VHD } = require('./index.js')
|
|
||||||
const { warn } = require('@xen-orchestra/log').createLogger('xo:xapi:vdi')
|
|
||||||
|
|
||||||
const noop = Function.prototype
|
const noop = Function.prototype
|
||||||
|
|
||||||
@ -155,7 +155,7 @@ class Vdi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
module.exports = Vdi
|
export default Vdi
|
||||||
|
|
||||||
decorateClass(Vdi, {
|
decorateClass(Vdi, {
|
||||||
// work around a race condition in XCP-ng/XenServer where the disk is not fully unmounted yet
|
// work around a race condition in XCP-ng/XenServer where the disk is not fully unmounted yet
|
@ -1,8 +1,6 @@
|
|||||||
'use strict'
|
import isVmRunning from './_isVmRunning.mjs'
|
||||||
|
|
||||||
const isVmRunning = require('./_isVmRunning.js')
|
export default class Vif {
|
||||||
|
|
||||||
module.exports = class Vif {
|
|
||||||
async create(
|
async create(
|
||||||
{
|
{
|
||||||
currently_attached = true,
|
currently_attached = true,
|
@ -1,23 +1,21 @@
|
|||||||
'use strict'
|
import CancelToken from 'promise-toolbox/CancelToken'
|
||||||
|
import groupBy from 'lodash/groupBy.js'
|
||||||
|
import hrp from 'http-request-plus'
|
||||||
|
import ignoreErrors from 'promise-toolbox/ignoreErrors'
|
||||||
|
import pickBy from 'lodash/pickBy.js'
|
||||||
|
import omit from 'lodash/omit.js'
|
||||||
|
import pCatch from 'promise-toolbox/catch'
|
||||||
|
import { asyncMap } from '@xen-orchestra/async-map'
|
||||||
|
import { createLogger } from '@xen-orchestra/log'
|
||||||
|
import { decorateClass } from '@vates/decorate-with'
|
||||||
|
import { defer } from 'golike-defer'
|
||||||
|
import { incorrectState, forbiddenOperation } from 'xo-common/api-errors.js'
|
||||||
|
import { JsonRpcError } from 'json-rpc-protocol'
|
||||||
|
import { Ref } from 'xen-api'
|
||||||
|
|
||||||
const CancelToken = require('promise-toolbox/CancelToken')
|
import extractOpaqueRef from './_extractOpaqueRef.mjs'
|
||||||
const groupBy = require('lodash/groupBy.js')
|
import isDefaultTemplate from './isDefaultTemplate.mjs'
|
||||||
const hrp = require('http-request-plus')
|
import isVmRunning from './_isVmRunning.mjs'
|
||||||
const ignoreErrors = require('promise-toolbox/ignoreErrors')
|
|
||||||
const pickBy = require('lodash/pickBy.js')
|
|
||||||
const omit = require('lodash/omit.js')
|
|
||||||
const pCatch = require('promise-toolbox/catch')
|
|
||||||
const { asyncMap } = require('@xen-orchestra/async-map')
|
|
||||||
const { createLogger } = require('@xen-orchestra/log')
|
|
||||||
const { decorateClass } = require('@vates/decorate-with')
|
|
||||||
const { defer } = require('golike-defer')
|
|
||||||
const { incorrectState, forbiddenOperation } = require('xo-common/api-errors.js')
|
|
||||||
const { JsonRpcError } = require('json-rpc-protocol')
|
|
||||||
const { Ref } = require('xen-api')
|
|
||||||
|
|
||||||
const extractOpaqueRef = require('./_extractOpaqueRef.js')
|
|
||||||
const isDefaultTemplate = require('./isDefaultTemplate.js')
|
|
||||||
const isVmRunning = require('./_isVmRunning.js')
|
|
||||||
|
|
||||||
const { warn } = createLogger('xo:xapi:vm')
|
const { warn } = createLogger('xo:xapi:vm')
|
||||||
|
|
||||||
@ -689,7 +687,7 @@ class Vm {
|
|||||||
return ref
|
return ref
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
module.exports = Vm
|
export default Vm
|
||||||
|
|
||||||
decorateClass(Vm, {
|
decorateClass(Vm, {
|
||||||
checkpoint: defer,
|
checkpoint: defer,
|
@ -1,6 +1,4 @@
|
|||||||
'use strict'
|
import assert from 'node:assert/strict'
|
||||||
|
|
||||||
const assert = require('node:assert/strict')
|
|
||||||
|
|
||||||
// This module provides a way to associate data with a XAPI object.
|
// This module provides a way to associate data with a XAPI object.
|
||||||
//
|
//
|
||||||
@ -16,7 +14,7 @@ const assert = require('node:assert/strict')
|
|||||||
* @param {string} params.uuid - The UUID of the object.
|
* @param {string} params.uuid - The UUID of the object.
|
||||||
* @returns {object|undefined} The parsed data object, or undefined if there is no data.
|
* @returns {object|undefined} The parsed data object, or undefined if there is no data.
|
||||||
*/
|
*/
|
||||||
exports.extract = function extract({ other_config, uuid }) {
|
export function extract({ other_config, uuid }) {
|
||||||
const json = other_config['xo:' + uuid.slice(0, 8)]
|
const json = other_config['xo:' + uuid.slice(0, 8)]
|
||||||
if (json !== undefined) {
|
if (json !== undefined) {
|
||||||
return JSON.parse(json)
|
return JSON.parse(json)
|
||||||
@ -34,7 +32,7 @@ exports.extract = function extract({ other_config, uuid }) {
|
|||||||
* @param {object|null} data - The data to merge with the XO data associated with the object. If null, the XO data for the object will be cleared.
|
* @param {object|null} data - The data to merge with the XO data associated with the object. If null, the XO data for the object will be cleared.
|
||||||
* @returns {Promise<object|undefined>} A Promise that resolves to the updated XO data object, or undefined if the XO data for the given object is cleared.
|
* @returns {Promise<object|undefined>} A Promise that resolves to the updated XO data object, or undefined if the XO data for the given object is cleared.
|
||||||
*/
|
*/
|
||||||
exports.set = async function set({ $type, $ref, $xapi, uuid }, data) {
|
export async function set({ $type, $ref, $xapi, uuid }, data) {
|
||||||
assert.equal(typeof data, 'object') // includes null
|
assert.equal(typeof data, 'object') // includes null
|
||||||
assert(!Array.isArray(data))
|
assert(!Array.isArray(data))
|
||||||
|
|
@ -30,6 +30,7 @@
|
|||||||
<!--packages-start-->
|
<!--packages-start-->
|
||||||
|
|
||||||
- @xen-orchestra/backups minor
|
- @xen-orchestra/backups minor
|
||||||
|
- @xen-orchestra/xapi major
|
||||||
- complex-matcher patch
|
- complex-matcher patch
|
||||||
- xo-web minor
|
- xo-web minor
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { isDefaultTemplate, parseDateTime } from '@xen-orchestra/xapi'
|
|||||||
import * as sensitiveValues from './sensitive-values.mjs'
|
import * as sensitiveValues from './sensitive-values.mjs'
|
||||||
import ensureArray from './_ensureArray.mjs'
|
import ensureArray from './_ensureArray.mjs'
|
||||||
import normalizeVmNetworks from './_normalizeVmNetworks.mjs'
|
import normalizeVmNetworks from './_normalizeVmNetworks.mjs'
|
||||||
import xoData from '@xen-orchestra/xapi/xoData.js'
|
import xoData from '@xen-orchestra/xapi/xoData.mjs'
|
||||||
import { createLogger } from '@xen-orchestra/log'
|
import { createLogger } from '@xen-orchestra/log'
|
||||||
import { extractIpFromVmNetworks } from './_extractIpFromVmNetworks.mjs'
|
import { extractIpFromVmNetworks } from './_extractIpFromVmNetworks.mjs'
|
||||||
import { extractProperty, forEach, isEmpty, mapFilter, parseXml } from './utils.mjs'
|
import { extractProperty, forEach, isEmpty, mapFilter, parseXml } from './utils.mjs'
|
||||||
|
@ -6,7 +6,7 @@ import lte from 'lodash/lte.js'
|
|||||||
import mapToArray from 'lodash/map.js'
|
import mapToArray from 'lodash/map.js'
|
||||||
import mapValues from 'lodash/mapValues.js'
|
import mapValues from 'lodash/mapValues.js'
|
||||||
import noop from 'lodash/noop.js'
|
import noop from 'lodash/noop.js'
|
||||||
import xoData from '@xen-orchestra/xapi/xoData.js'
|
import xoData from '@xen-orchestra/xapi/xoData.mjs'
|
||||||
import { decorateWith } from '@vates/decorate-with'
|
import { decorateWith } from '@vates/decorate-with'
|
||||||
import { defer as deferrable } from 'golike-defer'
|
import { defer as deferrable } from 'golike-defer'
|
||||||
import { ignoreErrors, pCatch } from 'promise-toolbox'
|
import { ignoreErrors, pCatch } from 'promise-toolbox'
|
||||||
|
Loading…
Reference in New Issue
Block a user