Merge pull request #2639 from xenserver/feature/REQ-814

Merge feature/REQ-814 into master
This commit is contained in:
Mihaela Stoica 2020-04-02 15:55:19 +01:00 committed by GitHub
commit 8c8980d73b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
47 changed files with 1797 additions and 1575 deletions

View File

@ -177,4 +177,7 @@
<data name="PRODUCT_VERSION_8_1" xml:space="preserve">
<value>8.1</value>
</data>
<data name="PRODUCT_VERSION_8_2" xml:space="preserve">
<value>8.2</value>
</data>
</root>

View File

@ -119,7 +119,7 @@ namespace XenAdmin.Controls
if (!decimal.TryParse(DiskSizeNumericUpDown.Text.Trim(), out decimal result) || result < 0)
{
SetError(Messages.INVALID_NUMBER);
SetError(Messages.INVALID_DISK_SIZE);
IsSizeValid = false;
return;
}
@ -142,7 +142,7 @@ namespace XenAdmin.Controls
if (SelectedSize > DEFAULT_MAXIMUM)
{
SetError(Messages.INVALID_NUMBER);
SetError(Messages.INVALID_DISK_SIZE);
IsSizeValid = false;
return;
}

View File

@ -158,45 +158,6 @@ namespace XenAdmin.Core
f.Activate();
}
public static bool FocusFirstControl(Control.ControlCollection cc)
{
bool found = false;
List<Control> controls = new List<Control>();
foreach (Control control in cc)
controls.Add(control);
controls.Sort((c1, c2) => c1.TabIndex.CompareTo(c2.TabIndex));
if (controls.Count > 0)
{
foreach (Control control in controls)
{
if (control.HasChildren)
{
found = FocusFirstControl(control.Controls);
}
if (!found)
{
if (control is Label)
continue;
if (control is TextBox && (control as TextBox).ReadOnly)
continue;
if (control.CanSelect)
{
found = control.Focus();
}
}
if (found)
break;
}
}
return found;
}
public static Dictionary<Host, Host> CheckHostIQNsDiffer()
{
Dictionary<Host, string> hosts = new Dictionary<Host, string>();

View File

@ -43,10 +43,16 @@ namespace XenAdmin.Diagnostics.Checks
// Check can override this to return multiple Problems
public virtual List<Problem> RunAllChecks()
{
var list = new List<Problem>(1);
var problem = RunCheck();
if (problem != null)
list.Add(problem);
var list = new List<Problem>();
//normally checks will have not been added to the list if they can't run, but check again
if (CanRun())
{
var problem = RunCheck();
if (problem != null)
list.Add(problem);
}
return list;
}
@ -62,5 +68,10 @@ namespace XenAdmin.Diagnostics.Checks
: string.Format(Messages.PATCHING_WIZARD_CHECK_OK, Description);
}
}
public virtual bool CanRun()
{
return true;
}
}
}

View File

@ -39,7 +39,6 @@ namespace XenAdmin.Diagnostics.Checks
{
class HostHasHotfixCheck : HostPostLivenessCheck
{
private readonly HotfixFactory hotfixFactory = new HotfixFactory();
public HostHasHotfixCheck(Host host)
: base(host)
{
@ -47,16 +46,13 @@ namespace XenAdmin.Diagnostics.Checks
protected override Problem RunHostCheck()
{
var hotfix = hotfixFactory.Hotfix(Host);
var hotfix = HotfixFactory.Hotfix(Host);
if (hotfix != null && hotfix.ShouldBeAppliedTo(Host))
return new HostDoesNotHaveHotfix(this, Host);
return null;
}
public override string Description
{
get { return Messages.HOTFIX_CHECK; }
}
public override string Description => Messages.HOTFIX_CHECK;
}
}

View File

@ -31,7 +31,6 @@
using System;
using System.Collections.Generic;
using System.Web.Script.Serialization;
using XenAdmin.Core;
using XenAdmin.Diagnostics.Problems;
using XenAdmin.Diagnostics.Problems.HostProblem;
@ -50,6 +49,7 @@ namespace XenAdmin.Diagnostics.Checks
{
this.installMethodConfig = installMethodConfig;
}
public override string Description => Messages.CHECKING_HOST_MEMORY_POST_UPGRADE_DESCRIPTION;
protected override Problem RunHostCheck()
@ -73,7 +73,7 @@ namespace XenAdmin.Diagnostics.Checks
string upgradePlatformVersion = null;
string upgradeProductVersion = null;
if (installMethodConfig != null)
TryGetUpgradeVersion(out upgradePlatformVersion, out upgradeProductVersion);
Host.TryGetUpgradeVersion(Host, installMethodConfig, out upgradePlatformVersion, out upgradeProductVersion);
if (Helpers.NaplesOrGreater(upgradePlatformVersion))
{
@ -102,24 +102,5 @@ namespace XenAdmin.Diagnostics.Checks
return false;
}
}
private bool TryGetUpgradeVersion(out string platformVersion, out string productVersion)
{
platformVersion = productVersion = null;
try
{
var result = Host.call_plugin(Host.Connection.Session, Host.opaque_ref, "prepare_host_upgrade.py", "getVersion", installMethodConfig);
var serializer = new JavaScriptSerializer();
var version = (Dictionary<string, object>)serializer.DeserializeObject(result);
platformVersion = version.ContainsKey("platform-version") ? (string)version["platform-version"] : null;
productVersion = version.ContainsKey("product-version") ? (string)version["product-version"] : null;
return platformVersion != null || productVersion != null;
}
catch (Exception exception)
{
log.WarnFormat("Plugin call prepare_host_upgrade.getVersion on {0} failed with {1}", Host.Name(), exception.Message);
return false;
}
}
}
}

View File

@ -36,7 +36,8 @@ using XenAPI;
using XenAdmin.Diagnostics.Problems;
using XenAdmin.Diagnostics.Problems.PoolProblem;
using System.Collections.Generic;
using System.Web.Script.Serialization;
using XenAdmin.Diagnostics.Hotfixing;
using XenAdmin.Diagnostics.Problems.HostProblem;
namespace XenAdmin.Diagnostics.Checks
{
@ -44,40 +45,60 @@ namespace XenAdmin.Diagnostics.Checks
{
private readonly Pool _pool;
private readonly bool _upgrade;
private readonly Dictionary<string, string> _installMethodConfig;
private readonly bool _manualUpgrade;
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private readonly Dictionary<string, string> _installMethodConfig;
public PVGuestsCheck(Pool pool, bool upgrade, Dictionary<string, string> installMethodConfig = null, bool manualUpgrade = false)
: base(Helpers.GetMaster(pool.Connection))
public PVGuestsCheck(Host master, bool upgrade, bool manualUpgrade = false, Dictionary<string, string> installMethodConfig = null)
: base(master)
{
_pool = pool;
_pool = Helpers.GetPoolOfOne(Host?.Connection);
_upgrade = upgrade;
_installMethodConfig = installMethodConfig;
_manualUpgrade = manualUpgrade;
_installMethodConfig = installMethodConfig;
}
public override bool CanRun()
{
if (Helpers.QuebecOrGreater(Host))
return false;
if (_pool == null || !_pool.Connection.Cache.VMs.Any(vm => vm.IsPvVm()))
return false;
if (!_upgrade && !Helpers.NaplesOrGreater(Host))
return false;
return true;
}
protected override Problem RunHostCheck()
{
string upgradePlatformVersion;
if (!_pool.Connection.Cache.VMs.Any(vm => vm.IsPvVm()))
return null;
if (!_upgrade || _manualUpgrade)
//update case
if (!_upgrade)
return new PoolHasPVGuestWarningUrl(this, _pool);
try
//upgrade case
if (!_manualUpgrade)
{
var result = Host.call_plugin(Host.Connection.Session, Host.opaque_ref, "prepare_host_upgrade.py", "getVersion", _installMethodConfig);
var serializer = new JavaScriptSerializer();
var version = (Dictionary<string, object>)serializer.DeserializeObject(result);
upgradePlatformVersion = version.ContainsKey("platform-version") ? (string)version["platform-version"] : null;
var hotfix = HotfixFactory.Hotfix(Host);
if (hotfix != null && hotfix.ShouldBeAppliedTo(Host))
return new HostDoesNotHaveHotfixWarning(this, Host);
}
catch (Exception exception)
{
log.Warn($"Plugin call prepare_host_upgrade.getVersion on {Host.Name()} threw an exception.", exception);
string upgradePlatformVersion = null;
if (_installMethodConfig != null)
Host.TryGetUpgradeVersion(Host, _installMethodConfig, out upgradePlatformVersion, out _);
// we don't know the upgrade version, so add warning
// (this is the case of the manual upgrade or when the rpu plugin doesn't have the function)
if (string.IsNullOrEmpty(upgradePlatformVersion))
return new PoolHasPVGuestWarningUrl(this, _pool);
}
if (Helpers.QuebecOrGreater(upgradePlatformVersion))
return new PoolHasPVGuestWarningUrl(this, _pool);
return null;
}

View File

@ -40,6 +40,7 @@ using System.Text.RegularExpressions;
using System.Xml;
using System.Collections.Generic;
using XenAdmin.Actions;
using XenAdmin.Diagnostics.Problems.PoolProblem;
namespace XenAdmin.Diagnostics.Checks
{
@ -99,8 +100,6 @@ namespace XenAdmin.Diagnostics.Checks
Session session = Host.Connection.DuplicateSession();
try
{
if (Patch != null)
@ -140,10 +139,7 @@ namespace XenAdmin.Diagnostics.Checks
}
}
public override string Description
{
get { return Messages.SERVER_SIDE_CHECK_DESCRIPTION; }
}
public override string Description => Messages.SERVER_SIDE_CHECK_DESCRIPTION;
/// <summary>
/// Find problem from xml result
@ -185,7 +181,7 @@ namespace XenAdmin.Diagnostics.Checks
else if (node.Name == "required")
required = node.InnerXml;
}
var problem = FindProblem(errorcode, found, required);
var problem = FindProblem(errorcode, "", found, required);
return problem ?? new PrecheckFailed(this, Host, new Failure(errorcode));
}
@ -193,14 +189,25 @@ namespace XenAdmin.Diagnostics.Checks
/// Find problem from xapi Failure
/// </summary>
/// <param name="failure">Xapi failure, thrown by Pool_patch.precheck() call.
/// E.g.: failure.ErrorDescription.Count = 4
/// E.g.: failure.ErrorDescription.Count = 4
/// ErrorDescription[0] = "PATCH_PRECHECK_FAILED_WRONG_SERVER_VERSION"
/// ErrorDescription[1] = "OpaqueRef:612b5eee-03dc-bbf5-3385-6905fdc9b079"
/// ErrorDescription[2] = "6.5.0"
/// ErrorDescription[3] = "^6\\.2\\.0$"
/// E.g.: failure.ErrorDescription.Count = 2
///
/// E.g.: failure.ErrorDescription.Count = 2
/// ErrorDescription[0] = "OUT_OF_SPACE"
/// ErrorDescription[1] = "/var/patch"
///
/// E.g.: failure.ErrorDescription.Count = 3 with the last parameter being an xml string
/// ErrorDescription[0] = "UPDATE_PRECHECK_FAILED_UNKNOWN_ERROR"
/// ErrorDescription[1] = "test-update"
/// ErrorDescription[2] = "<?x m l version="1.0" ?><error errorcode="LICENCE_RESTRICTION"></error>"
///
/// E.g.: failure.ErrorDescription.Count = 3 with the last parameter being a plain string
/// ErrorDescription[0] = "UPDATE_PRECHECK_FAILED_UNKNOWN_ERROR"
/// ErrorDescription[1] = "CH82"
/// ErrorDescription[2] = "VSWITCH_CONTROLLER_CONNECTED\nYou must [...] this update\n"
/// </param>
/// <returns>Problem or null, if no problem found</returns>
private Problem FindProblem(Failure failure)
@ -209,21 +216,17 @@ namespace XenAdmin.Diagnostics.Checks
return null;
var errorcode = failure.ErrorDescription[0];
var found = "";
var required = "";
var param1 = failure.ErrorDescription.Count > 1 ? failure.ErrorDescription[1] : "";
var param2 = failure.ErrorDescription.Count > 2 ? failure.ErrorDescription[2] : "";
var param3 = failure.ErrorDescription.Count > 3 ? failure.ErrorDescription[3] : "";
if (failure.ErrorDescription.Count > 2)
found = failure.ErrorDescription[2];
if (failure.ErrorDescription.Count > 3)
required = failure.ErrorDescription[3];
return FindProblem(errorcode, found, required);
return FindProblem(errorcode, param1, param2, param3);
}
private Problem FindProblem(string errorcode, string found, string required)
private Problem FindProblem(string errorcode, string param1, string param2, string param3)
{
long requiredSpace = 0;
long foundSpace = 0;
long requiredSpace;
long foundSpace;
long reclaimableDiskSpace = 0;
DiskSpaceRequirements diskSpaceReq;
@ -234,19 +237,19 @@ namespace XenAdmin.Diagnostics.Checks
return new WrongServerVersion(this, Host);
case "UPDATE_PRECHECK_FAILED_CONFLICT_PRESENT":
return new ConflictingUpdatePresent(this, found, Host);
return new ConflictingUpdatePresent(this, param2, Host);
case "UPDATE_PRECHECK_FAILED_PREREQUISITE_MISSING":
return new PrerequisiteUpdateMissing(this, found, Host);
return new PrerequisiteUpdateMissing(this, param2, Host);
case "PATCH_PRECHECK_FAILED_WRONG_SERVER_VERSION":
return new WrongServerVersion(this, required, Host);
return new WrongServerVersion(this, param3, Host);
case "PATCH_PRECHECK_FAILED_OUT_OF_SPACE":
System.Diagnostics.Trace.Assert(!Helpers.ElyOrGreater(Host.Connection)); // If Ely or greater, we shouldn't get this error
long.TryParse(found, out foundSpace);
long.TryParse(required, out requiredSpace);
long.TryParse(param2, out foundSpace);
long.TryParse(param3, out requiredSpace);
// get reclaimable disk space (excluding current patch)
try
{
@ -265,8 +268,9 @@ namespace XenAdmin.Diagnostics.Checks
case "UPDATE_PRECHECK_FAILED_OUT_OF_SPACE":
System.Diagnostics.Trace.Assert(Helpers.ElyOrGreater(Host.Connection)); // If not Ely or greater, we shouldn't get this error
long.TryParse(found, out foundSpace);
long.TryParse(required, out requiredSpace);
long.TryParse(param2, out foundSpace);
long.TryParse(param3, out requiredSpace);
diskSpaceReq = new DiskSpaceRequirements(DiskSpaceRequirements.OperationTypes.install, Host, Update.Name(), requiredSpace, foundSpace, 0);
@ -295,12 +299,15 @@ namespace XenAdmin.Diagnostics.Checks
case "LICENCE_RESTRICTION":
return new LicenseRestrictionProblem(this, Host);
case "UPDATE_PRECHECK_FAILED_UNKNOWN_ERROR":
// try to find the problem from the error parameters as xml string
// e.g.
// ErrorDescription[0] = "UPDATE_PRECHECK_FAILED_UNKNOWN_ERROR"
// ErrorDescription[1] = "test-update"
// ErrorDescription[2] = "<?xml version="1.0" ?><error errorcode="LICENCE_RESTRICTION"></error>"
return FindProblem(found);
if (param1 == "CH82" && param2.StartsWith("VSWITCH_CONTROLLER_CONNECTED"))
{
var pool = Helpers.GetPoolOfOne(Host.Connection);
if (pool.vSwitchController())
return new VSwitchControllerProblem(this, pool);
return null;
}
else
return FindProblem(param2);
}
return null;
}

View File

