/// <summary> /// Set and persist the current reconfiguration phase. /// </summary> /// <param name="phase"> /// The current reconfiguration phase. /// </param> void StartReconfigurationPhase(ServerProvisioningPhase phase) { Provisioner.State.Phase = phase; DataAccess.Tell( new ServerReconfiguring(ServerId, phase) ); Log.Info("Starting reconfiguration phase {Phase} for server {ServerId}.", phase, ServerId); }
/// <summary> /// Set and persist the current de-provisioning phase. /// </summary> /// <param name="phase"> /// The current de-provisioning phase. /// </param> void StartDeprovisioningPhase(ServerProvisioningPhase phase) { Provisioner.State.Phase = phase; DataAccess.Tell( new ServerDeprovisioning(ServerId, phase) ); Log.Info("Started de-provisioning phase {Phase} for server {ServerId}.", phase, ServerId); }
/// <summary> /// Create a new <see cref="ServerStatusChanged"/>. /// </summary> /// <param name="serverId"> /// The Id of the server whose provisioning status has changed. /// </param> /// <param name="status"> /// The server's current provisioning status. /// </param> /// <param name="phase"> /// The server's current provisioning phase (if any). /// </param> /// <param name="messages"> /// Messages (if any) associated with the status change. /// </param> protected ServerStatusChanged(string serverId, ServerProvisioningPhase phase, IEnumerable <string> messages = null) { ServerId = serverId; Phase = phase; if (messages != null) { Messages = Messages.AddRange(messages); } }
/// <summary> /// Create a new <see cref="ServerReconfiguring"/> message. /// </summary> /// <param name="serverId"> /// The Id of the server being reconfigured. /// </param> /// <param name="phase"> /// The current provisioning phase. /// </param> public ServerReconfiguring(string serverId, ServerProvisioningPhase phase) : base(serverId, ProvisioningStatus.Reconfiguring, phase) { }
/// <summary> /// Create a new <see cref="ServerDeprovisioning"/> message. /// </summary> /// <param name="serverId"> /// The Id of the server being de-provisioned. /// </param> /// <param name="phase"> /// The current provisioning phase. /// </param> public ServerDeprovisioning(string serverId, ServerProvisioningPhase phase) : base(serverId, ProvisioningStatus.Deprovisioning, phase) { }