mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-27 02:56:01 +01:00
add information on general page of pool and vm; repair autoboot setting after merge from upstream
This commit is contained in:
parent
b4bba6b679
commit
aa51937727
@ -91,7 +91,7 @@ namespace XenAdmin.SettingsPanels
|
|||||||
this.m_tlpAutoBoot.Controls.Add(this.m_picInfoAutoBoot, 0, 0);
|
this.m_tlpAutoBoot.Controls.Add(this.m_picInfoAutoBoot, 0, 0);
|
||||||
this.m_tlpAutoBoot.Controls.Add(this.m_autoHeightLabelAutoBoot, 1, 0);
|
this.m_tlpAutoBoot.Controls.Add(this.m_autoHeightLabelAutoBoot, 1, 0);
|
||||||
this.m_tlpAutoBoot.Controls.Add(this.m_autoHeightLabelAutoBootHAWarning, 1, 0);
|
this.m_tlpAutoBoot.Controls.Add(this.m_autoHeightLabelAutoBootHAWarning, 1, 0);
|
||||||
this.m_tlpAutoBoot.Controls.Add(this.m_checkBoxAutoBoot, 0, 1);
|
this.m_tlpAutoBoot.Controls.Add(this.m_checkBoxAutoBoot, 0, 2);
|
||||||
this.m_tlpAutoBoot.Name = "m_tlpAutoBoot";
|
this.m_tlpAutoBoot.Name = "m_tlpAutoBoot";
|
||||||
//
|
//
|
||||||
// m_picInfoAutoBoot
|
// m_picInfoAutoBoot
|
||||||
|
@ -92,6 +92,8 @@ namespace XenAdmin.SettingsPanels
|
|||||||
|
|
||||||
vm.SetAutoPowerOn(m_checkBoxAutoBoot.Checked);
|
vm.SetAutoPowerOn(m_checkBoxAutoBoot.Checked);
|
||||||
|
|
||||||
|
vm.PV_args = m_textBoxOsParams.Text;
|
||||||
|
|
||||||
return new DelegatedAsyncAction(vm.Connection, "Change VBDs bootable", "Change VBDs bootable", null,
|
return new DelegatedAsyncAction(vm.Connection, "Change VBDs bootable", "Change VBDs bootable", null,
|
||||||
delegate(Session session)
|
delegate(Session session)
|
||||||
{
|
{
|
||||||
@ -187,7 +189,8 @@ namespace XenAdmin.SettingsPanels
|
|||||||
m_picInfoAutoBoot.Visible = false;
|
m_picInfoAutoBoot.Visible = false;
|
||||||
m_autoHeightLabelAutoBoot.Visible = false;
|
m_autoHeightLabelAutoBoot.Visible = false;
|
||||||
m_autoHeightLabelAutoBootHAWarning.Visible = false;
|
m_autoHeightLabelAutoBootHAWarning.Visible = false;
|
||||||
m_checkBoxAutoBoot.Visible = false;
|
|
||||||
|
m_checkBoxAutoBoot.Checked = vm.GetAutoPowerOn();
|
||||||
|
|
||||||
BootDeviceAndOrderEnabled(vm.IsHVM());
|
BootDeviceAndOrderEnabled(vm.IsHVM());
|
||||||
|
|
||||||
@ -351,8 +354,8 @@ namespace XenAdmin.SettingsPanels
|
|||||||
Convert(false);
|
Convert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -214,7 +214,7 @@
|
|||||||
<value>m_autoHeightLabelHvm</value>
|
<value>m_autoHeightLabelHvm</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>m_autoHeightLabelHvm.Type" xml:space="preserve">
|
<data name=">>m_autoHeightLabelHvm.Type" xml:space="preserve">
|
||||||
<value>XenAdmin.Controls.Common.AutoHeightLabel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
<value>XenAdmin.Controls.Common.AutoHeightLabel, XCP-ng Center, Version=99.99.99.29, Culture=neutral, PublicKeyToken=null</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>m_autoHeightLabelHvm.Parent" xml:space="preserve">
|
<data name=">>m_autoHeightLabelHvm.Parent" xml:space="preserve">
|
||||||
<value>tableLayoutPanel1</value>
|
<value>tableLayoutPanel1</value>
|
||||||
@ -247,7 +247,7 @@
|
|||||||
<value>m_autoHeightLabelNonHvm</value>
|
<value>m_autoHeightLabelNonHvm</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>m_autoHeightLabelNonHvm.Type" xml:space="preserve">
|
<data name=">>m_autoHeightLabelNonHvm.Type" xml:space="preserve">
|
||||||
<value>XenAdmin.Controls.Common.AutoHeightLabel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
<value>XenAdmin.Controls.Common.AutoHeightLabel, XCP-ng Center, Version=99.99.99.29, Culture=neutral, PublicKeyToken=null</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>m_autoHeightLabelNonHvm.Parent" xml:space="preserve">
|
<data name=">>m_autoHeightLabelNonHvm.Parent" xml:space="preserve">
|
||||||
<value>tableLayoutPanel1</value>
|
<value>tableLayoutPanel1</value>
|
||||||
@ -316,7 +316,7 @@
|
|||||||
<value>m_autoHeightLabelAutoBoot</value>
|
<value>m_autoHeightLabelAutoBoot</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>m_autoHeightLabelAutoBoot.Type" xml:space="preserve">
|
<data name=">>m_autoHeightLabelAutoBoot.Type" xml:space="preserve">
|
||||||
<value>XenAdmin.Controls.Common.AutoHeightLabel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
<value>XenAdmin.Controls.Common.AutoHeightLabel, XCP-ng Center, Version=99.99.99.29, Culture=neutral, PublicKeyToken=null</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>m_autoHeightLabelAutoBoot.Parent" xml:space="preserve">
|
<data name=">>m_autoHeightLabelAutoBoot.Parent" xml:space="preserve">
|
||||||
<value>m_tlpAutoBoot</value>
|
<value>m_tlpAutoBoot</value>
|
||||||
@ -349,7 +349,7 @@
|
|||||||
<value>m_autoHeightLabelAutoBootHAWarning</value>
|
<value>m_autoHeightLabelAutoBootHAWarning</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>m_autoHeightLabelAutoBootHAWarning.Type" xml:space="preserve">
|
<data name=">>m_autoHeightLabelAutoBootHAWarning.Type" xml:space="preserve">
|
||||||
<value>XenAdmin.Controls.Common.AutoHeightLabel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
<value>XenAdmin.Controls.Common.AutoHeightLabel, XCP-ng Center, Version=99.99.99.29, Culture=neutral, PublicKeyToken=null</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>m_autoHeightLabelAutoBootHAWarning.Parent" xml:space="preserve">
|
<data name=">>m_autoHeightLabelAutoBootHAWarning.Parent" xml:space="preserve">
|
||||||
<value>m_tlpAutoBoot</value>
|
<value>m_tlpAutoBoot</value>
|
||||||
@ -397,10 +397,10 @@
|
|||||||
<value>3, 16</value>
|
<value>3, 16</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="m_tlpAutoBoot.RowCount" type="System.Int32, mscorlib">
|
<data name="m_tlpAutoBoot.RowCount" type="System.Int32, mscorlib">
|
||||||
<value>2</value>
|
<value>4</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="m_tlpAutoBoot.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="m_tlpAutoBoot.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>438, 55</value>
|
<value>438, 75</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="m_tlpAutoBoot.TabIndex" type="System.Int32, mscorlib">
|
<data name="m_tlpAutoBoot.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>7</value>
|
<value>7</value>
|
||||||
@ -418,7 +418,7 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="m_tlpAutoBoot.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
<data name="m_tlpAutoBoot.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="m_picInfoAutoBoot" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="m_autoHeightLabelAutoBoot" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="m_autoHeightLabelAutoBootHAWarning" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="m_checkBoxAutoBoot" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /></Controls><Columns Styles="AutoSize,0,AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,Absolute,20" /></TableLayoutSettings></value>
|
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="m_picInfoAutoBoot" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="m_autoHeightLabelAutoBoot" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="m_autoHeightLabelAutoBootHAWarning" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="m_checkBoxAutoBoot" Row="2" RowSpan="1" Column="0" ColumnSpan="2" /></Controls><Columns Styles="AutoSize,0,AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,Absolute,20,Absolute,20" /></TableLayoutSettings></value>
|
||||||
</data>
|
</data>
|
||||||
<data name="m_groupBoxAutoBoot.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
<data name="m_groupBoxAutoBoot.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||||
<value>Fill</value>
|
<value>Fill</value>
|
||||||
@ -427,7 +427,7 @@
|
|||||||
<value>3, 101</value>
|
<value>3, 101</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="m_groupBoxAutoBoot.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="m_groupBoxAutoBoot.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>444, 74</value>
|
<value>444, 94</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="m_groupBoxAutoBoot.TabIndex" type="System.Int32, mscorlib">
|
<data name="m_groupBoxAutoBoot.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>8</value>
|
<value>8</value>
|
||||||
@ -598,7 +598,7 @@
|
|||||||
<value>Fill</value>
|
<value>Fill</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="m_tlpHvm.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="m_tlpHvm.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>3, 181</value>
|
<value>3, 201</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="m_tlpHvm.RowCount" type="System.Int32, mscorlib">
|
<data name="m_tlpHvm.RowCount" type="System.Int32, mscorlib">
|
||||||
<value>5</value>
|
<value>5</value>
|
||||||
@ -724,7 +724,7 @@
|
|||||||
<value>Fill</value>
|
<value>Fill</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="m_tlpNonHvm.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="m_tlpNonHvm.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>3, 344</value>
|
<value>3, 364</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="m_tlpNonHvm.RowCount" type="System.Int32, mscorlib">
|
<data name="m_tlpNonHvm.RowCount" type="System.Int32, mscorlib">
|
||||||
<value>5</value>
|
<value>5</value>
|
||||||
|
@ -742,6 +742,9 @@ namespace XenAdmin.TabPages
|
|||||||
|
|
||||||
PDSection s = pdSectionBootOptions;
|
PDSection s = pdSectionBootOptions;
|
||||||
|
|
||||||
|
s.AddEntry(FriendlyName("VM.auto_boot"), Helpers.BoolToString(vm.GetAutoPowerOn()),
|
||||||
|
new PropertiesToolStripMenuItem(new VmEditStartupOptionsCommand(Program.MainWindow, vm)));
|
||||||
|
|
||||||
if (vm.IsHVM())
|
if (vm.IsHVM())
|
||||||
{
|
{
|
||||||
s.AddEntry(FriendlyName("VM.BootOrder"), HVMBootOrder(vm),
|
s.AddEntry(FriendlyName("VM.BootOrder"), HVMBootOrder(vm),
|
||||||
@ -974,6 +977,8 @@ namespace XenAdmin.TabPages
|
|||||||
s.AddEntry(FriendlyName("host.enabled"), Messages.YES, item);
|
s.AddEntry(FriendlyName("host.enabled"), Messages.YES, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s.AddEntry("Autoboot of VMs enabled", Helpers.BoolToString(host.GetVmAutostartEnabled()));
|
||||||
|
|
||||||
if (Helpers.CloudOrGreater(host) && Helpers.XapiEqualOrGreater_1_290_0(host))
|
if (Helpers.CloudOrGreater(host) && Helpers.XapiEqualOrGreater_1_290_0(host))
|
||||||
{
|
{
|
||||||
var pool = Helpers.GetPoolOfOne(xenObject.Connection);
|
var pool = Helpers.GetPoolOfOne(xenObject.Connection);
|
||||||
@ -1115,6 +1120,8 @@ namespace XenAdmin.TabPages
|
|||||||
{
|
{
|
||||||
s.AddEntry(Messages.NUMBER_OF_SOCKETS, p.CpuSockets().ToString());
|
s.AddEntry(Messages.NUMBER_OF_SOCKETS, p.CpuSockets().ToString());
|
||||||
|
|
||||||
|
s.AddEntry("Autoboot of VMs enabled", Helpers.BoolToString(p.GetVmAutostartEnabled()));
|
||||||
|
|
||||||
if (Helpers.CloudOrGreater(p.Connection) && Helpers.XapiEqualOrGreater_1_290_0(p.Connection))
|
if (Helpers.CloudOrGreater(p.Connection) && Helpers.XapiEqualOrGreater_1_290_0(p.Connection))
|
||||||
{
|
{
|
||||||
if (p.tls_verification_enabled)
|
if (p.tls_verification_enabled)
|
||||||
|
@ -147,6 +147,16 @@ namespace XenAPI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool GetVmAutostartEnabled()
|
||||||
|
{
|
||||||
|
Pool p = Helpers.GetPoolOfOne(Connection);
|
||||||
|
|
||||||
|
if (p != null)
|
||||||
|
return p.GetVmAutostartEnabled();
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public string GetIscsiIqn()
|
public string GetIscsiIqn()
|
||||||
{
|
{
|
||||||
if (Helpers.KolkataOrGreater(this))
|
if (Helpers.KolkataOrGreater(this))
|
||||||
|
@ -287,6 +287,17 @@ namespace XenAPI
|
|||||||
return base.Equals(other);
|
return base.Equals(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool GetVmAutostartEnabled()
|
||||||
|
{
|
||||||
|
string auto_poweron = Get(other_config, "auto_poweron");
|
||||||
|
if (auto_poweron == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return auto_poweron == "true" ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -659,6 +659,14 @@ namespace XenAPI
|
|||||||
public void SetAutoPowerOn(bool value)
|
public void SetAutoPowerOn(bool value)
|
||||||
{
|
{
|
||||||
other_config = SetDictionaryKey(other_config, "auto_poweron", value.ToString().ToLower());
|
other_config = SetDictionaryKey(other_config, "auto_poweron", value.ToString().ToLower());
|
||||||
|
|
||||||
|
//// set auto_poweron on pool
|
||||||
|
//Pool p = Helpers.GetPoolOfOne(Connection);
|
||||||
|
//if (p != null)
|
||||||
|
//{
|
||||||
|
// p.other_config = Pool.SetDictionaryKey(p.other_config, "auto_poweron", "true");
|
||||||
|
// p.SaveChanges(Connection.Session); // need to lock pool first, but how?!?
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string IsOnSharedStorage()
|
public string IsOnSharedStorage()
|
||||||
|
Loading…
Reference in New Issue
Block a user