@ -0,0 +1,117 @@
/* Copyright (c) Citrix Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms,
* with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using XenAdmin.Core;
using XenAdmin.Diagnostics.Hotfixing;
using XenAdmin.Diagnostics.Problems;
using XenAdmin.Diagnostics.Problems.HostProblem;
using XenAdmin.Diagnostics.Problems.PoolProblem;
using XenAPI;
namespace XenAdmin.Diagnostics.Checks
{
class VSwitchControllerCheck : HostPostLivenessCheck
{
private readonly Dictionary<string, string> _installMethodConfig;
private readonly Pool _pool;
private readonly XenServerVersion _newVersion;
private readonly bool _manualUpgrade;
public VSwitchControllerCheck(Host host, XenServerVersion newVersion)
: base(host)
{
_newVersion = newVersion;
_pool = Helpers.GetPoolOfOne(Host?.Connection);
}
public VSwitchControllerCheck(Host host, Dictionary<string, string> installMethodConfig, bool manualUpgrade)
: base(host)
{
_installMethodConfig = installMethodConfig;
_manualUpgrade = manualUpgrade;
_pool = Helpers.GetPoolOfOne(Host?.Connection);
}
public override string Description => Messages.CHECKING_VSWITCH_CONTROLLER;
public override bool CanRun()
{
if (Helpers.StockholmOrGreater(Host))
return false;
if (_pool == null || !_pool.vSwitchController())
return false;
if (_newVersion != null && !Helpers.NaplesOrGreater(Host))
return false;
return true;
}
protected override Problem RunHostCheck()
{
//update case
if (_newVersion != null)
{
if (_newVersion.Version.CompareTo(new Version(BrandManager.ProductVersion82)) >= 0)
return new VSwitchControllerProblem(this, _pool);
return null;
}
//upgrade case
if (!_manualUpgrade)
{
var hotfix = HotfixFactory.Hotfix(Host);
if (hotfix != null && hotfix.ShouldBeAppliedTo(Host))
return new HostDoesNotHaveHotfixWarning(this, Host);
}
string upgradePlatformVersion = null;
if (_installMethodConfig != null)
Host.TryGetUpgradeVersion(Host, _installMethodConfig, out upgradePlatformVersion, out _);
// we don't know the upgrade version, so add generic warning
// (this is the case of the manual upgrade or when the rpu plugin doesn't have the function)
if (string.IsNullOrEmpty(upgradePlatformVersion))
return new VSwitchControllerWarning(this, _pool);
// we know they are upgrading to Stockholm or greater, so block them
if (Helpers.StockholmOrGreater(upgradePlatformVersion))
return new VSwitchControllerProblem(this, _pool);
return null;
}
}
}

View File

@ -35,7 +35,7 @@ using XenAPI;
namespace XenAdmin.Diagnostics.Hotfixing
{
internal sealed class HotfixFactory
internal static class HotfixFactory
{
public enum HotfixableServerVersion
{
@ -44,25 +44,25 @@ namespace XenAdmin.Diagnostics.Hotfixing
Naples
}
private readonly Hotfix dundeeHotfix = new SingleHotfix
private static readonly Hotfix dundeeHotfix = new SingleHotfix
{
Filename = "RPU003",
UUID = "b651dd22-df7d-45a4-8c0a-6be037bc1714"
};
private readonly Hotfix elyLimaHotfix = new SingleHotfix
private static readonly Hotfix elyLimaHotfix = new SingleHotfix
{
Filename = "RPU004",
UUID = "1821854d-0171-4696-a9c4-01daf75a45a0"
};
private readonly Hotfix naplesHotfix = new SingleHotfix
private static readonly Hotfix naplesHotfix = new SingleHotfix
{
Filename = "RPU005",
UUID = "b43ea62d-2804-4589-9164-f6cc5867d011"
};
public Hotfix Hotfix(Host host)
public static Hotfix Hotfix(Host host)
{
if (Helpers.NaplesOrGreater(host) && !Helpers.QuebecOrGreater(host))
return Hotfix(HotfixableServerVersion.Naples);
@ -73,7 +73,7 @@ namespace XenAdmin.Diagnostics.Hotfixing
return null;
}
public Hotfix Hotfix(HotfixableServerVersion version)
public static Hotfix Hotfix(HotfixableServerVersion version)
{
if (version == HotfixableServerVersion.Naples)
return naplesHotfix;
@ -85,7 +85,7 @@ namespace XenAdmin.Diagnostics.Hotfixing
throw new ArgumentException("A version was provided for which there is no hotfix filename");
}
public bool IsHotfixRequired(Host host)
public static bool IsHotfixRequired(Host host)
{
return Hotfix(host) != null;
}

View File

@ -29,39 +29,23 @@
* SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using XenAdmin.Core;
using XenAdmin.Diagnostics.Checks;
using XenAdmin.Diagnostics.Hotfixing;
using XenAdmin.Properties;
using XenAPI;
namespace XenAdmin.Diagnostics.Problems.HostProblem
{
class HostDoesNotHaveHotfix : HostProblem
{
private readonly HotfixFactory hotfixFactory = new HotfixFactory();
public HostDoesNotHaveHotfix(HostHasHotfixCheck check, Host server)
: base(check, server)
{
}
public override string Description
{
get { return string.Format(Messages.REQUIRED_HOTFIX_ISNOT_INSTALLED, ServerName); }
}
public override string Description => string.Format(Messages.REQUIRED_HOTFIX_NOT_INSTALLED, ServerName);
public override string HelpMessage
{
get { return Messages.APPLY_HOTFIX; }
}
public override string HelpMessage => Messages.APPLY_HOTFIX;
protected override Actions.AsyncAction CreateAction(out bool cancelled)
{
@ -69,10 +53,25 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
return new Actions.DelegatedAsyncAction(Server.Connection, string.Format(Messages.APPLYING_HOTFIX_TO_HOST, Server), "", "",
(ss) =>
{
Hotfix hotfix = hotfixFactory.Hotfix(Server);
Hotfix hotfix = HotfixFactory.Hotfix(Server);
if (hotfix != null)
hotfix.Apply(Server, ss);
}, true);
}
}
class HostDoesNotHaveHotfixWarning : Warning
{
private readonly Host host;
public HostDoesNotHaveHotfixWarning(Check check, Host host)
: base(check)
{
this.host = host;
}
public override string Title => Check.Description;
public override string Description => string.Format(Messages.REQUIRED_HOTFIX_NOT_INSTALLED_WARNING, host);
}
}

View File

@ -31,6 +31,7 @@
using XenAdmin.Diagnostics.Checks;
using System;
using XenAdmin.Core;
using XenAPI;
namespace XenAdmin.Diagnostics.Problems.PoolProblem
@ -48,7 +49,11 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
private string PVGuestCheckUrl => string.Format(InvisibleMessages.PV_GUESTS_CHECK_URL);
public override Uri UriToLaunch => new Uri(PVGuestCheckUrl);
public override string Title => Description;
public override string Description => string.Format(Messages.POOL_HAS_PV_GUEST_WARNING, _pool.Name());
public override string Description =>
string.Format(Messages.POOL_HAS_PV_GUEST_WARNING, _pool.Name(),
string.Format(Messages.XENSERVER_8_1, BrandManager.ProductVersion81));
public override string HelpMessage => LinkText;
public override string LinkText => Messages.LEARN_MORE;
}

View File

@ -0,0 +1,86 @@
/* Copyright (c) Citrix Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms,
* with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
using XenAdmin.Core;
using XenAdmin.Diagnostics.Checks;
using XenAPI;
namespace XenAdmin.Diagnostics.Problems.PoolProblem
{
class VSwitchControllerProblem : ProblemWithMoreInfo
{
private Pool _pool;
public VSwitchControllerProblem(Check check, Pool pool)
: base(check)
{
_pool = pool;
}
public override string Title => Check.Description;
public override string LinkData => InvisibleMessages.DEPRECATION_URL;
public override string LinkText => Messages.LEARN_MORE;
public override string Description =>
string.Format(Messages.PROBLEM_VSWITCH_CONTROLLER_DESCRIPTION, _pool,
string.Format(Messages.XENSERVER_8_2, BrandManager.ProductVersion82));
public override string Message =>
string.Format(Messages.PROBLEM_VSWITCH_CONTROLLER_INFO_ERROR,
string.Format(Messages.XENSERVER_8_2, BrandManager.ProductVersion82));
}
class VSwitchControllerWarning : WarningWithMoreInfo
{
private readonly Pool pool;
public VSwitchControllerWarning(Check check, Pool pool)
: base(check)
{
this.pool = pool;
}
public override string Title => Check.Description;
public override string LinkData => InvisibleMessages.DEPRECATION_URL;
public override string LinkText => Messages.LEARN_MORE;
public override string Description =>
string.Format(Messages.PROBLEM_VSWITCH_CONTROLLER_DESCRIPTION, pool,
string.Format(Messages.XENSERVER_8_2, BrandManager.ProductVersion82));
public override string Message =>
string.Format(Messages.PROBLEM_VSWITCH_CONTROLLER_INFO_WARNING,
string.Format(Messages.XENSERVER_8_2, BrandManager.ProductVersion82));
}
}

View File

@ -33,6 +33,7 @@ using System;
using System.Drawing;
using XenAdmin.Actions;
using XenAdmin.Diagnostics.Checks;
using XenAdmin.Dialogs;
namespace XenAdmin.Diagnostics.Problems
{
@ -152,4 +153,42 @@ namespace XenAdmin.Diagnostics.Problems
#endregion
}
public abstract class ProblemWithMoreInfo : Problem
{
protected ProblemWithMoreInfo(Check check)
: base(check)
{
}
public override bool IsFixable => false;
public override string HelpMessage => Messages.MORE_INFO;
public abstract string Message { get; }
public virtual string LinkData => null;
public virtual string LinkText => LinkData;
protected override AsyncAction CreateAction(out bool cancelled)
{
Program.Invoke(Program.MainWindow, delegate ()
{
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Error, Message)))
{
if (!string.IsNullOrEmpty(LinkText) && !string.IsNullOrEmpty(LinkData))
{
dlg.LinkText = LinkText;
dlg.LinkData = LinkData;
dlg.ShowLinkLabel = true;
}
dlg.ShowDialog();
}
});
cancelled = true;
return null;
}
}
}

View File

@ -45,11 +45,17 @@ namespace XenAdmin.Diagnostics.Problems
protected override Actions.AsyncAction CreateAction(out bool cancelled)
{
Program.Invoke(Program.MainWindow, delegate ()
Program.Invoke(Program.MainWindow, () =>
{
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Warning, Message)))
{
if (!string.IsNullOrEmpty(LinkText) && !string.IsNullOrEmpty(LinkData))
{
dlg.LinkText = LinkText;
dlg.LinkData = LinkData;
dlg.ShowLinkLabel = true;
}
dlg.ShowDialog();
}
});
@ -59,5 +65,8 @@ namespace XenAdmin.Diagnostics.Problems
}
public abstract string Message { get; }
public virtual string LinkData => null;
public virtual string LinkText => LinkData;
}
}

View File

@ -37,6 +37,7 @@ namespace XenAdmin.Dialogs
this.button1 = new System.Windows.Forms.Button();
this.labelMessage = new System.Windows.Forms.LinkLabel();
this.checkBoxOption = new System.Windows.Forms.CheckBox();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxIcon)).BeginInit();
this.flowLayoutPanel1.SuspendLayout();
@ -46,9 +47,10 @@ namespace XenAdmin.Dialogs
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.pictureBoxIcon, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.labelMessage, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.checkBoxOption, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.checkBoxOption, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.linkLabel1, 1, 1);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// pictureBoxIcon
@ -99,6 +101,13 @@ namespace XenAdmin.Dialogs
this.checkBoxOption.Name = "checkBoxOption";
this.checkBoxOption.UseVisualStyleBackColor = true;
//
// linkLabel1
//
resources.ApplyResources(this.linkLabel1, "linkLabel1");
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.TabStop = true;
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// ThreeButtonDialog
//
resources.ApplyResources(this, "$this");
@ -128,5 +137,6 @@ namespace XenAdmin.Dialogs
private System.Windows.Forms.Button button3;
private System.Windows.Forms.LinkLabel labelMessage;
private System.Windows.Forms.CheckBox checkBoxOption;
private System.Windows.Forms.LinkLabel linkLabel1;
}
}

View File

@ -147,6 +147,20 @@ namespace XenAdmin.Dialogs
}
}
public bool ShowLinkLabel
{
get { return linkLabel1.Visible; }
set { linkLabel1.Visible = value; }
}
public string LinkText
{
get { return linkLabel1.Text; }
set { linkLabel1.Text = value; }
}
public string LinkData { get; set; }
public bool ShowCheckbox
{
get { return checkBoxOption.Visible; }
@ -410,6 +424,16 @@ namespace XenAdmin.Dialogs
}
catch { } // Best effort
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
try
{
if (!string.IsNullOrEmpty(LinkData))
System.Diagnostics.Process.Start(LinkData);
}
catch { }
}
}
public class NonModalThreeButtonDialog : ThreeButtonDialog

View File

@ -180,9 +180,6 @@
<data name="button3.Location" type="System.Drawing.Point, System.Drawing">
<value>165, 3</value>
</data>
<data name="button3.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 0, 0</value>
</data>
<data name="button3.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 30</value>
</data>
@ -213,9 +210,6 @@
<data name="button2.Location" type="System.Drawing.Point, System.Drawing">
<value>84, 3</value>
</data>
<data name="button2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 0</value>
</data>
<data name="button2.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 30</value>
</data>
@ -246,9 +240,6 @@
<data name="button1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="button1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 0</value>
</data>
<data name="button1.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 30</value>
</data>
@ -277,13 +268,13 @@
<value>Segoe UI, 9pt</value>
</data>
<data name="flowLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>96, 74</value>
<value>93, 86</value>
</data>
<data name="flowLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>50, 0, 0, 0</value>
</data>
<data name="flowLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>240, 33</value>
<value>243, 36</value>
</data>
<data name="flowLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
@ -313,10 +304,10 @@
<value>0, 0</value>
</data>
<data name="labelMessage.Location" type="System.Drawing.Point, System.Drawing">
<value>43, 5</value>
<value>41, 0</value>
</data>
<data name="labelMessage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 15</value>
<value>3, 0, 3, 15</value>
</data>
<data name="labelMessage.MaximumSize" type="System.Drawing.Size, System.Drawing">
<value>409, 9999</value>
@ -349,7 +340,7 @@
<value>Segoe UI, 9pt</value>
</data>
<data name="checkBoxOption.Location" type="System.Drawing.Point, System.Drawing">
<value>41, 52</value>
<value>41, 64</value>
</data>
<data name="checkBoxOption.Size" type="System.Drawing.Size, System.Drawing">
<value>82, 19</value>
@ -375,6 +366,39 @@
<data name="&gt;&gt;checkBoxOption.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="linkLabel1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="linkLabel1.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="linkLabel1.Location" type="System.Drawing.Point, System.Drawing">
<value>41, 46</value>
</data>
<data name="linkLabel1.Size" type="System.Drawing.Size, System.Drawing">
<value>60, 15</value>
</data>
<data name="linkLabel1.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="linkLabel1.Text" xml:space="preserve">
<value>linkLabel1</value>
</data>
<data name="linkLabel1.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;linkLabel1.Name" xml:space="preserve">
<value>linkLabel1</value>
</data>
<data name="&gt;&gt;linkLabel1.Type" xml:space="preserve">
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;linkLabel1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;linkLabel1.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -388,10 +412,10 @@
<value>10, 10, 10, 10</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>3</value>
<value>4</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>336, 107</value>
<value>336, 122</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -409,7 +433,7 @@
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="pictureBoxIcon" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="flowLayoutPanel1" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="labelMessage" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="checkBoxOption" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="Percent,100,AutoSize,0,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="pictureBoxIcon" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="flowLayoutPanel1" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="labelMessage" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="checkBoxOption" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="linkLabel1" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="Percent,100,AutoSize,0,AutoSize,0,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -424,7 +448,7 @@
<value>GrowAndShrink</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>356, 127</value>
<value>356, 142</value>
</data>
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>

View File

@ -76,7 +76,7 @@ namespace XenAdmin.Dialogs
{
// Check if vSwitch Controller is configured for the pool (CA-46299)
Pool pool = Helpers.GetPoolOfOne(connection);
var vSwitchController = pool != null && pool.vSwitchController();
var vSwitchController = !Helpers.StockholmOrGreater(connection) && pool != null && pool.vSwitchController();
if (vSwitchController)
{
@ -203,21 +203,9 @@ namespace XenAdmin.Dialogs
comboBoxNetwork.SelectedIndex = 0;
}
private XenAPI.Network SelectedNetwork
{
get
{
return ((NetworkComboBoxItem)comboBoxNetwork.SelectedItem).Network;
}
}
private XenAPI.Network SelectedNetwork => (comboBoxNetwork.SelectedItem as NetworkComboBoxItem)?.Network;
private string SelectedMac
{
get
{
return radioButtonAutogenerate.Checked ? "" : promptTextBoxMac.Text;
}
}
private string SelectedMac => radioButtonAutogenerate.Checked ? "" : promptTextBoxMac.Text;
public VIF NewVif()
{
@ -387,16 +375,7 @@ namespace XenAdmin.Dialogs
#endregion
internal override string HelpName
{
get
{
if (ExistingVif != null)
return "EditVmNetworkSettingsDialog";
else
return "VIFDialog";
}
}
internal override string HelpName => ExistingVif == null ? "VIFDialog" : "EditVmNetworkSettingsDialog";
}
public class NetworkComboBoxItem : IEquatable<NetworkComboBoxItem>

View File

@ -230,11 +230,8 @@ namespace XenAdmin.Wizards
nic = pageNetworkDetails.SelectedHostNic;
}
long vlan = pageNetworkDetails.VLAN;
NetworkAction action = pageNetworkType.SelectedNetworkType == NetworkTypes.External
? new NetworkAction(xenConnection, network, nic, vlan)
? new NetworkAction(xenConnection, network, nic, pageNetworkDetails.VLAN)
: new NetworkAction(xenConnection, network, true);
action.RunAsync();
}
@ -251,14 +248,18 @@ namespace XenAdmin.Wizards
var autoPlug = pageNetworkType.SelectedNetworkType == NetworkTypes.CHIN
? pageChinDetails.isAutomaticAddNicToVM
: pageNetworkType.SelectedNetworkType == NetworkTypes.SRIOV
? pageSriovDetails.isAutomaticAddNicToVM
: pageNetworkDetails.isAutomaticAddNicToVM;
? pageSriovDetails.AddNicToVmsAutomatically
: pageNetworkDetails.AddNicToVmsAutomatically;
result.SetAutoPlug(autoPlug);
if (pageNetworkType.SelectedNetworkType == NetworkTypes.CHIN)
result.MTU = pageChinDetails.MTU;
else if (pageNetworkDetails.MTU.HasValue) //Custom MTU may not be allowed if we are making a virtual network or something
result.MTU = pageNetworkDetails.MTU.Value;
else
{
int mtu = pageNetworkDetails.MTU;
if (mtu != -1) //Custom MTU may not be allowed if we are making a virtual network or something
result.MTU = mtu;
}
return result;
}

View File

@ -161,7 +161,7 @@
<value>Tahoma, 8pt</value>
</data>
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>775, 535</value>
<value>790, 560</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>NewNetworkWizard</value>

View File

@ -32,7 +32,6 @@
using System;
using System.Collections.Generic;
using XenAdmin.Controls;
using XenAdmin.Core;
using XenAPI;
@ -56,11 +55,6 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
return Details.Valid;
}
protected override void PageLoadedCore(PageLoadedDirection direction)
{
HelpersGUI.FocusFirstControl(Controls);
}
protected override void PageLeaveCore(PageLoadedDirection direction, ref bool cancel)
{
if (direction == PageLoadedDirection.Forward)

View File

@ -112,26 +112,26 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
@ -154,7 +154,7 @@
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -175,7 +175,7 @@
<value>433, 385</value>
</data>
<data name="Details.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
<value>1</value>
</data>
<data name="&gt;&gt;Details.Name" xml:space="preserve">
<value>Details</value>
@ -205,13 +205,13 @@
<value>433, 426</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>$this</value>
@ -222,7 +222,7 @@
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="label1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="Details" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">

View File

@ -89,7 +89,6 @@
this.tableLayoutPanel1.SetColumnSpan(this.tableLayoutPanelMTUWarning, 2);
this.tableLayoutPanelMTUWarning.Controls.Add(this.pictureBox1, 0, 0);
this.tableLayoutPanelMTUWarning.Controls.Add(this.labelMTUWarning, 1, 0);
this.tableLayoutPanelMTUWarning.MinimumSize = new System.Drawing.Size(0, 40);
this.tableLayoutPanelMTUWarning.Name = "tableLayoutPanelMTUWarning";
//
// pictureBox1

View File

@ -31,13 +31,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using XenAdmin.Controls;
using XenAdmin.Core;
using XenAdmin.Network;
using XenAPI;
@ -55,9 +49,9 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
numericUpDownMTU.Visible = labelMTU.Visible = tableLayoutPanelMTUWarning.Visible = false;
}
public override string Text { get { return Messages.NETW_DETAILS_TEXT; } }
public override string PageTitle { get { return Messages.NETW_CHIN_DETAILS_TITLE; } }
public override string Text => Messages.NETW_DETAILS_TEXT;
public override string PageTitle => Messages.NETW_CHIN_DETAILS_TITLE;
public override bool EnableNext()
{
@ -66,7 +60,7 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
protected override void PageLoadedCore(PageLoadedDirection direction)
{
HelpersGUI.FocusFirstControl(Controls);
comboInterfaces.Focus();
}
public override void PopulatePage()
@ -77,20 +71,11 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
public Host Host { private get; set; }
public Pool Pool { private get; set; }
public XenAPI.Network SelectedInterface
{
get { return (XenAPI.Network)comboInterfaces.SelectedItem; }
}
public XenAPI.Network SelectedInterface => (XenAPI.Network)comboInterfaces.SelectedItem;
public bool isAutomaticAddNicToVM
{
get { return cbxAutomatic.Checked; }
}
public bool isAutomaticAddNicToVM => cbxAutomatic.Checked;
public long MTU
{
get { return (long)numericUpDownMTU.Value; }
}
public long MTU => (long)numericUpDownMTU.Value;
private void PopulateInterfaces(Pool pool, Host host, IXenConnection connection)
{
@ -116,7 +101,7 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
}
}
}
comboInterfaces.SelectedIndexChanged += new EventHandler(comboInterfaces_SelectedIndexChanged);
comboInterfaces.SelectedIndexChanged += comboInterfaces_SelectedIndexChanged;
if (comboInterfaces.Items.Count > 0)
comboInterfaces.SelectedIndex = 0;

View File

@ -112,40 +112,37 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="cbxAutomatic.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="cbxAutomatic.CheckAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>TopLeft</value>
</data>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="lblNicHelp.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="lblNicHelp.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="lblNicHelp.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
<value>3, 0</value>
</data>
<data name="lblNicHelp.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 30</value>
<value>3, 0, 3, 30</value>
</data>
<data name="lblNicHelp.Size" type="System.Drawing.Size, System.Drawing">
<value>491, 26</value>
<value>461, 26</value>
</data>
<data name="lblNicHelp.TabIndex" type="System.Int32, mscorlib">
<value>101</value>
<value>0</value>
</data>
<data name="lblNicHelp.Text" xml:space="preserve">
<value>Select a management interface for the new network to use and configure any additional settings before proceeding.
@ -158,7 +155,7 @@
<value>lblNicHelp</value>
</data>
<data name="&gt;&gt;lblNicHelp.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblNicHelp.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -170,22 +167,19 @@
<value>Top, Left, Right</value>
</data>
<data name="comboInterfaces.Location" type="System.Drawing.Point, System.Drawing">
<value>119, 56</value>
</data>
<data name="comboInterfaces.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
<value>125, 59</value>
</data>
<data name="comboInterfaces.Size" type="System.Drawing.Size, System.Drawing">
<value>374, 21</value>
<value>365, 21</value>
</data>
<data name="comboInterfaces.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>2</value>
</data>
<data name="&gt;&gt;comboInterfaces.Name" xml:space="preserve">
<value>comboInterfaces</value>
</data>
<data name="&gt;&gt;comboInterfaces.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;comboInterfaces.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -193,23 +187,20 @@
<data name="&gt;&gt;comboInterfaces.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="label2.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 56</value>
</data>
<data name="label2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 3, 0</value>
<value>3, 63</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>116, 21</value>
<value>116, 13</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
<value>1</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>&amp;Management interface:</value>
@ -221,7 +212,7 @@
<value>label2</value>
</data>
<data name="&gt;&gt;label2.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -236,17 +227,11 @@
<value>2</value>
</data>
<data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="pictureBox1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 3, 0</value>
<value>3, 3</value>
</data>
<data name="pictureBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 16</value>
</data>
<data name="pictureBox1.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>AutoSize</value>
</data>
<data name="pictureBox1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
@ -254,7 +239,7 @@
<value>pictureBox1</value>
</data>
<data name="&gt;&gt;pictureBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox1.Parent" xml:space="preserve">
<value>tableLayoutPanelMTUWarning</value>
@ -266,19 +251,16 @@
<value>True</value>
</data>
<data name="labelMTUWarning.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
<value>Top</value>
</data>
<data name="labelMTUWarning.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelMTUWarning.Location" type="System.Drawing.Point, System.Drawing">
<value>19, 0</value>
</data>
<data name="labelMTUWarning.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
<value>25, 0</value>
</data>
<data name="labelMTUWarning.Size" type="System.Drawing.Size, System.Drawing">
<value>474, 45</value>
<value>465, 26</value>
</data>
<data name="labelMTUWarning.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -290,7 +272,7 @@
<value>labelMTUWarning</value>
</data>
<data name="&gt;&gt;labelMTUWarning.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelMTUWarning.Parent" xml:space="preserve">
<value>tableLayoutPanelMTUWarning</value>
@ -307,14 +289,17 @@
<data name="tableLayoutPanelMTUWarning.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="tableLayoutPanelMTUWarning.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>0, 40</value>
</data>
<data name="tableLayoutPanelMTUWarning.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanelMTUWarning.Size" type="System.Drawing.Size, System.Drawing">
<value>493, 45</value>
<value>493, 40</value>
</data>
<data name="tableLayoutPanelMTUWarning.TabIndex" type="System.Int32, mscorlib">
<value>102</value>
<value>5</value>
</data>
<data name="tableLayoutPanelMTUWarning.Visible" type="System.Boolean, mscorlib">
<value>False</value>
@ -323,7 +308,7 @@
<value>tableLayoutPanelMTUWarning</value>
</data>
<data name="&gt;&gt;tableLayoutPanelMTUWarning.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanelMTUWarning.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -334,23 +319,20 @@
<data name="tableLayoutPanelMTUWarning.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="pictureBox1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="labelMTUWarning" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,50,Percent,50" /&gt;&lt;Rows Styles="Percent,50" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="labelMTU.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="labelMTU.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelMTU.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="labelMTU.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 84</value>
</data>
<data name="labelMTU.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 7, 3, 5</value>
<value>3, 89</value>
</data>
<data name="labelMTU.Size" type="System.Drawing.Size, System.Drawing">
<value>116, 20</value>
<value>34, 13</value>
</data>
<data name="labelMTU.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
<value>3</value>
</data>
<data name="labelMTU.Text" xml:space="preserve">
<value>MTU:</value>
@ -362,7 +344,7 @@
<value>labelMTU</value>
</data>
<data name="&gt;&gt;labelMTU.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelMTU.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -371,22 +353,19 @@
<value>5</value>
</data>
<data name="numericUpDownMTU.Location" type="System.Drawing.Point, System.Drawing">
<value>119, 84</value>
</data>
<data name="numericUpDownMTU.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 7, 0, 5</value>
<value>125, 86</value>
</data>
<data name="numericUpDownMTU.Size" type="System.Drawing.Size, System.Drawing">
<value>96, 20</value>
</data>
<data name="numericUpDownMTU.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<value>4</value>
</data>
<data name="&gt;&gt;numericUpDownMTU.Name" xml:space="preserve">
<value>numericUpDownMTU</value>
</data>
<data name="&gt;&gt;numericUpDownMTU.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;numericUpDownMTU.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -407,13 +386,13 @@
<value>493, 276</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>$this</value>
@ -422,22 +401,22 @@
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="lblNicHelp" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="comboInterfaces" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="cbxAutomatic" Row="4" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="tableLayoutPanelMTUWarning" Row="3" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="labelMTU" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="numericUpDownMTU" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,Absolute,45,Percent,100,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="lblNicHelp" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="comboInterfaces" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="cbxAutomatic" Row="4" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="tableLayoutPanelMTUWarning" Row="3" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="labelMTU" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="numericUpDownMTU" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="cbxAutomatic.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cbxAutomatic.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 161</value>
<value>3, 159</value>
</data>
<data name="cbxAutomatic.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 7, 3, 3</value>
<value>3, 10, 3, 3</value>
</data>
<data name="cbxAutomatic.Size" type="System.Drawing.Size, System.Drawing">
<value>286, 17</value>
</data>
<data name="cbxAutomatic.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
<value>6</value>
</data>
<data name="cbxAutomatic.Text" xml:space="preserve">
<value>&amp;Automatically add this network to new virtual machines.</value>
@ -449,7 +428,7 @@
<value>cbxAutomatic</value>
</data>
<data name="&gt;&gt;cbxAutomatic.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbxAutomatic.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -457,7 +436,7 @@
<data name="&gt;&gt;cbxAutomatic.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">

View File

@ -29,112 +29,66 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NetWDetails));
this.panel1 = new System.Windows.Forms.Panel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.infoMtuPanel = new System.Windows.Forms.Panel();
this.infoMtuMessage = new System.Windows.Forms.Label();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.labelExternal = new System.Windows.Forms.Label();
this.labelInternal = new System.Windows.Forms.Label();
this.labelNIC = new System.Windows.Forms.Label();
this.labelVLAN = new System.Windows.Forms.Label();
this.lblNicHelp = new System.Windows.Forms.Label();
this.numericUpDownVLAN = new System.Windows.Forms.NumericUpDown();
this.comboBoxNICList = new System.Windows.Forms.ComboBox();
this.labelVLAN = new System.Windows.Forms.Label();
this.numericUpDownVLAN = new System.Windows.Forms.NumericUpDown();
this.infoVlanPanel = new System.Windows.Forms.TableLayoutPanel();
this.pictureBoxVlan = new System.Windows.Forms.PictureBox();
this.labelVlanMessage = new System.Windows.Forms.Label();
this.labelMTU = new System.Windows.Forms.Label();
this.numericUpDownMTU = new System.Windows.Forms.NumericUpDown();
this.panelVLANInfo = new System.Windows.Forms.Panel();
this.labelVlanError = new System.Windows.Forms.Label();
this.labelVLAN0Info = new System.Windows.Forms.Label();
this.checkBoxAutomatic = new System.Windows.Forms.CheckBox();
this.infoMtuPanel = new System.Windows.Forms.TableLayoutPanel();
this.pictureBoxMtu = new System.Windows.Forms.PictureBox();
this.labelMtuMessage = new System.Windows.Forms.Label();
this.checkBoxSriov = new System.Windows.Forms.CheckBox();
this.panel1.SuspendLayout();
this.checkBoxAutomatic = new System.Windows.Forms.CheckBox();
this.tableLayoutPanel1.SuspendLayout();
this.infoMtuPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownVLAN)).BeginInit();
this.infoVlanPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxVlan)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMTU)).BeginInit();
this.panelVLANInfo.SuspendLayout();
this.infoMtuPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxMtu)).BeginInit();
this.SuspendLayout();
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.BackColor = System.Drawing.SystemColors.Control;
this.panel1.Controls.Add(this.tableLayoutPanel1);
this.panel1.Name = "panel1";
//
// tableLayoutPanel1
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.infoMtuPanel, 2, 3);
this.tableLayoutPanel1.Controls.Add(this.labelNIC, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.labelVLAN, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.lblNicHelp, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.numericUpDownVLAN, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.comboBoxNICList, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.labelMTU, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.numericUpDownMTU, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.panelVLANInfo, 2, 2);
this.tableLayoutPanel1.Controls.Add(this.checkBoxAutomatic, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.checkBoxSriov, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.labelExternal, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.labelInternal, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.labelNIC, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.comboBoxNICList, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.labelVLAN, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.numericUpDownVLAN, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.infoVlanPanel, 2, 3);
this.tableLayoutPanel1.Controls.Add(this.labelMTU, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.numericUpDownMTU, 1, 4);
this.tableLayoutPanel1.Controls.Add(this.infoMtuPanel, 2, 4);
this.tableLayoutPanel1.Controls.Add(this.checkBoxSriov, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.checkBoxAutomatic, 0, 6);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// infoMtuPanel
// labelExternal
//
resources.ApplyResources(this.infoMtuPanel, "infoMtuPanel");
this.tableLayoutPanel1.SetColumnSpan(this.infoMtuPanel, 2);
this.infoMtuPanel.Controls.Add(this.infoMtuMessage);
this.infoMtuPanel.Controls.Add(this.pictureBox2);
this.infoMtuPanel.Name = "infoMtuPanel";
resources.ApplyResources(this.labelExternal, "labelExternal");
this.tableLayoutPanel1.SetColumnSpan(this.labelExternal, 4);
this.labelExternal.Name = "labelExternal";
//
// infoMtuMessage
// labelInternal
//
resources.ApplyResources(this.infoMtuMessage, "infoMtuMessage");
this.infoMtuMessage.Name = "infoMtuMessage";
//
// pictureBox2
//
resources.ApplyResources(this.pictureBox2, "pictureBox2");
this.pictureBox2.Image = global::XenAdmin.Properties.Resources._000_Info3_h32bit_16;
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.TabStop = false;
resources.ApplyResources(this.labelInternal, "labelInternal");
this.tableLayoutPanel1.SetColumnSpan(this.labelInternal, 4);
this.labelInternal.Name = "labelInternal";
//
// labelNIC
//
resources.ApplyResources(this.labelNIC, "labelNIC");
this.labelNIC.Name = "labelNIC";
//
// labelVLAN
//
resources.ApplyResources(this.labelVLAN, "labelVLAN");
this.labelVLAN.Name = "labelVLAN";
//
// lblNicHelp
//
resources.ApplyResources(this.lblNicHelp, "lblNicHelp");
this.tableLayoutPanel1.SetColumnSpan(this.lblNicHelp, 4);
this.lblNicHelp.Name = "lblNicHelp";
//
// numericUpDownVLAN
//
resources.ApplyResources(this.numericUpDownVLAN, "numericUpDownVLAN");
this.numericUpDownVLAN.Maximum = new decimal(new int[] {
4094,
0,
0,
0});
this.numericUpDownVLAN.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.numericUpDownVLAN.Name = "numericUpDownVLAN";
this.numericUpDownVLAN.Value = new decimal(new int[] {
1,
0,
0,
0});
this.numericUpDownVLAN.ValueChanged += new System.EventHandler(this.nudVLAN_ValueChanged);
//
// comboBoxNICList
//
this.tableLayoutPanel1.SetColumnSpan(this.comboBoxNICList, 2);
@ -146,6 +100,37 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
this.comboBoxNICList.Sorted = true;
this.comboBoxNICList.SelectedIndexChanged += new System.EventHandler(this.cmbHostNicList_SelectedIndexChanged);
//
// labelVLAN
//
resources.ApplyResources(this.labelVLAN, "labelVLAN");
this.labelVLAN.Name = "labelVLAN";
//
// numericUpDownVLAN
//
resources.ApplyResources(this.numericUpDownVLAN, "numericUpDownVLAN");
this.numericUpDownVLAN.Name = "numericUpDownVLAN";
this.numericUpDownVLAN.ValueChanged += new System.EventHandler(this.numericUpDownVLAN_ValueChanged);
this.numericUpDownVLAN.Leave += new System.EventHandler(this.numericUpDownVLAN_Leave);
//
// infoVlanPanel
//
resources.ApplyResources(this.infoVlanPanel, "infoVlanPanel");
this.tableLayoutPanel1.SetColumnSpan(this.infoVlanPanel, 2);
this.infoVlanPanel.Controls.Add(this.pictureBoxVlan, 0, 0);
this.infoVlanPanel.Controls.Add(this.labelVlanMessage, 1, 0);
this.infoVlanPanel.Name = "infoVlanPanel";
//
// pictureBoxVlan
//
resources.ApplyResources(this.pictureBoxVlan, "pictureBoxVlan");
this.pictureBoxVlan.Name = "pictureBoxVlan";
this.pictureBoxVlan.TabStop = false;
//
// labelVlanMessage
//
resources.ApplyResources(this.labelVlanMessage, "labelVlanMessage");
this.labelVlanMessage.Name = "labelVlanMessage";
//
// labelMTU
//
resources.ApplyResources(this.labelMTU, "labelMTU");
@ -155,33 +140,27 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
//
resources.ApplyResources(this.numericUpDownMTU, "numericUpDownMTU");
this.numericUpDownMTU.Name = "numericUpDownMTU";
this.numericUpDownMTU.ValueChanged += new System.EventHandler(this.numericUpDownMTU_ValueChanged);
this.numericUpDownMTU.Leave += new System.EventHandler(this.numericUpDownMTU_Leave);
//
// panelVLANInfo
// infoMtuPanel
//
resources.ApplyResources(this.panelVLANInfo, "panelVLANInfo");
this.tableLayoutPanel1.SetColumnSpan(this.panelVLANInfo, 2);
this.panelVLANInfo.Controls.Add(this.labelVlanError);
this.panelVLANInfo.Controls.Add(this.labelVLAN0Info);
this.panelVLANInfo.Name = "panelVLANInfo";
resources.ApplyResources(this.infoMtuPanel, "infoMtuPanel");
this.tableLayoutPanel1.SetColumnSpan(this.infoMtuPanel, 2);
this.infoMtuPanel.Controls.Add(this.pictureBoxMtu, 0, 0);
this.infoMtuPanel.Controls.Add(this.labelMtuMessage, 1, 0);
this.infoMtuPanel.Name = "infoMtuPanel";
//
// labelVlanError
// pictureBoxMtu
//
resources.ApplyResources(this.labelVlanError, "labelVlanError");
this.labelVlanError.ForeColor = System.Drawing.Color.Red;
this.labelVlanError.Name = "labelVlanError";
resources.ApplyResources(this.pictureBoxMtu, "pictureBoxMtu");
this.pictureBoxMtu.Name = "pictureBoxMtu";
this.pictureBoxMtu.TabStop = false;
//
// labelVLAN0Info
// labelMtuMessage
//
resources.ApplyResources(this.labelVLAN0Info, "labelVLAN0Info");
this.labelVLAN0Info.ForeColor = System.Drawing.SystemColors.ControlText;
this.labelVLAN0Info.Name = "labelVLAN0Info";
//
// checkBoxAutomatic
//
resources.ApplyResources(this.checkBoxAutomatic, "checkBoxAutomatic");
this.tableLayoutPanel1.SetColumnSpan(this.checkBoxAutomatic, 4);
this.checkBoxAutomatic.Name = "checkBoxAutomatic";
this.checkBoxAutomatic.UseVisualStyleBackColor = true;
resources.ApplyResources(this.labelMtuMessage, "labelMtuMessage");
this.labelMtuMessage.Name = "labelMtuMessage";
//
// checkBoxSriov
//
@ -191,45 +170,51 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
this.checkBoxSriov.UseVisualStyleBackColor = true;
this.checkBoxSriov.CheckedChanged += new System.EventHandler(this.checkBoxSriov_CheckedChanged);
//
// checkBoxAutomatic
//
resources.ApplyResources(this.checkBoxAutomatic, "checkBoxAutomatic");
this.tableLayoutPanel1.SetColumnSpan(this.checkBoxAutomatic, 4);
this.checkBoxAutomatic.Name = "checkBoxAutomatic";
this.checkBoxAutomatic.UseVisualStyleBackColor = true;
//
// NetWDetails
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.SystemColors.Control;
this.Controls.Add(this.panel1);
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "NetWDetails";
this.panel1.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownVLAN)).EndInit();
this.infoVlanPanel.ResumeLayout(false);
this.infoVlanPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxVlan)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMTU)).EndInit();
this.infoMtuPanel.ResumeLayout(false);
this.infoMtuPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownVLAN)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMTU)).EndInit();
this.panelVLANInfo.ResumeLayout(false);
this.panelVLANInfo.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxMtu)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label labelNIC;
private System.Windows.Forms.ComboBox comboBoxNICList;
private System.Windows.Forms.NumericUpDown numericUpDownVLAN;
private System.Windows.Forms.Label labelVLAN;
private System.Windows.Forms.Label lblNicHelp;
private System.Windows.Forms.Label labelInternal;
private System.Windows.Forms.CheckBox checkBoxAutomatic;
private System.Windows.Forms.Label labelVlanError;
private System.Windows.Forms.Label labelMTU;
private System.Windows.Forms.NumericUpDown numericUpDownMTU;
private System.Windows.Forms.Panel panelVLANInfo;
private System.Windows.Forms.Label labelVLAN0Info;
private System.Windows.Forms.Panel infoMtuPanel;
private System.Windows.Forms.Label infoMtuMessage;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.Label labelMtuMessage;
private System.Windows.Forms.PictureBox pictureBoxMtu;
private System.Windows.Forms.CheckBox checkBoxSriov;
private System.Windows.Forms.Label labelExternal;
private System.Windows.Forms.TableLayoutPanel infoMtuPanel;
private System.Windows.Forms.TableLayoutPanel infoVlanPanel;
private System.Windows.Forms.PictureBox pictureBoxVlan;
private System.Windows.Forms.Label labelVlanMessage;
private System.Windows.Forms.NumericUpDown numericUpDownVLAN;
private System.Windows.Forms.NumericUpDown numericUpDownMTU;
}
}

View File

@ -40,56 +40,84 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
{
public partial class NetWDetails : XenTabPage
{
List<int> vlans;
private List<int> vlans;
private bool _vlanError;
private bool _mtuError;
private bool _populatingNics;
public NetWDetails()
{
InitializeComponent();
numericUpDownVLAN.LostFocus += checkVLAN;
//non-browsable events
numericUpDownVLAN.TextChanged += numericUpDownVLAN_TextChanged;
numericUpDownMTU.TextChanged += numericUpDownMTU_TextChanged;
numericUpDownMTU.Maximum = XenAPI.Network.MTU_MAX;
numericUpDownMTU.Minimum = XenAPI.Network.MTU_MIN;
numericUpDownMTU.Value = XenAPI.Network.MTU_DEFAULT;
numericUpDownVLAN.Maximum = 4094;
}
public override string Text { get { return Messages.NETW_DETAILS_TEXT; } }
public override string Text => Messages.NETW_DETAILS_TEXT;
public override string PageTitle { get
{
return SelectedNetworkType == NetworkTypes.External
? Messages.NETW_EXTERNAL_DETAILS_TITLE
: Messages.NETW_INTERNAL_DETAILS_TITLE;
} }
public override string PageTitle =>
SelectedNetworkType == NetworkTypes.External
? Messages.NETW_EXTERNAL_DETAILS_TITLE
: Messages.NETW_INTERNAL_DETAILS_TITLE;
public override bool EnableNext()
{
return (SelectedHostNic != null || !comboBoxNICList.Visible) && !labelVlanError.Visible;
}
if (_vlanError || _mtuError)
return false;
protected override void PageLoadedCore(PageLoadedDirection direction)
{
HelpersGUI.FocusFirstControl(Controls);
return SelectedHostNic != null || !comboBoxNICList.Visible;
}
public override void PopulatePage()
{
PopulateHostNicList(Host, Connection);
UpdateEnablement(SelectedNetworkType == NetworkTypes.External, Host);
//set minimum value for VLAN
numericUpDownVLAN.Minimum = Helpers.VLAN0Allowed(Connection) ? 0 : 1;
}
var external = SelectedNetworkType == NetworkTypes.External;
private int CurrentVLANValue
{
get { return Convert.ToInt32(Math.Round(numericUpDownVLAN.Value, MidpointRounding.AwayFromZero)); }
}
labelExternal.Visible = external;
labelInternal.Visible = !external;
labelNIC.Visible = external;
comboBoxNICList.Visible = external;
private void checkVLAN(object sender, EventArgs e)
{
if (numericUpDownVLAN.Text == "")
if (comboBoxNICList.Visible)
{
numericUpDownVLAN.Text = CurrentVLANValue.ToString();
try
{
_populatingNics = true;
comboBoxNICList.Items.Clear();
foreach (PIF ThePIF in Connection.Cache.PIFs)
{
if (ThePIF.host.opaque_ref == Host.opaque_ref && ThePIF.IsPhysical() &&
(Properties.Settings.Default.ShowHiddenVMs || ThePIF.Show(Properties.Settings.Default.ShowHiddenVMs)) &&
!ThePIF.IsBondSlave())
{
comboBoxNICList.Items.Add(ThePIF);
}
}
}
finally
{
_populatingNics = false;
}
if (comboBoxNICList.Items.Count > 0)
comboBoxNICList.SelectedIndex = 0;
comboBoxNICList.Focus();
}
labelVLAN.Visible = external;
numericUpDownVLAN.Visible = external;
numericUpDownVLAN.Minimum = Helpers.VLAN0Allowed(Connection) ? 0 : 1;
numericUpDownMTU.Visible = labelMTU.Visible = infoMtuPanel.Visible = external;
checkBoxSriov.Visible = SelectedHostNic != null && SelectedHostNic.IsSriovPhysicalPIF();
OnPageUpdated();
}
#region Accessors
@ -98,191 +126,186 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
public Host Host { private get; set; }
public PIF SelectedHostNic
{
get { return (PIF)comboBoxNICList.SelectedItem; }
}
public PIF SelectedHostNic => comboBoxNICList.SelectedItem as PIF;
public long VLAN
{
get { return CurrentVLANValue; }
}
public int VLAN => Convert.ToInt32(Math.Round(numericUpDownVLAN.Value, MidpointRounding.AwayFromZero));
public bool isAutomaticAddNicToVM
{
get { return checkBoxAutomatic.Checked; }
}
public bool AddNicToVmsAutomatically => checkBoxAutomatic.Checked;
public bool CreateVlanOnSriovNetwork
{
get { return checkBoxSriov.Visible && checkBoxSriov.Checked; }
}
public bool CreateVlanOnSriovNetwork => checkBoxSriov.Visible && checkBoxSriov.Checked;
/// <summary>
/// Null if the custom MTU option is disabled
/// Returns -1 if the custom MTU option is disabled
/// </summary>
public long? MTU
{
get
{
if (numericUpDownMTU.Enabled)
return (long)numericUpDownMTU.Value;
else
return null;
}
}
public int MTU => numericUpDownMTU.Visible && numericUpDownMTU.Enabled
? Convert.ToInt32(Math.Round(numericUpDownMTU.Value, MidpointRounding.AwayFromZero))
: -1;
#endregion
private void UpdateEnablement(bool external, Host host)
private List<int> GetVLANList(PIF nic)
{
lblNicHelp.Text = external ? Messages.WIZARD_DESC_NETWORK_SETTINGS_EXTERNAL : Messages.WIZARD_DESC_NETWORK_SETTINGS_INTERNAL;
comboBoxNICList.Visible = external;
labelVLAN.Visible = external;
numericUpDownVLAN.Visible = external;
numericUpDownMTU.Visible = labelMTU.Visible = infoMtuPanel.Visible = external;
labelNIC.Visible = external;
if (comboBoxNICList.Items.Count > 0)
comboBoxNICList.SelectedIndex = external ? comboBoxNICList.Items.Count - 1 : -1;
checkBoxSriov.Visible = SelectedHostNic != null && SelectedHostNic.IsSriovPhysicalPIF();
List<int> vlans = new List<int>();
foreach (PIF pif in nic.Connection.Cache.PIFs)
{
if (pif.device == nic.device)
{
var pifIsSriov = pif.NetworkSriov() != null;
if ((CreateVlanOnSriovNetwork && pifIsSriov) || (!CreateVlanOnSriovNetwork && !pifIsSriov))
vlans.Add((int)pif.VLAN);
}
}
return vlans;
}
private void ValidateVLANValue()
{
//CA-192746: do not call numericUpDown.Value or properties/methods that call it
//in the validation method, because it auto-corrects what the user has typed
_vlanError = false;
string msg = null;
if (!int.TryParse(numericUpDownVLAN.Text.Trim(), out int currentValue))
{
_vlanError = true;
msg = Messages.INVALID_NUMBER;
}
else if (currentValue < numericUpDownVLAN.Minimum || numericUpDownVLAN.Maximum < currentValue)
{
_vlanError = true;
msg = string.Format(Messages.NETW_DETAILS_VLAN_RANGE, numericUpDownVLAN.Minimum, numericUpDownVLAN.Maximum);
}
else if (vlans != null && vlans.Contains(currentValue))
{
_vlanError = true;
msg = Messages.NETW_DETAILS_VLAN_NUMBER_IN_USE;
}
else if (currentValue == 0)
{
msg = Messages.NETW_VLAN_ZERO;
}
if (_vlanError)
{
pictureBoxVlan.Image = Images.StaticImages._000_error_h32bit_16;
labelVlanMessage.Text = msg;
infoVlanPanel.Visible = true;
}
else if (!string.IsNullOrEmpty(msg))
{
pictureBoxVlan.Image = Images.StaticImages._000_Info3_h32bit_16;
labelVlanMessage.Text = msg;
infoVlanPanel.Visible = true;
}
else
infoVlanPanel.Visible = false;
OnPageUpdated();
}
private void PopulateHostNicList(Host host, IXenConnection conn)
private void ValidateMtuValue()
{
comboBoxNICList.Items.Clear();
//CA-192746: do not call numericUpDown.Value or properties/methods that call it
//in the validation method, because it auto-corrects what the user has typed
foreach (PIF ThePIF in conn.Cache.PIFs)
_mtuError = false;
if (!int.TryParse(numericUpDownMTU.Text.Trim(), out int currentValue))
{
if (ThePIF.host.opaque_ref == host.opaque_ref && ThePIF.IsPhysical() && (Properties.Settings.Default.ShowHiddenVMs || ThePIF.Show(Properties.Settings.Default.ShowHiddenVMs)) && !ThePIF.IsBondSlave())
{
comboBoxNICList.Items.Add(ThePIF);
}
_mtuError = true;
pictureBoxMtu.Image = Images.StaticImages._000_error_h32bit_16;
labelMtuMessage.Text = Messages.INVALID_NUMBER;
}
if (comboBoxNICList.Items.Count > 0)
comboBoxNICList.SelectedIndex = 0;
cmbHostNicList_SelectedIndexChanged(null, null);
}
private List<int> GetVLANList(PIF nic)
{
List<int> vlans = new List<int>();
foreach (PIF pif in nic.Connection.Cache.PIFs)
{
if (pif.device == nic.device)
{
var pifIsSriov = pif.NetworkSriov() != null;
if ((CreateVlanOnSriovNetwork && pifIsSriov) || (!CreateVlanOnSriovNetwork && !pifIsSriov))
vlans.Add((int)pif.VLAN);
}
}
return vlans;
}
private int GetFirstAvailableVLAN(List<int> vlans)
{
//CA-19111: VLAN values should only go up to the numericUpDownVLAN.Maximum (4094)
for (int i = 1; i <= numericUpDownVLAN.Maximum; i++)
else
{
if (!vlans.Contains(i))
return i;
if (currentValue < numericUpDownMTU.Minimum || numericUpDownMTU.Maximum < currentValue)
_mtuError = true;
pictureBoxMtu.Image = Images.StaticImages._000_Info3_h32bit_16;
labelMtuMessage.Text = numericUpDownMTU.Minimum == numericUpDownMTU.Maximum
? string.Format(Messages.ALLOWED_MTU_VALUE, numericUpDownMTU.Minimum)
: string.Format(Messages.ALLOWED_MTU_RANGE, numericUpDownMTU.Minimum, numericUpDownMTU.Maximum);
}
return -1;
infoMtuPanel.Visible = true;
OnPageUpdated();
}
#region Event Handlers
private void cmbHostNicList_SelectedIndexChanged(object sender, EventArgs e)
{
OnPageUpdated();
if (SelectedHostNic == null)
if (_populatingNics || SelectedHostNic == null)
return;
checkBoxSriov.Visible = SelectedHostNic.IsSriovPhysicalPIF();
numericUpDownMTU.Maximum = Math.Min(SelectedHostNic.MTU, XenAPI.Network.MTU_MAX);
numericUpDownMTU.Enabled = numericUpDownMTU.Minimum != numericUpDownMTU.Maximum;
infoMtuMessage.Text = numericUpDownMTU.Minimum == numericUpDownMTU.Maximum
? string.Format(Messages.ALLOWED_MTU_VALUE, numericUpDownMTU.Minimum)
: string.Format(Messages.ALLOWED_MTU_RANGE, numericUpDownMTU.Minimum, numericUpDownMTU.Maximum);
ValidateMtuValue();
vlans = GetVLANList(SelectedHostNic);
//CA-72484: check whether the currently selected VLAN is available and keep it
int curVlan = CurrentVLANValue;
if (!vlans.Contains(curVlan))
if (!vlans.Contains(VLAN))
{
SetError(null);
ValidateVLANValue();
return;
}
int avail_vlan = GetFirstAvailableVLAN(vlans);
//CA-19111: VLAN values should only go up to the numericUpDownVLAN.Maximum (4094)
for (int i = 1; i <= numericUpDownVLAN.Maximum; i++)
{
if (!vlans.Contains(i))
{
numericUpDownVLAN.Value = i;
break;
}
}
if (avail_vlan == -1)
return;
numericUpDownVLAN.Value = avail_vlan;
OnPageUpdated();
}
private void nudVLAN_ValueChanged(object sender, EventArgs e)
private void numericUpDownVLAN_Leave(object sender, EventArgs e)
{
if (numericUpDownVLAN.Text == "")
numericUpDownVLAN.Text = VLAN.ToString();
}
private void numericUpDownVLAN_TextChanged(object sender, EventArgs e)
{
ValidateVLANValue();
}
void numericUpDownVLAN_TextChanged(object sender, EventArgs e)
private void numericUpDownVLAN_ValueChanged(object sender, EventArgs e)
{
ValidateVLANValue();
}
private void SetError(string error)
private void numericUpDownMTU_Leave(object sender, EventArgs e)
{
bool visible = !string.IsNullOrEmpty(error);
bool updatePage = labelVlanError.Visible != visible;
labelVlanError.Visible = visible;
if (visible)
labelVlanError.Text = error;
labelVLAN0Info.Visible = !visible && numericUpDownVLAN.Value == 0;
if (updatePage)
OnPageUpdated();
if (numericUpDownMTU.Text == "")
numericUpDownMTU.Text = MTU.ToString();
}
private bool VLANValidNumber()
private void numericUpDownMTU_TextChanged(object sender, EventArgs e)
{
int result;
return int.TryParse(numericUpDownVLAN.Text.Trim(), out result);
ValidateMtuValue();
}
private bool VLANNumberUnique()
private void numericUpDownMTU_ValueChanged(object sender, EventArgs e)
{
if (vlans == null)
return true;
return !vlans.Contains(CurrentVLANValue);
}
private void ValidateVLANValue()
{
if (!VLANValidNumber())
{
SetError(Messages.INVALID_NUMBER);
return;
}
if (!VLANNumberUnique())
{
SetError(Messages.NETW_DETAILS_VLAN_NUMBER_IN_USE);
return;
}
SetError(null);
ValidateMtuValue();
}
private void checkBoxSriov_CheckedChanged(object sender, EventArgs e)
{
vlans = GetVLANList(SelectedHostNic);
vlans = GetVLANList(SelectedHostNic);
ValidateVLANValue();
}
#endregion
}
}

View File

@ -117,141 +117,102 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="panel1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="infoMtuPanel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="infoMtuPanel.AutoSize" type="System.Boolean, mscorlib">
<data name="labelExternal.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="infoMtuMessage.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="infoMtuMessage.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="infoMtuMessage.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="labelExternal.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="infoMtuMessage.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 0</value>
<data name="labelExternal.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value>
</data>
<data name="infoMtuMessage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
<data name="labelExternal.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 25</value>
</data>
<data name="infoMtuMessage.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 2, 0, 0</value>
<data name="labelExternal.Size" type="System.Drawing.Size, System.Drawing">
<value>523, 26</value>
</data>
<data name="infoMtuMessage.Size" type="System.Drawing.Size, System.Drawing">
<value>294, 15</value>
</data>
<data name="infoMtuMessage.TabIndex" type="System.Int32, mscorlib">
<data name="labelExternal.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="infoMtuMessage.Text" xml:space="preserve">
<value>MTU cannot be changed (the only valid value is already set)</value>
<data name="labelExternal.Text" xml:space="preserve">
<value>Your new network will be mapped to an existing physical network interface and assigned a VLAN number to use on that interface. You can select the physical interface you would like to use below.</value>
</data>
<data name="&gt;&gt;infoMtuMessage.Name" xml:space="preserve">
<value>infoMtuMessage</value>
<data name="&gt;&gt;labelExternal.Name" xml:space="preserve">
<value>labelExternal</value>
</data>
<data name="&gt;&gt;infoMtuMessage.Type" xml:space="preserve">
<data name="&gt;&gt;labelExternal.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;infoMtuMessage.Parent" xml:space="preserve">
<value>infoMtuPanel</value>
</data>
<data name="&gt;&gt;infoMtuMessage.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="pictureBox2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Left</value>
</data>
<data name="pictureBox2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="pictureBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="pictureBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 15</value>
</data>
<data name="pictureBox2.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>AutoSize</value>
</data>
<data name="pictureBox2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;pictureBox2.Name" xml:space="preserve">
<value>pictureBox2</value>
</data>
<data name="&gt;&gt;pictureBox2.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox2.Parent" xml:space="preserve">
<value>infoMtuPanel</value>
</data>
<data name="&gt;&gt;pictureBox2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="infoMtuPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>164, 136</value>
</data>
<data name="infoMtuPanel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>6, 0, 0, 2</value>
</data>
<data name="infoMtuPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>310, 15</value>
</data>
<data name="infoMtuPanel.TabIndex" type="System.Int32, mscorlib">
<value>17</value>
</data>
<data name="&gt;&gt;infoMtuPanel.Name" xml:space="preserve">
<value>infoMtuPanel</value>
</data>
<data name="&gt;&gt;infoMtuPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;infoMtuPanel.Parent" xml:space="preserve">
<data name="&gt;&gt;labelExternal.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;infoMtuPanel.ZOrder" xml:space="preserve">
<data name="&gt;&gt;labelExternal.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="labelInternal.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelInternal.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelInternal.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 51</value>
</data>
<data name="labelInternal.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 25</value>
</data>
<data name="labelInternal.Size" type="System.Drawing.Size, System.Drawing">
<value>367, 13</value>
</data>
<data name="labelInternal.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="labelInternal.Text" xml:space="preserve">
<value>Select whether you would like to automatically add this network to new VMs.</value>
</data>
<data name="labelInternal.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="&gt;&gt;labelInternal.Name" xml:space="preserve">
<value>labelInternal</value>
</data>
<data name="&gt;&gt;labelInternal.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelInternal.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelInternal.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="labelNIC.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="labelNIC.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelNIC.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="labelNIC.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelNIC.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 72</value>
</data>
<data name="labelNIC.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 3, 0</value>
<value>3, 96</value>
</data>
<data name="labelNIC.Size" type="System.Drawing.Size, System.Drawing">
<value>35, 27</value>
<value>28, 13</value>
</data>
<data name="labelNIC.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
<value>2</value>
</data>
<data name="labelNIC.Text" xml:space="preserve">
<value>NI&amp;C:</value>
</data>
<data name="labelNIC.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="&gt;&gt;labelNIC.Name" xml:space="preserve">
<value>labelNIC</value>
</data>
@ -262,28 +223,46 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelNIC.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="comboBoxNICList.Location" type="System.Drawing.Point, System.Drawing">
<value>47, 92</value>
</data>
<data name="comboBoxNICList.Size" type="System.Drawing.Size, System.Drawing">
<value>241, 21</value>
</data>
<data name="comboBoxNICList.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;comboBoxNICList.Name" xml:space="preserve">
<value>comboBoxNICList</value>
</data>
<data name="&gt;&gt;comboBoxNICList.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;comboBoxNICList.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;comboBoxNICList.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="labelVLAN.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="labelVLAN.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelVLAN.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="labelVLAN.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelVLAN.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 110</value>
</data>
<data name="labelVLAN.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 11, 0, 7</value>
<value>3, 123</value>
</data>
<data name="labelVLAN.Size" type="System.Drawing.Size, System.Drawing">
<value>38, 18</value>
<value>38, 13</value>
</data>
<data name="labelVLAN.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
<value>4</value>
</data>
<data name="labelVLAN.Text" xml:space="preserve">
<value>&amp;VLAN:</value>
@ -298,61 +277,16 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelVLAN.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="lblNicHelp.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblNicHelp.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="lblNicHelp.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lblNicHelp.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="lblNicHelp.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 7</value>
</data>
<data name="lblNicHelp.Size" type="System.Drawing.Size, System.Drawing">
<value>493, 65</value>
</data>
<data name="lblNicHelp.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="lblNicHelp.Text" xml:space="preserve">
<value>Your new external network will be mapped to an existing physical network interface and assigned a VLAN number for that interface.
Select the physical interface you would like to use:</value>
</data>
<data name="lblNicHelp.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="&gt;&gt;lblNicHelp.Name" xml:space="preserve">
<value>lblNicHelp</value>
</data>
<data name="&gt;&gt;lblNicHelp.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblNicHelp.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;lblNicHelp.ZOrder" xml:space="preserve">
<value>3</value>
<value>4</value>
</data>
<data name="numericUpDownVLAN.Location" type="System.Drawing.Point, System.Drawing">
<value>41, 108</value>
</data>
<data name="numericUpDownVLAN.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 9, 0, 7</value>
<value>47, 119</value>
</data>
<data name="numericUpDownVLAN.Size" type="System.Drawing.Size, System.Drawing">
<value>117, 20</value>
<value>114, 20</value>
</data>
<data name="numericUpDownVLAN.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<value>5</value>
</data>
<data name="&gt;&gt;numericUpDownVLAN.Name" xml:space="preserve">
<value>numericUpDownVLAN</value>
@ -364,49 +298,115 @@ Select the physical interface you would like to use:</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;numericUpDownVLAN.ZOrder" xml:space="preserve">
<value>4</value>
<value>5</value>
</data>
<data name="comboBoxNICList.Location" type="System.Drawing.Point, System.Drawing">
<value>41, 75</value>
<data name="infoVlanPanel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="comboBoxNICList.Size" type="System.Drawing.Size, System.Drawing">
<value>241, 21</value>
<data name="infoVlanPanel.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="comboBoxNICList.TabIndex" type="System.Int32, mscorlib">
<data name="infoVlanPanel.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="pictureBoxVlan.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="pictureBoxVlan.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 16</value>
</data>
<data name="pictureBoxVlan.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;pictureBoxVlan.Name" xml:space="preserve">
<value>pictureBoxVlan</value>
</data>
<data name="&gt;&gt;pictureBoxVlan.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBoxVlan.Parent" xml:space="preserve">
<value>infoVlanPanel</value>
</data>
<data name="&gt;&gt;pictureBoxVlan.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="labelVlanMessage.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="labelVlanMessage.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelVlanMessage.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelVlanMessage.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 4</value>
</data>
<data name="labelVlanMessage.Size" type="System.Drawing.Size, System.Drawing">
<value>331, 13</value>
</data>
<data name="labelVlanMessage.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;labelVlanMessage.Name" xml:space="preserve">
<value>labelVlanMessage</value>
</data>
<data name="&gt;&gt;labelVlanMessage.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelVlanMessage.Parent" xml:space="preserve">
<value>infoVlanPanel</value>
</data>
<data name="&gt;&gt;labelVlanMessage.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;comboBoxNICList.Name" xml:space="preserve">
<value>comboBoxNICList</value>
<data name="infoVlanPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="&gt;&gt;comboBoxNICList.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="infoVlanPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>167, 119</value>
</data>
<data name="&gt;&gt;comboBoxNICList.Parent" xml:space="preserve">
<data name="infoVlanPanel.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="infoVlanPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 22</value>
</data>
<data name="infoVlanPanel.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="&gt;&gt;infoVlanPanel.Name" xml:space="preserve">
<value>infoVlanPanel</value>
</data>
<data name="&gt;&gt;infoVlanPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;infoVlanPanel.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;comboBoxNICList.ZOrder" xml:space="preserve">
<value>5</value>
<data name="&gt;&gt;infoVlanPanel.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="infoVlanPanel.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="pictureBoxVlan" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="labelVlanMessage" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100,Absolute,20" /&gt;&lt;Rows Styles="Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="labelMTU.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="labelMTU.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelMTU.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="labelMTU.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelMTU.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 137</value>
</data>
<data name="labelMTU.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 2, 3, 0</value>
<value>3, 151</value>
</data>
<data name="labelMTU.Size" type="System.Drawing.Size, System.Drawing">
<value>35, 18</value>
<value>34, 13</value>
</data>
<data name="labelMTU.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
<value>7</value>
</data>
<data name="labelMTU.Text" xml:space="preserve">
<value>&amp;MTU:</value>
@ -421,19 +421,16 @@ Select the physical interface you would like to use:</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelMTU.ZOrder" xml:space="preserve">
<value>6</value>
<value>7</value>
</data>
<data name="numericUpDownMTU.Location" type="System.Drawing.Point, System.Drawing">
<value>41, 135</value>
</data>
<data name="numericUpDownMTU.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 0, 0</value>
<value>47, 147</value>
</data>
<data name="numericUpDownMTU.Size" type="System.Drawing.Size, System.Drawing">
<value>117, 20</value>
<value>114, 20</value>
</data>
<data name="numericUpDownMTU.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<value>8</value>
</data>
<data name="&gt;&gt;numericUpDownMTU.Name" xml:space="preserve">
<value>numericUpDownMTU</value>
@ -445,127 +442,136 @@ Select the physical interface you would like to use:</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;numericUpDownMTU.ZOrder" xml:space="preserve">
<value>7</value>
<value>8</value>
</data>
<data name="panelVLANInfo.AutoSize" type="System.Boolean, mscorlib">
<data name="infoMtuPanel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="infoMtuPanel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelVlanError.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
<data name="infoMtuPanel.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="labelVlanError.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Left</value>
<data name="infoMtuPanel.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="labelVlanError.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt</value>
</data>
<data name="labelVlanError.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<data name="pictureBoxMtu.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelVlanError.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
<data name="pictureBoxMtu.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="labelVlanError.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
<data name="pictureBoxMtu.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 16</value>
</data>
<data name="labelVlanError.Size" type="System.Drawing.Size, System.Drawing">
<value>174, 13</value>
<data name="pictureBoxMtu.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>AutoSize</value>
</data>
<data name="labelVlanError.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="labelVlanError.Text" xml:space="preserve">
<value>This VLAN number is already in use</value>
</data>
<data name="labelVlanError.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="labelVlanError.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;labelVlanError.Name" xml:space="preserve">
<value>labelVlanError</value>
</data>
<data name="&gt;&gt;labelVlanError.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelVlanError.Parent" xml:space="preserve">
<value>panelVLANInfo</value>
</data>
<data name="&gt;&gt;labelVlanError.ZOrder" xml:space="preserve">
<data name="pictureBoxMtu.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="labelVLAN0Info.AutoSize" type="System.Boolean, mscorlib">
<data name="&gt;&gt;pictureBoxMtu.Name" xml:space="preserve">
<value>pictureBoxMtu</value>
</data>
<data name="&gt;&gt;pictureBoxMtu.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBoxMtu.Parent" xml:space="preserve">
<value>infoMtuPanel</value>
</data>
<data name="&gt;&gt;pictureBoxMtu.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="labelMtuMessage.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="labelMtuMessage.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelVLAN0Info.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="labelVLAN0Info.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt</value>
</data>
<data name="labelVLAN0Info.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<data name="labelMtuMessage.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelVLAN0Info.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
<data name="labelMtuMessage.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 4</value>
</data>
<data name="labelVLAN0Info.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
<data name="labelMtuMessage.Size" type="System.Drawing.Size, System.Drawing">
<value>331, 13</value>
</data>
<data name="labelVLAN0Info.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 13</value>
<data name="labelMtuMessage.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="labelVLAN0Info.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
<data name="&gt;&gt;labelMtuMessage.Name" xml:space="preserve">
<value>labelMtuMessage</value>
</data>
<data name="labelVLAN0Info.Text" xml:space="preserve">
<value>VLAN 0 will receive all traffic not on any other VLAN</value>
</data>
<data name="labelVLAN0Info.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="labelVLAN0Info.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;labelVLAN0Info.Name" xml:space="preserve">
<value>labelVLAN0Info</value>
</data>
<data name="&gt;&gt;labelVLAN0Info.Type" xml:space="preserve">
<data name="&gt;&gt;labelMtuMessage.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelVLAN0Info.Parent" xml:space="preserve">
<value>panelVLANInfo</value>
<data name="&gt;&gt;labelMtuMessage.Parent" xml:space="preserve">
<value>infoMtuPanel</value>
</data>
<data name="&gt;&gt;labelVLAN0Info.ZOrder" xml:space="preserve">
<data name="&gt;&gt;labelMtuMessage.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panelVLANInfo.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
<data name="infoMtuPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>167, 147</value>
</data>
<data name="panelVLANInfo.Location" type="System.Drawing.Point, System.Drawing">
<value>161, 112</value>
<data name="infoMtuPanel.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="panelVLANInfo.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 13, 0, 0</value>
<data name="infoMtuPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 22</value>
</data>
<data name="panelVLANInfo.Size" type="System.Drawing.Size, System.Drawing">
<value>332, 23</value>
<data name="infoMtuPanel.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="panelVLANInfo.TabIndex" type="System.Int32, mscorlib">
<value>16</value>
<data name="&gt;&gt;infoMtuPanel.Name" xml:space="preserve">
<value>infoMtuPanel</value>
</data>
<data name="&gt;&gt;panelVLANInfo.Name" xml:space="preserve">
<value>panelVLANInfo</value>
<data name="&gt;&gt;infoMtuPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panelVLANInfo.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panelVLANInfo.Parent" xml:space="preserve">
<data name="&gt;&gt;infoMtuPanel.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;panelVLANInfo.ZOrder" xml:space="preserve">
<value>8</value>
<data name="&gt;&gt;infoMtuPanel.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="infoMtuPanel.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="pictureBoxMtu" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="labelMtuMessage" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="checkBoxSriov.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="checkBoxSriov.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="checkBoxSriov.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 192</value>
</data>
<data name="checkBoxSriov.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 20, 3, 3</value>
</data>
<data name="checkBoxSriov.Size" type="System.Drawing.Size, System.Drawing">
<value>219, 17</value>
</data>
<data name="checkBoxSriov.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="checkBoxSriov.Text" xml:space="preserve">
<value>Create the VLAN on the &amp;SR-IOV network</value>
</data>
<data name="&gt;&gt;checkBoxSriov.Name" xml:space="preserve">
<value>checkBoxSriov</value>
</data>
<data name="&gt;&gt;checkBoxSriov.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;checkBoxSriov.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;checkBoxSriov.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="checkBoxAutomatic.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -577,16 +583,16 @@ Select the physical interface you would like to use:</value>
<value>NoControl</value>
</data>
<data name="checkBoxAutomatic.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 209</value>
<value>3, 232</value>
</data>
<data name="checkBoxAutomatic.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 24, 0, 0</value>
<value>3, 20, 3, 3</value>
</data>
<data name="checkBoxAutomatic.Size" type="System.Drawing.Size, System.Drawing">
<value>283, 17</value>
</data>
<data name="checkBoxAutomatic.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
<value>11</value>
</data>
<data name="checkBoxAutomatic.Text" xml:space="preserve">
<value>&amp;Automatically add this network to new virtual machines</value>
@ -604,40 +610,7 @@ Select the physical interface you would like to use:</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;checkBoxAutomatic.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="checkBoxSriov.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="checkBoxSriov.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="checkBoxSriov.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 165</value>
</data>
<data name="checkBoxSriov.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 10, 3, 3</value>
</data>
<data name="checkBoxSriov.Size" type="System.Drawing.Size, System.Drawing">
<value>219, 17</value>
</data>
<data name="checkBoxSriov.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="checkBoxSriov.Text" xml:space="preserve">
<value>Create the VLAN on the &amp;SR-IOV network</value>
</data>
<data name="&gt;&gt;checkBoxSriov.Name" xml:space="preserve">
<value>checkBoxSriov</value>
</data>
<data name="&gt;&gt;checkBoxSriov.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;checkBoxSriov.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;checkBoxSriov.ZOrder" xml:space="preserve">
<value>10</value>
<value>11</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -646,10 +619,10 @@ Select the physical interface you would like to use:</value>
<value>0, 0</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>6</value>
<value>7</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>493, 276</value>
<value>529, 319</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -661,37 +634,13 @@ Select the physical interface you would like to use:</value>
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>panel1</value>
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="infoMtuPanel" Row="3" RowSpan="1" Column="2" ColumnSpan="2" /&gt;&lt;Control Name="labelNIC" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="labelVLAN" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lblNicHelp" Row="0" RowSpan="1" Column="0" ColumnSpan="4" /&gt;&lt;Control Name="numericUpDownVLAN" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="comboBoxNICList" Row="1" RowSpan="1" Column="1" ColumnSpan="2" /&gt;&lt;Control Name="labelMTU" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="numericUpDownMTU" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="panelVLANInfo" Row="2" RowSpan="1" Column="2" ColumnSpan="2" /&gt;&lt;Control Name="checkBoxAutomatic" Row="5" RowSpan="1" Column="0" ColumnSpan="4" /&gt;&lt;Control Name="checkBoxSriov" Row="4" RowSpan="1" Column="0" ColumnSpan="4" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Absolute,120,Absolute,127,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,Percent,100,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="panel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>493, 276</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>0</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="labelExternal" Row="0" RowSpan="1" Column="0" ColumnSpan="4" /&gt;&lt;Control Name="labelInternal" Row="1" RowSpan="1" Column="0" ColumnSpan="4" /&gt;&lt;Control Name="labelNIC" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="comboBoxNICList" Row="2" RowSpan="1" Column="1" ColumnSpan="2" /&gt;&lt;Control Name="labelVLAN" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="numericUpDownVLAN" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="infoVlanPanel" Row="3" RowSpan="1" Column="2" ColumnSpan="2" /&gt;&lt;Control Name="labelMTU" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="numericUpDownMTU" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="infoMtuPanel" Row="4" RowSpan="1" Column="2" ColumnSpan="2" /&gt;&lt;Control Name="checkBoxSriov" Row="5" RowSpan="1" Column="0" ColumnSpan="4" /&gt;&lt;Control Name="checkBoxAutomatic" Row="6" RowSpan="1" Column="0" ColumnSpan="4" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Absolute,120,Absolute,127,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,Percent,100,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -703,7 +652,7 @@ Select the physical interface you would like to use:</value>
<value>0, 0, 0, 0</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>493, 276</value>
<value>529, 319</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Interface</value>

View File

@ -29,71 +29,59 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NetWName));
this.panel1 = new System.Windows.Forms.Panel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.txtName = new System.Windows.Forms.TextBox();
this.txtDescription = new System.Windows.Forms.TextBox();
this.lblDescription = new System.Windows.Forms.Label();
this.lblName = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.lblName = new System.Windows.Forms.Label();
this.txtName = new System.Windows.Forms.TextBox();
this.lblDescription = new System.Windows.Forms.Label();
this.txtDescription = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.BackColor = System.Drawing.SystemColors.Control;
this.panel1.Controls.Add(this.tableLayoutPanel1);
this.panel1.Name = "panel1";
//
// tableLayoutPanel1
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.txtName, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.txtDescription, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.lblDescription, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.lblName, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.lblName, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.txtName, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.lblDescription, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.txtDescription, 1, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// txtName
// label1
//
this.tableLayoutPanel1.SetColumnSpan(this.txtName, 2);
resources.ApplyResources(this.txtName, "txtName");
this.txtName.Name = "txtName";
this.txtName.TextChanged += new System.EventHandler(this.txtName_TextChanged);
//
// txtDescription
//
this.tableLayoutPanel1.SetColumnSpan(this.txtDescription, 2);
resources.ApplyResources(this.txtDescription, "txtDescription");
this.txtDescription.Name = "txtDescription";
//
// lblDescription
//
resources.ApplyResources(this.lblDescription, "lblDescription");
this.lblDescription.Name = "lblDescription";
resources.ApplyResources(this.label1, "label1");
this.tableLayoutPanel1.SetColumnSpan(this.label1, 3);
this.label1.Name = "label1";
//
// lblName
//
resources.ApplyResources(this.lblName, "lblName");
this.lblName.Name = "lblName";
//
// label1
// txtName
//
resources.ApplyResources(this.label1, "label1");
this.tableLayoutPanel1.SetColumnSpan(this.label1, 4);
this.label1.Name = "label1";
resources.ApplyResources(this.txtName, "txtName");
this.txtName.Name = "txtName";
this.txtName.TextChanged += new System.EventHandler(this.txtName_TextChanged);
//
// lblDescription
//
resources.ApplyResources(this.lblDescription, "lblDescription");
this.lblDescription.Name = "lblDescription";
//
// txtDescription
//
resources.ApplyResources(this.txtDescription, "txtDescription");
this.txtDescription.Name = "txtDescription";
//
// NetWName
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.SystemColors.Control;
this.Controls.Add(this.panel1);
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "NetWName";
this.panel1.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
@ -101,8 +89,6 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label lblName;
private System.Windows.Forms.TextBox txtName;
private System.Windows.Forms.Label lblDescription;

View File

@ -31,11 +31,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using XenAdmin.Controls;
using XenAdmin.Core;
using XenAdmin.Network;
@ -50,9 +45,9 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
InitializeComponent();
}
public override string Text { get { return Messages.NETW_NAME_TEXT; } }
public override string Text => Messages.NETW_NAME_TEXT;
public override string PageTitle { get { return Messages.NETW_NAME_TITLE; } }
public override string PageTitle => Messages.NETW_NAME_TITLE;
public override bool EnableNext()
{
@ -61,7 +56,7 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
protected override void PageLoadedCore(PageLoadedDirection direction)
{
HelpersGUI.FocusFirstControl(Controls);
txtName.Focus();
}
protected override void PageLeaveCore(PageLoadedDirection direction, ref bool cancel)
@ -77,21 +72,9 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
public NetworkTypes SelectedNetworkType { private get; set; }
public string NetworkName
{
get
{
return this.txtName.Text;
}
}
public string NetworkName => txtName.Text;
public string NetworkDescription
{
get
{
return this.txtDescription.Text;
}
}
public string NetworkDescription => txtDescription.Text;
private string GetNetworkName(NetworkTypes network_type)
{

View File

@ -112,127 +112,61 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="panel1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="txtName.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="txtName.Location" type="System.Drawing.Point, System.Drawing">
<value>66, 43</value>
</data>
<data name="txtName.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="txtName.Size" type="System.Drawing.Size, System.Drawing">
<value>294, 20</value>
</data>
<data name="txtName.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="txtName.Text" xml:space="preserve">
<value>New Network (1)</value>
</data>
<data name="&gt;&gt;txtName.Name" xml:space="preserve">
<value>txtName</value>
</data>
<data name="&gt;&gt;txtName.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtName.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;txtName.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="txtDescription.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="txtDescription.Location" type="System.Drawing.Point, System.Drawing">
<value>66, 68</value>
</data>
<data name="txtDescription.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="txtDescription.Size" type="System.Drawing.Size, System.Drawing">
<value>294, 20</value>
</data>
<data name="txtDescription.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;txtDescription.Name" xml:space="preserve">
<value>txtDescription</value>
</data>
<data name="&gt;&gt;txtDescription.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtDescription.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;txtDescription.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="lblDescription.AutoSize" type="System.Boolean, mscorlib">
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblDescription.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="lblDescription.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 68</value>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value>
</data>
<data name="lblDescription.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 3, 0</value>
<data name="label1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 30</value>
</data>
<data name="lblDescription.Size" type="System.Drawing.Size, System.Drawing">
<value>63, 20</value>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>394, 13</value>
</data>
<data name="lblDescription.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="lblDescription.Text" xml:space="preserve">
<value>&amp;Description:</value>
<data name="label1.Text" xml:space="preserve">
<value>Provide a name and optional description for the new network.</value>
</data>
<data name="lblDescription.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;lblDescription.Name" xml:space="preserve">
<value>lblDescription</value>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblDescription.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblDescription.Parent" xml:space="preserve">
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;lblDescription.ZOrder" xml:space="preserve">
<value>2</value>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="lblName.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="lblName.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblName.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="lblName.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 43</value>
</data>
<data name="lblName.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
<value>3, 49</value>
</data>
<data name="lblName.Size" type="System.Drawing.Size, System.Drawing">
<value>66, 20</value>
<value>38, 13</value>
</data>
<data name="lblName.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
@ -247,48 +181,96 @@
<value>lblName</value>
</data>
<data name="&gt;&gt;lblName.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblName.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;lblName.ZOrder" xml:space="preserve">
<value>3</value>
<value>1</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<data name="txtName.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
<data name="txtName.Location" type="System.Drawing.Point, System.Drawing">
<value>72, 46</value>
</data>
<data name="label1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
<data name="txtName.Size" type="System.Drawing.Size, System.Drawing">
<value>285, 20</value>
</data>
<data name="label1.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 30</value>
<data name="txtName.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>400, 43</value>
<data name="txtName.Text" xml:space="preserve">
<value>New Network (1)</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
<data name="&gt;&gt;txtName.Name" xml:space="preserve">
<value>txtName</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Provide a name and optional description for the new network.</value>
<data name="&gt;&gt;txtName.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<data name="&gt;&gt;txtName.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<data name="&gt;&gt;txtName.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="lblDescription.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="lblDescription.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblDescription.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 80</value>
</data>
<data name="lblDescription.Size" type="System.Drawing.Size, System.Drawing">
<value>63, 13</value>
</data>
<data name="lblDescription.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="lblDescription.Text" xml:space="preserve">
<value>&amp;Description:</value>
</data>
<data name="lblDescription.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="&gt;&gt;lblDescription.Name" xml:space="preserve">
<value>lblDescription</value>
</data>
<data name="&gt;&gt;lblDescription.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblDescription.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;lblDescription.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="txtDescription.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="txtDescription.Location" type="System.Drawing.Point, System.Drawing">
<value>72, 77</value>
</data>
<data name="txtDescription.Size" type="System.Drawing.Size, System.Drawing">
<value>285, 20</value>
</data>
<data name="txtDescription.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;txtDescription.Name" xml:space="preserve">
<value>txtDescription</value>
</data>
<data name="&gt;&gt;txtDescription.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtDescription.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;txtDescription.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
@ -307,48 +289,24 @@
<value>400, 300</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>panel1</value>
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="txtName" Row="1" RowSpan="1" Column="1" ColumnSpan="2" /&gt;&lt;Control Name="txtDescription" Row="3" RowSpan="1" Column="1" ColumnSpan="2" /&gt;&lt;Control Name="lblDescription" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lblName" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label1" Row="0" RowSpan="1" Column="0" ColumnSpan="4" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100,Absolute,40,Absolute,40" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,Absolute,5,AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="label1" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /&gt;&lt;Control Name="lblName" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="txtName" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lblDescription" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="txtDescription" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100,Absolute,40,Absolute,20" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,Absolute,5,AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="panel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>400, 300</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">

View File

@ -100,15 +100,9 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
OnPageUpdated();
}
public PIF SelectedHostNic
{
get { return (PIF)comboBoxNicList.SelectedItem; }
}
public PIF SelectedHostNic => (PIF)comboBoxNicList.SelectedItem;
public bool isAutomaticAddNicToVM
{
get { return cbxAutomatic.Checked; }
}
public bool AddNicToVmsAutomatically => cbxAutomatic.Checked;
private void comboBoxNicList_SelectedIndexChanged(object sender, EventArgs e)
{

View File

@ -139,7 +139,7 @@
<value>286, 17</value>
</data>
<data name="cbxAutomatic.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<value>3</value>
</data>
<data name="cbxAutomatic.Text" xml:space="preserve">
<value>&amp;Automatically add this network to new virtual machines.</value>

View File

@ -31,7 +31,6 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NetWTypeSelect));
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.lblNetTypeSel = new System.Windows.Forms.Label();
this.rbtnExternalNetwork = new System.Windows.Forms.RadioButton();
this.labelExternalNetwork = new System.Windows.Forms.Label();
@ -43,50 +42,35 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
this.labelCHIN = new System.Windows.Forms.Label();
this.rbtnSriov = new System.Windows.Forms.RadioButton();
this.labelSriov = new System.Windows.Forms.Label();
this.warningsTable = new System.Windows.Forms.TableLayoutPanel();
this.iconWarningChinOption = new System.Windows.Forms.PictureBox();
this.warningTableChin = new System.Windows.Forms.TableLayoutPanel();
this.labelWarningChinOption = new System.Windows.Forms.Label();
this.iconWarningChinOption = new System.Windows.Forms.PictureBox();
this.warningTableSriov = new System.Windows.Forms.TableLayoutPanel();
this.iconWarningSriovOption = new System.Windows.Forms.PictureBox();
this.labelWarningSriovOption = new System.Windows.Forms.Label();
this.flowLayoutPanel1.SuspendLayout();
this.warningsTable.SuspendLayout();
this.iconWarningSriovOption = new System.Windows.Forms.PictureBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.warningTableChin.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.iconWarningChinOption)).BeginInit();
this.warningTableSriov.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.iconWarningSriovOption)).BeginInit();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// toolTip
//
this.toolTip.ShowAlways = true;
//
// flowLayoutPanel1
//
resources.ApplyResources(this.flowLayoutPanel1, "flowLayoutPanel1");
this.flowLayoutPanel1.Controls.Add(this.lblNetTypeSel);
this.flowLayoutPanel1.Controls.Add(this.rbtnExternalNetwork);
this.flowLayoutPanel1.Controls.Add(this.labelExternalNetwork);
this.flowLayoutPanel1.Controls.Add(this.rbtnInternalNetwork);
this.flowLayoutPanel1.Controls.Add(this.label1);
this.flowLayoutPanel1.Controls.Add(this.rbtnBondedNetwork);
this.flowLayoutPanel1.Controls.Add(this.label3);
this.flowLayoutPanel1.Controls.Add(this.rbtnCHIN);
this.flowLayoutPanel1.Controls.Add(this.labelCHIN);
this.flowLayoutPanel1.Controls.Add(this.rbtnSriov);
this.flowLayoutPanel1.Controls.Add(this.labelSriov);
this.flowLayoutPanel1.Controls.Add(this.warningsTable);
this.flowLayoutPanel1.Controls.Add(this.warningTableSriov);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
//
// lblNetTypeSel
//
resources.ApplyResources(this.lblNetTypeSel, "lblNetTypeSel");
this.tableLayoutPanel1.SetColumnSpan(this.lblNetTypeSel, 2);
this.lblNetTypeSel.Name = "lblNetTypeSel";
//
// rbtnExternalNetwork
//
resources.ApplyResources(this.rbtnExternalNetwork, "rbtnExternalNetwork");
this.rbtnExternalNetwork.Checked = true;
this.tableLayoutPanel1.SetColumnSpan(this.rbtnExternalNetwork, 2);
this.rbtnExternalNetwork.Name = "rbtnExternalNetwork";
this.rbtnExternalNetwork.TabStop = true;
this.rbtnExternalNetwork.UseVisualStyleBackColor = true;
@ -99,6 +83,7 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
// rbtnInternalNetwork
//
resources.ApplyResources(this.rbtnInternalNetwork, "rbtnInternalNetwork");
this.tableLayoutPanel1.SetColumnSpan(this.rbtnInternalNetwork, 2);
this.rbtnInternalNetwork.Name = "rbtnInternalNetwork";
this.rbtnInternalNetwork.UseVisualStyleBackColor = true;
//
@ -110,6 +95,7 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
// rbtnBondedNetwork
//
resources.ApplyResources(this.rbtnBondedNetwork, "rbtnBondedNetwork");
this.tableLayoutPanel1.SetColumnSpan(this.rbtnBondedNetwork, 2);
this.rbtnBondedNetwork.Name = "rbtnBondedNetwork";
this.rbtnBondedNetwork.UseVisualStyleBackColor = true;
//
@ -121,6 +107,7 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
// rbtnCHIN
//
resources.ApplyResources(this.rbtnCHIN, "rbtnCHIN");
this.tableLayoutPanel1.SetColumnSpan(this.rbtnCHIN, 2);
this.rbtnCHIN.Name = "rbtnCHIN";
this.rbtnCHIN.UseVisualStyleBackColor = true;
//
@ -132,6 +119,7 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
// rbtnSriov
//
resources.ApplyResources(this.rbtnSriov, "rbtnSriov");
this.tableLayoutPanel1.SetColumnSpan(this.rbtnSriov, 2);
this.rbtnSriov.Name = "rbtnSriov";
this.rbtnSriov.UseVisualStyleBackColor = true;
//
@ -140,12 +128,17 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
resources.ApplyResources(this.labelSriov, "labelSriov");
this.labelSriov.Name = "labelSriov";
//
// warningsTable
// warningTableChin
//
resources.ApplyResources(this.warningsTable, "warningsTable");
this.warningsTable.Controls.Add(this.iconWarningChinOption, 0, 1);
this.warningsTable.Controls.Add(this.labelWarningChinOption, 1, 1);
this.warningsTable.Name = "warningsTable";
resources.ApplyResources(this.warningTableChin, "warningTableChin");
this.warningTableChin.Controls.Add(this.labelWarningChinOption, 1, 0);
this.warningTableChin.Controls.Add(this.iconWarningChinOption, 0, 0);
this.warningTableChin.Name = "warningTableChin";
//
// labelWarningChinOption
//
resources.ApplyResources(this.labelWarningChinOption, "labelWarningChinOption");
this.labelWarningChinOption.Name = "labelWarningChinOption";
//
// iconWarningChinOption
//
@ -154,18 +147,18 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
this.iconWarningChinOption.Name = "iconWarningChinOption";
this.iconWarningChinOption.TabStop = false;
//
// labelWarningChinOption
//
resources.ApplyResources(this.labelWarningChinOption, "labelWarningChinOption");
this.labelWarningChinOption.Name = "labelWarningChinOption";
//
// warningTableSriov
//
resources.ApplyResources(this.warningTableSriov, "warningTableSriov");
this.warningTableSriov.Controls.Add(this.iconWarningSriovOption, 0, 1);
this.warningTableSriov.Controls.Add(this.labelWarningSriovOption, 1, 1);
this.warningTableSriov.Controls.Add(this.labelWarningSriovOption, 1, 0);
this.warningTableSriov.Controls.Add(this.iconWarningSriovOption, 0, 0);
this.warningTableSriov.Name = "warningTableSriov";
//
// labelWarningSriovOption
//
resources.ApplyResources(this.labelWarningSriovOption, "labelWarningSriovOption");
this.labelWarningSriovOption.Name = "labelWarningSriovOption";
//
// iconWarningSriovOption
//
resources.ApplyResources(this.iconWarningSriovOption, "iconWarningSriovOption");
@ -173,27 +166,39 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
this.iconWarningSriovOption.Name = "iconWarningSriovOption";
this.iconWarningSriovOption.TabStop = false;
//
// labelWarningSriovOption
// tableLayoutPanel1
//
resources.ApplyResources(this.labelWarningSriovOption, "labelWarningSriovOption");
this.labelWarningSriovOption.Name = "labelWarningSriovOption";
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.lblNetTypeSel, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.rbtnExternalNetwork, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.labelExternalNetwork, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.rbtnInternalNetwork, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.label1, 1, 4);
this.tableLayoutPanel1.Controls.Add(this.rbtnBondedNetwork, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.label3, 1, 6);
this.tableLayoutPanel1.Controls.Add(this.rbtnCHIN, 0, 7);
this.tableLayoutPanel1.Controls.Add(this.labelCHIN, 1, 8);
this.tableLayoutPanel1.Controls.Add(this.warningTableChin, 1, 9);
this.tableLayoutPanel1.Controls.Add(this.rbtnSriov, 0, 10);
this.tableLayoutPanel1.Controls.Add(this.labelSriov, 1, 11);
this.tableLayoutPanel1.Controls.Add(this.warningTableSriov, 1, 12);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// NetWTypeSelect
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.flowLayoutPanel1);
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "NetWTypeSelect";
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
this.warningsTable.ResumeLayout(false);
this.warningsTable.PerformLayout();
this.warningTableChin.ResumeLayout(false);
this.warningTableChin.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.iconWarningChinOption)).EndInit();
this.warningTableSriov.ResumeLayout(false);
this.warningTableSriov.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.iconWarningSriovOption)).EndInit();
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
@ -208,15 +213,15 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label labelCHIN;
private System.Windows.Forms.RadioButton rbtnCHIN;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.ToolTip toolTip;
private System.Windows.Forms.TableLayoutPanel warningsTable;
private System.Windows.Forms.PictureBox iconWarningChinOption;
private System.Windows.Forms.Label labelWarningChinOption;
private System.Windows.Forms.TableLayoutPanel warningTableChin;
private System.Windows.Forms.RadioButton rbtnSriov;
private System.Windows.Forms.Label labelSriov;
private System.Windows.Forms.TableLayoutPanel warningTableSriov;
private System.Windows.Forms.PictureBox iconWarningSriovOption;
private System.Windows.Forms.Label labelWarningSriovOption;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label labelWarningChinOption;
private System.Windows.Forms.PictureBox iconWarningChinOption;
}
}

View File

@ -32,12 +32,10 @@
using System;
using System.Linq;
using XenAdmin.Core;
using XenAdmin.Network;
using XenAPI;
using XenAdmin.Controls;
namespace XenAdmin.Wizards.NewNetworkWizard_Pages
{
public partial class NetWTypeSelect : XenTabPage
@ -45,91 +43,84 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
public NetWTypeSelect()
{
InitializeComponent();
this.rbtnExternalNetwork.Checked = true;
rbtnExternalNetwork.Checked = true;
}
public override string Text { get { return Messages.NETW_TYPE_SELECT_TEXT; } }
public override string Text => Messages.NETW_TYPE_SELECT_TEXT;
public override string PageTitle => Messages.NETW_TYPE_SELECT_TITLE;
public NetworkTypes SelectedNetworkType =>
rbtnBondedNetwork.Checked
? NetworkTypes.Bonded
: rbtnExternalNetwork.Checked
? NetworkTypes.External
: rbtnCHIN.Checked
? NetworkTypes.CHIN
: rbtnSriov.Checked
? NetworkTypes.SRIOV
: NetworkTypes.Internal;
public override string PageTitle { get { return Messages.NETW_TYPE_SELECT_TITLE; } }
public override void PopulatePage()
{
Update(Connection);
}
public NetworkTypes SelectedNetworkType
{
get
{
return rbtnBondedNetwork.Checked
? NetworkTypes.Bonded
: rbtnExternalNetwork.Checked
? NetworkTypes.External
: rbtnCHIN.Checked
? NetworkTypes.CHIN
: rbtnSriov.Checked
? NetworkTypes.SRIOV
: NetworkTypes.Internal;
}
}
private void Update(IXenConnection connection)
{
Host master = Helpers.GetMaster(connection);
if (master == null)
Pool pool = Helpers.GetPoolOfOne(Connection);
if (pool == null)
return;
Pool pool = Helpers.GetPoolOfOne(connection);
labelCHIN.Visible = rbtnCHIN.Visible = !HiddenFeatures.CrossServerPrivateNetworkHidden;
if (!pool.vSwitchController())
if (HiddenFeatures.CrossServerPrivateNetworkHidden || Helpers.StockholmOrGreater(Connection))
{
rbtnCHIN.Checked = false;
rbtnCHIN.Visible = labelCHIN.Visible = false;
warningTableChin.Visible = false;
}
else if (!pool.vSwitchController())
{
rbtnCHIN.Visible = labelCHIN.Visible = true;
rbtnCHIN.Enabled = labelCHIN.Enabled = false;
labelWarningChinOption.Text =
Helpers.FeatureForbidden(connection, Host.RestrictVSwitchController) ?
String.Format(Messages.FEATURE_DISABLED, Messages.CHIN) :
Messages.CHINS_NEED_VSWITCHCONTROLLER;
labelWarningChinOption.Text = Helpers.FeatureForbidden(Connection, Host.RestrictVSwitchController)
? string.Format(Messages.FEATURE_DISABLED, Messages.CHIN)
: Messages.CHINS_NEED_VSWITCHCONTROLLER;
iconWarningChinOption.Visible = labelWarningChinOption.Visible = !HiddenFeatures.CrossServerPrivateNetworkHidden;
rbtnExternalNetwork.Checked = true;
warningTableChin.Visible = true;
}
else
{
rbtnCHIN.Visible = labelCHIN.Visible = true;
rbtnCHIN.Enabled = labelCHIN.Enabled = true;
iconWarningChinOption.Visible = labelWarningChinOption.Visible = false;
warningTableChin.Visible = false;
}
bool hasNicCanEnableSriov = pool.Connection.Cache.PIFs.Any(pif => pif.IsPhysical() && pif.SriovCapable() && !pif.IsSriovPhysicalPIF());
bool sriovFeatureForbidden = Helpers.FeatureForbidden(connection, Host.RestrictSriovNetwork);
bool sriovFeatureForbidden = Helpers.FeatureForbidden(Connection, Host.RestrictSriovNetwork);
if (!Helpers.KolkataOrGreater(pool.Connection))
{
iconWarningSriovOption.Visible = labelWarningSriovOption.Visible = false;
rbtnSriov.Visible = labelSriov.Visible = false;
warningTableSriov.Visible = false;
}
else if (Helpers.FeatureForbidden(pool.Connection, Host.SriovNetworkDisabled) ||
sriovFeatureForbidden || !pool.HasSriovNic() || !hasNicCanEnableSriov)
sriovFeatureForbidden || !pool.HasSriovNic() || !hasNicCanEnableSriov)
{
rbtnSriov.Checked = false;
rbtnSriov.Visible = labelSriov.Visible = true;
rbtnSriov.Enabled = labelSriov.Enabled = false;
labelWarningSriovOption.Text =
Helpers.FeatureForbidden(pool.Connection, Host.SriovNetworkDisabled)
? String.Format(Messages.FEATURE_EXPERIMENTAL, Messages.NETWORK_SRIOV)
? string.Format(Messages.FEATURE_EXPERIMENTAL, Messages.NETWORK_SRIOV)
: sriovFeatureForbidden
? String.Format(Messages.FEATURE_DISABLED, Messages.NETWORK_SRIOV)
? string.Format(Messages.FEATURE_DISABLED, Messages.NETWORK_SRIOV)
: pool.HasSriovNic()
? Messages.NICS_ARE_SRIOV_ENABLED
: Messages.SRIOV_NEED_NICSUPPORT;
iconWarningSriovOption.Visible = labelWarningSriovOption.Visible = true;
warningTableSriov.Visible = true;
}
else
{
rbtnSriov.Enabled = labelCHIN.Enabled = true;
iconWarningSriovOption.Visible = labelWarningSriovOption.Visible = false;
rbtnSriov.Visible = labelSriov.Visible = true;
rbtnSriov.Enabled = labelSriov.Enabled = true;
warningTableSriov.Visible = false;
}
}
}

View File

@ -121,61 +121,28 @@
<value>17, 17</value>
</metadata>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="flowLayoutPanel1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblNetTypeSel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="lblNetTypeSel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="lblNetTypeSel.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="lblNetTypeSel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="lblNetTypeSel.Size" type="System.Drawing.Size, System.Drawing">
<value>279, 13</value>
</data>
<data name="lblNetTypeSel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="lblNetTypeSel.Text" xml:space="preserve">
<value>Select the type of new network you would like to create:</value>
</data>
<data name="lblNetTypeSel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="&gt;&gt;lblNetTypeSel.Name" xml:space="preserve">
<value>lblNetTypeSel</value>
</data>
<data name="&gt;&gt;lblNetTypeSel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblNetTypeSel.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
</data>
<data name="&gt;&gt;lblNetTypeSel.ZOrder" xml:space="preserve">
<value>0</value>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="rbtnExternalNetwork.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="rbtnExternalNetwork.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8.25pt, style=Bold</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="rbtnExternalNetwork.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="rbtnExternalNetwork.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 29</value>
<value>3, 23</value>
</data>
<data name="rbtnExternalNetwork.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>20, 10, 3, 3</value>
<value>3, 10, 3, 3</value>
</data>
<data name="rbtnExternalNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>122, 17</value>
@ -193,28 +160,25 @@
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rbtnExternalNetwork.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;rbtnExternalNetwork.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="labelExternalNetwork.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<data name="labelExternalNetwork.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelExternalNetwork.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="labelExternalNetwork.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelExternalNetwork.Location" type="System.Drawing.Point, System.Drawing">
<value>46, 49</value>
</data>
<data name="labelExternalNetwork.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>46, 0, 3, 3</value>
<value>18, 43</value>
</data>
<data name="labelExternalNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 13</value>
<value>409, 13</value>
</data>
<data name="labelExternalNetwork.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
@ -229,7 +193,7 @@
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelExternalNetwork.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelExternalNetwork.ZOrder" xml:space="preserve">
<value>2</value>
@ -244,10 +208,10 @@
<value>NoControl</value>
</data>
<data name="rbtnInternalNetwork.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 71</value>
<value>3, 66</value>
</data>
<data name="rbtnInternalNetwork.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>20, 6, 3, 3</value>
<value>3, 10, 3, 3</value>
</data>
<data name="rbtnInternalNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>196, 17</value>
@ -265,7 +229,7 @@
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rbtnInternalNetwork.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;rbtnInternalNetwork.ZOrder" xml:space="preserve">
<value>3</value>
@ -273,17 +237,17 @@
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>46, 91</value>
</data>
<data name="label1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>46, 0, 3, 3</value>
<value>18, 86</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 26</value>
<value>409, 26</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
@ -299,7 +263,7 @@ This can be used as a private connection between VMs on the same host.</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>4</value>
@ -314,10 +278,10 @@ This can be used as a private connection between VMs on the same host.</value>
<value>NoControl</value>
</data>
<data name="rbtnBondedNetwork.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 126</value>
<value>3, 122</value>
</data>
<data name="rbtnBondedNetwork.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>20, 6, 3, 3</value>
<value>3, 10, 3, 3</value>
</data>
<data name="rbtnBondedNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>117, 17</value>
@ -335,7 +299,7 @@ This can be used as a private connection between VMs on the same host.</value>
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rbtnBondedNetwork.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;rbtnBondedNetwork.ZOrder" xml:space="preserve">
<value>5</value>
@ -343,17 +307,17 @@ This can be used as a private connection between VMs on the same host.</value>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label3.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="label3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>46, 146</value>
</data>
<data name="label3.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>46, 0, 3, 3</value>
<value>18, 142</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>320, 26</value>
<value>409, 26</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
@ -369,7 +333,7 @@ This will create a single higher performing channel.</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>6</value>
@ -384,10 +348,10 @@ This will create a single higher performing channel.</value>
<value>NoControl</value>
</data>
<data name="rbtnCHIN.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 181</value>
<value>3, 178</value>
</data>
<data name="rbtnCHIN.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>20, 6, 3, 3</value>
<value>3, 10, 3, 3</value>
</data>
<data name="rbtnCHIN.Size" type="System.Drawing.Size, System.Drawing">
<value>193, 17</value>
@ -405,28 +369,25 @@ This will create a single higher performing channel.</value>
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rbtnCHIN.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;rbtnCHIN.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="labelCHIN.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<data name="labelCHIN.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelCHIN.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="labelCHIN.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelCHIN.Location" type="System.Drawing.Point, System.Drawing">
<value>46, 201</value>
</data>
<data name="labelCHIN.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>46, 0, 3, 3</value>
<value>18, 198</value>
</data>
<data name="labelCHIN.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 39</value>
<value>409, 39</value>
</data>
<data name="labelCHIN.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
@ -443,92 +404,50 @@ This type of network requires the vSwitch Controller to be running.</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelCHIN.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelCHIN.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="rbtnSriov.AutoSize" type="System.Boolean, mscorlib">
<data name="warningTableChin.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="rbtnSriov.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8.25pt, style=Bold</value>
</data>
<data name="rbtnSriov.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="rbtnSriov.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 249</value>
</data>
<data name="rbtnSriov.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>20, 6, 3, 3</value>
</data>
<data name="rbtnSriov.Size" type="System.Drawing.Size, System.Drawing">
<value>115, 17</value>
</data>
<data name="rbtnSriov.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="rbtnSriov.Text" xml:space="preserve">
<value>S&amp;R-IOV Network</value>
</data>
<data name="&gt;&gt;rbtnSriov.Name" xml:space="preserve">
<value>rbtnSriov</value>
</data>
<data name="&gt;&gt;rbtnSriov.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rbtnSriov.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
</data>
<data name="&gt;&gt;rbtnSriov.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="labelSriov.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<data name="labelSriov.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelSriov.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelSriov.Location" type="System.Drawing.Point, System.Drawing">
<value>46, 269</value>
</data>
<data name="labelSriov.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>46, 0, 3, 3</value>
</data>
<data name="labelSriov.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 13</value>
</data>
<data name="labelSriov.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="labelSriov.Text" xml:space="preserve">
<value>Enable SR-IOV on a NIC and create an SR-IOV network on that NIC.</value>
</data>
<data name="&gt;&gt;labelSriov.Name" xml:space="preserve">
<value>labelSriov</value>
</data>
<data name="&gt;&gt;labelSriov.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelSriov.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelSriov.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="warningsTable.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="warningsTable.ColumnCount" type="System.Int32, mscorlib">
<data name="warningTableChin.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="iconWarningChinOption.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<data name="labelWarningChinOption.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="labelWarningChinOption.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelWarningChinOption.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelWarningChinOption.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 4</value>
</data>
<data name="labelWarningChinOption.Size" type="System.Drawing.Size, System.Drawing">
<value>45, 13</value>
</data>
<data name="labelWarningChinOption.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="labelWarningChinOption.Text" xml:space="preserve">
<value>warning</value>
</data>
<data name="&gt;&gt;labelWarningChinOption.Name" xml:space="preserve">
<value>labelWarningChinOption</value>
</data>
<data name="&gt;&gt;labelWarningChinOption.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelWarningChinOption.Parent" xml:space="preserve">
<value>warningTableChin</value>
</data>
<data name="&gt;&gt;labelWarningChinOption.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="iconWarningChinOption.ErrorImage" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
@ -557,86 +476,146 @@ This type of network requires the vSwitch Controller to be running.</value>
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;iconWarningChinOption.Parent" xml:space="preserve">
<value>warningsTable</value>
<value>warningTableChin</value>
</data>
<data name="&gt;&gt;iconWarningChinOption.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="labelWarningChinOption.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="labelWarningChinOption.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelWarningChinOption.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelWarningChinOption.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 4</value>
</data>
<data name="labelWarningChinOption.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="labelWarningChinOption.Size" type="System.Drawing.Size, System.Drawing">
<value>45, 13</value>
</data>
<data name="labelWarningChinOption.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="labelWarningChinOption.Text" xml:space="preserve">
<value>warning</value>
</data>
<data name="&gt;&gt;labelWarningChinOption.Name" xml:space="preserve">
<value>labelWarningChinOption</value>
</data>
<data name="&gt;&gt;labelWarningChinOption.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelWarningChinOption.Parent" xml:space="preserve">
<value>warningsTable</value>
</data>
<data name="&gt;&gt;labelWarningChinOption.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="warningsTable.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 291</value>
<data name="warningTableChin.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="warningsTable.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 1</value>
<data name="warningTableChin.Location" type="System.Drawing.Point, System.Drawing">
<value>18, 240</value>
</data>
<data name="warningsTable.RowCount" type="System.Int32, mscorlib">
<value>2</value>
<data name="warningTableChin.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="warningsTable.Size" type="System.Drawing.Size, System.Drawing">
<value>73, 22</value>
<data name="warningTableChin.Size" type="System.Drawing.Size, System.Drawing">
<value>409, 22</value>
</data>
<data name="warningsTable.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
<data name="warningTableChin.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="&gt;&gt;warningsTable.Name" xml:space="preserve">
<value>warningsTable</value>
<data name="&gt;&gt;warningTableChin.Name" xml:space="preserve">
<value>warningTableChin</value>
</data>
<data name="&gt;&gt;warningsTable.Type" xml:space="preserve">
<data name="&gt;&gt;warningTableChin.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;warningsTable.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
<data name="&gt;&gt;warningTableChin.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;warningsTable.ZOrder" xml:space="preserve">
<data name="&gt;&gt;warningTableChin.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="warningTableChin.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="labelWarningChinOption" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="iconWarningChinOption" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="rbtnSriov.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="rbtnSriov.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8.25pt, style=Bold</value>
</data>
<data name="rbtnSriov.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="rbtnSriov.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 275</value>
</data>
<data name="rbtnSriov.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 10, 3, 3</value>
</data>
<data name="rbtnSriov.Size" type="System.Drawing.Size, System.Drawing">
<value>115, 17</value>
</data>
<data name="rbtnSriov.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="rbtnSriov.Text" xml:space="preserve">
<value>S&amp;R-IOV Network</value>
</data>
<data name="&gt;&gt;rbtnSriov.Name" xml:space="preserve">
<value>rbtnSriov</value>
</data>
<data name="&gt;&gt;rbtnSriov.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rbtnSriov.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;rbtnSriov.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="labelSriov.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelSriov.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="labelSriov.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelSriov.Location" type="System.Drawing.Point, System.Drawing">
<value>18, 295</value>
</data>
<data name="labelSriov.Size" type="System.Drawing.Size, System.Drawing">
<value>409, 13</value>
</data>
<data name="labelSriov.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="warningsTable.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="iconWarningChinOption" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="labelWarningChinOption" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
<data name="labelSriov.Text" xml:space="preserve">
<value>Enable SR-IOV on a NIC and create an SR-IOV network on that NIC.</value>
</data>
<data name="warningTableSriov.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
<data name="&gt;&gt;labelSriov.Name" xml:space="preserve">
<value>labelSriov</value>
</data>
<data name="&gt;&gt;labelSriov.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelSriov.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;labelSriov.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="warningTableSriov.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="iconWarningSriovOption.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<data name="labelWarningSriovOption.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="labelWarningSriovOption.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelWarningSriovOption.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelWarningSriovOption.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 4</value>
</data>
<data name="labelWarningSriovOption.Size" type="System.Drawing.Size, System.Drawing">
<value>45, 13</value>
</data>
<data name="labelWarningSriovOption.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="labelWarningSriovOption.Text" xml:space="preserve">
<value>warning</value>
</data>
<data name="&gt;&gt;labelWarningSriovOption.Name" xml:space="preserve">
<value>labelWarningSriovOption</value>
</data>
<data name="&gt;&gt;labelWarningSriovOption.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelWarningSriovOption.Parent" xml:space="preserve">
<value>warningTableSriov</value>
</data>
<data name="&gt;&gt;labelWarningSriovOption.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="iconWarningSriovOption.ErrorImage" type="System.Resources.ResXNullRef, System.Windows.Forms">
<value />
</data>
@ -668,55 +647,19 @@ This type of network requires the vSwitch Controller to be running.</value>
<value>warningTableSriov</value>
</data>
<data name="&gt;&gt;iconWarningSriovOption.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="labelWarningSriovOption.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="labelWarningSriovOption.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labelWarningSriovOption.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="labelWarningSriovOption.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 4</value>
</data>
<data name="labelWarningSriovOption.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="labelWarningSriovOption.Size" type="System.Drawing.Size, System.Drawing">
<value>45, 13</value>
</data>
<data name="labelWarningSriovOption.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="labelWarningSriovOption.Text" xml:space="preserve">
<value>warning</value>
</data>
<data name="&gt;&gt;labelWarningSriovOption.Name" xml:space="preserve">
<value>labelWarningSriovOption</value>
</data>
<data name="&gt;&gt;labelWarningSriovOption.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelWarningSriovOption.Parent" xml:space="preserve">
<value>warningTableSriov</value>
</data>
<data name="&gt;&gt;labelWarningSriovOption.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="warningTableSriov.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 314</value>
<data name="warningTableSriov.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="warningTableSriov.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 0, 3, 12</value>
<data name="warningTableSriov.Location" type="System.Drawing.Point, System.Drawing">
<value>18, 311</value>
</data>
<data name="warningTableSriov.RowCount" type="System.Int32, mscorlib">
<value>2</value>
<value>1</value>
</data>
<data name="warningTableSriov.Size" type="System.Drawing.Size, System.Drawing">
<value>73, 22</value>
<value>409, 22</value>
</data>
<data name="warningTableSriov.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
@ -728,36 +671,72 @@ This type of network requires the vSwitch Controller to be running.</value>
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;warningTableSriov.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;warningTableSriov.ZOrder" xml:space="preserve">
<value>12</value>
</data>
<data name="warningTableSriov.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="iconWarningSriovOption" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="labelWarningSriovOption" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="labelWarningSriovOption" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="iconWarningSriovOption" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="flowLayoutPanel1.FlowDirection" type="System.Windows.Forms.FlowDirection, System.Windows.Forms">
<value>TopDown</value>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="flowLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="flowLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>504, 395</value>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="flowLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>430, 360</value>
</data>
<data name="&gt;&gt;flowLayoutPanel1.Name" xml:space="preserve">
<value>flowLayoutPanel1</value>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;flowLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;flowLayoutPanel1.Parent" xml:space="preserve">
<data name="&gt;&gt;tableLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;flowLayoutPanel1.ZOrder" xml:space="preserve">
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="lblNetTypeSel" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="rbtnExternalNetwork" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="labelExternalNetwork" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="rbtnInternalNetwork" Row="3" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="label1" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="rbtnBondedNetwork" Row="5" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="label3" Row="6" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="rbtnCHIN" Row="7" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="labelCHIN" Row="8" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="warningTableChin" Row="9" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="rbtnSriov" Row="10" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="labelSriov" Row="11" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="warningTableSriov" Row="12" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Absolute,15,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="lblNetTypeSel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lblNetTypeSel.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value>
</data>
<data name="lblNetTypeSel.Size" type="System.Drawing.Size, System.Drawing">
<value>279, 13</value>
</data>
<data name="lblNetTypeSel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="lblNetTypeSel.Text" xml:space="preserve">
<value>Select the type of new network you would like to create:</value>
</data>
<data name="lblNetTypeSel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="&gt;&gt;lblNetTypeSel.Name" xml:space="preserve">
<value>lblNetTypeSel</value>
</data>
<data name="&gt;&gt;lblNetTypeSel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblNetTypeSel.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;lblNetTypeSel.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@ -769,11 +748,8 @@ This type of network requires the vSwitch Controller to be running.</value>
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8.25pt</value>
</data>
<data name="$this.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 32, 0, 0</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>430, 358</value>
<value>430, 360</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Select Type</value>

View File

@ -122,7 +122,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
HelpersGUI.PerformIQNCheck();
if (direction == PageLoadedDirection.Forward)
HelpersGUI.FocusFirstControl(Controls);
textBoxIscsiHost.Focus();
}
protected override void PageLeaveCore(PageLoadedDirection direction, ref bool cancel)

View File

@ -109,7 +109,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
protected override void PageLoadedCore(PageLoadedDirection direction)
{
if (direction == PageLoadedDirection.Forward)
HelpersGUI.FocusFirstControl(Controls);
NfsServerPathComboBox.Focus();
}
#endregion

View File

@ -74,7 +74,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages
protected override void PageLoadedCore(PageLoadedDirection direction)
{
if (direction == PageLoadedDirection.Forward)
HelpersGUI.FocusFirstControl(Controls);
textBoxName.Focus();
}
public override void PopulatePage()

View File

@ -356,6 +356,18 @@ namespace XenAdmin.Wizards.PatchingWizard
groups.Add(new CheckGroup(Messages.CHECKING_HOST_LIVENESS_STATUS, livenessChecks));
if (WizardMode == WizardMode.NewVersion)
{
//vSwitch controller check - for each pool
var vSwitchChecks = (from Pool pool in SelectedPools
let check = new VSwitchControllerCheck(pool.Connection.Resolve(pool.master), UpdateAlert?.NewServerVersion)
where check.CanRun()
select check as Check).ToList();
if (vSwitchChecks.Count > 0)
groups.Add(new CheckGroup(Messages.CHECKING_VSWITCH_CONTROLLER_GROUP, vSwitchChecks));
}
//HA checks
var haChecks = new List<Check>();
@ -490,15 +502,15 @@ namespace XenAdmin.Wizards.PatchingWizard
}
//PVGuestsCheck checks
if (highestNewVersion != null || UpdateAlert?.NewServerVersion != null)
{
var pvChecks = new List<Check>();
foreach (var pool in SelectedPools.Where(p => Helpers.NaplesOrGreater(p.Connection)))
{
if (pool.Connection.Resolve(pool.master) != null)
pvChecks.Add(new PVGuestsCheck(pool, false));
}
//PVGuestsCheck checks
var pvChecks = (from Pool pool in SelectedPools
let check = new PVGuestsCheck(pool.Connection.Resolve(pool.master), false)
where check.CanRun()
select check as Check).ToList();
if (pvChecks.Count > 0)
groups.Add(new CheckGroup(Messages.CHECKING_PV_GUESTS, pvChecks));
}

View File

@ -179,7 +179,7 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
var hotfixChecks = new List<Check>();
foreach (var host in hostsToUpgrade)
{
if (new HotfixFactory().IsHotfixRequired(host) && !ManualUpgrade)
if (HotfixFactory.IsHotfixRequired(host) && !ManualUpgrade)
hotfixChecks.Add(new HostHasHotfixCheck(host));
}
if (hotfixChecks.Count > 0)
@ -199,6 +199,15 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
groups.Add(new CheckGroup(Messages.CHECKING_SAFE_TO_UPGRADE, safeToUpgradeChecks));
}
//vSwitch controller check - for each pool
var vSwitchChecks = (from Host server in SelectedMasters
let check = new VSwitchControllerCheck(server, InstallMethodConfig, ManualUpgrade)
where check.CanRun()
select check as Check).ToList();
if (vSwitchChecks.Count > 0)
groups.Add(new CheckGroup(Messages.CHECKING_VSWITCH_CONTROLLER_GROUP, vSwitchChecks));
//HA checks - for each pool
var haChecks = (from Host server in SelectedMasters
select new HAOffCheck(server) as Check).ToList();
@ -239,12 +248,11 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
}
//Checking PV guests - for hosts that have any PV guests and warn the user before the upgrade.
var pvChecks = new List<Check>();
foreach (Pool pool in SelectedPools.Where(p => !Helpers.QuebecOrGreater(p.Connection)))
{
if (pool.Connection.Resolve(pool.master) != null)
pvChecks.Add(new PVGuestsCheck(pool, true, InstallMethodConfig, ManualUpgrade));
}
var pvChecks = (from Host server in SelectedMasters
let check = new PVGuestsCheck(server, true, ManualUpgrade, InstallMethodConfig)
where check.CanRun()
select check as Check).ToList();
if (pvChecks.Count > 0)
groups.Add(new CheckGroup(Messages.CHECKING_PV_GUESTS, pvChecks));

View File

@ -241,6 +241,7 @@
<Compile Include="Diagnostics\Checks\SafeToUpgradeCheck.cs" />
<Compile Include="Diagnostics\Checks\HostHasUnsupportedStorageLinkSRCheck.cs" />
<Compile Include="Diagnostics\Checks\ServerSelectionCheck.cs" />
<Compile Include="Diagnostics\Checks\VSwitchControllerCheck.cs" />
<Compile Include="Diagnostics\Checks\XenCenterVersionCheck.cs" />
<Compile Include="Diagnostics\Checks\HostMemoryPostUpgradeCheck.cs" />
<Compile Include="Diagnostics\Problems\PoolProblem\PoolHasPVGuestWarningUrl.cs" />
@ -257,6 +258,7 @@
<Compile Include="Diagnostics\Problems\PoolProblem\CPUIncompatibilityProblem.cs" />
<Compile Include="Diagnostics\Problems\PoolProblem\NotLicensedForAutomatedUpdatesWarning.cs" />
<Compile Include="Diagnostics\Problems\PoolProblem\ServerSelectionProblem.cs" />
<Compile Include="Diagnostics\Problems\PoolProblem\VSwitchControllerProblem.cs" />
<Compile Include="Diagnostics\Problems\ProblemWithInformationUrl.cs" />
<Compile Include="Diagnostics\Problems\SRProblem\UnsupportedStorageLinkSrIsPresentProblem.cs" />
<Compile Include="Diagnostics\Problems\UtilityProblem\CfuNotAvailableProblem.cs" />

View File

@ -63,6 +63,8 @@ namespace XenAdmin.Core
public static string ProductVersion81 => Get("PRODUCT_VERSION_8_1");
public static string ProductVersion82 => Get("PRODUCT_VERSION_8_2");
public const string PRODUCT_BRAND = "[XenServer product]";
public const string COMPANY_NAME_SHORT = "[Citrix]";

View File

@ -7293,6 +7293,24 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to vSwitch Controller check.
/// </summary>
public static string CHECKING_VSWITCH_CONTROLLER {
get {
return ResourceManager.GetString("CHECKING_VSWITCH_CONTROLLER", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Checking vSwitch Controller configuration.
/// </summary>
public static string CHECKING_VSWITCH_CONTROLLER_GROUP {
get {
return ResourceManager.GetString("CHECKING_VSWITCH_CONTROLLER_GROUP", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Checking [XenCenter] version.
/// </summary>
@ -21000,6 +21018,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Invalid disk size.
/// </summary>
public static string INVALID_DISK_SIZE {
get {
return ResourceManager.GetString("INVALID_DISK_SIZE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Invalid host name.
/// </summary>
@ -21010,7 +21037,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to Invalid disk size.
/// Looks up a localized string similar to Invalid number.
/// </summary>
public static string INVALID_NUMBER {
get {
@ -21356,7 +21383,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to Learn more.
/// Looks up a localized string similar to Learn more....
/// </summary>
public static string LEARN_MORE {
get {
@ -24536,6 +24563,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Allowed VLAN range: {0} to {1}.
/// </summary>
public static string NETW_DETAILS_VLAN_RANGE {
get {
return ResourceManager.GetString("NETW_DETAILS_VLAN_RANGE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Configure the new network.
/// </summary>
@ -24590,6 +24626,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to VLAN 0 will receive all traffic not on any other VLAN.
/// </summary>
public static string NETW_VLAN_ZERO {
get {
return ResourceManager.GetString("NETW_VLAN_ZERO", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Network.
/// </summary>
@ -30103,7 +30148,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to {0}: Support for paravirtualized (PV) guests is dropped as of [XenServer] {1}. Click &quot;Learn more&quot; to see the list of supported guest operating systems. .
/// Looks up a localized string similar to {0}: Support for paravirtualized (PV) guests has been removed in {1}. Click Learn more to see the list of supported guest operating systems..
/// </summary>
public static string POOL_HAS_PV_GUEST_WARNING {
get {
@ -30539,6 +30584,33 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to {0}: Support for the vSwitch Controller has been removed in {1}..
/// </summary>
public static string PROBLEM_VSWITCH_CONTROLLER_DESCRIPTION {
get {
return ResourceManager.GetString("PROBLEM_VSWITCH_CONTROLLER_DESCRIPTION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Support for the vSwitch Controller has been removed in {0}. You must deconfigure the controller because any features that require it will no longer work. Please click the link below for more information..
/// </summary>
public static string PROBLEM_VSWITCH_CONTROLLER_INFO_ERROR {
get {
return ResourceManager.GetString("PROBLEM_VSWITCH_CONTROLLER_INFO_ERROR", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to If you are upgrading to {0} and above, you must deconfigure the vSwitch Controller because support for it has been removed in this release and any features that require it will no longer work. Please click the link below for more information..
/// </summary>
public static string PROBLEM_VSWITCH_CONTROLLER_INFO_WARNING {
get {
return ResourceManager.GetString("PROBLEM_VSWITCH_CONTROLLER_INFO_WARNING", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [XenCenter] version.
/// </summary>
@ -31789,9 +31861,18 @@ namespace XenAdmin {
/// <summary>
/// Looks up a localized string similar to {0}: The required hotfix is not installed.
/// </summary>
public static string REQUIRED_HOTFIX_ISNOT_INSTALLED {
public static string REQUIRED_HOTFIX_NOT_INSTALLED {
get {
return ResourceManager.GetString("REQUIRED_HOTFIX_ISNOT_INSTALLED", resourceCulture);
return ResourceManager.GetString("REQUIRED_HOTFIX_NOT_INSTALLED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0}: Check skipped because the required hotfix is not installed.
/// </summary>
public static string REQUIRED_HOTFIX_NOT_INSTALLED_WARNING {
get {
return ResourceManager.GetString("REQUIRED_HOTFIX_NOT_INSTALLED_WARNING", resourceCulture);
}
}
@ -39544,24 +39625,6 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Your new network will be mapped to an existing physical network interface and assigned a VLAN number to use on that interface. You can select the physical interface you would like to use below..
/// </summary>
public static string WIZARD_DESC_NETWORK_SETTINGS_EXTERNAL {
get {
return ResourceManager.GetString("WIZARD_DESC_NETWORK_SETTINGS_EXTERNAL", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Check the box below if you would like to automatically add this network to new VMs..
/// </summary>
public static string WIZARD_DESC_NETWORK_SETTINGS_INTERNAL {
get {
return ResourceManager.GetString("WIZARD_DESC_NETWORK_SETTINGS_INTERNAL", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to There was an internal error completing this wizard. Please see the logs for more information..
/// </summary>
@ -41693,6 +41756,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to [XenServer] {0}.
/// </summary>
public static string XENSERVER_8_2 {
get {
return ResourceManager.GetString("XENSERVER_8_2", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [XenServer] Templates.
/// </summary>

View File

@ -2616,6 +2616,12 @@ Do you want to assign it to the schedule '{2}' instead?</value>
<data name="CHECKING_SAFE_TO_UPGRADE_DESCRIPTION" xml:space="preserve">
<value>Host partition layout check</value>
</data>
<data name="CHECKING_VSWITCH_CONTROLLER" xml:space="preserve">
<value>vSwitch Controller check</value>
</data>
<data name="CHECKING_VSWITCH_CONTROLLER_GROUP" xml:space="preserve">
<value>Checking vSwitch Controller configuration</value>
</data>
<data name="CHECKING_SERVER_NEEDS_REBOOT" xml:space="preserve">
<value>Checking reboots required</value>
</data>
@ -7295,11 +7301,14 @@ This might result in failure to migrate VMs to this server during the RPU or to
<data name="INTERFACES_COUNT" xml:space="preserve">
<value>Interfaces: {0}</value>
</data>
<data name="INVALID_DISK_SIZE" xml:space="preserve">
<value>Invalid disk size</value>
</data>
<data name="INVALID_HOST" xml:space="preserve">
<value>Invalid host name</value>
</data>
<data name="INVALID_NUMBER" xml:space="preserve">
<value>Invalid disk size</value>
<value>Invalid number</value>
</data>
<data name="INVALID_PARAMETER" xml:space="preserve">
<value>Invalid parameter</value>
@ -7429,7 +7438,7 @@ Size: {3}</value>
<value>License Manager</value>
</data>
<data name="LEARN_MORE" xml:space="preserve">
<value>Learn more</value>
<value>Learn more...</value>
</data>
<data name="LEAVING_AD" xml:space="preserve">
<value>Enter a user name and password with sufficient privileges to remove your machine account from AD. Authentication will be disabled even if the machine account cannot be removed.</value>
@ -8663,6 +8672,9 @@ You should only proceed if you have verified that these settings are correct.</v
<data name="NETW_DETAILS_VLAN_NUMBER_IN_USE" xml:space="preserve">
<value>This VLAN number is already in use</value>
</data>
<data name="NETW_DETAILS_VLAN_RANGE" xml:space="preserve">
<value>Allowed VLAN range: {0} to {1}</value>
</data>
<data name="NETW_EXTERNAL_DETAILS_TITLE" xml:space="preserve">
<value>Configure the new network</value>
</data>
@ -8681,6 +8693,9 @@ You should only proceed if you have verified that these settings are correct.</v
<data name="NETW_TYPE_SELECT_TITLE" xml:space="preserve">
<value>Choose the type of network to create</value>
</data>
<data name="NETW_VLAN_ZERO" xml:space="preserve">
<value>VLAN 0 will receive all traffic not on any other VLAN</value>
</data>
<data name="NEVER" xml:space="preserve">
<value>Never</value>
</data>
@ -10479,7 +10494,7 @@ Please reconnect the host and try again</value>
<value>This pool has no shared storage</value>
</data>
<data name="POOL_HAS_PV_GUEST_WARNING" xml:space="preserve">
<value>{0}: Support for paravirtualized (PV) guests is dropped as of [XenServer] {1}. Click "Learn more" to see the list of supported guest operating systems. </value>
<value>{0}: Support for paravirtualized (PV) guests has been removed in {1}. Click Learn more to see the list of supported guest operating systems.</value>
</data>
<data name="POOL_IS_PARTIALLY_LICENSED" xml:space="preserve">
<value>The pool is partially licensed</value>
@ -10556,6 +10571,15 @@ Please reconnect the host and try again</value>
<data name="PROBLEM_HOSTPROBLEM_TITLE" xml:space="preserve">
<value>Server '{0}'</value>
</data>
<data name="PROBLEM_VSWITCH_CONTROLLER_DESCRIPTION" xml:space="preserve">
<value>{0}: Support for the vSwitch Controller has been removed in {1}.</value>
</data>
<data name="PROBLEM_VSWITCH_CONTROLLER_INFO_ERROR" xml:space="preserve">
<value>Support for the vSwitch Controller has been removed in {0}. You must deconfigure the controller because any features that require it will no longer work. Please click the link below for more information.</value>
</data>
<data name="PROBLEM_VSWITCH_CONTROLLER_INFO_WARNING" xml:space="preserve">
<value>If you are upgrading to {0} and above, you must deconfigure the vSwitch Controller because support for it has been removed in this release and any features that require it will no longer work. Please click the link below for more information.</value>
</data>
<data name="PROBLEM_MAC_ADDRESS_IS_DUPLICATE" xml:space="preserve">
<value>The MAC address entered has already been assigned to the VM:
{1}
@ -11037,9 +11061,12 @@ Click Server Status Report to open the Compile Server Status Report Wizard or cl
<data name="REPEATED_KEY" xml:space="preserve">
<value>Repeated key</value>
</data>
<data name="REQUIRED_HOTFIX_ISNOT_INSTALLED" xml:space="preserve">
<data name="REQUIRED_HOTFIX_NOT_INSTALLED" xml:space="preserve">
<value>{0}: The required hotfix is not installed</value>
</data>
<data name="REQUIRED_HOTFIX_NOT_INSTALLED_WARNING" xml:space="preserve">
<value>{0}: Check skipped because the required hotfix is not installed</value>
</data>
<data name="REQUIRED_UPDATES" xml:space="preserve">
<value>Required Updates</value>
</data>
@ -13656,12 +13683,6 @@ Schedule:
<data name="WIZARD_BUTTON_NEXT" xml:space="preserve">
<value>&amp;Next &gt;</value>
</data>
<data name="WIZARD_DESC_NETWORK_SETTINGS_EXTERNAL" xml:space="preserve">
<value>Your new network will be mapped to an existing physical network interface and assigned a VLAN number to use on that interface. You can select the physical interface you would like to use below.</value>
</data>
<data name="WIZARD_DESC_NETWORK_SETTINGS_INTERNAL" xml:space="preserve">
<value>Check the box below if you would like to automatically add this network to new VMs.</value>
</data>
<data name="WIZARD_INTERNAL_ERROR" xml:space="preserve">
<value>There was an internal error completing this wizard. Please see the logs for more information.</value>
</data>
@ -14371,6 +14392,9 @@ Are you sure you want to enable automated power management for this Host?</value
<data name="XENSERVER_8_1" xml:space="preserve">
<value>[XenServer] {0}</value>
</data>
<data name="XENSERVER_8_2" xml:space="preserve">
<value>[XenServer] {0}</value>
</data>
<data name="XENSERVER_TEMPLATES" xml:space="preserve">
<value>[XenServer] Templates</value>
</data>

View File

@ -39,6 +39,7 @@ using XenAdmin;
using XenAdmin.Core;
using XenAdmin.Network;
using System.Diagnostics;
using System.Web.Script.Serialization;
namespace XenAPI
@ -1225,7 +1226,6 @@ namespace XenAPI
return vm != null ? vm.memory_static_max - vm.memory_static_min : 0;
}
/// <summary>
/// Friendly string showing memory usage on the host
/// </summary>
@ -1582,6 +1582,28 @@ namespace XenAPI
!Helpers.FeatureForbidden(Connection, RestrictIntegratedGpuPassthrough);
}
public static bool TryGetUpgradeVersion(Host host, Dictionary<string, string> installMethodConfig,
out string platformVersion, out string productVersion)
{
platformVersion = productVersion = null;
try
{
var result = call_plugin(host.Connection.Session, host.opaque_ref,
"prepare_host_upgrade.py", "getVersion", installMethodConfig);
var serializer = new JavaScriptSerializer();
var version = (Dictionary<string, object>)serializer.DeserializeObject(result);
platformVersion = version.ContainsKey("platform-version") ? (string)version["platform-version"] : null;
productVersion = version.ContainsKey("product-version") ? (string)version["product-version"] : null;
return platformVersion != null || productVersion != null;
}
catch (Exception exception)
{
log.WarnFormat("Plugin call prepare_host_upgrade.getVersion on {0} failed with {1}", host.Name(), exception.Message);
return false;
}
}
#region IEquatable<Host> Members
/// <summary>