chore(xo-server/xapi/utils): remove NULL_REF in favor of xen-api
This commit is contained in:
parent
0c05d89d3f
commit
a10fea2823
@ -16,7 +16,7 @@ import {
|
||||
} from 'promise-toolbox'
|
||||
import { PassThrough } from 'stream'
|
||||
import { forbiddenOperation } from 'xo-common/api-errors'
|
||||
import { Xapi as XapiBase } from 'xen-api'
|
||||
import { Xapi as XapiBase, NULL_REF } from 'xen-api'
|
||||
import {
|
||||
every,
|
||||
find,
|
||||
@ -63,7 +63,6 @@ import {
|
||||
canSrHaveNewVdiOfSize,
|
||||
isVmHvm,
|
||||
isVmRunning,
|
||||
NULL_REF,
|
||||
optional,
|
||||
parseDateTime,
|
||||
prepareXapiParam,
|
||||
|
@ -1,10 +1,11 @@
|
||||
import deferrable from 'golike-defer'
|
||||
import { ignoreErrors, pCatch } from 'promise-toolbox'
|
||||
import { find, gte, includes, isEmpty, lte, noop } from 'lodash'
|
||||
import { ignoreErrors, pCatch } from 'promise-toolbox'
|
||||
import { NULL_REF } from 'xen-api'
|
||||
|
||||
import { forEach, mapToArray, parseSize } from '../../utils'
|
||||
|
||||
import { isVmHvm, isVmRunning, makeEditObject, NULL_REF } from '../utils'
|
||||
import { isVmHvm, isVmRunning, makeEditObject } from '../utils'
|
||||
|
||||
// According to: https://xenserver.org/blog/entry/vga-over-cirrus-in-xenserver-6-2.html.
|
||||
const XEN_VGA_VALUES = ['std', 'cirrus']
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { NULL_REF } from './utils'
|
||||
import { NULL_REF } from 'xen-api'
|
||||
|
||||
const OTHER_CONFIG_TEMPLATE = {
|
||||
actions_after_crash: 'restart',
|
||||
|
@ -366,10 +366,6 @@ export const makeEditObject = specs => {
|
||||
|
||||
// ===================================================================
|
||||
|
||||
export const NULL_REF = 'OpaqueRef:NULL'
|
||||
|
||||
// ===================================================================
|
||||
|
||||
export const useUpdateSystem = host => {
|
||||
// Match Xen Center's condition: https://github.com/xenserver/xenadmin/blob/f3a64fc54bbff239ca6f285406d9034f57537d64/XenModel/Utils/Helpers.cs#L420
|
||||
return versionSatisfies(host.software_version.platform_version, '^2.1.1')
|
||||
|
Loading…
Reference in New Issue
Block a user