CP-14647: Intermediate check-in #1

This commit is contained in:
Stephen Turner 2015-10-26 16:01:55 +00:00
parent d9cd979a44
commit b587ab832e
118 changed files with 543 additions and 2006 deletions

View File

@ -188,7 +188,7 @@ namespace XenAdmin.Actions
{
ShellCmd cmd = _menuItemFeature.ShellCmd;
RbacMethodList methodsToCheck = cmd.RequiredMethods.Count == 0 ? _menuItemFeature.GetMethodList(cmd.RequiredMethodList) : cmd.RequiredMethods;
if (methodsToCheck == null || xenConnection.Session == null || xenConnection.Session.IsLocalSuperuser || !Helpers.MidnightRideOrGreater(xenConnection))
if (methodsToCheck == null || xenConnection.Session == null || xenConnection.Session.IsLocalSuperuser)
{
return;
}

View File

@ -72,7 +72,6 @@ namespace XenAdmin.Actions.Wlb
ApiMethodsToRoleCheck.Add("pool.sync_database");
ApiMethodsToRoleCheck.Add("pool.set_ha_host_failures_to_tolerate");
ApiMethodsToRoleCheck.Add("vm.set_ha_restart_priority");
ApiMethodsToRoleCheck.Add("vm.set_ha_always_run");
ApiMethodsToRoleCheck.Add("vm.assert_can_boot_here");
ApiMethodsToRoleCheck.Add("vm.assert_agile");
@ -405,12 +404,6 @@ namespace XenAdmin.Actions.Wlb
/// <param name="end">progress bar end point</param>
private static void SetHaProtection(bool protect, AsyncAction action, VM vm, int start, int end)
{
if (!Helpers.BostonOrGreater(vm.Connection))
{
// Enable or disable HA protection for the VM.
XenAPI.VM.set_ha_always_run(action.Session, vm.opaque_ref, protect);
}
// Do database sync. Helps to ensure that the change persists over master failover.
action.RelatedTask = XenAPI.Pool.async_sync_database(action.Session);
action.PollToCompletion(start, end);

View File

@ -51,7 +51,7 @@ namespace XenAdmin.Actions
{
Util.ThrowIfEnumerableParameterNullOrEmpty(connections, "connections");
_connections = Util.GetList(connections).FindAll(c => c.IsConnected && Helpers.GetPoolOfOne(c) != null && Helpers.MidnightRideOrGreater(c) && !Helpers.FeatureForbidden(c, XenAPI.Host.RestrictStorageChoices));
_connections = Util.GetList(connections).FindAll(c => c.IsConnected && Helpers.GetPoolOfOne(c) != null && !Helpers.FeatureForbidden(c, XenAPI.Host.RestrictStorageChoices));
_host = host;
_username = username;
_password = password;

View File

@ -64,11 +64,6 @@ namespace XenAdmin.Actions
throw new ArgumentException("Pool not licensed.", "host");
}
if (!Helpers.MidnightRideOrGreater(connection))
{
throw new ArgumentException("Pool must by Midnight Ride or later.", "host");
}
XenAPI.Pool pool = Helpers.GetPool(Connection);
if (pool != null)

View File

@ -124,7 +124,7 @@ namespace XenAdmin.Commands
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
return selection.FirstAsXenObject != null && selection.FirstAsXenObject.Connection != null && selection.FirstAsXenObject.Connection.IsConnected && Helpers.BostonOrGreater(selection.FirstAsXenObject.Connection)
return selection.FirstAsXenObject != null && selection.FirstAsXenObject.Connection != null && selection.FirstAsXenObject.Connection.IsConnected
&& (selection.PoolAncestor != null || selection.HostAncestor != null); //CA-61207: this check ensures there's no cross-pool selection
}

View File

@ -100,7 +100,7 @@ namespace XenAdmin.Commands
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
return selection.Count == 1 && selection.FirstAsXenObject != null && selection.FirstAsXenObject.Connection != null && Helpers.BostonOrGreater(selection.FirstAsXenObject.Connection);
return selection.Count == 1 && selection.FirstAsXenObject != null && selection.FirstAsXenObject.Connection != null;
}
public override string ContextMenuText

View File

@ -103,7 +103,7 @@ namespace XenAdmin.Commands
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
return selection.Count == 1 && selection.FirstAsXenObject != null && selection.FirstAsXenObject.Connection != null && Helpers.BostonOrGreater(selection.FirstAsXenObject.Connection);
return selection.Count == 1 && selection.FirstAsXenObject != null && selection.FirstAsXenObject.Connection != null;
}
public override string ContextMenuText

View File

@ -100,7 +100,7 @@ namespace XenAdmin.Commands
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
return selection.Count==1&&selection.FirstAsXenObject != null && selection.FirstAsXenObject.Connection != null && Helpers.BostonOrGreater(selection.FirstAsXenObject.Connection);
return selection.Count==1 && selection.FirstAsXenObject != null && selection.FirstAsXenObject.Connection != null;
}
public override string ContextMenuText

View File

@ -82,20 +82,7 @@ namespace XenAdmin.Commands
// We just want one, so that we can name it.
PIF pif = pifs[0];
string new_name;
string msg;
if (network != null && !Helpers.BostonOrGreater(network.Connection) && network.Connection.ResolveAll(network.VIFs).Count > 0)
{
// We have a live pre-Boston network. Tell the user that we're going to rename it.
new_name = Helpers.MakeUniqueName(Messages.RENAMED_BOND, GetAllNetworkNames(network.Connection));
msg = string.Format(Messages.DELETE_BOND_WITH_VIFS_MESSAGE, pif.Name, new_name);
}
else
{
// It's not in use -- delete the network as well as the bonds and PIFs.
new_name = null;
msg = string.Format(Messages.DELETE_BOND_MESSAGE, pif.Name);
}
string msg = string.Format(Messages.DELETE_BOND_MESSAGE, pif.Name);
bool will_disturb_primary = NetworkingHelper.ContainsPrimaryManagement(pifs);
bool will_disturb_secondary = NetworkingHelper.ContainsSecondaryManagement(pifs);
@ -147,7 +134,7 @@ namespace XenAdmin.Commands
// done the right thing and that the bond hasn't been deleted in the meantime. (CA-27436).
Bond bond = pif.BondMasterOf;
if (bond != null)
new Actions.DestroyBondAction(bond, new_name).RunAsync();
new Actions.DestroyBondAction(bond, null).RunAsync();
}
}
}

View File

@ -97,7 +97,7 @@ namespace XenAdmin.Commands
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
return selection.FirstAsXenObject != null && selection.FirstAsXenObject.Connection != null && selection.FirstAsXenObject.Connection.IsConnected && Helpers.BostonOrGreater(selection.FirstAsXenObject.Connection)
return selection.FirstAsXenObject != null && selection.FirstAsXenObject.Connection != null && selection.FirstAsXenObject.Connection.IsConnected
&& (selection.PoolAncestor != null || selection.HostAncestor != null); //CA-61207: this check ensures there's no cross-pool selection
}
@ -137,14 +137,5 @@ namespace XenAdmin.Commands
return Messages.DISASTER_RECOVERY_CONTEXT_MENU;
}
}
protected override string GetCantExecuteReasonCore(SelectedItem item)
{
if (!Helpers.BostonOrGreater(item.XenObject.Connection))
return Messages.ONLY_IN_BOSTON_OR_LATER;
return base.GetCantExecuteReasonCore(item);
}
}
}

View File

@ -103,14 +103,5 @@ namespace XenAdmin.Commands
}
return false;
}
protected override string GetCantExecuteReasonCore(SelectedItem item)
{
IXenConnection connection = item.Connection;
Host best_host = item.HostAncestor ?? (connection == null ? null : Helpers.GetMaster(connection));
bool george_or_greater = best_host != null && Helpers.GeorgeOrGreater(best_host);
return george_or_greater ? base.GetCantExecuteReasonCore(item) : string.Format(Messages.FEATURE_NOT_AVAILABLE_NEED_GEORGE, Messages.WLB);
}
}
}

View File

@ -79,7 +79,7 @@ namespace XenAdmin.Commands
if (pool == null)
return;
if (Helpers.FeatureForbidden(pool, Host.RestrictHAFloodgate))
if (Helpers.FeatureForbidden(pool, Host.RestrictHA))
{
// Show upsell dialog
UpsellDialog dlg = new UpsellDialog(Messages.UPSELL_BLURB_HA, InvisibleMessages.UPSELL_LEARNMOREURL_HA);
@ -113,7 +113,7 @@ namespace XenAdmin.Commands
{
Host master = Helpers.GetMaster(poolAncestor.Connection);
if (master == null || master.RestrictHAOrlando || HelpersGUI.FindActiveHaAction(poolAncestor.Connection) != null || poolAncestor.Locked)
if (master == null || HelpersGUI.FindActiveHaAction(poolAncestor.Connection) != null || poolAncestor.Locked)
{
return false;
}
@ -135,7 +135,7 @@ namespace XenAdmin.Commands
{
Host master = Helpers.GetMaster(poolAncestor.Connection);
if (master == null || master.RestrictHAOrlando)
if (master == null)
{
return Messages.FIELD_DISABLED;
}

View File

@ -73,8 +73,6 @@ namespace XenAdmin.Commands
if (selection.Count == 1)
{
IXenConnection connection = selection[0].Connection;
if (!XenAdmin.Core.Helpers.GeorgeOrGreater(connection))
return false;
bool connected = connection != null && connection.IsConnected;
Host host = selection[0].XenObject as Host;
bool is_host = (host != null);

View File

@ -310,8 +310,6 @@ namespace XenAdmin.Commands
if (xenConnection.Session == null)
return false;
if (!Helpers.MidnightRideOrGreater(xenConnection))
return true;
RbacMethodList r = new RbacMethodList("http/connect_console");
if (Role.CanPerform(r, xenConnection, false))
return true;

View File

@ -74,8 +74,6 @@ namespace XenAdmin.Commands
if (selection.Count == 1)
{
IXenConnection connection = selection[0].Connection;
if (!XenAdmin.Core.Helpers.GeorgeOrGreater(connection))
return false;
bool connected = connection != null && connection.IsConnected;
bool inPool = selection[0].PoolAncestor != null;

View File

@ -131,7 +131,7 @@ namespace XenAdmin.Commands
private static bool CanExecute(VM vm)
{
return vm != null && !vm.is_a_template && !vm.Locked && Helpers.GeorgeOrGreater(vm.Connection) && (vm.allowed_operations.Contains(vm_operations.snapshot) || vm.allowed_operations.Contains(vm_operations.checkpoint));
return vm != null && !vm.is_a_template && !vm.Locked && (vm.allowed_operations.Contains(vm_operations.snapshot) || vm.allowed_operations.Contains(vm_operations.checkpoint));
}
protected override bool CanExecuteCore(SelectedItemCollection selection)
@ -153,23 +153,6 @@ namespace XenAdmin.Commands
}
}
protected override string GetCantExecuteReasonCore(SelectedItem item)
{
Host host = item.HostAncestor;
if (host == null && item.Connection != null)
{
host = Helpers.GetMaster(item.Connection);
}
if (host == null || !Helpers.GeorgeOrGreater(host))
{
return Messages.SNAPSHOT_REQUIRE_GEORGE;
}
return base.GetCantExecuteReasonCore(item);
}
public override string MenuText
{
get

View File

@ -98,19 +98,6 @@ namespace XenAdmin.Commands
&& (selection.PoolAncestor != null || selection.HostAncestor != null); //CA-61207: this check ensures there's no cross-pool selection
}
protected override string GetCantExecuteReasonCore(SelectedItem item)
{
Pool poolAncestor = item.PoolAncestor;
if (poolAncestor != null)
{
string reason = VMGroup<T>.CantExecuteReason(poolAncestor.Connection);
if (!string.IsNullOrEmpty(reason))
return reason;
}
return base.GetCantExecuteReasonCore(item);
}
public override string ContextMenuText
{
get

View File

@ -123,14 +123,5 @@ namespace XenAdmin.Commands
}
return false;
}
protected override string GetCantExecuteReasonCore(SelectedItem item)
{
IXenConnection connection = item.Connection;
Host best_host = item.HostAncestor ?? (connection == null ? null : Helpers.GetMaster(connection));
bool george_or_greater = best_host != null && Helpers.GeorgeOrGreater(best_host);
return george_or_greater ? base.GetCantExecuteReasonCore(item) : string.Format(Messages.FEATURE_NOT_AVAILABLE_NEED_GEORGE, Messages.WLB);
}
}
}

View File

@ -118,8 +118,7 @@ namespace XenAdmin.Controls
labelLoggedInAs.Visible = true;
// get the logged in username from the session to update the logged in label
if (connection.Session.IsLocalSuperuser || XenAdmin.Core.Helpers.GetMaster(connection).external_auth_type != Auth.AUTH_TYPE_AD ||
!Helpers.MidnightRideOrGreater(Connection))
if (connection.Session.IsLocalSuperuser || XenAdmin.Core.Helpers.GetMaster(connection).external_auth_type != Auth.AUTH_TYPE_AD)
{
labelUsername.Text = connection.Session.UserFriendlyName;
}

View File

@ -214,7 +214,6 @@ namespace XenAdmin.Controls
this.tableLayoutPanelBondMode.Controls.Add(this.radioButtonLacpSrcMac, 0, 3);
this.tableLayoutPanelBondMode.Controls.Add(this.radioButtonBalanceSlb, 0, 0);
this.tableLayoutPanelBondMode.Controls.Add(this.radioButtonActiveBackup, 0, 1);
this.tableLayoutPanelBondMode.MinimumSize = new System.Drawing.Size(0, 40);
this.tableLayoutPanelBondMode.Name = "tableLayoutPanelBondMode";
//
// radioButtonLacpTcpudpPorts

View File

@ -215,22 +215,13 @@ namespace XenAdmin.Controls
private void ShowHideControls()
{
labelMTU.Visible = numericUpDownMTU.Visible = Helpers.CowleyOrGreater(Connection);
groupBoxBondMode.Visible = Helpers.BostonOrGreater(Connection);
radioButtonLacpSrcMac.Visible = radioButtonLacpTcpudpPorts.Visible = Helpers.SupportsLinkAggregationBond(Connection);
}
private string PIFDescription(PIF pif)
{
Bond bond = pif.BondSlaveOf;
if (bond != null)
return string.Format(Messages.ALREADY_IN_BOND, bond.Name);
XenAPI.Network network = Connection.Resolve(pif.network);
if (network != null && !Helpers.BostonOrGreater(network.Connection) && network.HasActiveVIFs) // in Boston, can make a bond even if there are active VMs (PR-1006)
return Messages.PIF_IN_USE_BY_VMS;
return "";
return bond == null ? "" : string.Format(Messages.ALREADY_IN_BOND, bond.Name);
}
internal DialogResult ShowCreationWarning()

View File

