示例#1
0
 public async Task <TerodoViewComputeResourceType> UpdatePerformanceCollectionStatusAsync(TerodoViewComputeResourceType paramComputeresource, bool paramStatus = true, string paramMessage = null)
 {
     ExceptionFactory.CheckObjectIsNull(paramComputeresource);
     Resource = $"{OrgResource}/computeresources/{paramComputeresource.Id}.json";
     return(await PutOperationAsync <TerodoViewComputeResourceType>(new TerodoViewComputeResourceType()
     {
         Id = paramComputeresource.Id, PerfCollectionStatus = paramStatus, PerfCollectionMessage = (paramStatus ? "Success" : paramMessage), PerfContactErrorCount = (paramStatus ? 0 : paramComputeresource.PerfContactErrorCount += 1), PerfLastContact = DateTime.UtcNow
     }));
 }
示例#2
0
 public async Task <TerodoViewTaskType> UpdateState(TerodoViewTaskType _task, string _status)
 {
     ExceptionFactory.CheckObjectIsNull(_task);
     Resource = $"{OrgResource}/tasks/{_task.Id}.json";
     return(await PutOperationAsync <TerodoViewTaskType>(new TerodoViewTaskType()
     {
         Id = _task.Id, TaskStatus = _status
     }));
 }
示例#3
0
 public async Task <TerodoViewComputeResourceType> UpdateKnownAddress(TerodoViewComputeResourceType paramComputeresource, string paramKnownaddress)
 {
     ExceptionFactory.CheckObjectIsNull(paramKnownaddress);
     Resource = $"{OrgResource}/computeresources/{paramComputeresource.Id}.json";
     return(await PutOperationAsync <TerodoViewComputeResourceType>(new TerodoViewComputeResourceType()
     {
         Id = paramComputeresource.Id, Knownaddress = paramKnownaddress
     }));
 }
示例#4
0
        public async Task <TerodoViewPlatformType> UpdateStatusPoll(TerodoViewPlatformType paramPlatform, bool paramSuccess, string paramMessage = null)
        {
            ExceptionFactory.CheckObjectIsNull(paramPlatform);
            Resource = $"{OrgResource}/platforms/{paramPlatform.Id}.json";
            var paramPoll = new List <TerodoViewPlatformPollType>();

            paramPoll.Add(new TerodoViewPlatformPollType()
            {
                PollSuccess = paramSuccess, PollError = paramMessage
            });
            return(await PutOperationAsync <TerodoViewPlatformType>(new TerodoViewPlatformType()
            {
                Id = paramPlatform.Id,
                Poll = paramPoll
            }));
        }
 public async Task <TerodoViewPlatformHostType> UpdateAsync(TerodoViewPlatformHostType paramHost)
 {
     Resource = $"{OrgResource}/platforms/{instanceLocalPlatformObject.Id}/platformhosts/{paramHost.Id}.json";
     return(await PutOperationAsync <TerodoViewPlatformHostType>(ExceptionFactory.CheckObjectIsNull(paramHost)));
 }
 public async Task <TerodoViewPlatformNetworkType> CreateAsync(TerodoViewPlatformNetworkType paramNetwork)
 {
     Resource = $"{OrgResource}/platforms/{instanceLocalPlatformObject.Id}/platformnetworks.json";
     return(await PostOperationAsync <TerodoViewPlatformNetworkType>(ExceptionFactory.CheckObjectIsNull(paramNetwork)));
 }
示例#7
0
 public async Task <TerodoViewComputeResourceProcessType> UpdateAsync(TerodoViewComputeResourceProcessType paramProcess)
 {
     Resource = $"{OrgResource}/computeresources/{instanceLocalCompureresourceObject.Id}/computeresourceprocesses/{paramProcess.Id}.json";
     return(await PutOperationAsync <TerodoViewComputeResourceProcessType>(ExceptionFactory.CheckObjectIsNull(paramProcess)));
 }
示例#8
0
 public async Task <TerodoViewComputeResourceInterfaceType> UpdateAsync(TerodoViewComputeResourceInterfaceType paramInterface)
 {
     Resource = $"{OrgResource}/computeresources/{instanceCompureresourceObject.Id}/computeresourceinterfaces/{paramInterface.Id}.json";
     return(await PutOperationAsync <TerodoViewComputeResourceInterfaceType>(ExceptionFactory.CheckObjectIsNull(paramInterface)));
 }
示例#9
0
 public async Task <TerodoViewPlatformDatastoreHostType> CreateAsync(TerodoViewPlatformHostCrudType paramDatastoreHost)
 {
     Resource = $"{OrgResource}/platforms/{instanceLocalPlatformObject.Id}/platformdatastoreplatformhosts.json";
     return(await PostOperationAsync <TerodoViewPlatformDatastoreHostType>(ExceptionFactory.CheckObjectIsNull(paramDatastoreHost)));
 }
 public async Task <TerodoViewComputeResourcePerformanceCounterType> UpdateAsync(TerodoViewComputeResourcePerformanceCounterType paramPerformancecounter)
 {
     Resource = $"{OrgResource}/computeresources/{instanceCompureresource.Id}/computeresourceperformancecounters/{paramPerformancecounter.Id}.json";
     return(await PutOperationAsync <TerodoViewComputeResourcePerformanceCounterType>(ExceptionFactory.CheckObjectIsNull(paramPerformancecounter)));
 }
示例#11
0
 public async Task <TerodoViewTaskType> UpdateAsync(TerodoViewTaskType _task)
 {
     Resource = $"{OrgResource}/tasks/{_task.Id}.json";
     return(await PutOperationAsync <TerodoViewTaskType>(ExceptionFactory.CheckObjectIsNull(_task)));
 }
示例#12
0
 public async Task <TerodoViewComputeResourceDiskType> CreateAsync(TerodoViewComputeResourceDiskType paramDisk)
 {
     Resource = $"{OrgResource}/computeresources/{instanceLocalCompureresourceObject.Id}/computeresourcedisks.json";
     return(await PostOperationAsync <TerodoViewComputeResourceDiskType>(ExceptionFactory.CheckObjectIsNull(paramDisk)));
 }
示例#13
0
 public async Task <TerodoViewStatusType> DestroyAsync(TerodoViewComputeResourceType paramComputeresource)
 {
     ExceptionFactory.CheckObjectIsNull(paramComputeresource);
     Resource = $"{OrgResource}/computeresources/{paramComputeresource.Id}.json";
     return(await DeleteOperationAsync <TerodoViewStatusType>());
 }
示例#14
0
 public async Task <TerodoViewComputeResourceType> CreateAsync(TerodoViewComputeResourceType paramComputeresource)
 {
     ExceptionFactory.CheckObjectIsNull(paramComputeresource);
     Resource = $"{OrgResource}/computeresources.json";
     return(instanceComputeresourceObject = await PostOperationAsync <TerodoViewComputeResourceType>(paramComputeresource));
 }
示例#15
0
 public async Task <TerodoViewPlatformType> UpdateAsync(TerodoViewPlatformType paramPlatform)
 {
     Resource = $"{OrgResource}/platforms/{paramPlatform.Id}.json";
     return(await PutOperationAsync <TerodoViewPlatformType>(ExceptionFactory.CheckObjectIsNull(paramPlatform)));
 }