CA-187943: Revised warning messages to take account the selected affinity.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2020-04-09 16:44:46 +01:00 committed by Mihaela Stoica
parent 3c68e7e097
commit cf0da96b87
3 changed files with 34 additions and 4 deletions

View File

@ -201,7 +201,10 @@ namespace XenAdmin.Wizards.NewVMWizard
if (suggestedSrVisible)
sb.AppendFormat(Messages.NEWVMWIZARD_STORAGEPAGE_SUGGESTED_NOSPACE, suggestedSr.Name().Ellipsise(50)).AppendLine();
else if (suggestedSrHasSpace)
sb.AppendFormat(Messages.NEWVMWIZARD_STORAGEPAGE_SUGGESTED_LOCAL, suggestedSr.Name().Ellipsise(50)).AppendLine();
sb.AppendFormat(Affinity == null
? Messages.NEWVMWIZARD_STORAGEPAGE_SUGGESTED_LOCAL_NO_HOME
: Messages.NEWVMWIZARD_STORAGEPAGE_SUGGESTED_LOCAL,
suggestedSr.Name().Ellipsise(50)).AppendLine();
SR defaultSr = connection.Resolve(Helpers.GetPoolOfOne(connection).default_SR);
var defaultSrVisible = defaultSr != null && defaultSr.CanBeSeenFrom(affinity);
@ -221,7 +224,10 @@ namespace XenAdmin.Wizards.NewVMWizard
if (defaultSrVisible && !defaultSr.Equals(suggestedSr))
sb.AppendFormat(Messages.NEWVMWIZARD_STORAGEPAGE_DEFAULT_NOSPACE, defaultSr.Name().Ellipsise(50)).AppendLine();
else if (defaultSrHasSpace && !defaultSr.Equals(suggestedSr))
sb.AppendFormat(Messages.NEWVMWIZARD_STORAGEPAGE_DEFAULT_LOCAL, defaultSr.Name().Ellipsise(50)).AppendLine();
sb.AppendFormat(Affinity == null
? Messages.NEWVMWIZARD_STORAGEPAGE_DEFAULT_LOCAL_NO_HOME
: Messages.NEWVMWIZARD_STORAGEPAGE_DEFAULT_LOCAL,
defaultSr.Name().Ellipsise(50)).AppendLine();
foreach (SR sr in connection.Cache.SRs)
{

View File

@ -27099,7 +27099,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to VMs without a home server cannot have disks on the default SR &apos;{0}&apos;..
/// Looks up a localized string similar to The default SR &apos;{0}&apos; cannot be seen from the VM&apos;s home server..
/// </summary>
public static string NEWVMWIZARD_STORAGEPAGE_DEFAULT_LOCAL {
get {
@ -27107,6 +27107,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to VMs without a home server cannot have disks on the default SR &apos;{0}&apos;..
/// </summary>
public static string NEWVMWIZARD_STORAGEPAGE_DEFAULT_LOCAL_NO_HOME {
get {
return ResourceManager.GetString("NEWVMWIZARD_STORAGEPAGE_DEFAULT_LOCAL_NO_HOME", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The default SR &apos;{0}&apos; does not have enough free space for the new VM&apos;s disks..
/// </summary>
@ -27162,7 +27171,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to VMs without a home server cannot have disks on the SR suggested by the template (&apos;{0}&apos;)..
/// Looks up a localized string similar to The SR suggested by the template (&apos;{0}&apos;) cannot be seen from the VM&apos;s home server..
/// </summary>
public static string NEWVMWIZARD_STORAGEPAGE_SUGGESTED_LOCAL {
get {
@ -27170,6 +27179,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to VMs without a home server cannot have disks on the SR suggested by the template (&apos;{0}&apos;)..
/// </summary>
public static string NEWVMWIZARD_STORAGEPAGE_SUGGESTED_LOCAL_NO_HOME {
get {
return ResourceManager.GetString("NEWVMWIZARD_STORAGEPAGE_SUGGESTED_LOCAL_NO_HOME", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The SR suggested by the template (&apos;{0}&apos;) does not have enough free space for the new VM&apos;s disks..
/// </summary>

View File

@ -9259,6 +9259,9 @@ Review these settings, then click Previous if you need to change anything. Other
<value>Created by template provisioner</value>
</data>
<data name="NEWVMWIZARD_STORAGEPAGE_DEFAULT_LOCAL" xml:space="preserve">
<value>The default SR '{0}' cannot be seen from the VM's home server.</value>
</data>
<data name="NEWVMWIZARD_STORAGEPAGE_DEFAULT_LOCAL_NO_HOME" xml:space="preserve">
<value>VMs without a home server cannot have disks on the default SR '{0}'.</value>
</data>
<data name="NEWVMWIZARD_STORAGEPAGE_DEFAULT_NOSPACE" xml:space="preserve">
@ -9268,6 +9271,9 @@ Review these settings, then click Previous if you need to change anything. Other
<value>Storage</value>
</data>
<data name="NEWVMWIZARD_STORAGEPAGE_SUGGESTED_LOCAL" xml:space="preserve">
<value>The SR suggested by the template ('{0}') cannot be seen from the VM's home server.</value>
</data>
<data name="NEWVMWIZARD_STORAGEPAGE_SUGGESTED_LOCAL_NO_HOME" xml:space="preserve">
<value>VMs without a home server cannot have disks on the SR suggested by the template ('{0}').</value>
</data>
<data name="NEWVMWIZARD_STORAGEPAGE_SUGGESTED_NOSPACE" xml:space="preserve">