private static void Reserve(AssetInventoryContext entities, string hostName, string platformUsage, DateTime lastUpdated, string sessionId, DataEnvironment environment) { FrameworkClient vmReservation = Select(entities, hostName); vmReservation.UsageState = EnumUtil.GetDescription(VMUsageState.Reserved); vmReservation.PlatformUsage = platformUsage; vmReservation.LastUpdated = lastUpdated; vmReservation.SessionId = sessionId; vmReservation.Environment = environment.ToString(); }
private static void SetEnvironment(string hostName, DataEnvironment environment, AssetInventoryContext entities) { FrameworkClient machine = Select(entities, hostName); if (machine != null) { machine.Environment = environment.ToString(); } else { TraceFactory.Logger.Error("{0} not found in database".FormatWith(hostName)); } }