mirror of
https://github.com/vatesfr/xen-orchestra.git
synced 2026-09-10 22:14:48 -05:00
feat(@vates/types): add XoMessage and XoAlarm
This commit is contained in:
@@ -115,6 +115,18 @@ type BaseXoVm = BaseXapiXo & {
|
||||
}
|
||||
}
|
||||
|
||||
export type XoAlarm = Omit<XoMessage, '$object' | 'body'> & {
|
||||
body: {
|
||||
value: string
|
||||
name: string
|
||||
}
|
||||
object: {
|
||||
type: XapiXoRecord['type'] | 'unknown'
|
||||
uuid: XapiXoRecord['uuid']
|
||||
href?: string
|
||||
}
|
||||
}
|
||||
|
||||
export type XoGroup = {
|
||||
id: Branded<'group'>
|
||||
name: string
|
||||
@@ -211,6 +223,16 @@ export type XoHostPatch = BaseXapiXo & {
|
||||
type: 'host_patch'
|
||||
}
|
||||
|
||||
export type XoMessage = BaseXapiXo & {
|
||||
$object: XapiXoRecord['id']
|
||||
|
||||
body: string
|
||||
id: Branded<'message'>
|
||||
name: string
|
||||
time: number
|
||||
type: 'message'
|
||||
}
|
||||
|
||||
export type XoNetwork = BaseXapiXo & {
|
||||
id: Branded<'network'>
|
||||
type: 'network'
|
||||
@@ -445,7 +467,9 @@ export type XoVtpm = BaseXapiXo & {
|
||||
}
|
||||
|
||||
export type XapiXoRecord =
|
||||
| XoAlarm
|
||||
| XoHost
|
||||
| XoMessage
|
||||
| XoNetwork
|
||||
| XoPool
|
||||
| XoSr
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { Task } from '@vates/types/lib/vates/task'
|
||||
import type { XapiHostStats, XapiVmStats, XapiStatsGranularity } from '@vates/types/common'
|
||||
import type {
|
||||
XenApiHostWrapped,
|
||||
XenApiMessage,
|
||||
XenApiNetwork,
|
||||
XenApiPoolWrapped,
|
||||
XenApiSrWrapped,
|
||||
@@ -17,6 +18,7 @@ import type { XoHost, XoServer, XoUser, XapiXoRecord, XoVm, XoSchedule, XoJob }
|
||||
|
||||
type XapiRecordByXapiXoRecord = {
|
||||
host: XenApiHostWrapped
|
||||
message: XenApiMessage
|
||||
network: XenApiNetwork
|
||||
pool: XenApiPoolWrapped
|
||||
SR: XenApiSrWrapped
|
||||
|
||||
Reference in New Issue
Block a user