@ -112,20 +112,20 @@
<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" />
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="cbxAutomatic.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</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="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" />
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="cbxAutomatic.CheckAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>TopLeft</value>
</data>
@ -169,7 +169,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>panelLACPWarning</value>
@ -199,7 +199,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>panelLACPWarning</value>
@ -229,7 +229,7 @@
<value>panelLACPWarning</value>
</data>
<data name="&gt;&gt;panelLACPWarning.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panelLACPWarning.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -250,7 +250,7 @@
<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>
@ -261,7 +261,7 @@
<data name="dataGridView1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<metadata name="ColumnCheckBox.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="ColumnCheckBox.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnCheckBox.HeaderText" xml:space="preserve">
@ -270,7 +270,7 @@
<data name="ColumnCheckBox.Width" type="System.Int32, mscorlib">
<value>5</value>
</data>
<metadata name="ColumnNic.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="ColumnNic.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnNic.HeaderText" xml:space="preserve">
@ -279,7 +279,7 @@
<data name="ColumnNic.Width" type="System.Int32, mscorlib">
<value>50</value>
</data>
<metadata name="ColumnMac.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="ColumnMac.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnMac.HeaderText" xml:space="preserve">
@ -288,7 +288,7 @@
<data name="ColumnMac.Width" type="System.Int32, mscorlib">
<value>55</value>
</data>
<metadata name="ColumnLinkStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="ColumnLinkStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnLinkStatus.HeaderText" xml:space="preserve">
@ -297,7 +297,7 @@
<data name="ColumnLinkStatus.Width" type="System.Int32, mscorlib">
<value>85</value>
</data>
<metadata name="ColumnSpeed.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="ColumnSpeed.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnSpeed.HeaderText" xml:space="preserve">
@ -306,7 +306,7 @@
<data name="ColumnSpeed.Width" type="System.Int32, mscorlib">
<value>63</value>
</data>
<metadata name="ColumnDuplex.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="ColumnDuplex.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnDuplex.HeaderText" xml:space="preserve">
@ -315,7 +315,7 @@
<data name="ColumnDuplex.Width" type="System.Int32, mscorlib">
<value>65</value>
</data>
<metadata name="ColumnVendor.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="ColumnVendor.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnVendor.HeaderText" xml:space="preserve">
@ -324,7 +324,7 @@
<data name="ColumnVendor.Width" type="System.Int32, mscorlib">
<value>66</value>
</data>
<metadata name="ColumnDevice.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="ColumnDevice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnDevice.HeaderText" xml:space="preserve">
@ -333,7 +333,7 @@
<data name="ColumnDevice.Width" type="System.Int32, mscorlib">
<value>66</value>
</data>
<metadata name="ColumnPci.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="ColumnPci.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnPci.HeaderText" xml:space="preserve">
@ -355,7 +355,7 @@
<value>dataGridView1</value>
</data>
<data name="&gt;&gt;dataGridView1.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;dataGridView1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -391,7 +391,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>
@ -436,7 +436,7 @@
<value>radioButtonLacpTcpudpPorts</value>
</data>
<data name="&gt;&gt;radioButtonLacpTcpudpPorts.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonLacpTcpudpPorts.Parent" xml:space="preserve">
<value>tableLayoutPanelBondMode</value>
@ -466,7 +466,7 @@
<value>radioButtonLacpSrcMac</value>
</data>
<data name="&gt;&gt;radioButtonLacpSrcMac.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonLacpSrcMac.Parent" xml:space="preserve">
<value>tableLayoutPanelBondMode</value>
@ -496,7 +496,7 @@
<value>radioButtonBalanceSlb</value>
</data>
<data name="&gt;&gt;radioButtonBalanceSlb.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonBalanceSlb.Parent" xml:space="preserve">
<value>tableLayoutPanelBondMode</value>
@ -526,7 +526,7 @@
<value>radioButtonActiveBackup</value>
</data>
<data name="&gt;&gt;radioButtonActiveBackup.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonActiveBackup.Parent" xml:space="preserve">
<value>tableLayoutPanelBondMode</value>
@ -543,6 +543,9 @@
<data name="tableLayoutPanelBondMode.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="tableLayoutPanelBondMode.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>0, 40</value>
</data>
<data name="tableLayoutPanelBondMode.RowCount" type="System.Int32, mscorlib">
<value>4</value>
</data>
@ -556,7 +559,7 @@
<value>tableLayoutPanelBondMode</value>
</data>
<data name="&gt;&gt;tableLayoutPanelBondMode.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;tableLayoutPanelBondMode.Parent" xml:space="preserve">
<value>groupBoxBondMode</value>
@ -592,7 +595,7 @@
<value>groupBoxBondMode</value>
</data>
<data name="&gt;&gt;groupBoxBondMode.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBoxBondMode.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -619,7 +622,7 @@
<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>
@ -655,7 +658,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>
@ -708,7 +711,7 @@
<data name="dataGridViewTextBoxColumn8.HeaderText" xml:space="preserve">
<value>PCI Bus Path</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">
@ -721,108 +724,108 @@
<value>ColumnCheckBox</value>
</data>
<data name="&gt;&gt;ColumnCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewCheckBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewCheckBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnNic.Name" xml:space="preserve">
<value>ColumnNic</value>
</data>
<data name="&gt;&gt;ColumnNic.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnMac.Name" xml:space="preserve">
<value>ColumnMac</value>
</data>
<data name="&gt;&gt;ColumnMac.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnLinkStatus.Name" xml:space="preserve">
<value>ColumnLinkStatus</value>
</data>
<data name="&gt;&gt;ColumnLinkStatus.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnSpeed.Name" xml:space="preserve">
<value>ColumnSpeed</value>
</data>
<data name="&gt;&gt;ColumnSpeed.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnDuplex.Name" xml:space="preserve">
<value>ColumnDuplex</value>
</data>
<data name="&gt;&gt;ColumnDuplex.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnVendor.Name" xml:space="preserve">
<value>ColumnVendor</value>
</data>
<data name="&gt;&gt;ColumnVendor.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnDevice.Name" xml:space="preserve">
<value>ColumnDevice</value>
</data>
<data name="&gt;&gt;ColumnDevice.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnPci.Name" xml:space="preserve">
<value>ColumnPci</value>
</data>
<data name="&gt;&gt;ColumnPci.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn1.Name" xml:space="preserve">
<value>dataGridViewTextBoxColumn1</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn1.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn2.Name" xml:space="preserve">
<value>dataGridViewTextBoxColumn2</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn2.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn3.Name" xml:space="preserve">
<value>dataGridViewTextBoxColumn3</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn3.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn4.Name" xml:space="preserve">
<value>dataGridViewTextBoxColumn4</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn4.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn5.Name" xml:space="preserve">
<value>dataGridViewTextBoxColumn5</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn5.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn6.Name" xml:space="preserve">
<value>dataGridViewTextBoxColumn6</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn6.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn7.Name" xml:space="preserve">
<value>dataGridViewTextBoxColumn7</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn7.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn8.Name" xml:space="preserve">
<value>dataGridViewTextBoxColumn8</value>
</data>
<data name="&gt;&gt;dataGridViewTextBoxColumn8.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>BondDetails</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -221,7 +221,7 @@ namespace XenAdmin.Controls
public static bool RbacDenied(VM source, out List<Role> AllowedRoles)
{
if (source == null || source.Connection == null || !Helpers.MidnightRideOrGreater(source.Connection))
if (source == null || source.Connection == null)
{
AllowedRoles = null;
return false;

View File

@ -455,7 +455,6 @@ namespace XenAdmin.Controls.CustomDataGraph
get
{
return !XenObject.Connection.Session.IsLocalSuperuser &&
Helpers.MidnightRideOrGreater(XenObject.Connection) &&
!Registry.DontSudo;
}
}

View File

@ -42,7 +42,6 @@
resources.ApplyResources(this.panelWithBorder, "panelWithBorder");
this.panelWithBorder.BackColor = System.Drawing.Color.Transparent;
this.panelWithBorder.Controls.Add(this.containerPanel);
this.panelWithBorder.MinimumSize = new System.Drawing.Size(755, 30);
this.panelWithBorder.Name = "panelWithBorder";
//
// containerPanel
@ -50,7 +49,6 @@
resources.ApplyResources(this.containerPanel, "containerPanel");
this.containerPanel.Controls.Add(this.placementPolicyLabel);
this.containerPanel.Controls.Add(this.editPlacementPolicyButton);
this.containerPanel.MinimumSize = new System.Drawing.Size(755, 33);
this.containerPanel.Name = "containerPanel";
//
// placementPolicyLabel
@ -73,7 +71,6 @@
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.panelWithBorder);
this.DoubleBuffered = true;
this.MinimumSize = new System.Drawing.Size(400, 32);
this.Name = "GpuPlacementPolicyPanel";
this.VisibleChanged += new System.EventHandler(this.GpuPlacementPolicyPanel_VisibleChanged);
this.panelWithBorder.ResumeLayout(false);

View File

@ -112,16 +112,16 @@
<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="panelWithBorder.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="panelWithBorder.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
@ -140,7 +140,7 @@
<data name="placementPolicyLabel.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="placementPolicyLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 7</value>
</data>
@ -160,7 +160,7 @@
<value>placementPolicyLabel</value>
</data>
<data name="&gt;&gt;placementPolicyLabel.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;placementPolicyLabel.Parent" xml:space="preserve">
<value>containerPanel</value>
@ -193,7 +193,7 @@
<value>editPlacementPolicyButton</value>
</data>
<data name="&gt;&gt;editPlacementPolicyButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;editPlacementPolicyButton.Parent" xml:space="preserve">
<value>containerPanel</value>
@ -204,6 +204,9 @@
<data name="containerPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>1, 1</value>
</data>
<data name="containerPanel.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>755, 33</value>
</data>
<data name="containerPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>1046, 33</value>
</data>
@ -217,7 +220,7 @@
<value>containerPanel</value>
</data>
<data name="&gt;&gt;containerPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;containerPanel.Parent" xml:space="preserve">
<value>panelWithBorder</value>
@ -234,6 +237,9 @@
<data name="panelWithBorder.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="panelWithBorder.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>755, 30</value>
</data>
<data name="panelWithBorder.Size" type="System.Drawing.Size, System.Drawing">
<value>755, 35</value>
</data>
@ -252,7 +258,7 @@
<data name="&gt;&gt;panelWithBorder.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">
@ -264,6 +270,9 @@
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>400, 32</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>464, 35</value>
</data>
@ -271,6 +280,6 @@
<value>GpuPlacementPolicyPanel</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -114,7 +114,9 @@ namespace XenAdmin.Controls.MainWindowControls
Search.SearchesChanged += PopulateSearchDropDown;
PopulateSearchDropDown();
buttonInfraBig.Checked = true;
// TODO: Remove
// comment markers
// buttonInfraBig.Checked = true;
}
protected override void OnResize(EventArgs e)

View File

@ -167,7 +167,8 @@ namespace XenAdmin.Controls.NetworkingTab
this.VlanColumn,
this.AutoColumn,
this.LinkStatusColumn,
this.NetworkMacColumn});
this.NetworkMacColumn,
this.MtuColumn});
//CA-47050: the Description column should be autosized to Fill, but should not become smaller than a minimum
//width, which here is chosen to be the column header width. To find what this width is set temporarily the
@ -176,10 +177,6 @@ namespace XenAdmin.Controls.NetworkingTab
int storedWidth = this.DescriptionColumn.Width;
this.DescriptionColumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
this.DescriptionColumn.MinimumWidth = storedWidth;
// add MTU to grid view on Network tab for pools and hosts, for Cowley or greater only (CA-45643)
if (Helpers.CowleyOrGreater(_xenObject.Connection))
NetworksGridView.Columns.Add(this.MtuColumn);
}
finally
{
@ -904,11 +901,8 @@ namespace XenAdmin.Controls.NetworkingTab
VlanCell,
AutoCell,
LinkStatusCell,
MacCell);
// add MTU to grid view on Network tab for pools and hosts, for Cowley or greater only (CA-45643)
if (Helpers.CowleyOrGreater(Xmo.Connection))
Cells.Add(this.MtuCell);
MacCell,
MtuCell);
Network.PropertyChanged += Server_PropertyChanged;

View File

@ -837,8 +837,6 @@ namespace XenAdmin.Controls.Wlb
private bool PassedRbacChecks()
{
if (!Helpers.MidnightRideOrGreater(_pool.Connection))
return true;
return Role.CanPerform(WLB_PERMISSION_CHECKS, this._pool.Connection);
}
#endregion

View File

@ -182,23 +182,8 @@ namespace XenAdmin.Core
return false;
return typeof(T) == typeof(VMPP) ?
Helpers.CowleyOrGreater(connection) && Registry.VMPRFeatureEnabled :
Helpers.BostonOrGreater(connection);
}
internal static string CantExecuteReason(IXenConnection connection)
{
if (typeof(T) == typeof(VMPP))
{
if (!Helpers.CowleyOrGreater(connection))
return Messages.ONLY_IN_COWLEY_OR_LATER;
}
else
{
if (!Helpers.BostonOrGreater(connection))
return Messages.ONLY_IN_BOSTON_OR_LATER;
}
return null;
Registry.VMPRFeatureEnabled :
true;
}
internal static Predicate<Host> FeatureRestricted

View File

@ -64,23 +64,12 @@ namespace XenAdmin.Diagnostics.Checks
return new HostDoesNotHaveHotfix(this, Host);
}
if (Helpers.BostonOrGreater(Host) && !Helpers.SanibelOrGreater(Host)
if (!Helpers.SanibelOrGreater(Host)
&& hotfixFactory.Hotfix(HotfixFactory.HotfixableServerVersion.Boston).ShouldBeAppliedTo(Host))
{
return new HostDoesNotHaveHotfix(this, Host);
}
if (Helpers.CowleyOrGreater(Host) && !Helpers.BostonOrGreater(Host)
&& hotfixFactory.Hotfix(HotfixFactory.HotfixableServerVersion.Cowley).ShouldBeAppliedTo(Host))
{
return new HostDoesNotHaveHotfix(this, Host);
}
if (Helpers.MidnightRideOrGreater(Host) && !Helpers.CowleyOrGreater(Host)
&& hotfixFactory.Hotfix(HotfixFactory.HotfixableServerVersion.MNR).ShouldBeAppliedTo(Host))
{
return new HostDoesNotHaveHotfix(this, Host);
}
return null;
}

View File

@ -94,12 +94,8 @@ namespace XenAdmin.Diagnostics.Hotfixing
return Hotfix(HotfixableServerVersion.Creedence);
if (Helpers.SanibelOrGreater(host) && !Helpers.CreedenceOrGreater(host))
return Hotfix(HotfixableServerVersion.SanibelToClearwater);
if (Helpers.BostonOrGreater(host) && !Helpers.SanibelOrGreater(host))
if (!Helpers.SanibelOrGreater(host))
return Hotfix(HotfixableServerVersion.Boston);
if (Helpers.CowleyOrGreater(host) && !Helpers.BostonOrGreater(host))
return Hotfix(HotfixableServerVersion.Cowley);
if (Helpers.MidnightRideOrGreater(host) && !Helpers.CowleyOrGreater(host))
return Hotfix(HotfixableServerVersion.MNR);
return null;
}

View File

@ -112,16 +112,16 @@
<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" />
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnCancel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Right</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="btnCancel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
@ -134,7 +134,7 @@
<data name="btnCancel.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</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="btnCancel.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
@ -145,7 +145,7 @@
<value>btnCancel</value>
</data>
<data name="&gt;&gt;btnCancel.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnCancel.Parent" xml:space="preserve">
<value>flowLayoutPanel2</value>
@ -178,7 +178,7 @@
<value>btnOK</value>
</data>
<data name="&gt;&gt;btnOK.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnOK.Parent" xml:space="preserve">
<value>flowLayoutPanel2</value>
@ -202,7 +202,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>flowLayoutPanel1</value>
@ -253,7 +253,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>flowLayoutPanel1</value>
@ -280,7 +280,7 @@
<value>flowLayoutPanel1</value>
</data>
<data name="&gt;&gt;flowLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;flowLayoutPanel1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -316,7 +316,7 @@
<value>flowLayoutPanel2</value>
</data>
<data name="&gt;&gt;flowLayoutPanel2.Type" xml:space="preserve">
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;flowLayoutPanel2.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -355,7 +355,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>tableLayoutPanel2</value>
@ -391,7 +391,7 @@
<value>label3</value>
</data>
<data name="&gt;&gt;label3.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;label3.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
@ -427,7 +427,7 @@
<value>label4</value>
</data>
<data name="&gt;&gt;label4.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;label4.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
@ -463,7 +463,7 @@
<value>label5</value>
</data>
<data name="&gt;&gt;label5.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;label5.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
@ -493,7 +493,7 @@
<value>UsernameTextBox</value>
</data>
<data name="&gt;&gt;UsernameTextBox.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;UsernameTextBox.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
@ -523,7 +523,7 @@
<value>OldPasswordTextBox</value>
</data>
<data name="&gt;&gt;OldPasswordTextBox.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;OldPasswordTextBox.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
@ -553,7 +553,7 @@
<value>NewPasswordTextBox</value>
</data>
<data name="&gt;&gt;NewPasswordTextBox.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;NewPasswordTextBox.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
@ -583,7 +583,7 @@
<value>ConfirmPasswordTextBox</value>
</data>
<data name="&gt;&gt;ConfirmPasswordTextBox.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ConfirmPasswordTextBox.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
@ -613,7 +613,7 @@
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.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;tableLayoutPanel2.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -646,7 +646,7 @@
<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>
@ -657,7 +657,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="flowLayoutPanel1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="flowLayoutPanel2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="tableLayoutPanel2" 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,AutoSize,0" /&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

