xenadmin/XenModel/Actions/PVS/DeletePvsSiteAction.cs
Mihaela Stoica fe6144ba70 CP-17920: Add dialog for PVS cache configuration
- this commit contains a temporary image for PVS_site

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
2016-09-26 17:44:17 +01:00

26 lines
825 B
C#

using XenAPI;
namespace XenAdmin.Actions
{
public class DeletePvsSiteAction : PureAsyncAction
{
private readonly PVS_site pvsSite;
public DeletePvsSiteAction(PVS_site pvsSite)
: base(pvsSite.Connection, string.Format(Messages.ACTION_DELETE_PVS_SITE_TITLE, pvsSite.Name.Ellipsise(50)),
Messages.ACTION_DELETE_PVS_SITE_DESCRIPTION, false)
{
System.Diagnostics.Trace.Assert(pvsSite != null);
this.pvsSite = pvsSite;
}
protected override void Run()
{
RelatedTask = PVS_site.async_forget(Session, pvsSite.opaque_ref);
PollToCompletion();
Description = Messages.ACTION_DELETE_PVS_SITE_DONE;
PercentComplete = 100;
}
}
}