//********************************************************************* /// /// <summary> /// Add a CMP VM to the CmpWap DB /// </summary> /// <param name="cmpVm"></param> /// <param name="cwdb"></param> /// //********************************************************************* private void ImportVm(CmpClient.CmpService.VmDeploymentRequest cmpVm, CmpWapDb cwdb) { try { var cmpReq = new CmpRequest() { AccessGroupId = 0, Active = true, AddressFromVm = null, CmpRequestID = cmpVm.ID, Config = cmpVm.Config, Domain = null, ExceptionMessage = cmpVm.ExceptionMessage, Id = 0, FeatureSpec = null, LastStatusUpdate = cmpVm.LastStatusUpdate, ParentAppName = cmpVm.ParentAppName, RequestType = cmpVm.RequestType, SourceImageName = null, SourceServerName = cmpVm.SourceServerName, StatusCode = cmpVm.Status, StatusMessage = cmpVm.StatusMessage, StorageSpec = null, TagData = cmpVm.TagData, TagID = cmpVm.TagID, TargetLocation = cmpVm.TargetLocation, TargetVmName = cmpVm.TargetVmName, UserSpec = null, VmSize = cmpVm.VmSize, WapSubscriptionID = null, Warnings = null, WhenRequested = cmpVm.WhenRequested, WhoRequested = cmpVm.WhoRequested }; cwdb.InsertVmDepRequest(cmpReq); } catch (Exception ex) { LogThis(ex, EventLogEntryType.Error, "Exception in SyncWorker.ImportVm()", 0, 0); } }