Esempio n. 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
     }));
 }
Esempio n. 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
     }));
 }
Esempio n. 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
     }));
 }
Esempio n. 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)));
 }
Esempio n. 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)));
 }
Esempio n. 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)));
 }
Esempio n. 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)));
 }
Esempio n. 11
0
 public async Task <TerodoViewTaskType> UpdateAsync(TerodoViewTaskType _task)
 {
     Resource = $"{OrgResource}/tasks/{_task.Id}.json";
     return(await PutOperationAsync <TerodoViewTaskType>(ExceptionFactory.CheckObjectIsNull(_task)));
 }
Esempio n. 12
0
 public async Task <TerodoViewComputeResourceDiskType> CreateAsync(TerodoViewComputeResourceDiskType paramDisk)
 {
     Resource = $"{OrgResource}/computeresources/{instanceLocalCompureresourceObject.Id}/computeresourcedisks.json";
     return(await PostOperationAsync <TerodoViewComputeResourceDiskType>(ExceptionFactory.CheckObjectIsNull(paramDisk)));
 }
Esempio n. 13
0
 public async Task <TerodoViewStatusType> DestroyAsync(TerodoViewComputeResourceType paramComputeresource)
 {
     ExceptionFactory.CheckObjectIsNull(paramComputeresource);
     Resource = $"{OrgResource}/computeresources/{paramComputeresource.Id}.json";
     return(await DeleteOperationAsync <TerodoViewStatusType>());
 }
Esempio n. 14
0
 public async Task <TerodoViewComputeResourceType> CreateAsync(TerodoViewComputeResourceType paramComputeresource)
 {
     ExceptionFactory.CheckObjectIsNull(paramComputeresource);
     Resource = $"{OrgResource}/computeresources.json";
     return(instanceComputeresourceObject = await PostOperationAsync <TerodoViewComputeResourceType>(paramComputeresource));
 }
Esempio n. 15
0
 public async Task <TerodoViewPlatformType> UpdateAsync(TerodoViewPlatformType paramPlatform)
 {
     Resource = $"{OrgResource}/platforms/{paramPlatform.Id}.json";
     return(await PutOperationAsync <TerodoViewPlatformType>(ExceptionFactory.CheckObjectIsNull(paramPlatform)));
 }