public void ReconfigureScheduledTask(ScheduledTaskSpec spec)
 {
     try
     {
         ReconfigureScheduledTaskRequestType reconfigureScheduledTaskRequestType = new ReconfigureScheduledTaskRequestType();
         reconfigureScheduledTaskRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         reconfigureScheduledTaskRequestType.spec  = (VimApi_65.ScheduledTaskSpec)VIConvert.ToWsdlType(spec);
         this.VimServiceProxy.ReconfigureScheduledTask(new ReconfigureScheduledTaskRequest(reconfigureScheduledTaskRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
Ejemplo n.º 2
0
        public ManagedObjectReference CreateObjectScheduledTask(ManagedObjectReference obj, ScheduledTaskSpec spec)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                CreateObjectScheduledTaskRequestType createObjectScheduledTaskRequestType = new CreateObjectScheduledTaskRequestType();
                createObjectScheduledTaskRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                createObjectScheduledTaskRequestType.obj   = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(obj);
                createObjectScheduledTaskRequestType.spec  = (VimApi_65.ScheduledTaskSpec)VIConvert.ToWsdlType(spec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.CreateObjectScheduledTask(new CreateObjectScheduledTaskRequest(createObjectScheduledTaskRequestType)).CreateObjectScheduledTaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
Ejemplo n.º 3
0
        public ManagedObjectReference CreateScheduledTask(ManagedObjectReference entity, ScheduledTaskSpec spec)
        {
            ManagedObjectReference result;

            try
            {
                CreateScheduledTaskRequestType createScheduledTaskRequestType = new CreateScheduledTaskRequestType();
                createScheduledTaskRequestType._this  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                createScheduledTaskRequestType.entity = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(entity);
                createScheduledTaskRequestType.spec   = (VimApi_65.ScheduledTaskSpec)VIConvert.ToWsdlType(spec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.CreateScheduledTask(new CreateScheduledTaskRequest(createScheduledTaskRequestType)).CreateScheduledTaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }