fix(xo-server/backup NG/listReplicatedVms): avoid templates and snapshots

This commit is contained in:
Julien Fontanet 2018-05-11 17:24:23 +02:00
parent 2d9368062e
commit bcb66a4145
2 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,8 @@ declare class XapiObject {
type Id = string | XapiObject
declare export class Vm extends XapiObject {
$snapshots: Vm[];
is_a_snapshot: boolean;
is_a_template: boolean;
name_label: string;
other_config: $Dict<string>;
snapshot_time: number;

View File

@ -145,6 +145,8 @@ const listReplicatedVms = (
const oc = object.other_config
if (
object.$type === 'vm' &&
!object.is_a_snapshot &&
!object.is_a_template &&
'start' in object.blocked_operations &&
oc['xo:backup:schedule'] === scheduleId &&
oc['xo:backup:sr'] === srId &&