CP-9370: Add network type and change error message

Signed-off-by: Cheng Zhang <cheng.zhang@citrix.com>
This commit is contained in:
Cheng Zhang 2014-08-07 14:18:29 +08:00
parent f1c02cdc4e
commit f718ac0b89
5 changed files with 63 additions and 8 deletions

View File

@ -130,7 +130,7 @@ namespace XenAdmin.Actions
if (_exception is IOException) if (_exception is IOException)
{ {
this.Description = string.Format(Messages.ACTION_EXPORT_DESCRIPTION_FAILED_OF_OPEN_FILE, _filename); this.Description = _exception.Message;
} }
else else
{ {
@ -621,13 +621,10 @@ namespace XenAdmin.Actions
if (Cancelling) if (Cancelling)
throw new CancelledException(); throw new CancelledException();
if (network.other_config.ContainsKey("is_guest_installer_network")) if (network.IsGuestInstallerNetwork)
{ {
if (network.other_config["is_guest_installer_network"].ToLower() == "true") PercentComplete = Convert.ToInt32((++itemIndex) * baseIndex / itemCount);
{ continue;
PercentComplete = Convert.ToInt32((++itemIndex) * baseIndex / itemCount);
continue;
}
} }
List<PIF> pifs = network.Connection.ResolveAll(network.PIFs); List<PIF> pifs = network.Connection.ResolveAll(network.PIFs);
@ -637,9 +634,13 @@ namespace XenAdmin.Actions
if (network.IsBond) if (network.IsBond)
type = Messages.BOND; type = Messages.BOND;
else if (network.IsVLAN) else if (network.IsVLAN)
type = Messages.NETWORKPANEL_VLAN; type = Messages.EXTERNAL_NETWORK;
else if (pifs.Count != 0 && pifs[0].IsPhysical)
type = Messages.BUILDIN_NETWORK;
else if (pifs.Count != 0 && pifs[0].IsTunnelAccessPIF) else if (pifs.Count != 0 && pifs[0].IsTunnelAccessPIF)
type = Messages.CHIN; type = Messages.CHIN;
else if (pifs.Count == 0)
type = Messages.SINGLE_SERVER_PRIVATE_NETWORK;
else else
type = Messages.HYPHEN; type = Messages.HYPHEN;

View File

@ -5370,6 +5370,15 @@ namespace XenAdmin {
} }
} }
/// <summary>
/// Looks up a localized string similar to Build-in network.
/// </summary>
public static string BUILDIN_NETWORK {
get {
return ResourceManager.GetString("BUILDIN_NETWORK", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to PCI Bus Path. /// Looks up a localized string similar to PCI Bus Path.
/// </summary> /// </summary>
@ -13038,6 +13047,15 @@ namespace XenAdmin {
} }
} }
/// <summary>
/// Looks up a localized string similar to External network.
/// </summary>
public static string EXTERNAL_NETWORK {
get {
return ResourceManager.GetString("EXTERNAL_NETWORK", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to External networks require a Standard Edition license.. /// Looks up a localized string similar to External networks require a Standard Edition license..
/// </summary> /// </summary>
@ -27777,6 +27795,15 @@ namespace XenAdmin {
} }
} }
/// <summary>
/// Looks up a localized string similar to Single-server private network.
/// </summary>
public static string SINGLE_SERVER_PRIVATE_NETWORK {
get {
return ResourceManager.GetString("SINGLE_SERVER_PRIVATE_NETWORK", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Size. /// Looks up a localized string similar to Size.
/// </summary> /// </summary>

View File

@ -1908,6 +1908,9 @@ CPU 使用率が {3} を超えるとアラートが送信されます。</value>
<data name="BUGTOOL_SAVING" xml:space="preserve"> <data name="BUGTOOL_SAVING" xml:space="preserve">
<value>サーバーの状態レポートを保存しています</value> <value>サーバーの状態レポートを保存しています</value>
</data> </data>
<data name="BUILDIN_NETWORK" xml:space="preserve">
<value>Build-in network</value>
</data>
<data name="BUS_PATH" xml:space="preserve"> <data name="BUS_PATH" xml:space="preserve">
<value>PCI バスのパス</value> <value>PCI バスのパス</value>
</data> </data>
@ -4469,6 +4472,9 @@ CD をイジェクトしてから再試行してください。</value>
<data name="EXPORT_VM_VERIFY_POST_INSTALL" xml:space="preserve"> <data name="EXPORT_VM_VERIFY_POST_INSTALL" xml:space="preserve">
<value>完了時にエクスポートを検証する(&amp;V)</value> <value>完了時にエクスポートを検証する(&amp;V)</value>
</data> </data>
<data name="EXTERNAL_NETWORK" xml:space="preserve">
<value>External network</value>
</data>
<data name="EXTERNAL_NETWORKS_REQUIRE_STANDARD" xml:space="preserve"> <data name="EXTERNAL_NETWORKS_REQUIRE_STANDARD" xml:space="preserve">
<value>外部ネットワークを使用するには、Standard Edition のライセンスが必要です。</value> <value>外部ネットワークを使用するには、Standard Edition のライセンスが必要です。</value>
</data> </data>
@ -9337,6 +9343,9 @@ StorageLink Gateway を使用する VM の XenServer 6.0 へのアップグレ
<data name="SHUTTING_DOWN_VM_OUT_OF" xml:space="preserve"> <data name="SHUTTING_DOWN_VM_OUT_OF" xml:space="preserve">
<value>VM をシャットダウン中: {0} / {1}</value> <value>VM をシャットダウン中: {0} / {1}</value>
</data> </data>
<data name="SINGLE_SERVER_PRIVATE_NETWORK" xml:space="preserve">
<value>Single-server private network</value>
</data>
<data name="SIGNING_APPLIANCE" xml:space="preserve"> <data name="SIGNING_APPLIANCE" xml:space="preserve">
<value>アプライアンスにデジタル署名を適用しています...</value> <value>アプライアンスにデジタル署名を適用しています...</value>
</data> </data>

View File

@ -1965,6 +1965,9 @@ Deleting this bond will disrupt traffic through the secondary interface on the b
<data name="BUGTOOL_SAVING" xml:space="preserve"> <data name="BUGTOOL_SAVING" xml:space="preserve">
<value>Saving server status report</value> <value>Saving server status report</value>
</data> </data>
<data name="BUILDIN_NETWORK" xml:space="preserve">
<value>Build-in network</value>
</data>
<data name="BUS_PATH" xml:space="preserve"> <data name="BUS_PATH" xml:space="preserve">
<value>PCI Bus Path</value> <value>PCI Bus Path</value>
</data> </data>
@ -4583,6 +4586,9 @@ Would you like to eject these ISOs before continuing?</value>
<data name="EXPORT_VM_VERIFY_POST_INSTALL" xml:space="preserve"> <data name="EXPORT_VM_VERIFY_POST_INSTALL" xml:space="preserve">
<value>&amp;Verify export on completion</value> <value>&amp;Verify export on completion</value>
</data> </data>
<data name="EXTERNAL_NETWORK" xml:space="preserve">
<value>External network</value>
</data>
<data name="EXTERNAL_NETWORKS_REQUIRE_STANDARD" xml:space="preserve"> <data name="EXTERNAL_NETWORKS_REQUIRE_STANDARD" xml:space="preserve">
<value>External networks require a Standard Edition license.</value> <value>External networks require a Standard Edition license.</value>
</data> </data>
@ -9646,6 +9652,9 @@ Upgrading VMs using StorageLink Gateway to XenServer 6.0 is only supported if th
<data name="SHUTTING_DOWN_VM_OUT_OF" xml:space="preserve"> <data name="SHUTTING_DOWN_VM_OUT_OF" xml:space="preserve">
<value>Shutting down VM {0} out of {1}</value> <value>Shutting down VM {0} out of {1}</value>
</data> </data>
<data name="SINGLE_SERVER_PRIVATE_NETWORK" xml:space="preserve">
<value>Single-server private network</value>
</data>
<data name="SIGNING_APPLIANCE" xml:space="preserve"> <data name="SIGNING_APPLIANCE" xml:space="preserve">
<value>Applying digital signature to appliance...</value> <value>Applying digital signature to appliance...</value>
</data> </data>

View File

@ -1908,6 +1908,9 @@ XenServer 可以重新启动服务器并将服务器的 CPU 级别降至池中
<data name="BUGTOOL_SAVING" xml:space="preserve"> <data name="BUGTOOL_SAVING" xml:space="preserve">
<value>正在保存服务器状态报告</value> <value>正在保存服务器状态报告</value>
</data> </data>
<data name="BUILDIN_NETWORK" xml:space="preserve">
<value>内置网络</value>
</data>
<data name="BUS_PATH" xml:space="preserve"> <data name="BUS_PATH" xml:space="preserve">
<value>PCI 总线路径</value> <value>PCI 总线路径</value>
</data> </data>
@ -4468,6 +4471,9 @@ XenServer 可以重新启动服务器并将服务器的 CPU 级别降至池中
<data name="EXPORT_VM_VERIFY_POST_INSTALL" xml:space="preserve"> <data name="EXPORT_VM_VERIFY_POST_INSTALL" xml:space="preserve">
<value>完成时验证导出(&amp;V)</value> <value>完成时验证导出(&amp;V)</value>
</data> </data>
<data name="EXTERNAL_NETWORK" xml:space="preserve">
<value>外部网络</value>
</data>
<data name="EXTERNAL_NETWORKS_REQUIRE_STANDARD" xml:space="preserve"> <data name="EXTERNAL_NETWORKS_REQUIRE_STANDARD" xml:space="preserve">
<value>外部网络需要使用 Standard Edition 许可证。</value> <value>外部网络需要使用 Standard Edition 许可证。</value>
</data> </data>
@ -9339,6 +9345,9 @@ XenServer 可以重新启动服务器并将其 CPU 降至主服务器的级别
<data name="SHUTTING_DOWN_VM_OUT_OF" xml:space="preserve"> <data name="SHUTTING_DOWN_VM_OUT_OF" xml:space="preserve">
<value>正在关闭 {1} 个 VM 中的第 {0} 个</value> <value>正在关闭 {1} 个 VM 中的第 {0} 个</value>
</data> </data>
<data name="SINGLE_SERVER_PRIVATE_NETWORK" xml:space="preserve">
<value>单服务器专用网络</value>
</data>
<data name="SIGNING_APPLIANCE" xml:space="preserve"> <data name="SIGNING_APPLIANCE" xml:space="preserve">
<value>正在将数字签名应用到设备...</value> <value>正在将数字签名应用到设备...</value>
</data> </data>