Esempio n. 1
0
        protected override void Run()
        {
            Description = string.Format(Messages.CREATING_VMPP, _record.Name);
            RelatedTask = VMPP.async_create(Session, _record);
            PollToCompletion();
            var vmppref = new XenRef <VMPP>(Result);

            Connection.WaitForCache(vmppref);
            foreach (var selectedVM in _vms)
            {
                VM.set_protection_policy(Session, selectedVM.opaque_ref, vmppref.opaque_ref);
            }
            Description     = string.Format(Messages.CREATED_VMPP, _record.Name);
            PercentComplete = 60;
            if (_runNow)
            {
                VMPP.protect_now(Session, vmppref);
            }
            PercentComplete = 100;
        }
 protected override void Run()
 {
     Result      = VMPP.protect_now(Session, _vmpp.opaque_ref);
     Description = string.Format(Messages.RUN_POLICY_STARTED, _vmpp.Name);
 }