Exemple #1
0
        /// <summary>
        /// Saves the request log to database.
        /// </summary>
        /// <param name="vmConfig">The VM configuration.</param>
        private static async Task SaveRequestLogToDB(VMConfig vmConfig, string exceptionMessage = "NA")
        {
            VMRequestLogEntity vmRequestLogEntity = new VMRequestLogEntity(vmConfig.VMName, vmConfig.VMSize)
            {
                VMName       = vmConfig.VMName,
                VMSize       = vmConfig.VMSize,
                ErrorMessage = exceptionMessage
            };

            await CosmosDBStorageHelper.InsertOrMergeEntityAsync(table, vmRequestLogEntity);
        }
Exemple #2
0
 public async Task <IEnumerable <VMRequestLogEntity> > ListVM()
 {
     return(await CosmosDBStorageHelper.GetAllVMsAsync(table));
 }