@ -813,7 +813,6 @@ namespace XenAdmin.Dialogs
List<Role> validRoles = new List<Role>();
if (!connection.Session.IsLocalSuperuser
&& Helpers.MidnightRideOrGreater(connection)
&& !Registry.DontSudo
&& !Role.CanPerform(new RbacMethodList(rbacMethods), connection, out validRoles))
{

View File

@ -144,7 +144,7 @@ namespace XenAdmin.Dialogs
}
var dontShow = new List<string>();
foreach (IXenConnection c in ConnectionsManager.XenConnectionsCopy.FindAll(c => c.IsConnected && Helpers.MidnightRideOrGreater(c)))
foreach (IXenConnection c in ConnectionsManager.XenConnectionsCopy.FindAll(c => c.IsConnected))
{
foreach (VDI vdi in c.Cache.VDIs)
{

View File

@ -66,7 +66,7 @@ namespace XenAdmin.Dialogs
//This check used to be "_expiresText != Messages.LICENSE_NEVER" but I've swapped it for
//"!host.isOEM" according to the ticket CA-37336 where this 3rd part of the check was added
//OEM licenses (< XS ver 5.5) have perpetual (2036) expiry dates
return host.IsFreeLicense() && host.IsFloodgateOrLater() && !host.isOEM && !Helpers.ClearwaterOrGreater(host);
return host.IsFreeLicense() && !host.isOEM && !Helpers.ClearwaterOrGreater(host);
}
public static bool CanActivate(Pool pool)

View File

@ -86,7 +86,6 @@ namespace XenAdmin.Dialogs
IXenObject xo = comboBox.Items[i] as IXenObject;
if (xo != null
&& (xo.Connection.Session.IsLocalSuperuser
|| !Helpers.MidnightRideOrGreater(xo.Connection)
|| !XenAdmin.Commands.CrossConnectionCommand.IsReadOnly(xo.Connection)))
{
nonReadOnlyIndex = i;

View File

@ -150,18 +150,8 @@ namespace XenAdmin.Dialogs
{
ShowTab(VCpuMemoryEditPage = new CPUMemoryEditPage());
ShowTab(StartupOptionsEditPage = new BootOptionsEditPage());
if (!Helpers.BostonOrGreater(xenObjectCopy.Connection) && Helpers.FeatureForbidden(xenObjectCopy, Host.RestrictHAFloodgate))
{
VMHAUpsellEditPage = new UpsellPage {Image = Properties.Resources._001_PowerOn_h32bit_16, Text = Messages.START_UP_OPTIONS};
VMHAUpsellEditPage.SetAllTexts(Messages.UPSELL_BLURB_HA, InvisibleMessages.UPSELL_LEARNMOREURL_HA);
ShowTab(VMHAUpsellEditPage);
}
else
{
ShowTab(VMHAEditPage = new VMHAEditPage {VerticalTabs = verticalTabs});
}
}
if (is_vm || is_host || (is_sr && Helpers.ClearwaterOrGreater(connection)))
{
@ -189,24 +179,16 @@ namespace XenAdmin.Dialogs
{
ShowTab(PerfmonAlertOptionsEditPage = new PerfmonAlertOptionsPage());
}
if (!Helpers.FeatureForbidden(xenObjectCopy, Host.RestrictStorageChoices)
&& !Helpers.BostonOrGreater(xenObjectCopy.Connection)
&& Helpers.MidnightRideOrGreater(xenObjectCopy.Connection))
ShowTab(StorageLinkPage = new StorageLinkEditPage());
}
if (is_host)
{
ShowTab(hostMultipathPage1 = new HostMultipathPage());
if (Helpers.MidnightRideOrGreater(xenObject.Connection))
ShowTab(HostPowerONEditPage = new HostPowerONEditPage());
ShowTab(LogDestinationEditPage = new LogDestinationEditPage());
}
if (is_pool && Helpers.MidnightRideOrGreater(xenObject.Connection))
if (is_pool)
ShowTab(PoolPowerONEditPage = new PoolPowerONEditPage());
if ((is_pool_or_standalone && Helpers.VGpuCapability(xenObjectCopy.Connection))
@ -225,8 +207,6 @@ namespace XenAdmin.Dialogs
ShowTab(HomeServerPage = new HomeServerEditPage());
if (is_vm && ((VM)xenObjectCopy).CanHaveGpu)
{
if (Helpers.BostonOrGreater(xenObject.Connection))
{
if (Helpers.FeatureForbidden(xenObjectCopy, Host.RestrictGpu))
{
@ -239,7 +219,6 @@ namespace XenAdmin.Dialogs
ShowTab(GpuEditPage = new GpuEditPage());
}
}
}
if (is_hvm)
{

View File

@ -145,9 +145,7 @@ namespace XenAdmin.Dialogs
private void pictureBoxQuiesceInfo_Click(object sender, EventArgs e)
{
string tt;
if (!Helpers.MidnightRideOrGreater(_VM.Connection))
tt = string.Format(Messages.FEATURE_NOT_AVAILABLE_NEED_MR_PLURAL, Messages.QUIESCED_SNAPSHOTS);
else if (Helpers.FeatureForbidden(_VM, Host.RestrictVss))
if (Helpers.FeatureForbidden(_VM, Host.RestrictVss))
tt = Messages.FIELD_DISABLED;
else if (_VM.power_state != vm_power_state.Running)
tt = Messages.INFO_QUIESCE_MODE_POWER_STATE.Replace("\\n", "\n");
@ -176,9 +174,7 @@ namespace XenAdmin.Dialogs
private void CheckpointInfoPictureBox_Click(object sender, EventArgs e)
{
string tt;
if (!Helpers.MidnightRideOrGreater(_VM.Connection))
tt = string.Format(Messages.FEATURE_NOT_AVAILABLE_NEED_MR_ENTERPRISE_OR_PLATINUM_PLURAL.Replace("\\n", "\n"), Messages.DISKMEMORY_SNAPSHOTS);
else if (Helpers.FeatureForbidden(_VM, Host.RestrictCheckpoint))
if (Helpers.FeatureForbidden(_VM, Host.RestrictCheckpoint))
tt = string.Format(Messages.FEATURE_NOT_AVAILABLE_NEED_ENTERPRISE_OR_PLATINUM_PLURAL.Replace("\\n", "\n"), Messages.DISKMEMORY_SNAPSHOTS);
else if (_VM.power_state != vm_power_state.Running)
tt = Messages.INFO_DISKMEMORY_MODE_POWER_STATE.Replace("\\n", "\n");

View File

@ -1322,13 +1322,9 @@ namespace XenAdmin
// 'Home' tab is only visible if the 'Overview' tree node is selected, or if the tree is
// empty (i.e. at startup).
bool show_home = SelectionManager.Selection.Count == 1 && SelectionManager.Selection[0].Value == null;
// Only show the HA tab if the host's license has the HA flag set
bool has_ha_license_flag = selectionMaster != null && !selectionMaster.RestrictHAOrlando;
bool george_or_greater = Helpers.GeorgeOrGreater(selectionConnection);
bool mr_or_greater = Helpers.MidnightRideOrGreater(selectionConnection);
// The upsell pages use the first selected XenObject: but they're only shown if there is only one selected object (see calls to ShowTab() below).
bool dmc_upsell = Helpers.FeatureForbidden(SelectionManager.Selection.FirstAsXenObject, Host.RestrictDMC);
bool ha_upsell = Helpers.FeatureForbidden(SelectionManager.Selection.FirstAsXenObject, Host.RestrictHAFloodgate);
bool ha_upsell = Helpers.FeatureForbidden(SelectionManager.Selection.FirstAsXenObject, Host.RestrictHA);
bool wlb_upsell = Helpers.FeatureForbidden(SelectionManager.Selection.FirstAsXenObject, Host.RestrictWLB);
bool is_connected = selectionConnection != null && selectionConnection.IsConnected;
@ -1350,7 +1346,7 @@ namespace XenAdmin
NewTabCount = 0;
ShowTab(TabPageHome, !SearchMode && show_home);
ShowTab(TabPageGeneral, !multi && !SearchMode && (isVMSelected || (isHostSelected && (isHostLive || !is_connected)) || isPoolSelected || isSRSelected || isStorageLinkSelected || isDockerContainerSelected));
ShowTab(dmc_upsell ? TabPageBallooningUpsell : TabPageBallooning, !multi && !SearchMode && mr_or_greater && (isVMSelected || (isHostSelected && isHostLive) || isPoolSelected));
ShowTab(dmc_upsell ? TabPageBallooningUpsell : TabPageBallooning, !multi && !SearchMode && (isVMSelected || (isHostSelected && isHostLive) || isPoolSelected));
ShowTab(TabPageStorage, !multi && !SearchMode && (isRealVMSelected || (isTemplateSelected && !selectedTemplateHasProvisionXML)));
ShowTab(TabPageSR, !multi && !SearchMode && (isSRSelected || isStorageLinkSRSelected));
ShowTab(TabPagePhysicalStorage, !multi && !SearchMode && ((isHostSelected && isHostLive) || isPoolSelected));
@ -1374,14 +1370,14 @@ namespace XenAdmin
ShowTab(TabPageConsole, !shownConsoleReplacement && !multi && !SearchMode && (isRealVMSelected || (isHostSelected && isHostLive)));
ShowTab(TabPagePeformance, !multi && !SearchMode && (isRealVMSelected || (isHostSelected && isHostLive)));
ShowTab(ha_upsell ? TabPageHAUpsell : TabPageHA, !multi && !SearchMode && isPoolSelected && has_ha_license_flag);
ShowTab(TabPageSnapshots, !multi && !SearchMode && george_or_greater && isRealVMSelected);
ShowTab(ha_upsell ? TabPageHAUpsell : TabPageHA, !multi && !SearchMode && isPoolSelected);
ShowTab(TabPageSnapshots, !multi && !SearchMode && isRealVMSelected);
//Any Clearwater XenServer, or WLB is not licensed on XenServer, the WLB tab and any WLB menu items disappear completely.
if(!(SelectionManager.Selection.All(s => Helpers.IsClearwater(s.Connection)) || wlb_upsell ))
ShowTab(TabPageWLB, !multi && !SearchMode && isPoolSelected && george_or_greater);
ShowTab(TabPageWLB, !multi && !SearchMode && isPoolSelected);
ShowTab(TabPageAD, !multi && !SearchMode && (isPoolSelected || isHostSelected && isHostLive) && george_or_greater);
ShowTab(TabPageAD, !multi && !SearchMode && (isPoolSelected || isHostSelected && isHostLive));
foreach (TabPageFeature f in pluginManager.GetAllFeatures<TabPageFeature>(f => !f.IsConsoleReplacement && !multi && f.ShowTab))
ShowTab(f.TabPage, true);
@ -1609,9 +1605,6 @@ namespace XenAdmin
IXenConnection connection = SelectionManager.Selection.GetConnectionOfFirstItem();
bool vm = SelectionManager.Selection.FirstIsRealVM && !((VM)SelectionManager.Selection.First).Locked;
Host best_host = hostAncestor ?? (connection == null ? null : Helpers.GetMaster(connection));
bool george_or_greater = best_host != null && Helpers.GeorgeOrGreater(best_host);
exportSettingsToolStripMenuItem.Enabled = ConnectionsManager.XenConnectionsCopy.Count > 0;
this.MenuShortcuts = true;
@ -1619,7 +1612,7 @@ namespace XenAdmin
startOnHostToolStripMenuItem.Available = startOnHostToolStripMenuItem.Enabled;
resumeOnToolStripMenuItem.Available = resumeOnToolStripMenuItem.Enabled;
relocateToolStripMenuItem.Available = relocateToolStripMenuItem.Enabled;
storageLinkToolStripMenuItem.Available = storageLinkToolStripMenuItem.Enabled;
storageLinkToolStripMenuItem.Available = true;// storageLinkToolStripMenuItem.Enabled;
sendCtrlAltDelToolStripMenuItem.Enabled = (TheTabControl.SelectedTab == TabPageConsole) && vm && ((VM)SelectionManager.Selection.First).power_state == vm_power_state.Running;
templatesToolStripMenuItem1.Checked = Properties.Settings.Default.DefaultTemplatesVisible;

View File

@ -128,7 +128,7 @@ namespace XenAdmin.Network
if (AcceptCertificate)
log.Debug("Adding cert after confirmation");
else
log.Debug("User refejected new cert");
log.Debug("User rejected new cert");
return AcceptCertificate;
}
}

View File

@ -148,7 +148,7 @@ namespace XenAdmin.Network.StorageLink
{
Pool pool = Helpers.GetPoolOfOne(c);
if (c.IsConnected && pool != null && Helpers.MidnightRideOrGreater(c) && !Helpers.FeatureForbidden(c, Host.RestrictStorageChoices))
if (c.IsConnected && pool != null && !Helpers.FeatureForbidden(c, Host.RestrictStorageChoices))
{
Settings.CslgCredentials localCreds = null;
Invoke(() => localCreds = Settings.GetCslgCredentials(c));
@ -190,29 +190,6 @@ namespace XenAdmin.Network.StorageLink
private List<StorageLinkCredentials> GetAllStorageLinkCredentials()
{
var output = new List<StorageLinkCredentials>();
foreach (IXenConnection connection in GetXenConnectionsCopy())
{
if (connection.IsConnected && !Helpers.FeatureForbidden(connection, XenAPI.Host.RestrictStorageChoices) && !Helpers.BostonOrGreater(connection) && Helpers.CowleyOrGreater(connection))
{
Pool pool = Helpers.GetPoolOfOne(connection);
if (pool != null) // can be null if still connecting.
{
var allCreds = new List<StorageLinkCredentials> { pool.GetStorageLinkCredentials() };
allCreds.AddRange(Array.ConvertAll(connection.Cache.PBDs, p => p.GetStorageLinkCredentials()));
allCreds.RemoveAll(c => c == null || !c.IsValid || string.IsNullOrEmpty(c.Password));
foreach (StorageLinkCredentials creds in allCreds)
{
if (null == output.Find(c => c.Host == creds.Host && c.Username == creds.Username))
{
output.Add(creds);
}
}
}
}
}
return output;
}

View File

@ -32,6 +32,8 @@ namespace XenAdmin.SettingsPanels
this.m_textBoxOsParams = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.m_autoHeightLabelHvm = new XenAdmin.Controls.Common.AutoHeightLabel();
this.m_autoHeightLabelNonHvm = new XenAdmin.Controls.Common.AutoHeightLabel();
this.m_tlpHvm = new System.Windows.Forms.TableLayoutPanel();
this.label1 = new System.Windows.Forms.Label();
this.m_buttonUp = new System.Windows.Forms.Button();
@ -40,9 +42,6 @@ namespace XenAdmin.SettingsPanels
this.m_tlpNonHvm = new System.Windows.Forms.TableLayoutPanel();
this.label2 = new System.Windows.Forms.Label();
this.m_comboBoxBootDevice = new System.Windows.Forms.ComboBox();
this.m_checkBoxAutoBoot = new System.Windows.Forms.CheckBox();
this.m_autoHeightLabelHvm = new XenAdmin.Controls.Common.AutoHeightLabel();
this.m_autoHeightLabelNonHvm = new XenAdmin.Controls.Common.AutoHeightLabel();
this.tableLayoutPanel1.SuspendLayout();
this.m_tlpHvm.SuspendLayout();
this.m_tlpNonHvm.SuspendLayout();
@ -63,11 +62,22 @@ namespace XenAdmin.SettingsPanels
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.m_autoHeightLabelHvm, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.m_autoHeightLabelNonHvm, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.m_tlpHvm, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.m_tlpNonHvm, 0, 6);
this.tableLayoutPanel1.Controls.Add(this.m_checkBoxAutoBoot, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.m_tlpHvm, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.m_tlpNonHvm, 0, 4);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// m_autoHeightLabelHvm
//
resources.ApplyResources(this.m_autoHeightLabelHvm, "m_autoHeightLabelHvm");
this.tableLayoutPanel1.SetColumnSpan(this.m_autoHeightLabelHvm, 4);
this.m_autoHeightLabelHvm.Name = "m_autoHeightLabelHvm";
//
// m_autoHeightLabelNonHvm
//
resources.ApplyResources(this.m_autoHeightLabelNonHvm, "m_autoHeightLabelNonHvm");
this.tableLayoutPanel1.SetColumnSpan(this.m_autoHeightLabelNonHvm, 3);
this.m_autoHeightLabelNonHvm.Name = "m_autoHeightLabelNonHvm";
//
// m_tlpHvm
//
resources.ApplyResources(this.m_tlpHvm, "m_tlpHvm");
@ -127,24 +137,6 @@ namespace XenAdmin.SettingsPanels
this.m_comboBoxBootDevice.Name = "m_comboBoxBootDevice";
this.m_comboBoxBootDevice.SelectedIndexChanged += new System.EventHandler(this.m_comboBoxBootDevice_SelectedIndexChanged);
//
// m_checkBoxAutoBoot
//
resources.ApplyResources(this.m_checkBoxAutoBoot, "m_checkBoxAutoBoot");
this.m_checkBoxAutoBoot.Name = "m_checkBoxAutoBoot";
this.m_checkBoxAutoBoot.UseVisualStyleBackColor = true;
//
// m_autoHeightLabelHvm
//
resources.ApplyResources(this.m_autoHeightLabelHvm, "m_autoHeightLabelHvm");
this.tableLayoutPanel1.SetColumnSpan(this.m_autoHeightLabelHvm, 4);
this.m_autoHeightLabelHvm.Name = "m_autoHeightLabelHvm";
//
// m_autoHeightLabelNonHvm
//
resources.ApplyResources(this.m_autoHeightLabelNonHvm, "m_autoHeightLabelNonHvm");
this.tableLayoutPanel1.SetColumnSpan(this.m_autoHeightLabelNonHvm, 3);
this.m_autoHeightLabelNonHvm.Name = "m_autoHeightLabelNonHvm";
//
// BootOptionsEditPage
//
resources.ApplyResources(this, "$this");
@ -178,7 +170,6 @@ namespace XenAdmin.SettingsPanels
private System.Windows.Forms.Button m_buttonUp;
private System.Windows.Forms.Button m_buttonDown;
private System.Windows.Forms.CheckedListBox m_checkedListBox;
private System.Windows.Forms.CheckBox m_checkBoxAutoBoot;
}
}

View File

@ -79,8 +79,7 @@ namespace XenAdmin.SettingsPanels
{
get
{
bool autoBootChanged = Helpers.BostonOrGreater(vm.Connection) ? false : m_checkBoxAutoBoot.Checked != vm.AutoPowerOn;
return autoBootChanged || (vm.IsHVM && GetOrder() != vm.BootOrder) || (m_textBoxOsParams.Text != vm.PV_args) || (VMPVBootableDVD() != bootFromCD);
return (vm.IsHVM && GetOrder() != vm.BootOrder) || (m_textBoxOsParams.Text != vm.PV_args) || (VMPVBootableDVD() != bootFromCD);
}
}
@ -88,9 +87,6 @@ namespace XenAdmin.SettingsPanels
{
vm.BootOrder = GetOrder();
if (!Helpers.BostonOrGreater(vm.Connection))
vm.AutoPowerOn = m_checkBoxAutoBoot.Checked;
vm.PV_args = m_textBoxOsParams.Text;
return new DelegatedAsyncAction(vm.Connection, "Change VBDs bootable", "Change VBDs bootable", null,
@ -163,15 +159,9 @@ namespace XenAdmin.SettingsPanels
string order = String.Join(", ", driveLetters.ToArray());
if (!Helpers.BostonOrGreater(vm.Connection) && m_checkBoxAutoBoot.Checked)
return String.Format(Messages.BOOTORDER_AUTOSTART, order);
else
return String.Format(Messages.BOOTORDER, order);
}
if (!Helpers.BostonOrGreater(vm.Connection) && m_checkBoxAutoBoot.Checked)
return Messages.AUTOSTART;
else
return Messages.NONE_DEFINED;
}
}
@ -194,14 +184,6 @@ namespace XenAdmin.SettingsPanels
private void Repopulate()
{
if (Helpers.BostonOrGreater(vm.Connection))
m_checkBoxAutoBoot.Visible = false;
else
{
m_checkBoxAutoBoot.Visible = true;
m_checkBoxAutoBoot.Checked = vm.AutoPowerOn;
}
BootDeviceAndOrderEnabled(vm.IsHVM);
if (vm.IsHVM)

View File

@ -379,7 +379,7 @@
<value>Fill</value>
</data>
<data name="m_tlpHvm.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 144</value>
<value>3, 101</value>
</data>
<data name="m_tlpHvm.RowCount" type="System.Int32, mscorlib">
<value>4</value>
@ -478,13 +478,13 @@
<value>Fill</value>
</data>
<data name="m_tlpNonHvm.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 258</value>
<value>3, 215</value>
</data>
<data name="m_tlpNonHvm.RowCount" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="m_tlpNonHvm.Size" type="System.Drawing.Size, System.Drawing">
<value>444, 165</value>
<value>444, 208</value>
</data>
<data name="m_tlpNonHvm.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
@ -504,36 +504,6 @@
<data name="m_tlpNonHvm.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="label3" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="m_textBoxOsParams" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label2" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="m_comboBoxBootDevice" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,65,Percent,35" /&gt;&lt;Rows Styles="AutoSize,0,Absolute,20,AutoSize,0,Percent,100,Absolute,20,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="m_checkBoxAutoBoot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="m_checkBoxAutoBoot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="m_checkBoxAutoBoot.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 101</value>
</data>
<data name="m_checkBoxAutoBoot.Size" type="System.Drawing.Size, System.Drawing">
<value>142, 17</value>
</data>
<data name="m_checkBoxAutoBoot.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="m_checkBoxAutoBoot.Text" xml:space="preserve">
<value>Auto-start on server boot</value>
</data>
<data name="&gt;&gt;m_checkBoxAutoBoot.Name" xml:space="preserve">
<value>m_checkBoxAutoBoot</value>
</data>
<data name="&gt;&gt;m_checkBoxAutoBoot.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;m_checkBoxAutoBoot.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;m_checkBoxAutoBoot.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -541,7 +511,7 @@
<value>0, 0</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>7</value>
<value>5</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>450, 426</value>
@ -562,7 +532,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="m_autoHeightLabelHvm" Row="0" RowSpan="1" Column="0" ColumnSpan="4" /&gt;&lt;Control Name="m_autoHeightLabelNonHvm" Row="1" RowSpan="1" Column="0" ColumnSpan="3" /&gt;&lt;Control Name="m_tlpHvm" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="m_tlpNonHvm" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="m_checkBoxAutoBoot" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,Absolute,20,AutoSize,0,Absolute,20,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="m_autoHeightLabelHvm" Row="0" RowSpan="1" Column="0" ColumnSpan="4" /&gt;&lt;Control Name="m_autoHeightLabelNonHvm" Row="1" RowSpan="1" Column="0" ColumnSpan="3" /&gt;&lt;Control Name="m_tlpHvm" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="m_tlpNonHvm" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,Absolute,20,AutoSize,0,AutoSize,0,Absolute,20,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>

View File

@ -177,8 +177,7 @@ namespace XenAdmin.SettingsPanels
public void SetXenObjects(IXenObject orig, IXenObject clone)
{
vm = (VM)clone;
MROrGreater = Helpers.MidnightRideOrGreater(vm.Connection);
ShowMemory = !MROrGreater || Helpers.FeatureForbidden(vm, Host.RestrictDMC);
ShowMemory = Helpers.FeatureForbidden(vm, Host.RestrictDMC);
Repopulate();
}

View File

@ -329,7 +329,7 @@ namespace XenAdmin.SettingsPanels
HostPNICList.SelectedItem = pif.Name;
}
bool hasBondMode = HasBondMode;
bool hasBondMode = network.IsBond;
groupBoxBondMode.Visible = hasBondMode;
bool supportsLinkAggregation = Helpers.SupportsLinkAggregationBond(network.Connection);
@ -679,17 +679,6 @@ namespace XenAdmin.SettingsPanels
return null;
}
/// <summary>
/// Does the network being edited support bond mode (i.e., is it a bond of Boston or later)?
/// </summary>
private bool HasBondMode
{
get
{
return network.IsBond && Helpers.BostonOrGreater(network.Connection);
}
}
/// <summary>
/// The mode of the bond associated with this network. Assumes HasBondMode has already been tested,
/// and that the Bond objects on each host have the same mode.

View File

@ -94,7 +94,6 @@ namespace XenAdmin.SettingsPanels
public void SetXenObjects(IXenObject orig, IXenObject clone)
{
Trace.Assert(clone is VM); // only VMs should show this page
Trace.Assert(Helpers.BostonOrGreater(clone.Connection)); // If not Boston or greater, we shouldn't see this page
Trace.Assert(!Helpers.FeatureForbidden(clone, Host.RestrictGpu)); // If license insufficient, we show upsell page instead
vm = (VM)clone;

View File

@ -57,7 +57,7 @@ namespace XenAdmin.SettingsPanels
private static List<IXenConnection> GetValidConnections()
{
return ConnectionsManager.XenConnectionsCopy.FindAll(c => c.IsConnected && Helpers.GetPoolOfOne(c) != null && Helpers.MidnightRideOrGreater(c) && !Helpers.FeatureForbidden(c, Host.RestrictStorageChoices));
return ConnectionsManager.XenConnectionsCopy.FindAll(c => c.IsConnected && Helpers.GetPoolOfOne(c) != null && !Helpers.FeatureForbidden(c, Host.RestrictStorageChoices));
}
#region IEditPage Members
@ -81,7 +81,7 @@ namespace XenAdmin.SettingsPanels
_xenObjectCopy = clone;
allServersCheckBox.Checked = true;
if (_xenObjectCopy != null && Helpers.MidnightRideOrGreater(_xenObjectCopy.Connection))
if (_xenObjectCopy != null)
{
Pool pool = Helpers.GetPoolOfOne(_xenObjectCopy.Connection);

View File

@ -74,8 +74,6 @@ namespace XenAdmin.SettingsPanels
/// </summary>
private readonly List<Host_metrics> hostMetrics = new List<Host_metrics>();
private static bool showStartOrderAndDelay;
private readonly CollectionChangeEventHandler Host_CollectionChangedWithInvoke;
#endregion
@ -105,13 +103,6 @@ namespace XenAdmin.SettingsPanels
if (vm == null)
return "";
// Disable editing if pool master doesn't have HA license flag
Host host = Helpers.GetMaster(vm.Connection);
if (host == null || host.RestrictHAOrlando)
{
return Messages.HA_LICENSE_DISABLED;
}
Pool pool = Helpers.GetPool(vm.Connection);
if (pool == null)
{
@ -339,16 +330,9 @@ namespace XenAdmin.SettingsPanels
private void UpdateEnablement()
{
// hide start order and delay for pre-Boston VMs
showStartOrderAndDelay = !Helpers.HaIgnoreStartupOptions(vm.Connection);
if (!showStartOrderAndDelay)
{
groupBoxStartupOptions.Visible = false;
}
// Disable editing if pool master doesn't have HA license flag
Host host = Helpers.GetMaster(vm.Connection);
if (host == null || host.RestrictHA)
if (host == null || Host.RestrictHA(host))
{
m_labelHaStatus.Text = Messages.HA_LICENSE_DISABLED;
m_tlpPriority.Visible = false;
@ -420,7 +404,7 @@ namespace XenAdmin.SettingsPanels
private bool ChangesMadeInStartupOptions()
{
return showStartOrderAndDelay && (nudOrder.Value != origOrder || nudStartDelay.Value != origStartDelay);
return nudOrder.Value != origOrder || nudStartDelay.Value != origStartDelay;
}
public VM.HA_Restart_Priority SelectedPriority { get; private set; }
@ -551,7 +535,7 @@ namespace XenAdmin.SettingsPanels
// If skankPanel is disabled, so is editing
var validToSaveHA = !IsHaEditable() || this.vm != null && !haNtolIndicator.UpdateInProgress && haNtolIndicator.Ntol >= 0;
var validToSaveStartupOptions = !showStartOrderAndDelay || this.vm != null;
var validToSaveStartupOptions = this.vm != null;
return validToSaveHA && validToSaveStartupOptions;
}
@ -606,10 +590,6 @@ namespace XenAdmin.SettingsPanels
{
if (pool == null)
return;
Host master = Helpers.GetMaster(pool.Connection);
if (master == null || master.RestrictHAOrlando)
return;
HAPage.EditHA(pool);
}

View File

@ -92,8 +92,6 @@ namespace XenAdmin.SettingsPanels
// Set up the Automation checkboxes
checkBoxUseAutomation.Checked = _poolConfiguration.AutoBalanceEnabled;
if (Helpers.MidnightRideOrGreater(_connection))
{
checkBoxEnablePowerManagement.Checked = _poolConfiguration.PowerManagementEnabled;
checkBoxEnablePowerManagement.Enabled = checkBoxUseAutomation.Checked;
@ -128,21 +126,12 @@ namespace XenAdmin.SettingsPanels
{
thisItem.SubItems.Add(host.Name);
}
if (Helpers.MidnightRideOrGreater(_connection))
{
thisItem.SubItems.Add(GetHostPowerOnMode(host.power_on_mode));
}
thisItem.SubItems.Add(powerManagementTested);
listViewExPowerManagementHosts.Items.Add(thisItem);
}
labelNoHosts.Visible = (listViewExPowerManagementHosts.Items.Count == 0);
}
else
{
this.checkBoxEnablePowerManagement.Enabled = false;
this.decentGroupBoxPowerManagementHosts.Enabled = false;
}
_loading = false;
}
@ -204,16 +193,8 @@ namespace XenAdmin.SettingsPanels
_hasChanged = true;
}
if (Helpers.MidnightRideOrGreater(_connection))
{
checkBoxEnablePowerManagement.Enabled = checkBoxUseAutomation.Checked;
}
else
{
this.checkBoxEnablePowerManagement.Enabled = false;
}
}
private void checkBoxEnablePowerManagement_CheckedChanged(object sender, EventArgs e)
{
@ -288,7 +269,7 @@ namespace XenAdmin.SettingsPanels
private bool HostCannotParticipateInPowerManagement(Host host)
{
return host.IsMaster() || (string.IsNullOrEmpty(host.power_on_mode) && Helpers.MidnightRideOrGreater(_connection));
return host.IsMaster() || string.IsNullOrEmpty(host.power_on_mode);
}
private void listViewExPowerManagementHosts_DrawSubItem(object sender, DrawListViewSubItemEventArgs e)

View File

@ -154,14 +154,13 @@ namespace XenAdmin.TabPages
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.GridViewSubjectList.DefaultCellStyle = dataGridViewCellStyle5;
this.GridViewSubjectList.MaximumSize = new System.Drawing.Size(900, 500);
this.GridViewSubjectList.Name = "GridViewSubjectList";
this.GridViewSubjectList.RowHeadersVisible = false;
this.GridViewSubjectList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.GridViewSubjectList.SortCompare += new System.Windows.Forms.DataGridViewSortCompareEventHandler(this.GridViewSubjectList_SortCompare);
this.GridViewSubjectList.MouseUp += new System.Windows.Forms.MouseEventHandler(this.GridViewSubjectList_MouseClick);
this.GridViewSubjectList.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.GridViewSubjectList_CellMouseClick);
this.GridViewSubjectList.SelectionChanged += new System.EventHandler(this.GridViewSubjectList_SelectionChanged);
this.GridViewSubjectList.SortCompare += new System.Windows.Forms.DataGridViewSortCompareEventHandler(this.GridViewSubjectList_SortCompare);
this.GridViewSubjectList.MouseUp += new System.Windows.Forms.MouseEventHandler(this.GridViewSubjectList_MouseClick);
//
// ColumnExpand
//
@ -246,7 +245,6 @@ namespace XenAdmin.TabPages
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
this.tableLayoutPanel2.Controls.Add(this.labelBlurb, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.buttonJoinLeave, 0, 1);
this.tableLayoutPanel2.MaximumSize = new System.Drawing.Size(900, 100);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
//
// labelBlurb
@ -316,7 +314,6 @@ namespace XenAdmin.TabPages
this.panel1.Controls.Add(this.panel2);
this.panel1.Controls.Add(this.LabelGridViewDisabled);
resources.ApplyResources(this.panel1, "panel1");
this.panel1.MaximumSize = new System.Drawing.Size(900, 540);
this.panel1.Name = "panel1";
//
// panel2

View File

@ -80,7 +80,6 @@ namespace XenAdmin.TabPages
if (_xenObject == null)
return;
SetRbacVisible(Helpers.MidnightRideOrGreater(_xenObject.Connection));
pool = Helpers.GetPoolOfOne(_xenObject.Connection);
if (pool == null)
{
@ -167,17 +166,6 @@ namespace XenAdmin.TabPages
pool.Connection.Session.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler(Session_PropertyChanged);
}
/// <summary>
/// Toggles whether the RBAC controls are visible on this control
/// </summary>
/// <param name="p"></param>
private void SetRbacVisible(bool p)
{
ButtonChangeRoles.Visible = p;
toolStripMenuItemChangeRoles.Visible = p;
GridViewSubjectList.Columns["ColumnRoles"].Visible = p;
}
/// <summary>
/// We keep track of the actions in currently running so we can disable the tab if we are in the middle of configuring AD.
/// </summary>
@ -636,12 +624,6 @@ namespace XenAdmin.TabPages
contractedSubjectInfo.Add(new KeyValuePair<string, string>(Messages.AD_LOCAL_ROOT_ACCOUNT, ""));
}
else
{
if (!Helpers.MidnightRideOrGreater(subject.Connection))
{
expandedRoles = contractedRoles = "";
}
else
{
//Generate the role list
string s = "";
@ -657,7 +639,6 @@ namespace XenAdmin.TabPages
roles.Count > 1 ? roles[0].FriendlyName.AddEllipsis() : roles[0].FriendlyName
: "";
}
contractedSubjectInfo = new List<KeyValuePair<String, String>>();
contractedSubjectInfo.Add(new KeyValuePair<string, string>(subject.DisplayName ?? subject.SubjectName ?? "", ""));
expandedSubjectInfo = Subject.ExtractKvpInfo(subject);

View File

@ -112,19 +112,19 @@
<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="GridViewSubjectList.ColumnHeadersHeight" type="System.Int32, mscorlib">
<value>25</value>
</data>
<metadata name="ColumnExpand.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="ColumnExpand.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<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="dataGridViewCellStyle2.NullValue" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Qk32AgAAAAAAADYAAAAoAAAADgAAABAAAAABABgAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAAAAAAAAAA
@ -151,7 +151,7 @@
<data name="ColumnExpand.Width" type="System.Int32, mscorlib">
<value>20</value>
</data>
<metadata name="ColumnTypeImage.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="ColumnTypeImage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnTypeImage.HeaderText" xml:space="preserve">
@ -163,19 +163,19 @@
<data name="ColumnTypeImage.Width" type="System.Int32, mscorlib">
<value>50</value>
</data>
<metadata name="ColumnSubject.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="ColumnSubject.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnSubject.HeaderText" xml:space="preserve">
<value>Subject</value>
</data>
<metadata name="ColumnRoles.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="ColumnRoles.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnRoles.HeaderText" xml:space="preserve">
<value>Roles</value>
</data>
<metadata name="ColumnStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="ColumnStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnStatus.HeaderText" xml:space="preserve">
@ -184,7 +184,7 @@
<data name="ColumnStatus.MinimumWidth" type="System.Int32, mscorlib">
<value>50</value>
</data>
<metadata name="ColumnDummy.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="ColumnDummy.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnDummy.HeaderText" xml:space="preserve">
@ -196,7 +196,7 @@
<data name="ColumnDummy.Width" type="System.Int32, mscorlib">
<value>5</value>
</data>
<metadata name="contextMenuStripADBox.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="contextMenuStripADBox.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="addToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
@ -233,9 +233,9 @@
<value>contextMenuStripADBox</value>
</data>
<data name="&gt;&gt;contextMenuStripADBox.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</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="GridViewSubjectList.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -251,6 +251,9 @@
<data name="GridViewSubjectList.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="GridViewSubjectList.MaximumSize" type="System.Drawing.Size, System.Drawing">
<value>900, 500</value>
</data>
<data name="GridViewSubjectList.Size" type="System.Drawing.Size, System.Drawing">
<value>900, 475</value>
</data>
@ -261,7 +264,7 @@
<value>GridViewSubjectList</value>
</data>
<data name="&gt;&gt;GridViewSubjectList.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;GridViewSubjectList.Parent" xml:space="preserve">
<value>panel1</value>
@ -291,7 +294,7 @@
<value>buttonAdd</value>
</data>
<data name="&gt;&gt;buttonAdd.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonAdd.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
@ -324,7 +327,7 @@
<value>ButtonRemove</value>
</data>
<data name="&gt;&gt;ButtonRemove.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ButtonRemove.Parent" xml:space="preserve">
<value>tTipRemoveButton</value>
@ -381,7 +384,7 @@
<value>ButtonLogout</value>
</data>
<data name="&gt;&gt;ButtonLogout.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ButtonLogout.Parent" xml:space="preserve">
<value>tTipLogoutButton</value>
@ -438,7 +441,7 @@
<value>ButtonChangeRoles</value>
</data>
<data name="&gt;&gt;ButtonChangeRoles.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ButtonChangeRoles.Parent" xml:space="preserve">
<value>tTipChangeRole</value>
@ -486,7 +489,7 @@
<value>flowLayoutPanel1</value>
</data>
<data name="&gt;&gt;flowLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;flowLayoutPanel1.Parent" xml:space="preserve">
<value>panel1</value>
@ -519,7 +522,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>panel2</value>
@ -543,7 +546,7 @@
<value>panel2</value>
</data>
<data name="&gt;&gt;panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>panel1</value>
@ -579,7 +582,7 @@
<value>LabelGridViewDisabled</value>
</data>
<data name="&gt;&gt;LabelGridViewDisabled.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;LabelGridViewDisabled.Parent" xml:space="preserve">
<value>panel1</value>
@ -593,6 +596,9 @@
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>10, 94</value>
</data>
<data name="panel1.MaximumSize" type="System.Drawing.Size, System.Drawing">
<value>900, 540</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>900, 540</value>
</data>
@ -603,7 +609,7 @@
<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>
<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>pageContainerPanel</value>
@ -639,7 +645,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>pageContainerPanel</value>
@ -684,7 +690,7 @@
<value>labelBlurb</value>
</data>
<data name="&gt;&gt;labelBlurb.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;labelBlurb.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
@ -714,7 +720,7 @@
<value>buttonJoinLeave</value>
</data>
<data name="&gt;&gt;buttonJoinLeave.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;buttonJoinLeave.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
@ -731,6 +737,9 @@
<data name="tableLayoutPanel2.Location" type="System.Drawing.Point, System.Drawing">
<value>10, 10</value>
</data>
<data name="tableLayoutPanel2.MaximumSize" type="System.Drawing.Size, System.Drawing">
<value>900, 100</value>
</data>
<data name="tableLayoutPanel2.RowCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
@ -744,7 +753,7 @@
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.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;tableLayoutPanel2.Parent" xml:space="preserve">
<value>pageContainerPanel</value>
@ -765,20 +774,20 @@
<value>pageContainerPanel</value>
</data>
<data name="&gt;&gt;pageContainerPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pageContainerPanel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;pageContainerPanel.ZOrder" xml:space="preserve">
<value>0</value>
<value>1</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
</metadata>
<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>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>96, 96</value>
</data>
@ -789,67 +798,67 @@
<value>addToolStripMenuItem</value>
</data>
<data name="&gt;&gt;addToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripMenuItemRemove.Name" xml:space="preserve">
<value>toolStripMenuItemRemove</value>
</data>
<data name="&gt;&gt;toolStripMenuItemRemove.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripSeparator1.Name" xml:space="preserve">
<value>toolStripSeparator1</value>
</data>
<data name="&gt;&gt;toolStripSeparator1.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripMenuItemLogout.Name" xml:space="preserve">
<value>toolStripMenuItemLogout</value>
</data>
<data name="&gt;&gt;toolStripMenuItemLogout.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripMenuItemChangeRoles.Name" xml:space="preserve">
<value>toolStripMenuItemChangeRoles</value>
</data>
<data name="&gt;&gt;toolStripMenuItemChangeRoles.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnExpand.Name" xml:space="preserve">
<value>ColumnExpand</value>
</data>
<data name="&gt;&gt;ColumnExpand.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewImageColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewImageColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnTypeImage.Name" xml:space="preserve">
<value>ColumnTypeImage</value>
</data>
<data name="&gt;&gt;ColumnTypeImage.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewImageColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewImageColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnSubject.Name" xml:space="preserve">
<value>ColumnSubject</value>
</data>
<data name="&gt;&gt;ColumnSubject.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnRoles.Name" xml:space="preserve">
<value>ColumnRoles</value>
</data>
<data name="&gt;&gt;ColumnRoles.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnStatus.Name" xml:space="preserve">
<value>ColumnStatus</value>
</data>
<data name="&gt;&gt;ColumnStatus.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnDummy.Name" xml:space="preserve">
<value>ColumnDummy</value>
</data>
<data name="&gt;&gt;ColumnDummy.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>AdPage</value>

View File

@ -904,12 +904,6 @@ namespace XenAdmin.TabPages
PDSection s = pdSectionBootOptions;
if (!Helpers.BostonOrGreater(vm.Connection))
{
s.AddEntry(FriendlyName("VM.auto_boot"), Helpers.BoolToString(vm.AutoPowerOn),
new PropertiesToolStripMenuItem(new VmEditStartupOptionsCommand(Program.MainWindow, vm)));
}
if (vm.IsHVM)
{
s.AddEntry(FriendlyName("VM.BootOrder"), HVMBootOrder(vm),
@ -1158,7 +1152,7 @@ namespace XenAdmin.TabPages
s.AddEntry(FriendlyName("host.uptime"), uptime == null ? "" : host.Uptime.ToString());
s.AddEntry(FriendlyName("host.agentUptime"), agentUptime == null ? "" : host.AgentUptime.ToString());
if ((Helpers.GeorgeOrGreater(xenObject.Connection) && host.external_auth_type == Auth.AUTH_TYPE_AD))
if (host.external_auth_type == Auth.AUTH_TYPE_AD)
s.AddEntry(FriendlyName("host.external_auth_service_name"), host.external_auth_service_name);
}
else if (xenObject is VM)
@ -1169,12 +1163,12 @@ namespace XenAdmin.TabPages
s.AddEntry(FriendlyName("VM.OperatingMode"), vm.IsHVM ? Messages.VM_OPERATING_MODE_HVM : Messages.VM_OPERATING_MODE_PV);
if (!vm.DefaultTemplate && Helpers.MidnightRideOrGreater(vm.Connection))
if (!vm.DefaultTemplate)
{
s.AddEntry(Messages.BIOS_STRINGS_COPIED, vm.BiosStringsCopied ? Messages.YES : Messages.NO);
}
if (Helpers.BostonOrGreater(vm.Connection) && vm.Connection != null)
if (vm.Connection != null)
{
var appl = vm.Connection.Resolve(vm.appliance);
if (appl != null)

View File

@ -267,15 +267,12 @@ namespace XenAdmin.TabPages
private RbacMethodList HA_PERMISSION_CHECKS = new RbacMethodList(
"pool.set_ha_host_failures_to_tolerate",
"pool.sync_database",
"vm.set_ha_always_run",
"vm.set_ha_restart_priority",
"pool.ha_compute_hypothetical_max_host_failures_to_tolerate"
);
private bool PassedRbacChecks()
{
if (!Helpers.MidnightRideOrGreater(pool.Connection))
return true;
return Role.CanPerform(HA_PERMISSION_CHECKS, pool.Connection);
}
@ -305,13 +302,6 @@ namespace XenAdmin.TabPages
private void generatePoolHABox(Pool pool)
{
Host master = Helpers.GetMaster(pool.Connection);
if (master == null || master.RestrictHAOrlando)
{
// Don't generate the box at all
return;
}
if (!pool.ha_enabled)
return;
@ -543,13 +533,6 @@ namespace XenAdmin.TabPages
private void generateSRHABox(SR sr)
{
Host master = Helpers.GetMaster(sr.Connection);
if (master == null)
return;
if (master.RestrictHAOrlando)
// Don't generate the box at all
return;
CustomListRow header = CreateHeader(Messages.HA_CONFIGURATION_TITLE);
customListPanel.AddRow(header);
@ -629,10 +612,6 @@ namespace XenAdmin.TabPages
{
if (pool == null)
return;
Host master = Helpers.GetMaster(pool.Connection);
if (master == null || master.RestrictHAOrlando)
return;
EditHA(pool);
}

View File

@ -56,7 +56,6 @@ namespace XenAdmin.TabPages
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private VM m_VM = null;
private bool m_NeedToUpdate = false;
private bool m_TreeViewEnabled = false;
private float defaultWidthProperties;
private readonly ToolTip toolTipDescriptionLabel = new ToolTip();
@ -138,34 +137,18 @@ namespace XenAdmin.TabPages
VM_BatchCollectionChanged);
m_VM.PropertyChanged += snapshot_PropertyChanged;
//Version setup
m_TreeViewEnabled = Helpers.MidnightRideOrGreater(m_VM.Connection);
toolStripMenuItemScheduledSnapshots.Available = toolStripSeparatorView.Available = Helpers.CowleyOrGreater(m_VM.Connection)
&& Registry.VMPRFeatureEnabled;
if (m_TreeViewEnabled && VM.SnapshotView != SnapshotsView.ListView)
toolStripMenuItemScheduledSnapshots.Available = toolStripSeparatorView.Available = Registry.VMPRFeatureEnabled;
if (VM.SnapshotView != SnapshotsView.ListView)
TreeViewChecked();
else
{
GridViewChecked();
}
if (m_TreeViewEnabled)
{
toolStripButtonTreeView.Enabled = true;
toolStripButtonTreeView.ToolTipText = "";
revertButton.Enabled = true;
toolTipContainerRevertButton.SetToolTip("");
}
else
{
toolStripButtonTreeView.Enabled = false;
toolStripButtonTreeView.ToolTipText =
string.Format(Messages.FEATURE_NOT_AVAILABLE_NEED_MR, Messages.SNAPSHOT_TREE_VIEW);
revertButton.Enabled = false;
toolTipContainerRevertButton.SetToolTip(
string.Format(Messages.FEATURE_NOT_AVAILABLE_NEED_MR, Messages.SNAPSHOT_REVERT));
}
//toolStripButtonListView.Enabled = toolStripButtonTreeView.Enabled = true;
//Refresh items
BuildList();
@ -197,7 +180,7 @@ namespace XenAdmin.TabPages
private void RefreshVMProtectionPanel()
{
if (Helpers.CowleyOrGreater(VM.Connection) && Registry.VMPRFeatureEnabled && !Helpers.ClearwaterOrGreater(VM.Connection))
if (Registry.VMPRFeatureEnabled && !Helpers.ClearwaterOrGreater(VM.Connection))
{
panelVMPP.Visible = true;
var vmpp = VM.Connection.Resolve(VM.protection_policy);
@ -307,16 +290,9 @@ namespace XenAdmin.TabPages
}
toolStripButtonListView.Enabled = true;
IList<VM> roots = RefreshDataGridView(snapshots);
if (m_TreeViewEnabled)
{
toolStripButtonTreeView.Enabled = true;
RefreshTreeView(roots);
SelectPreviousItemVMTreeView();
}
else
{
GridViewChecked();
}
UpdateSpinningIcon();
}
}
@ -633,18 +609,8 @@ namespace XenAdmin.TabPages
}
private void EnableAllButtons()
{
if (m_TreeViewEnabled)
{
revertButton.Enabled = true;
}
else
{
revertButton.Enabled = false;
toolTipContainerRevertButton.SetToolTip(string.Format(
Messages.FEATURE_NOT_AVAILABLE_NEED_MR, Messages.SNAPSHOT_REVERT));
}
saveButton.Enabled = true;
deleteButton.Enabled = true;
}
@ -1198,14 +1164,11 @@ namespace XenAdmin.TabPages
{
contextMenuStrip.Items.Clear();
if (m_TreeViewEnabled)
{
contextMenuStrip.Items.AddRange(new ToolStripItem[]
{
revertToolStripMenuItem,
saveVMToolStripSeparator
});
}
contextMenuStrip.Items.AddRange(new ToolStripItem[]
{
saveVMToolStripMenuItem,

View File

@ -561,17 +561,8 @@ namespace XenAdmin.TabPages
case 0:
return VDI.Name;
case 1:
if (Helpers.BostonOrGreater(VDI.Connection))
{
string name;
if (VDI.sm_config.TryGetValue("displayname", out name))
{
return name;
}
return string.Empty;
}
StorageLinkVolume volume = showStorageLink ? VDI.StorageLinkVolume(Program.StorageLinkConnections.GetCopy()) : null;
return volume == null ? string.Empty : volume.Name;
return VDI.sm_config.TryGetValue("displayname", out name) ? name : "";
case 2:
return VDI.Description;
case 3:

View File

@ -626,17 +626,8 @@ namespace XenAdmin.TabPages
case 3:
return SR.Name;
case 4:
if (Helpers.BostonOrGreater(VDI.Connection))
{
string name;
if (VDI.sm_config.TryGetValue("displayname", out name))
{
return name;
}
return string.Empty;
}
StorageLinkVolume vol = VDI.StorageLinkVolume(Program.StorageLinkConnections.GetCopy());
return vol == null ? string.Empty : vol.Name;
return VDI.sm_config.TryGetValue("displayname", out name) ? name : "";
case 5:
return VDI.SizeText;
case 6:

View File

@ -354,8 +354,6 @@ namespace XenAdmin.TabPages
private bool PassedRbacChecks()
{
if (!Helpers.MidnightRideOrGreater(_pool.Connection))
return true;
return Role.CanPerform(WLB_PERMISSION_CHECKS, _pool.Connection);
}

View File

@ -191,7 +191,7 @@ namespace XenAdmin.Wizards.GenericPages
PermissionCheckHeaderRow headerRow = AddHeaderRow(connection);
PermissionCheckResult checkResult = PermissionCheckResult.OK;
if (connection.Session.IsLocalSuperuser || connectionChecks.Value.Count == 0 || !Helpers.MidnightRideOrGreater(connection))
if (connection.Session.IsLocalSuperuser || connectionChecks.Value.Count == 0)
{
SetNoWarnings();
}
@ -222,10 +222,10 @@ namespace XenAdmin.Wizards.GenericPages
{
Program.AssertOffEventThread();
if (connection.Session.IsLocalSuperuser || !Helpers.MidnightRideOrGreater(connection))
if (connection.Session.IsLocalSuperuser)
{
// We should not be here.
log.Warn("A pre RBAC user or local root account is being blocked access");
log.Warn("A local root account is being blocked access");
}
List<Role> roleList = connection.Session.Roles;

View File

@ -77,27 +77,6 @@ namespace XenAdmin.Wizards
protected override void OnShown(EventArgs e)
{
// Check all the hosts in the pool have xha licenses
List<string> hostsWithoutLicense = new List<string>();
foreach (Host host in xenConnection.Cache.Hosts)
{
if (host.RestrictHAOrlando)
{
hostsWithoutLicense.Add(host.Name);
}
}
if (hostsWithoutLicense.Count > 0)
{
new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Error,
String.Format(Messages.HA_HOSTS_LACK_LICENSE, String.Join("\n", hostsWithoutLicense.ToArray())),
Messages.HIGH_AVAILABILITY)).ShowDialog(this);
this.Close();
return;
}
// Check for broken SRs
List<string> brokenSRs = new List<string>();
foreach (SR sr in xenConnection.Cache.SRs)

View File

@ -52,8 +52,6 @@ namespace XenAdmin.Wizards.HAWizard_Pages
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private IXenConnection connection;
private bool showStartOrderAndDelay;
private readonly CollectionChangeEventHandler VM_CollectionChangedWithInvoke;
private readonly QueuedBackgroundWorker m_worker;
@ -74,16 +72,6 @@ namespace XenAdmin.Wizards.HAWizard_Pages
RegisterEvents();
showStartOrderAndDelay = !Helpers.HaIgnoreStartupOptions(connection);
if (!showStartOrderAndDelay)
{
colStartOrder.Visible = false;
colDelay.Visible = false;
nudOrder.Visible = nudStartDelay.Visible = false;
labelStartOrder.Visible = labelStartDelay.Visible = labelStartDelayUnits.Visible = false;
}
UpdateMenuItems();
PopulateVMs();
@ -532,11 +520,8 @@ namespace XenAdmin.Wizards.HAWizard_Pages
{
m_dropDownButtonRestartPriority.Enabled = false;
m_dropDownButtonRestartPriority.Text = "";
if (showStartOrderAndDelay)
{
nudOrder.Enabled = nudStartDelay.Enabled = false;
nudOrder.Text = nudStartDelay.Text = "";
}
return;
}
@ -546,11 +531,8 @@ namespace XenAdmin.Wizards.HAWizard_Pages
{
m_dropDownButtonRestartPriority.Enabled = true;
m_dropDownButtonRestartPriority.Text = "";
if (showStartOrderAndDelay)
{
nudOrder.Enabled = nudStartDelay.Enabled = true;
nudOrder.Text = nudStartDelay.Text = "";
}
return;
}
@ -578,8 +560,6 @@ namespace XenAdmin.Wizards.HAWizard_Pages
}
// set the order and delay NUDs
if (showStartOrderAndDelay)
{
nudOrder.Enabled = nudStartDelay.Enabled = true;
var orderDistList = (from row in selectedRows select row.StartOrder).Distinct();
@ -587,7 +567,6 @@ namespace XenAdmin.Wizards.HAWizard_Pages
var delayDistList = (from row in selectedRows select row.StartDelay).Distinct();
nudStartDelay.Text = delayDistList.Count() == 1 ? delayDistList.ElementAt(0).ToString() : "";
}
// check that all the VMs selected in the list are agile and make sure the protect button is disabled with the relevant reason
VmWithSettingsRow nonAgileRow = selectedRows.FirstOrDefault(r => !r.IsAgile);
@ -599,10 +578,7 @@ namespace XenAdmin.Wizards.HAWizard_Pages
if (VM.HaPriorityIsRestart(connection, priority))
{
menuItem.Enabled = priority == VM.HA_Restart_Priority.AlwaysRestartHighPriority
? (nonAgileRow == null && Helpers.CowleyOrGreater(connection))
: (nonAgileRow == null);
menuItem.Enabled = (nonAgileRow == null);
menuItem.ToolTipText = (nonAgileRow == null)
? ""
: nonAgileRow.FriendlyNonAgileReason;
@ -683,14 +659,14 @@ namespace XenAdmin.Wizards.HAWizard_Pages
public override string Text
{
get { return Messages.HAWIZARD_ASSIGNRIORITIESPAGE_TEXT; }
get { return Messages.HAWIZARD_ASSIGNPRIORITIESPAGE_TEXT; }
}
public override string PageTitle
{
get
{
return showStartOrderAndDelay ? Messages.HAWIZARD_ASSIGNRIORITIESPAGE_TITLE : Messages.HAWIZARD_ASSIGNRIORITIESPAGE_TITLE_NOORDER;
return Messages.HAWIZARD_ASSIGNPRIORITIESPAGE_TITLE;
}
}

View File

@ -80,21 +80,12 @@ namespace XenAdmin.Wizards.HAWizard_Pages
break;
}
}
if (Helpers.BostonOrGreater(Connection))
labelSummary.Text = String.Format(Messages.HAWIZ_SUMMARY_NEW,
HeartbeatSrName.Ellipsise(50),
Ntol,
GetVmNumber(alwaysRestart),
GetVmNumber(bestEffort),
GetVmNumber(doNotRestart));
else
labelSummary.Text = String.Format(Messages.HAWIZ_SUMMARY,
HeartbeatSrName.Ellipsise(50),
Ntol,
GetVmNumber(alwaysRestartHighPriority),
GetVmNumber(alwaysRestart),
GetVmNumber(bestEffort),
GetVmNumber(doNotRestart));
// If the user hasn't protected any VMs, show a warning.
labelNoVmsProtected.Visible = (bestEffort + alwaysRestart + alwaysRestartHighPriority == 0) && doNotRestart > 0;

View File

@ -207,13 +207,10 @@ namespace XenAdmin.Wizards
result.name_label = pageName.NetworkName;
result.name_description = pageName.NetworkDescription;
result.AutoPlug = (pageNetworkType.SelectedNetworkType == NetworkTypes.CHIN ? pageChinDetails.isAutomaticAddNicToVM : pageNetworkDetails.isAutomaticAddNicToVM);
if (Helpers.CowleyOrGreater(xenConnection))
{
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;
}
return result;
}

View File

@ -136,7 +136,7 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
comboBoxNICList.Visible = external;
labelVLAN.Visible = external;
numericUpDownVLAN.Visible = external;
numericUpDownMTU.Visible = labelMTU.Visible = (external && Helpers.CowleyOrGreater(host));
numericUpDownMTU.Visible = labelMTU.Visible = external;
labelNIC.Visible = external;
if (comboBoxNICList.Items.Count > 0)
comboBoxNICList.SelectedIndex = external ? comboBoxNICList.Items.Count - 1 : -1;

View File

@ -105,7 +105,7 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
rbtnCHIN.Enabled = labelCHIN.Enabled = false;
labelWarningChinOption.Text =
!Helpers.CowleyOrGreater(connection) || Helpers.FeatureForbidden(connection, Host.RestrictVSwitchController) ?
Helpers.FeatureForbidden(connection, Host.RestrictVSwitchController) ?
string.Format(Messages.FEATURE_NOT_AVAILABLE_NEED_COWLEY_ENTERPRISE_OR_PLATINUM_PLURAL, Messages.CHINS) :
Messages.CHINS_NEED_VSWITCHCONTROLLER;

View File

@ -331,11 +331,7 @@ namespace XenAdmin.Wizards
else if (m_srWizardType is SrWizardType_Cslg)
{
AddPage(xenTabPageCslg);
if (Helpers.BostonOrGreater(xenConnection))
AddPages(xenTabPageCslgLocation, xenTabPageCslgSettings);
else
AddPages(new XenTabPage { Text = "" });
}
else if (m_srWizardType is SrWizardType_NetApp || m_srWizardType is SrWizardType_EqualLogic)
{
@ -431,56 +427,13 @@ namespace XenAdmin.Wizards
SetCustomDescription(m_srWizardType, xenTabPageVhdoNFS.SrDescription);
}
else if (senderPagetype == typeof(CSLG))
{
#region
if (Helpers.BostonOrGreater(xenConnection))
{
xenTabPageCslgLocation.SelectedStorageAdapter = xenTabPageCslg.SelectedStorageAdapter;
xenTabPageCslgSettings.SelectedStorageAdapter = xenTabPageCslg.SelectedStorageAdapter;
NotifyNextPagesOfChange(xenTabPageCslgLocation, xenTabPageCslgSettings);
}
else
{
RemovePagesFrom(_rbac ? 4 : 3);
if (xenTabPageCslg.SelectedStorageSystem != null)
{
AddPages(xenTabPageCslgSettings);
xenTabPageCslgSettings.SystemStorage = xenTabPageCslg.SelectedStorageSystem;
xenTabPageCslgSettings.StoragePools = xenTabPageCslg.StoragePools;
NotifyNextPagesOfChange(xenTabPageCslgLocation);
}
else if (xenTabPageCslg.NetAppSelected || xenTabPageCslg.DellSelected)
{
AddPage(xenTabPageFilerDetails);
NotifyNextPagesOfChange(xenTabPageFilerDetails);
if (xenTabPageCslg.NetAppSelected)
{
if (m_srWizardType is SrWizardType_Cslg)
{
m_srWizardType = ((SrWizardType_Cslg)m_srWizardType).ToNetApp();
xenTabPageCslg.SrWizardType = m_srWizardType;
}
xenTabPageFilerDetails.IsNetApp = true;
AddPage(xenTabPageNetApp);
}
else if (xenTabPageCslg.DellSelected)
{
if (m_srWizardType is SrWizardType_Cslg)
{
m_srWizardType = ((SrWizardType_Cslg)m_srWizardType).ToEqualLogic();
xenTabPageCslg.SrWizardType = m_srWizardType;
}
xenTabPageFilerDetails.IsNetApp = false;
AddPage(xentabPageEqualLogic);
}
}
}
foreach (var entry in xenTabPageCslg.DeviceConfigParts)
m_srWizardType.DeviceConfig[entry.Key] = entry.Value;
#endregion
}
else if (senderPagetype == typeof(CslgLocation))
{
@ -857,12 +810,9 @@ namespace XenAdmin.Wizards
return;
}
if (_srToReattach.type == "cslg" && Helpers.BostonOrGreater(_srToReattach.Connection)
&& xenTabPageCslg.SelectedStorageAdapter != null)
{
if (_srToReattach.type == "cslg" && xenTabPageCslg.SelectedStorageAdapter != null)
NextStep();
}
}
protected override string WizardPaneHelpID()
{

View File

@ -99,28 +99,9 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
get
{
var dconf = new Dictionary<string, string>();
if (Helpers.BostonOrGreater(Connection))
{
var adapter = comboBoxStorageSystem.SelectedItem as StorageLinkAdapterBoston;
if (adapter != null)
dconf[ADAPTER_ID] = adapter.Id;
}
else
{
var system = comboBoxStorageSystem.SelectedItem as CslgSystemStorage;
if (system != null)
dconf[STORAGE_SYSTEM_ID] = system.StorageSystemId;
StorageLinkCredentials credentials = GetStorageLinkCredentials(Connection);
if (credentials != null)
{
dconf["target"] = credentials.Host;
dconf["username"] = credentials.Username;
dconf["password"] = credentials.Password;
}
}
return dconf;
}
}
@ -140,7 +121,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
{
var credsList = new List<StorageLinkCredentials>();
foreach (IXenConnection c in ConnectionsManager.XenConnectionsCopy.FindAll(c => c.IsConnected && Helpers.MidnightRideOrGreater(c) && !Helpers.FeatureForbidden(c, Host.RestrictStorageChoices)))
foreach (IXenConnection c in ConnectionsManager.XenConnectionsCopy.FindAll(c => c.IsConnected && !Helpers.FeatureForbidden(c, Host.RestrictStorageChoices)))
{
var p = Helpers.GetPoolOfOne(c);
credsList.Add(p.GetStorageLinkCredentials());
@ -150,53 +131,6 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
return credsList;
}
private StorageLinkCredentials GetStorageLinkCredentials(IXenConnection connection)
{
if (Helpers.BostonOrGreater(connection))
return null;
if (_storageLinkObject != null)
{
return GetAllValidStorageLinkCreds().Find(c =>
c.Host == _storageLinkObject.StorageLinkConnection.Host &&
c.Username == _storageLinkObject.StorageLinkConnection.Username &&
c.Password == _storageLinkObject.StorageLinkConnection.Password);
}
else
{
// just do a check that local creds have been correctly moved the server pool object.
Settings.CslgCredentials localCreds = Settings.GetCslgCredentials(connection);
Debug.Assert(localCreds == null || string.IsNullOrEmpty(localCreds.Host));
Pool pool = Helpers.GetPoolOfOne(connection);
if (pool != null)
{
StorageLinkCredentials creds = pool.GetStorageLinkCredentials();
if (creds != null && creds.IsValid)
{
return creds;
}
else
{
// if there aren't any creds then try importing from another pool. The user will probably only
// have one set of CSLG creds and they just haven't set the creds to this pool yet. Do it for them.
var credsList = GetAllValidStorageLinkCreds();
if (credsList.Count > 0 && !Helpers.BostonOrGreater(Connection))
{
var action = new SetCslgCredentialsToPoolAction(pool.Connection, credsList[0].Host, credsList[0].Username, credsList[0].Password);
new ActionProgressDialog(action, ProgressBarStyle.Marquee).ShowDialog(this);
return pool.GetStorageLinkCredentials();
}
}
}
return null;
}
}
public void SetStorageLinkObject(IStorageLinkObject storageLinkObject)
{
_storageLinkObject = storageLinkObject;
@ -209,25 +143,11 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
public bool PerformStorageSystemScan()
{
var items = new List<object>();
StorageLinkCredentials credentials = null;
SrCslgStorageSystemScanAction scanAction = null;
if (_storageLinkObject != null || (Connection.IsConnected && !Helpers.FeatureForbidden(Connection, Host.RestrictStorageChoices) && Helpers.MidnightRideOrGreater(Connection)))
if (_storageLinkObject != null || (Connection.IsConnected && !Helpers.FeatureForbidden(Connection, Host.RestrictStorageChoices)))
{
if (_srToReattach == null || _srToReattach.type == "cslg")
{
credentials = GetStorageLinkCredentials(Connection);
if (credentials != null && credentials.IsValid)
{
scanAction = new SrCslgStorageSystemScanAction(Program.MainWindow, Connection,
Program.StorageLinkConnections.GetCopy(),
credentials.Host, credentials.Username,
credentials.PasswordSecret);
}
else if (Helpers.BostonOrGreater(Connection))
{
var action = new SrCslgAdaptersScanAction(Connection);
var dialog = new ActionProgressDialog(action, ProgressBarStyle.Marquee);
// never show the error message if it fails.
@ -249,34 +169,11 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
else
return false;
}
if (scanAction != null)
{
var dialog = new ActionProgressDialog(scanAction, ProgressBarStyle.Marquee);
// never show the error message if it fails.
scanAction.Completed += s =>
{
if (!scanAction.Succeeded)
{
Program.Invoke(dialog, dialog.Close);
}
};
dialog.ShowDialog(this);
if (scanAction.Succeeded)
{
_storages = scanAction.CslgSystemStorages;
items.AddRange(Util.PopulateList<object>(_storages));
items.Sort((x, y) => x.ToString().CompareTo(y.ToString()));
}
}
}
}
bool bostonHasDell = false;
bool bostonHasNetapp = false;
if (Helpers.BostonOrGreater(Connection) && items != null)
if (items != null)
{
bostonHasDell = (items.Find(item => ((StorageLinkAdapterBoston)item).Id == "DELL_EQUALLOGIC") != null);
bostonHasNetapp = (items.Find(item => ((StorageLinkAdapterBoston)item).Id == "NETAPP") != null);
@ -286,30 +183,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
if (_storageLinkObject != null)
{
// the wizard was launched with a storagelink-server, storage-system or storage-pool selected.
if (scanAction != null && scanAction.Succeeded)
{
comboBoxStorageSystem.Items.Add(new NonSelectableComboBoxItem(string.Format(Messages.CSLG_STORAGELINK_SERVER, credentials.Host), true));
comboBoxStorageSystem.Items.AddRange(items.ToArray());
comboBoxStorageSystem.Items.Add(new NonSelectableComboBoxItem(Messages.ADD_HOST, false));
// if a specific storage-system was selected when the wizard was launched then select that storage-system
// in the combo-box here.
var system = _storageLinkObject as StorageLinkSystem;
if (system == null)
{
// if a specific storage-pool was selected when the wizard was launched then select the storage-system
// of that storage-pool here.
var storagePool = _storageLinkObject as StorageLinkPool;
system = storagePool == null ? null : storagePool.StorageLinkSystem;
}
if (system != null)
{
comboBoxStorageSystem.SelectedItem = items.Find(o => ((CslgSystemStorage)o).StorageSystemId == system.opaque_ref);
}
}
;
}
else if (_srToReattach != null)
{
@ -323,46 +197,20 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
// a direct-connect NetApp is being reattached. Only add this item.
comboBoxStorageSystem.Items.Add(Messages.CSLG_NETAPP_DIRECT);
}
else if (credentials != null)
{
// credentials can be null if we don't have a license which supports CSLG.
// re-attaching StorageLink SR
Debug.Assert(_srToReattach.type == "cslg");
comboBoxStorageSystem.Items.Add(new NonSelectableComboBoxItem(string.Format(Messages.CSLG_STORAGELINK_SERVER, credentials.Host), true));
comboBoxStorageSystem.Items.AddRange(items.ToArray());
}
}
else
{
// a pool or host was selected in the mainwindow tree when the wizard was launched.
bool canAdd = scanAction != null && scanAction.Succeeded && scanAction.StorageLinkConnection != null;
bool showHeaders = scanAction != null && scanAction.Succeeded && (items.Count > 0 || scanAction.StorageLinkConnection != null);
if (showHeaders || Helpers.BostonOrGreater(Connection))
{
if (!bostonHasDell || !bostonHasNetapp)
comboBoxStorageSystem.Items.Add(new NonSelectableComboBoxItem(Messages.CSLG_DIRECT_CONNECTION, true));
}
if (!bostonHasDell)
comboBoxStorageSystem.Items.Add(Messages.CSLG_DELL_DIRECT);
if (!bostonHasNetapp)
comboBoxStorageSystem.Items.Add(Messages.CSLG_NETAPP_DIRECT);
if (showHeaders)
{
comboBoxStorageSystem.Items.Add(new NonSelectableComboBoxItem(string.Format(Messages.CSLG_STORAGELINK_SERVER, credentials.Host), true));
comboBoxStorageSystem.Items.AddRange(items.ToArray());
}
if (canAdd)
{
comboBoxStorageSystem.Items.Add(new NonSelectableComboBoxItem(Messages.ADD_HOST, false));
}
}
if (Helpers.BostonOrGreater(Connection) && items != null && items.Count > 0)
if (items != null && items.Count > 0)
{
if (!bostonHasDell || !bostonHasNetapp)
comboBoxStorageSystem.Items.Add(new NonSelectableComboBoxItem(Messages.CSLG_STORAGELINK_ADAPTERS, true));
@ -373,8 +221,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
{
// select the first selectable item if nothing's already been selected.
comboBoxStorageSystem.SelectedItem = Util.PopulateList<object>(comboBoxStorageSystem.Items).Find(s => !(s is NonSelectableComboBoxItem));
if (_srToReattach != null && _srToReattach.type == "cslg" &&
Helpers.BostonOrGreater(Connection))
if (_srToReattach != null && _srToReattach.type == "cslg")
{
comboBoxStorageSystem.SelectedItem =
Util.PopulateList<object>(comboBoxStorageSystem.Items).Find(s =>
@ -404,7 +251,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
private bool PerformStoragePoolScan()
{
StorageLinkCredentials credentials = GetStorageLinkCredentials(Connection);
StorageLinkCredentials credentials = null;
var scanAction = new SrCslgStoragePoolScanAction(Connection, Program.StorageLinkConnections.GetCopy(), credentials.Host,
credentials.Username, credentials.PasswordSecret, SelectedStorageSystem.StorageSystemId);
@ -418,42 +265,6 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
return scanAction.Succeeded;
}
private void AddStorageSystem()
{
StorageLinkConnection slCon = Program.StorageLinkConnections.GetCopy().Find(s => s.Host == GetStorageLinkCredentials(Connection).Host);
if (slCon == null)
return;
var systemsBefore = new List<StorageLinkSystem>(slCon.Cache.StorageSystems);
AddStorageLinkSystemCommand command = new AddStorageLinkSystemCommand(Program.MainWindow, slCon.Cache.Server, Parent);
command.Completed += (s, ee) =>
{
if (ee.Success)
{
var systemsAfter = new List<StorageLinkSystem>(slCon.Cache.StorageSystems);
ThreadPool.QueueUserWorkItem(o =>
{
Program.Invoke(Program.MainWindow, () =>
{
PerformStorageSystemScan();
if (systemsAfter.Count > systemsBefore.Count)
{
// the new item should be selected.
comboBoxStorageSystem.SelectedItem = systemsAfter.Find(ss => !systemsBefore.Contains(ss));
comboBoxStorageSystem.DroppedDown = true;
}
});
});
}
};
command.Execute();
}
#region XenTabPage overrides
public override void PageLeave(PageLoadedDirection direction, ref bool cancel)
@ -466,29 +277,27 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
public override void PopulatePage()
{
linkLabelGotoStorageLinkProperties.Visible = Helpers.MidnightRideOrGreater(Connection) && _storageLinkObject == null;
linkLabelGotoStorageLinkProperties.Visible = _storageLinkObject == null;
labelStorageLinkPropertiesLinkBlurb.Visible = linkLabelGotoStorageLinkProperties.Visible;
labelAdapter.Visible = Helpers.BostonOrGreater(Connection);
labelSystem.Visible = flowLayoutPanel1.Visible = !Helpers.BostonOrGreater(Connection);
if (Helpers.BostonOrGreater(Connection))
labelAdapter.Visible = true;
labelSystem.Visible = flowLayoutPanel1.Visible = false;
labelStorageSystem.Text = Messages.CSLG_STORAGEADAPTER;
}
public override string Text
{
get { return Helpers.BostonOrGreater(Connection) ? Messages.STORAGE_ADAPTER : Messages.STORAGE_SYSTEM; }
get { return Messages.STORAGE_ADAPTER; }
}
public override string PageTitle
{
get { return Helpers.BostonOrGreater(Connection) ? Messages.NEWSR_CSLG_ADAPTER_PAGE_TITLE : Messages.NEWSR_CSLG_PAGE_TITLE; }
get { return Messages.NEWSR_CSLG_ADAPTER_PAGE_TITLE; }
}
public override string HelpID
{
get { return Helpers.BostonOrGreater(Connection) ? "SL_System" : "SL_System_PreBoston"; }
get { return "SL_System"; }
}
public override bool EnableNext()
@ -534,12 +343,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
{
if (comboBoxStorageSystem.SelectedItem is NonSelectableComboBoxItem)
{
if (comboBoxStorageSystem.SelectedItem.ToString() == Messages.ADD_HOST)
{
Program.BeginInvoke(Program.MainWindow, AddStorageSystem);
comboBoxStorageSystem.SelectedIndex = -1;
}
else if (comboBoxStorageSystem.SelectedIndex < comboBoxStorageSystem.Items.Count - 1 &&
if (comboBoxStorageSystem.SelectedIndex < comboBoxStorageSystem.Items.Count - 1 &&
(_storageSystemComboLastSelectedIndex < comboBoxStorageSystem.SelectedIndex || comboBoxStorageSystem.SelectedIndex == 0))
{
_storageSystemComboLastSelectedIndex = comboBoxStorageSystem.SelectedIndex;
@ -602,11 +406,6 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
e.Graphics.DrawImageUnscaled(Resources.sl_system_16, new Point(e.Bounds.X + indent, e.Bounds.Y + 1));
Drawing.DrawText(e.Graphics, item.ToString(), e.Font, textRect, e.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.EndEllipsis);
}
else if (item.ToString() == Messages.ADD_HOST)
{
e.Graphics.DrawImageUnscaled(Resources.sl_add_storage_system_small_16, new Point(e.Bounds.X + indent, e.Bounds.Y + 1));
Drawing.DrawText(e.Graphics, item.ToString(), e.Font, textRect, e.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.EndEllipsis);
}
else if (nonSelectable != null)
{
// bold headings

View File

@ -79,23 +79,11 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
{
get
{
var credentials = StorageLinkCredentials;
var dconf = new Dictionary<string, string>();
if (Helpers.BostonOrGreater(Connection))
{
dconf[TARGET] = textBoxTarget.Text;
dconf[USERNAME] = textBoxUsername.Text;
dconf[PASSWORD] = textBoxPassword.Text;
dconf[STORAGE_SYSTEM_ID] = SystemStorage.StorageSystemId;
}
else if (credentials != null)
{
dconf[TARGET] = credentials.Host;
dconf[USERNAME] = credentials.Username;
dconf[PASSWORD] = credentials.Password;
}
return dconf;
}
}
@ -217,11 +205,6 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
e.Graphics.DrawImageUnscaled(Resources.sl_system_16, new Point(e.Bounds.X + indent, e.Bounds.Y + 1));
Drawing.DrawText(e.Graphics, item.ToString(), e.Font, textRect, e.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.EndEllipsis);
}
else if (item.ToString() == Messages.ADD_HOST)
{
e.Graphics.DrawImageUnscaled(Resources.sl_add_storage_system_small_16, new Point(e.Bounds.X + indent, e.Bounds.Y + 1));
Drawing.DrawText(e.Graphics, item.ToString(), e.Font, textRect, e.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.EndEllipsis);
}
else if (nonSelectable != null)
{
// bold headings

View File

@ -65,7 +65,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages
public override bool EnableNext()
{
return textBoxName.Text.Trim() != "" && ValidName();
return textBoxName.Text.Trim() != "";
}
public override bool EnablePrevious()
@ -113,17 +113,6 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages
textBoxDescription.Enabled = labelDescription.Enabled = !checkBoxAutoDescription.Checked;
}
private bool ValidName()
{
if (Helpers.BostonOrGreater(Connection))
return true;
if (m_srWizardType is SrWizardType_Cslg || m_srWizardType is SrWizardType_NetApp || m_srWizardType is SrWizardType_EqualLogic)
return _nameRegex.IsMatch(textBoxName.Text);
return true;
}
public int MatchingFrontends { private get; set; }
#region Event handlers
@ -136,7 +125,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages
private void textBoxName_TextChanged(object sender, EventArgs e)
{
OnPageUpdated();
labelInvalidName.Visible = textBoxName.Text.Length > 0 && !ValidName();
labelInvalidName.Visible = false;
}
#endregion

View File

@ -60,7 +60,7 @@ namespace XenAdmin.Wizards.NewVMWizard
_template = template;
ServersGridView.Rows.Clear();
if (Helpers.MidnightRideOrGreater(Connection) && template.DefaultTemplate)
if (template.DefaultTemplate)
{
List<Host> hosts = new List<Host>(Connection.Cache.Hosts);
hosts.Sort();

View File

@ -77,7 +77,7 @@ namespace XenAdmin.Wizards.NewVMWizard
initialising = true;
Template = SelectedTemplate;
if (Template.has_ballooning && Helpers.MidnightRideOrGreater(Template.Connection) && !Helpers.FeatureForbidden(Template, Host.RestrictDMC))
if (Template.has_ballooning && !Helpers.FeatureForbidden(Template, Host.RestrictDMC))
memoryMode = (Template.memory_dynamic_max == Template.memory_static_max ? 2 : 3);
else
memoryMode = 1;

View File

@ -66,8 +66,6 @@ namespace XenAdmin.Wizards.NewVMWizard
PopulateTemplatesBox();
templatesLoaded = true;
checkBoxCopyBiosStrings.Visible = Helpers.MidnightRideOrGreater(Connection);
if (m_selectedTemplate == null)
return;

View File

@ -89,16 +89,8 @@ namespace XenAdmin.Wizards.PatchingWizard
case UpdateType.NewRetail:
case UpdateType.Existing:
textBoxLog.Text = PatchingWizardModeGuidanceBuilder.ModeRetailPatch(SelectedServers, Patch);
if (Helpers.MidnightRideOrGreater(SelectedServers[0].Connection))
{
AutomaticRadioButton.Enabled = true;
AutomaticRadioButton.Checked = true;
}
else
{
AutomaticRadioButton.Enabled = false;
ManualRadioButton.Checked = true;
}
break;
case UpdateType.NewOem:
ManualRadioButton.Checked = true;

View File

@ -236,7 +236,7 @@ namespace XenAdmin.Wizards.PatchingWizard
//Do RBAC check
foreach (Host master in masters)
{
if(Helpers.MidnightRideOrGreater(master.Connection)&&!(Role.CanPerform(new RbacMethodList("pool_patch.apply"),master.Connection)))
if (!(Role.CanPerform(new RbacMethodList("pool_patch.apply"), master.Connection)))
{
string nameLabel = master.Name;
Pool pool = Helpers.GetPoolOfOne(master.Connection);

View File

@ -77,7 +77,6 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
protected override void FinishWizard()
{
var brokenSRs = RollingUpgradeWizardSelectPool.SelectedMasters
.Where(Helpers.BostonOrGreater)
.Any(master => master != null && master.Connection.Cache.SRs.Any(sr => sr.IsBroken(true)));
if(brokenSRs)
{

View File

@ -150,7 +150,7 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
private static bool IsNotAnUpgradeableVersion(Host host)
{
return !Helpers.MidnightRideOrGreater(host);
return false; // currently, all supported versions are upgradable
}
public IList<Host> SelectedMasters

View File

@ -456,9 +456,6 @@ namespace XenAdmin
{
// Adds the report node
TreeNode currentReportTreeNode = GetReportTreeNode(currentNodes[i]);
// Filter out Audit log report if it's early version than MidnightRide
if (Helpers.MidnightRideOrGreater(Pool.Connection) || (!Helpers.MidnightRideOrGreater(Pool.Connection) && !_midnightRideReports.Contains(currentReportTreeNode.Text)))
treeViewReportList.Nodes.Add(currentReportTreeNode);
// Add in each subscription for the current report

View File

@ -314,10 +314,7 @@ namespace XenAdminTests.TabsAndMenus
new ExpectedSeparator(),
new ExpectedTextMenuItem("&High Availability...", true)
};
if (Helpers.CowleyOrGreater(pool.Connection))
expected.Add(new ExpectedTextMenuItem("VM Pr&otection Policies...", true));
if (Helpers.BostonOrGreater(pool.Connection))
{
expected.Add(new ExpectedTextMenuItem("Manage &vApps...", true));
expected.Add(new ExpectedTextMenuItem("Di&saster Recovery", true, new ExpectedMenuItem[]
{
@ -327,8 +324,6 @@ namespace XenAdminTests.TabsAndMenus
"&Disaster Recovery Wizard...",
true)
}));
}
expected.AddRange(new List<ExpectedMenuItem>{
new ExpectedSeparator(),
new ExpectedTextMenuItem("&Add Server", true, false,
@ -413,7 +408,7 @@ namespace XenAdminTests.TabsAndMenus
}));
expectedMenuItems.Add(new ExpectedSeparator());
}
else if (Helpers.CowleyOrGreater(vm.Connection) && vm.IsOnSharedStorage() == string.Empty || !Helpers.CowleyOrGreater(vm.Connection))
else if (vm.IsOnSharedStorage() == string.Empty)
{
expectedMenuItems.Add(new ExpectedTextMenuItem("M&igrate to Server", true, false,
new ExpectedMenuItem[]
@ -427,7 +422,6 @@ namespace XenAdminTests.TabsAndMenus
expectedMenuItems.Add(new ExpectedTextMenuItem("Ta&ke a Snapshot...", true));
if (Helpers.CowleyOrGreater(vm.Connection))
expectedMenuItems.Add(new ExpectedTextMenuItem("Assign to VM Protection Polic&y", true, new ExpectedMenuItem[] { new ExpectedTextMenuItem("&New Policy...", true), new ExpectedSeparator(), new ExpectedTextMenuItem("&1 Ewan's backups", true), new ExpectedTextMenuItem("&2 grage", true) }));
expectedMenuItems.Add(new ExpectedSeparator());
expectedMenuItems.Add(new ExpectedTextMenuItem("P&roperties", true));
@ -547,9 +541,9 @@ namespace XenAdminTests.TabsAndMenus
{
var expected = new List<ExpectedMenuItem>(expectedForAll);
if (Helpers.CowleyOrGreater(snapshot.Connection) && snapshot.tags.Length > 0)
if (snapshot.tags.Length > 0)
expected.Insert(5, new ExpectedTextMenuItem("Untag Ob&ject", true));
if (Helpers.CowleyOrGreater(snapshot.Connection) && Folders.GetFolder(snapshot) != null)
if (Folders.GetFolder(snapshot) != null)
expected.Insert(5, new ExpectedTextMenuItem("Remove from &folder", true));
VerifyContextMenu(snapshot, expected.ToArray());
}
@ -560,9 +554,9 @@ namespace XenAdminTests.TabsAndMenus
{
var expected = new List<ExpectedMenuItem>(expectedForAll);
if (Helpers.CowleyOrGreater(snapshot.Connection) && snapshot.tags.Length > 0)
if (snapshot.tags.Length > 0)
expected.Insert(5, new ExpectedTextMenuItem("Untag Ob&ject", true));
if (Helpers.CowleyOrGreater(snapshot.Connection) && Folders.GetFolder(snapshot) != null)
if (Folders.GetFolder(snapshot) != null)
expected.Insert(5, new ExpectedTextMenuItem("Remove from &folder", true));
VerifyContextMenu(snapshot, expected.ToArray());
}

View File

@ -306,7 +306,7 @@ namespace XenAdmin.Actions
RbacMethodList rbacMethodList;
if (Connection.Session.IsLocalSuperuser || !Helpers.MidnightRideOrGreater(Connection) || XenAdminConfigManager.Provider.DontSudo) // don't need to / can't / don't want to sudo
if (Connection.Session.IsLocalSuperuser || XenAdminConfigManager.Provider.DontSudo) // don't need / want to sudo
rbacMethodList = new RbacMethodList();
else
rbacMethodList = GetApiMethodsToRoleCheck;

View File

@ -97,15 +97,8 @@ namespace XenAdmin.Actions.HostActions
}
public LicenseDataStruct(XenAPI.Host host)
{
if (Helpers.MidnightRideOrGreater(host))
{
Edition = host.edition;
}
else
{
Edition = host.license_params.ContainsKey("sku_type") ? host.license_params["sku_type"] : "";
}
ExpiryDate = host.license_params.ContainsKey("expiry") ? host.license_params["expiry"] : "";
}
}
@ -193,17 +186,10 @@ namespace XenAdmin.Actions.HostActions
{
string newEdition;
if (String.IsNullOrEmpty(CurrentEdition))
{
if (Helpers.MidnightRideOrGreater(host))
{
newEdition = host.edition;
}
else
{
newEdition = host.license_params.ContainsKey("sku_type") ? host.license_params["sku_type"] : "";
}
}
else
{
newEdition = CurrentEdition;
}

View File

@ -65,7 +65,6 @@ namespace XenAdmin.Actions
private readonly long mtu;
private readonly bond_mode bondMode;
private readonly Dictionary<Host, List<PIF>> PIFs = new Dictionary<Host, List<PIF>>();
private readonly bool bostonOrGreater; // in Boston, most network configuration is done automatically by xapi (PR-1006)
private readonly bool tampaOrGreater;
private readonly Host Master;
private readonly Bond.hashing_algoritm hashingAlgoritm;
@ -94,7 +93,6 @@ namespace XenAdmin.Actions
if (Master == null)
throw new Failure(Failure.INTERNAL_ERROR, "Pool master has gone away");
bostonOrGreater = Helpers.BostonOrGreater(connection);
tampaOrGreater = Helpers.TampaOrGreater(connection);
foreach (Host host in Connection.Cache.Hosts)
@ -133,7 +131,7 @@ namespace XenAdmin.Actions
new_bonds = new List<NewBond>();
network = null;
Connection.ExpectDisruption = true;
int inc = 100 / (Connection.Cache.HostCount * 3 + 1);
int inc = 100 / (Connection.Cache.HostCount * 2 + 1);
string network_ref = CreateNetwork(0, inc);
try
@ -161,9 +159,7 @@ namespace XenAdmin.Actions
RelatedTask = tampaOrGreater ?
Bond.async_create(Session, network_ref, pif_refs, "", bondMode, bondProperties) :
bostonOrGreater ?
Bond.async_create(Session, network_ref, pif_refs, "", bondMode) :
Bond.async_create(Session, network_ref, pif_refs, "");
Bond.async_create(Session, network_ref, pif_refs, "", bondMode);
PollToCompletion(lo, lo + inc);
lo += inc;
@ -188,13 +184,6 @@ namespace XenAdmin.Actions
lo += inc;
ReconfigureManagementInterfaces(new_bond.slaves, new_bond.master, lo);
}
foreach (NewBond new_bond in new_bonds)
{
lo += inc;
if (!bostonOrGreater)
NetworkingActionHelpers.Plug(this, new_bond.master, lo);
}
}
catch (Exception)
{
@ -251,38 +240,8 @@ namespace XenAdmin.Actions
foreach (PIF pif in slaves)
{
lo += inc;
// In Boston and later, the only thing we need to do is move the ManagementPurpose
// (= management interface name) to the bond (see PR-1006/CP-2059).
if (bostonOrGreater)
{
NetworkingActionHelpers.MoveManagementInterfaceName(this, pif, new_master);
}
else if (pif.management)
{
log.DebugFormat("Moving primary management interface to {0}...", pif.uuid);
NetworkingActionHelpers.ReconfigureSinglePrimaryManagement(this, pif, new_master, lo);
log.DebugFormat("Moving primary management interface to {0} done.", pif.uuid);
}
else if (pif.IsSecondaryManagementInterface(true))
{
log.DebugFormat("Moving secondary management interface to {0}...", pif.uuid);
ReconfigureSecondaryManagement(pif, new_master, lo);
log.DebugFormat("Moving secondary management interface to {0} done.", pif.uuid);
}
}
}
private void ReconfigureSecondaryManagement(PIF src, PIF dest, int hi)
{
System.Diagnostics.Trace.Assert(!bostonOrGreater);
int mid = (PercentComplete + hi) / 2;
PIF new_dest = NetworkingHelper.CopyIPConfig(src, dest);
NetworkingActionHelpers.BringDown(this, src, mid);
NetworkingActionHelpers.BringUp(this, new_dest, dest, hi);
}
/// <summary>
@ -306,24 +265,9 @@ namespace XenAdmin.Actions
}
try
{
if (bostonOrGreater)
{
NetworkingActionHelpers.MoveManagementInterfaceName(this, master, slave);
}
else if (master.management)
{
log.DebugFormat("Reverting primary management interface change for {0} as part of cleanup...", master.uuid);
NetworkingActionHelpers.ReconfigurePrimaryManagement(this, master, slave, PercentComplete);
log.DebugFormat("Reverting primary management interface change for {0} as part of cleanup done.", master.uuid);
}
else if (master.IsSecondaryManagementInterface(true))
{
log.DebugFormat("Reverting secondary management interface change for {0} as part of cleanup...", master.uuid);
ReconfigureSecondaryManagement(master, slave, PercentComplete);
log.DebugFormat("Reverting secondary management interface change for {0} as part of cleanup done.", master.uuid);
}
}
catch (Exception exn)
{
log.Warn(exn, exn);
@ -337,7 +281,6 @@ namespace XenAdmin.Actions
XenAPI.Network network = new XenAPI.Network();
network.name_label = name_label;
network.AutoPlug = autoplug;
if (Helpers.CowleyOrGreater(Connection))
network.MTU = mtu;
if (network.other_config == null)
network.other_config = new Dictionary<string, string>();

View File

@ -90,11 +90,6 @@ namespace XenAdmin.Actions
/// </summary>
private readonly string Name;
/// <summary>
/// In Boston, most network configuration is done automatically by xapi (PR-1006)
/// </summary>
private readonly bool bostonOrGreater;
/// <summary>
///
/// </summary>
@ -120,7 +115,6 @@ namespace XenAdmin.Actions
Name = bond.Name;
Pool = Helpers.GetPoolOfOne(Connection);
bostonOrGreater = Helpers.BostonOrGreater(Connection);
foreach (Host host in Connection.Cache.Hosts)
{
@ -145,10 +139,7 @@ namespace XenAdmin.Actions
pif.Locked = true;
}
if (bostonOrGreater)
{
FirstSlaves[master] = Connection.Resolve(b.primary_slave);
}
if (!FirstSlaves.ContainsKey(master) && slaves.Count != 0)
FirstSlaves[master] = slaves[0];
@ -173,25 +164,6 @@ namespace XenAdmin.Actions
string old_network_name = Network == null ? "" : Network.Name;
Exception e = null;
if (!bostonOrGreater)
{
if (Network != null && NewNetworkName != null)
{
// Unplug all active VIFs, because we can't fiddle with the PIFs on the network while the
// VIFs are active (xapi won't let us).
foreach (VIF vif in Connection.ResolveAll(Network.VIFs))
{
if (vif.currently_attached)
{
log.DebugFormat("Unplugging VIF {0} from network {1}...", vif.uuid, old_network_name);
VIF.unplug(Session, vif.opaque_ref);
unplugged_vifs.Add(vif);
log.DebugFormat("VIF {0} unplugged from network {1}.", vif.uuid, old_network_name);
}
}
}
}
BestEffort(ref e, ReconfigureManagementInterfaces);
if (e != null)
@ -199,7 +171,7 @@ namespace XenAdmin.Actions
PercentComplete = 50;
int inc = 40 / (Bonds.Count + Masters.Count + Slaves.Count);
int inc = 40 / Bonds.Count;
int lo = PercentComplete;
foreach (Bond bond in Bonds)
@ -212,19 +184,6 @@ namespace XenAdmin.Actions
lo += inc;
}
foreach (PIF master in Secondaries)
{
if (!bostonOrGreater)
ReconfigureSecondaryManagement(master, PercentComplete + inc);
PercentComplete += inc;
}
if (!bostonOrGreater)
{
foreach (PIF pif in Slaves)
NetworkingActionHelpers.Plug(this, pif, PercentComplete + inc);
}
if (Network != null)
{
if (NewNetworkName == null)
@ -249,20 +208,6 @@ namespace XenAdmin.Actions
n.SaveChanges(Session);
log.DebugFormat("Renaming network {0} ({1}) done.", NewNetworkName, n.uuid);
});
// Replug all the VIFs that we unplugged before.
if (!bostonOrGreater)
{
foreach (VIF vif in unplugged_vifs)
{
log.DebugFormat("Replugging VIF {0} into network {1}...", vif.opaque_ref, NewNetworkName);
BestEffort(ref e, delegate()
{
VIF.plug(Session, vif.opaque_ref);
log.DebugFormat("Replugging VIF {0} into network {1} done.", vif.opaque_ref, NewNetworkName);
});
}
}
}
}
@ -280,39 +225,8 @@ namespace XenAdmin.Actions
foreach (PIF master in Masters)
{
progress += inc;
if (bostonOrGreater)
{
NetworkingActionHelpers.MoveManagementInterfaceName(this, master, FirstSlaves[master]);
}
else if (master.management)
{
ReconfigurePrimaryManagement(master, progress);
}
else if (master.IsSecondaryManagementInterface(true))
{
DeconfigureSecondaryManagement(master, progress);
}
}
}
private void ReconfigurePrimaryManagement(PIF master, int hi)
{
System.Diagnostics.Trace.Assert(!bostonOrGreater);
NetworkingActionHelpers.ReconfigureSinglePrimaryManagement(this, master, FirstSlaves[master], hi);
}
private void DeconfigureSecondaryManagement(PIF master, int hi)
{
System.Diagnostics.Trace.Assert(!bostonOrGreater);
NewFirstSlaves[master] = NetworkingHelper.CopyIPConfig(master, FirstSlaves[master]);
NetworkingActionHelpers.BringDown(this, master, hi);
Secondaries.Add(master);
}
private void ReconfigureSecondaryManagement(PIF master, int hi)
{
System.Diagnostics.Trace.Assert(!bostonOrGreater);
NetworkingActionHelpers.BringUp(this, NewFirstSlaves[master], FirstSlaves[master], hi);
}
private void UnlockAll()

View File

@ -47,7 +47,6 @@ namespace XenAdmin.Actions
private readonly Dictionary<VM, VMStartupOptions> startupOptions;
private readonly SR[] heartbeatSRs;
private readonly long failuresToTolerate;
private readonly bool ignoreStartupOptions; // ignore start order and delay
public EnableHAAction(Pool pool, Dictionary<VM, VMStartupOptions> startupOptions, List<SR> heartbeatSRs, long failuresToTolerate)
: base(pool.Connection, string.Format(Messages.ENABLING_HA_ON, Helpers.GetName(pool).Ellipsise(50)), Messages.ENABLING_HA, false)
@ -61,7 +60,6 @@ namespace XenAdmin.Actions
this.startupOptions = startupOptions;
this.heartbeatSRs = heartbeatSRs.ToArray();
this.failuresToTolerate = failuresToTolerate;
ignoreStartupOptions = Helpers.HaIgnoreStartupOptions(pool.Connection);
}
public List<SR> HeartbeatSRs
@ -83,14 +81,12 @@ namespace XenAdmin.Actions
XenAPI.VM.SetHaRestartPriority(this.Session, vm, (VM.HA_Restart_Priority)startupOptions[vm].HaRestartPriority);
// Set new VM order and start_delay
if (!ignoreStartupOptions)
{
log.DebugFormat("Setting start order on {0} to {1}", vm.Name, startupOptions[vm].Order);
XenAPI.VM.set_order(this.Session, vm.opaque_ref, startupOptions[vm].Order);
log.DebugFormat("Setting start order on {0} to {1}", vm.Name, startupOptions[vm].StartDelay);
XenAPI.VM.set_start_delay(this.Session, vm.opaque_ref, startupOptions[vm].StartDelay);
}
this.PercentComplete = (int)(++i * increment);
}
}

View File

@ -80,8 +80,6 @@ namespace XenAdmin.Actions
_srIsShared = srIsShared;
_dconf = dconf;
_smconf = smconf;
if (_srType == SR.SRTypes.cslg && !Helpers.BostonOrGreater(connection))
_SLConnection = copyStorageLinkConnections.Find(s => s.Host == _dconf["target"]);
#region RBAC Dependencies
ApiMethodsToRoleCheck.AddRange(StaticRBACDependencies);
@ -115,8 +113,6 @@ namespace XenAdmin.Actions
log.DebugFormat("is shared='{0}'", _srIsShared);
string secretuuid = null;
if (Helpers.MidnightRideOrGreater(Connection))
{
string value;
if (_dconf.TryGetValue("cifspassword", out value))
{
@ -130,25 +126,6 @@ namespace XenAdmin.Actions
{
secretuuid = CreateSecret("chappassword", value);
}
}
if (Helpers.MidnightRideOrGreater(Connection))
{
string tempvalue;
System.Diagnostics.Debug.Assert(!_dconf.TryGetValue("password", out tempvalue), "The device config contains 'password', but it should have already been removed!");
System.Diagnostics.Debug.Assert(!_dconf.TryGetValue("cifspassword", out tempvalue), "The device config contains 'cifspassword', but it should have already been removed!");
System.Diagnostics.Debug.Assert(!_dconf.TryGetValue("chappassword", out tempvalue), "The device config contains 'chappassword', but it should have already been removed!");
}
if (_srType == SR.SRTypes.cslg && !Helpers.BostonOrGreater(Connection))
{
// make sure this connection is added to the storagelink service.
StorageLinkConnection slCon = _SLConnection;
if (slCon != null)
{
slCon.AddXenConnection(Connection);
}
}
Description = Messages.ACTION_SR_CREATING;
XenRef<SR> sr;

View File

@ -70,15 +70,7 @@ namespace XenAdmin.Actions
{
// CA-40132 create a new secret based on the secret that was passed in to the constructor. This is required so that the
// server doesn't associate the secret with a particular SR and then delete it when the SR is detached.
string newPasswordSecret = "";
if (!Helpers.BostonOrGreater(Connection))
{
string secretRef = Secret.get_by_uuid(Session, _passwordSecret);
string password = Secret.get_value(Session, secretRef);
newPasswordSecret = Secret.CreateSecret(Session, password);
}
else
newPasswordSecret = Secret.CreateSecret(Session, _passwordSecret);
string newPasswordSecret = Secret.CreateSecret(Session, _passwordSecret);
dconf["password_secret"] = newPasswordSecret;
try

View File

@ -132,8 +132,6 @@ namespace XenAdmin.Actions
provisioningTypes.Add(new CslgParameter(null, Messages.NEWSR_CSLG_DEFAULT_PROVISIONING));
}
if (Helpers.BostonOrGreater(Connection))
{
uint capacity = 0;
uint usedSpace = 0;
try
@ -148,9 +146,6 @@ namespace XenAdmin.Actions
(StorageLinkEnums.ProvisioningType)Enum.Parse(typeof(StorageLinkEnums.ProvisioningType), provisioningTypes[0].Name.ToUpper()));
output.Add(new CslgStoragePool(displayName, storagePoolId, raidTypes, provisioningTypes, !string.IsNullOrEmpty(parentStoragePoolId), storageLinkPool));
}
else
output.Add(new CslgStoragePool(displayName, storagePoolId, raidTypes, provisioningTypes, !string.IsNullOrEmpty(parentStoragePoolId), null));
}
return output;
@ -167,36 +162,10 @@ namespace XenAdmin.Actions
dconf["adapterid"] = _adapterId;
Log.DebugFormat("Attempting to find pools on {0}.", _storageSystemId);
if (Connection != null && (
(!Helpers.CowleyOrGreater(Connection) && Helpers.MidnightRideOrGreater(Connection)))
|| Helpers.BostonOrGreater(Connection)
)
{
RunProbe(dconf);
if (!string.IsNullOrEmpty(Result))
_cslgStoragePools = new ReadOnlyCollection<CslgStoragePool>(ParseStoragePoolXml(Util.GetContentsOfValueNode(Result)));
}
else
{
var slCon = _SLConnections.Find(c => c.Host == dconf["target"] && c.Username == dconf["username"]);
var pools = new List<CslgStoragePool>();
if (slCon != null)
{
pools = new List<StorageLinkPool>(slCon.Cache.StoragePools)
.FindAll(p => p.StorageLinkSystemId == _storageSystemId)
.ConvertAll(p => new CslgStoragePool(
p.FriendlyName,
p.opaque_ref,
GetRaidTypes(p.RaidTypes),
GetProvisioningTypes(p.ProvisioningTypes),
p.Parent != null,
p));
}
_cslgStoragePools = new ReadOnlyCollection<CslgStoragePool>(pools);
}
}
private static List<string> GetRaidTypes(StorageLinkEnums.RaidType raidType)
{

View File

@ -75,8 +75,6 @@ namespace XenAdmin.Actions
public SrCslgStorageSystemScanAction(IXenConnection connection, string adapterid, string target, string user, string password)
: base(connection, target, user, password)
{
if (!Helpers.BostonOrGreater(connection))
throw new ArgumentException(@"Invalid connection, it has to be a boston or greater connection", connection.Name);
_adapterid = adapterid;
}
@ -101,104 +99,11 @@ namespace XenAdmin.Actions
Log.DebugFormat("Attempting to find SRs on CSLG {0}.", dconf["target"]);
if (Connection != null && Helpers.MidnightRideOrGreater(Connection) && !Helpers.CowleyOrGreater(Connection))
{
RunProbe(dconf);
_cslgSystemStorages = new ReadOnlyCollection<CslgSystemStorage>(ParseStorageSystemsXml(Util.GetContentsOfValueNode(Result)));
}
else if (Connection != null && Helpers.BostonOrGreater(Connection))
{
dconf["adapterid"] = _adapterid;
RunProbe(dconf);
if (!string.IsNullOrEmpty(Result))
_cslgSystemStorages = new ReadOnlyCollection<CslgSystemStorage>(ParseStorageSystemsXml(Util.GetContentsOfValueNode(Result)));
}
else
{
bool created = false;
if (Connection != null)
{
// There will be no connection if a storagelink-object is selected in the tree.
string secretRef = Secret.get_by_uuid(Connection.Session, dconf["password_secret"]);
string password = Secret.get_value(Connection.Session, secretRef);
StorageLinkConnection = _SLConnections.Find(c => c.Host == dconf["target"] && c.Username == dconf["username"] && c.Password == password);
if (StorageLinkConnection == null)
{
// the user has clicked the "test connection" button in the properties dialog then
// the storagelink connection won't exist in the Program.StorageLinkConnections collection.
StorageLinkConnection = new StorageLinkConnection(_invoker, dconf["target"], dconf["username"], password);
StorageLinkConnection.BeginConnect();
created = true;
}
}
else
{
StorageLinkConnection = _SLConnections.Find(c => c.Host == dconf["target"] && c.Username == dconf["username"]);
}
try
{
var list = new List<CslgSystemStorage>();
// wait for storagelink connection to finish populating
for (int i = 0; i < 600 && StorageLinkConnection.ConnectionState == StorageLinkConnectionState.Connecting; i++)
{
Thread.Sleep(100);
}
if (!string.IsNullOrEmpty(StorageLinkConnection.Error))
{
throw new InvalidOperationException(StorageLinkConnection.Error);
}
if (StorageLinkConnection.ConnectionState != StorageLinkConnectionState.Connected)
{
throw new InvalidOperationException(string.Format(Messages.STORAGELINK_UNABLE_TO_CONNECT, dconf["target"]));
}
foreach (StorageLinkSystem s in StorageLinkConnection.Cache.StorageSystems)
{
var provisioningOptions = new List<CslgParameter> { new CslgParameter(null, Messages.NEWSR_CSLG_NONE) };
if ((s.Capabilities & StorageLinkEnums.StorageSystemCapabilities.POOL_LEVEL_DEDUPLICATION) != 0)
{
provisioningOptions.Add(new CslgParameter("DEDUP", Messages.NEWSR_CSLG_DEDUPLICATION));
}
var protocols = new List<CslgParameter> { new CslgParameter(null, Messages.NEWSR_CSLG_AUTO) };
if ((s.Capabilities & StorageLinkEnums.StorageSystemCapabilities.ISCSI) != 0)
{
protocols.Add(new CslgParameter("ISCSI", Messages.NEWSR_CSLG_ISCSI));
}
if ((s.Capabilities & StorageLinkEnums.StorageSystemCapabilities.FIBRE_CHANNEL) != 0)
{
protocols.Add(new CslgParameter("FC", Messages.NEWSR_CSLG_FC));
}
list.Add(new CslgSystemStorage(s.ToString(), s.StorageSystemId, protocols, provisioningOptions, false, s));
}
_cslgSystemStorages = new ReadOnlyCollection<CslgSystemStorage>(list);
}
finally
{
if (created)
{
StorageLinkConnection.EndConnect();
}
}
}
}
private List<CslgSystemStorage> ParseStorageSystemsXml(String xml)
{

View File

@ -287,20 +287,9 @@ namespace XenAdmin.Actions.VMActions
if (HomeServerChanged())
XenAPI.VM.set_affinity(Session, VM.opaque_ref, HomeServer != null ? HomeServer.opaque_ref : Helper.NullOpaqueRef);
if (Helpers.MidnightRideOrGreater(VM.Connection))
{
if (Template.memory_dynamic_min != MemoryDynamicMin || Template.memory_dynamic_max != MemoryDynamicMax || Template.memory_static_max != MemoryStaticMax)
XenAPI.VM.set_memory_limits(Session, VM.opaque_ref, Template.memory_static_min, MemoryStaticMax, MemoryDynamicMin, MemoryDynamicMax);
}
else
{
// For George and earlier hosts, we set them all the same.
// The order of operations doesn't matter, because George didn't enforce the ordering of values.
XenAPI.VM.set_memory_dynamic_min(Session, VM.opaque_ref, MemoryStaticMax);
XenAPI.VM.set_memory_dynamic_max(Session, VM.opaque_ref, MemoryStaticMax);
XenAPI.VM.set_memory_static_max(Session, VM.opaque_ref, MemoryStaticMax);
}
}
private bool HomeServerChanged()
{
@ -472,7 +461,7 @@ namespace XenAdmin.Actions.VMActions
if (vdi.name_label != disk.Disk.name_label)
VDI.set_name_label(Session, vdi.opaque_ref, disk.Disk.name_label);
if (firstDisk && Helpers.BostonOrGreater(Connection))
if (firstDisk)
{
//use the first disk to set the VM.suspend_SR
SR vdiSR = Connection.Resolve(vdi.SR);
@ -484,7 +473,7 @@ namespace XenAdmin.Actions.VMActions
progress += step;
}
if (Helpers.BostonOrGreater(Connection))
VM.set_suspend_SR(Session, VM.opaque_ref, suspendSr);
}

View File

@ -52,9 +52,6 @@ namespace XenAdmin.Actions
protected override void Run()
{
if (!Helpers.BostonOrGreater(VM.Connection))
XenAPI.VM.set_ha_always_run(Session, VM.opaque_ref, false);
XenAPI.VM.set_ha_restart_priority(Session, VM.opaque_ref, XenAPI.VM.RESTART_PRIORITY_DO_NOT_RESTART);
Description = Messages.COMPLETED;
}

View File

@ -48,7 +48,6 @@ namespace XenAdmin.Actions
private readonly Dictionary<VM, VMStartupOptions> settings = new Dictionary<VM, VMStartupOptions>();
private readonly long ntol;
private readonly Pool pool;
private readonly bool ignoreStartupOptions; // ignore start order and delay
/// <summary>
///
@ -71,8 +70,6 @@ namespace XenAdmin.Actions
throw new Exception("Could not resolve pool in constructor");
}
this.Pool = pool;
ignoreStartupOptions = Helpers.HaIgnoreStartupOptions(Connection);
}
protected override void Run()
@ -91,11 +88,8 @@ namespace XenAdmin.Actions
// If the above succeeded, then at least some changes have been committed
// Set new VM order and delay
if (!ignoreStartupOptions)
{
VM.set_order(this.Session, vm.opaque_ref, settings[vm].Order);
VM.set_start_delay(this.Session, vm.opaque_ref, settings[vm].StartDelay);
}
this.PercentComplete = (int)(++i * (60.0 / settings.Count));
if (Cancelling)
@ -118,11 +112,8 @@ namespace XenAdmin.Actions
// If the above succeeded, then at least some changes have been committed
// Set new VM order and delay
if (!ignoreStartupOptions)
{
VM.set_order(this.Session, vm.opaque_ref, settings[vm].Order);
VM.set_start_delay(this.Session, vm.opaque_ref, settings[vm].StartDelay);
}
this.PercentComplete = (int)(++i * (60.0 / settings.Count));
if (Cancelling)

View File

@ -139,7 +139,7 @@ namespace XenAdmin.Actions.VMActions
PercentComplete += halfstep;
}
if (Helpers.BostonOrGreater(Connection) && SR != null)
if (SR != null)
VM.set_suspend_SR(Session, VM.opaque_ref, SR.opaque_ref);
if (exn != null)

View File

@ -58,12 +58,6 @@ namespace XenAdmin.Actions.VMActions
/// <param name="end"></param>
protected static void SetHaProtection(bool protect, AsyncAction action, VM vm, int start, int end)
{
if (!Helpers.BostonOrGreater(vm.Connection))
{
// Enable or disable HA protection for the VM.
XenAPI.VM.set_ha_always_run(action.Session, vm.opaque_ref, protect);
}
// Do database sync. Helps to ensure that the change persists over master failover.
action.RelatedTask = XenAPI.Pool.async_sync_database(action.Session);
action.PollToCompletion(start, end);

View File

@ -370,7 +370,7 @@ namespace XenAdmin.Alerts
if (c.Session == null)
return false;
if (c.Session.IsLocalSuperuser || !Helpers.MidnightRideOrGreater(c))
if (c.Session.IsLocalSuperuser)
return true;
List<Role> rolesAbleToCompleteAction = Role.ValidRoleList("Message.destroy", c);

View File

@ -3769,15 +3769,6 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Add....
/// </summary>
public static string ADD_HOST {
get {
return ResourceManager.GetString("ADD_HOST", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You are attempting to add the server &apos;{0}&apos; to a pool that is configured to use AD authentication. All pool members must use the same authentication method.
///
@ -16428,25 +16419,6 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Heartbeat SR: {0}
///
///Failure tolerance: {1}
///
///Restart First: {2}
///
///Restart: {3}
///
///Restart if possible: {4}
///
///Do not restart: {5}.
/// </summary>
public static string HAWIZ_SUMMARY {
get {
return ResourceManager.GetString("HAWIZ_SUMMARY", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Heartbeat SR: {0}
///
@ -16467,27 +16439,18 @@ namespace XenAdmin {
/// <summary>
/// Looks up a localized string similar to HA Plan.
/// </summary>
public static string HAWIZARD_ASSIGNRIORITIESPAGE_TEXT {
public static string HAWIZARD_ASSIGNPRIORITIESPAGE_TEXT {
get {
return ResourceManager.GetString("HAWIZARD_ASSIGNRIORITIESPAGE_TEXT", resourceCulture);
return ResourceManager.GetString("HAWIZARD_ASSIGNPRIORITIESPAGE_TEXT", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Configure the HA restart priority, restart order and delay interval for the VMs in this pool.
/// </summary>
public static string HAWIZARD_ASSIGNRIORITIESPAGE_TITLE {
public static string HAWIZARD_ASSIGNPRIORITIESPAGE_TITLE {
get {
return ResourceManager.GetString("HAWIZARD_ASSIGNRIORITIESPAGE_TITLE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Configure the HA restart priority for the VMs in this pool.
/// </summary>
public static string HAWIZARD_ASSIGNRIORITIESPAGE_TITLE_NOORDER {
get {
return ResourceManager.GetString("HAWIZARD_ASSIGNRIORITIESPAGE_TITLE_NOORDER", resourceCulture);
return ResourceManager.GetString("HAWIZARD_ASSIGNPRIORITIESPAGE_TITLE", resourceCulture);
}
}

View File

@ -5188,13 +5188,13 @@ CD をイジェクトしてから再試行してください。</value>
<data name="HAS_CUSTOM_FIELDS" xml:space="preserve">
<value>カスタム フィールドあり</value>
</data>
<data name="HAWIZARD_ASSIGNRIORITIESPAGE_TEXT" xml:space="preserve">
<data name="HAWIZARD_ASSIGNPRIORITIESPAGE_TEXT" xml:space="preserve">
<value>高可用性プラン</value>
</data>
<data name="HAWIZARD_ASSIGNRIORITIESPAGE_TITLE" xml:space="preserve">
<data name="HAWIZARD_ASSIGNPRIORITIESPAGE_TITLE" xml:space="preserve">
<value>このプールの VM の再起動優先度、再起動順序、および起動間隔の設定</value>
</data>
<data name="HAWIZARD_ASSIGNRIORITIESPAGE_TITLE_NOORDER" xml:space="preserve">
<data name="HAWIZARD_ASSIGNPRIORITIESPAGE_TITLE_NOORDER" xml:space="preserve">
<value>このプールの VM の再起動優先度の設定</value>
</data>
<data name="HAWIZ_SUMMARY" xml:space="preserve">

View File

@ -1241,9 +1241,6 @@ To use this file, visit https://{0}.</value>
<data name="ADD_CUSTOM_FIELD" xml:space="preserve">
<value>Add custom field '{0}'</value>
</data>
<data name="ADD_HOST" xml:space="preserve">
<value>Add...</value>
</data>
<data name="ADD_HOST_TO_POOL_AD_MESSAGE" xml:space="preserve">
<value>You are attempting to add the server '{0}' to a pool that is configured to use AD authentication. All pool members must use the same authentication method.
@ -5497,28 +5494,12 @@ Click Configure HA to enable HA for this pool and allow your virtual machines to
<data name="HAS_CUSTOM_FIELDS" xml:space="preserve">
<value>Has any custom field</value>
</data>
<data name="HAWIZARD_ASSIGNRIORITIESPAGE_TEXT" xml:space="preserve">
<data name="HAWIZARD_ASSIGNPRIORITIESPAGE_TEXT" xml:space="preserve">
<value>HA Plan</value>
</data>
<data name="HAWIZARD_ASSIGNRIORITIESPAGE_TITLE" xml:space="preserve">
<data name="HAWIZARD_ASSIGNPRIORITIESPAGE_TITLE" xml:space="preserve">
<value>Configure the HA restart priority, restart order and delay interval for the VMs in this pool</value>
</data>
<data name="HAWIZARD_ASSIGNRIORITIESPAGE_TITLE_NOORDER" xml:space="preserve">
<value>Configure the HA restart priority for the VMs in this pool</value>
</data>
<data name="HAWIZ_SUMMARY" xml:space="preserve">
<value>Heartbeat SR: {0}
Failure tolerance: {1}
Restart First: {2}
Restart: {3}
Restart if possible: {4}
Do not restart: {5}</value>
</data>
<data name="HAWIZ_SUMMARY_NEW" xml:space="preserve">
<value>Heartbeat SR: {0}

View File

@ -5186,13 +5186,13 @@ XenServer 可以重新启动服务器并将服务器的 CPU 级别降至池中
<data name="HAS_CUSTOM_FIELDS" xml:space="preserve">
<value>带有任何自定义字段</value>
</data>
<data name="HAWIZARD_ASSIGNRIORITIESPAGE_TEXT" xml:space="preserve">
<data name="HAWIZARD_ASSIGNPRIORITIESPAGE_TEXT" xml:space="preserve">
<value>高可用性计划</value>
</data>
<data name="HAWIZARD_ASSIGNRIORITIESPAGE_TITLE" xml:space="preserve">
<data name="HAWIZARD_ASSIGNPRIORITIESPAGE_TITLE" xml:space="preserve">
<value>为该池中的 VM 配置高可用性重启优先级、重启顺序和延迟间隔</value>
</data>
<data name="HAWIZARD_ASSIGNRIORITIESPAGE_TITLE_NOORDER" xml:space="preserve">
<data name="HAWIZARD_ASSIGNPRIORITIESPAGE_TITLE_NOORDER" xml:space="preserve">
<value>为该池中的 VM 配置高可用性重启优先级</value>
</data>
<data name="HAWIZ_SUMMARY" xml:space="preserve">

View File

@ -1229,17 +1229,11 @@ namespace XenAdmin.Network
// Save the session so we can log it out later
task.Session = session;
if (session.APIVersion <= API_Version.API_1_2)
if (session.APIVersion <= API_Version.API_1_8)
throw new ServerNotSupported();
// Event.next uses a different session with a shorter timeout: see CA-33145.
// Although Orlando hosts don't: see CA-40952.
Session eventNextSession =
session.APIVersion >= API_Version.API_1_6 ? // Helpers.GeorgeOrGreater, except we can't use that because the cache isn't populated before we fire the first Event.next.
DuplicateSession(EVENT_NEXT_TIMEOUT) :
session;
if (session.APIVersion >= API_Version.API_1_6)
Session eventNextSession = DuplicateSession(EVENT_NEXT_TIMEOUT);
eventNextSession.ConnectionGroupName = eventNextConnectionGroupName; // this will force the eventNextSession onto its own set of TCP streams (see CA-108676)
bool legacyEventSystem = XenObjectDownloader.LegacyEventSystem(session);

Some files were not shown because too many files have changed in this diff Show More