private static String GetTitle(SrActionKind kind, SR sr) { switch (kind) { case SrActionKind.SetAsDefault: return(String.Format(Messages.ACTION_SR_SETTING_DEFAULT, sr.Name, Helpers.GetName(sr.Connection))); case SrActionKind.Detach: case SrActionKind.UnplugAndDestroyPBDs: return(String.Format(Messages.ACTION_SR_DETACHING, sr.Name, Helpers.GetName(sr.Connection))); case SrActionKind.Destroy: return(String.Format(Messages.ACTION_SR_DESTROYING, sr.Name, Helpers.GetName(sr.Connection))); case SrActionKind.Forget: return(String.Format(Messages.ACTION_SR_FORGETTING, sr.Name, Helpers.GetName(sr.Connection))); case SrActionKind.ConvertToThin: return(String.Format(Messages.ACTION_SR_CONVERT_TO_THIN, sr.NameWithLocation)); } return(""); }
private static String GetTitle(SrActionKind kind, SR sr) { switch (kind) { case SrActionKind.SetAsDefault: return String.Format(Messages.ACTION_SR_SETTING_DEFAULT, sr.Name, Helpers.GetName(sr.Connection)); case SrActionKind.Detach: case SrActionKind.UnplugAndDestroyPBDs: return String.Format(Messages.ACTION_SR_DETACHING, sr.Name, Helpers.GetName(sr.Connection)); case SrActionKind.Destroy: return String.Format(Messages.ACTION_SR_DESTROYING, sr.Name, Helpers.GetName(sr.Connection)); case SrActionKind.Forget: return String.Format(Messages.ACTION_SR_FORGETTING, sr.Name, Helpers.GetName(sr.Connection)); case SrActionKind.UpgradeLVM: return String.Format(Messages.ACTION_SR_CONVERT, sr.Name, Helpers.GetName(sr.Connection)); case SrActionKind.ConvertToThin: return String.Format(Messages.ACTION_SR_CONVERT_TO_THIN, sr.NameWithLocation); } return ""; }
public SrAction(SrActionKind kind, SR sr) : base(sr.Connection, GetTitle(kind, sr)) { this.kind = kind; this.SR = sr; Pool pool = Helpers.GetPoolOfOne(sr.Connection); if (pool != null) Pool = pool; Host host = sr.GetStorageHost(); if (host != null) Host = host; }
public SrAction(SrActionKind kind, SR sr) : base(sr.Connection, GetTitle(kind, sr)) { this.kind = kind; this.SR = sr; Pool pool = Helpers.GetPoolOfOne(sr.Connection); if (pool != null) { Pool = pool; } Host host = sr.GetStorageHost(); if (host != null) { Host = host; } }
public SrAction(SrActionKind kind, SR sr, Dictionary <string, string> parameters) : this(kind, sr) { this.parameters = parameters; }
public SrAction(SrActionKind kind, SR sr, Dictionary<string, string> parameters) : this(kind, sr) { this.parameters = parameters; }
private static String GetTitle(SrActionKind kind, SR sr) { switch (kind) { case SrActionKind.SetAsDefault: return String.Format(Messages.ACTION_SR_SETTING_DEFAULT, sr.Name, Helpers.GetName(sr.Connection)); case SrActionKind.Detach: return String.Format(Messages.ACTION_SR_DETACHING, sr.Name, Helpers.GetName(sr.Connection)); case SrActionKind.Destroy: return String.Format(Messages.ACTION_SR_DESTROYING, sr.Name, Helpers.GetName(sr.Connection)); case SrActionKind.Forget: return String.Format(Messages.ACTION_SR_FORGETTING, sr.Name, Helpers.GetName(sr.Connection)); case SrActionKind.UpgradeLVM: return String.Format(Messages.ACTION_SR_UPGRADE, sr.Name, Helpers.GetName(sr.Connection)); } return ""; }