mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Merge branch 'master' of https://github.com/xenserver/xenadmin into CP-13034,_CP-13035,_CP-13037
This commit is contained in:
commit
82b2354a1b
@ -125,7 +125,7 @@ namespace XenAdmin.Controls
|
||||
VgpuTypes = vgpuType == null ? null : new[] {vgpuType};
|
||||
if (vgpuType != null)
|
||||
{
|
||||
IsVgpuSubitem = gpuGroup.supported_VGPU_types.Count > 1;
|
||||
IsVgpuSubitem = gpuGroup.HasVGpu;
|
||||
IsFractionalVgpu = !vgpuType.IsPassthrough;
|
||||
if (disabledVGpuTypes != null && disabledVGpuTypes.Select(t => t.opaque_ref).Contains(vgpuType.opaque_ref))
|
||||
IsNotEnabledVgpu = true;
|
||||
|
@ -160,6 +160,11 @@ namespace XenAdmin.Controls.CustomDataGraph
|
||||
{
|
||||
if (settype.Contains("iops"))
|
||||
dataSet.CustomYRange = new DataRange(1, 0, 1, Unit.CountsPerSecond, RangeScaleMode.Auto);
|
||||
else if (settype.Contains("io_throughput"))
|
||||
{
|
||||
dataSet.CustomYRange = new DataRange(1, 0, 1, Unit.BytesPerSecond, RangeScaleMode.Auto);
|
||||
dataSet.MultiplyingFactor = (int)Util.BINARY_MEGA; //xapi units are in mebibytes/sec
|
||||
}
|
||||
else if (settype.EndsWith("iowait"))
|
||||
{
|
||||
dataSet.CustomYRange = new DataRange(100, 0, 10, Unit.Percentage, RangeScaleMode.Auto);
|
||||
|
@ -144,15 +144,10 @@ namespace XenAdmin.Controls.GPU
|
||||
|
||||
private void SetWindowTitle()
|
||||
{
|
||||
var match = Regex.Match(PGpuList[0].Name, @"\[(.*?)\]", RegexOptions.CultureInvariant);
|
||||
if (match.Success)
|
||||
{
|
||||
var name = match.Groups[1].Value;
|
||||
|
||||
Text = PGpuList.Count == 1
|
||||
? String.Format(Messages.GPU_GROUP_NAME_AND_NO_OF_GPUS_ONE, name)
|
||||
: String.Format(Messages.GPU_GROUP_NAME_AND_NO_OF_GPUS, name, PGpuList.Count);
|
||||
}
|
||||
var name = PGpuList[0].Name;
|
||||
Text = PGpuList.Count == 1
|
||||
? String.Format(Messages.GPU_GROUP_NAME_AND_NO_OF_GPUS_ONE, name)
|
||||
: String.Format(Messages.GPU_GROUP_NAME_AND_NO_OF_GPUS, name, PGpuList.Count);
|
||||
|
||||
rubricLabel.Text = PGpuList.Count == 1
|
||||
? Messages.GPU_RUBRIC_PLEASE_SELECT_WHICH_GPU_ONE
|
||||
|
@ -62,7 +62,16 @@ namespace XenAdmin.Controls.GPU
|
||||
foreach (VGPU vgpu in vGPUs)
|
||||
vms[vgpu] = vgpu.Connection.Resolve(vgpu.VM);
|
||||
|
||||
maxCapacity = !Helpers.FeatureForbidden(pGPU, Host.RestrictVgpu) && pGPU.HasVGpu ? 8 : 1;
|
||||
maxCapacity = 1;
|
||||
if (!Helpers.FeatureForbidden(pGPU, Host.RestrictVgpu) && pGPU.HasVGpu && pGPU.supported_VGPU_max_capacities != null)
|
||||
{
|
||||
foreach (var n in pGPU.supported_VGPU_max_capacities.Values)
|
||||
{
|
||||
if (n > maxCapacity)
|
||||
maxCapacity = n;
|
||||
}
|
||||
}
|
||||
|
||||
capacity = vGPUs.Count > 0 && pGPU.supported_VGPU_max_capacities.ContainsKey(vGPUs[0].type)
|
||||
? pGPU.supported_VGPU_max_capacities[vGPUs[0].type] : maxCapacity;
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ namespace XenAdmin.SettingsPanels
|
||||
|
||||
var disabledTypes = allTypes.FindAll(t => !enabledTypes.Exists(e => e.opaque_ref == t.opaque_ref));
|
||||
|
||||
if (allTypes.Count > 1)
|
||||
if (gpu_group.HasVGpu)
|
||||
{
|
||||
allTypes.Sort((t1, t2) =>
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ namespace XenAdmin.TabPages
|
||||
}
|
||||
|
||||
//show the FCoE column for Dundee or higher hosts only
|
||||
ColumnFCoECapable.Visible = false; // Helpers.DundeeOrGreater(host);
|
||||
ColumnFCoECapable.Visible = Helpers.DundeeOrGreater(host);
|
||||
|
||||
//CA-47050: the Device 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
|
||||
|
@ -116,7 +116,7 @@ namespace XenAdmin.Wizards.ExportWizard
|
||||
m_pageTvmIp.NetworkUuid.Key,
|
||||
m_pageTvmIp.IsTvmIpStatic,
|
||||
m_pageTvmIp.TvmIpAddress,
|
||||
m_pageTvmIp.TvmIpAddress,
|
||||
m_pageTvmIp.TvmSubnetMask,
|
||||
m_pageTvmIp.TvmGateway,
|
||||
m_pageFinish.VerifyExport)).RunAsync();
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages
|
||||
|
||||
radioButtonCifs.Visible = !Helpers.FeatureForbidden(Connection, Host.RestrictCifs);
|
||||
|
||||
radioButtonFcoe.Visible = false; // Helpers.DundeeOrGreater(Connection);
|
||||
radioButtonFcoe.Visible = Helpers.DundeeOrGreater(Connection);
|
||||
|
||||
foreach (var radioButton in RadioButtons)
|
||||
{
|
||||
|
@ -160,6 +160,7 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
{
|
||||
PatchingWizard_PatchingPage.ManualTextInstructions = PatchingWizard_ModePage.ManualTextInstructions;
|
||||
PatchingWizard_PatchingPage.IsAutomaticMode = PatchingWizard_ModePage.IsAutomaticMode;
|
||||
PatchingWizard_PatchingPage.RemoveUpdateFile = PatchingWizard_ModePage.RemoveUpdateFile;
|
||||
}
|
||||
else if (prevPageType == typeof(PatchingWizard_PrecheckPage))
|
||||
{
|
||||
|
@ -37,6 +37,7 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.autoHeightLabel1 = new XenAdmin.Controls.Common.AutoHeightLabel();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.removeUpdateFileCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@ -83,8 +84,9 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
this.tableLayoutPanel1.Controls.Add(this.AutomaticRadioButton, 0, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.ManualRadioButton, 0, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.textBoxLog, 0, 5);
|
||||
this.tableLayoutPanel1.Controls.Add(this.button1, 0, 6);
|
||||
this.tableLayoutPanel1.Controls.Add(this.removeUpdateFileCheckBox, 0, 7);
|
||||
this.tableLayoutPanel1.Controls.Add(this.textBoxLog, 0, 5);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
//
|
||||
// autoHeightLabel1
|
||||
@ -97,6 +99,14 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// removeUpdateFileCheckBox
|
||||
//
|
||||
resources.ApplyResources(this.removeUpdateFileCheckBox, "removeUpdateFileCheckBox");
|
||||
this.removeUpdateFileCheckBox.Checked = true;
|
||||
this.removeUpdateFileCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.removeUpdateFileCheckBox.Name = "removeUpdateFileCheckBox";
|
||||
this.removeUpdateFileCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// PatchingWizard_ModePage
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@ -119,5 +129,6 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private XenAdmin.Controls.Common.AutoHeightLabel autoHeightLabel1;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.CheckBox removeUpdateFileCheckBox;
|
||||
}
|
||||
}
|
||||
|
@ -139,6 +139,14 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
}
|
||||
}
|
||||
|
||||
public bool RemoveUpdateFile
|
||||
{
|
||||
get
|
||||
{
|
||||
return removeUpdateFileCheckBox.Checked;
|
||||
}
|
||||
}
|
||||
|
||||
public List<Host> SelectedServers { private get; set; }
|
||||
public Pool_patch Patch { private get; set; }
|
||||
public UpdateType SelectedUpdateType { private get; set; }
|
||||
|
@ -166,7 +166,7 @@
|
||||
<value>15, 3, 3, 3</value>
|
||||
</data>
|
||||
<data name="ManualRadioButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>545, 34</value>
|
||||
<value>534, 34</value>
|
||||
</data>
|
||||
<data name="ManualRadioButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
@ -229,7 +229,7 @@
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="textBoxLog.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>557, 143</value>
|
||||
<value>546, 230</value>
|
||||
</data>
|
||||
<data name="textBoxLog.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
@ -244,13 +244,13 @@
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>textBoxLog.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="button1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Left</value>
|
||||
</data>
|
||||
<data name="button1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 314</value>
|
||||
<value>3, 401</value>
|
||||
</data>
|
||||
<data name="button1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 3, 3, 10</value>
|
||||
@ -274,7 +274,7 @@
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>button1.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
@ -292,7 +292,7 @@
|
||||
<value>3, 3, 3, 15</value>
|
||||
</data>
|
||||
<data name="autoHeightLabel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>557, 39</value>
|
||||
<value>546, 39</value>
|
||||
</data>
|
||||
<data name="autoHeightLabel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@ -345,17 +345,47 @@
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="removeUpdateFileCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="removeUpdateFileCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 437</value>
|
||||
</data>
|
||||
<data name="removeUpdateFileCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>270, 17</value>
|
||||
</data>
|
||||
<data name="removeUpdateFileCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="removeUpdateFileCheckBox.Text" xml:space="preserve">
|
||||
<value>Allow XenCenter to &delete the update installation file</value>
|
||||
</data>
|
||||
<data name=">>removeUpdateFileCheckBox.Name" xml:space="preserve">
|
||||
<value>removeUpdateFileCheckBox</value>
|
||||
</data>
|
||||
<data name=">>removeUpdateFileCheckBox.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=">>removeUpdateFileCheckBox.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>removeUpdateFileCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.MinimumSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1, 1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>563, 347</value>
|
||||
<value>565, 467</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@ -373,16 +403,22 @@
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="autoHeightLabel1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label3" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="AutomaticRadioButton" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="ManualRadioButton" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label2" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="textBoxLog" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="button1" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,Absolute,40,AutoSize,0,Percent,100,AutoSize,0" /></TableLayoutSettings></value>
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="autoHeightLabel1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label3" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="AutomaticRadioButton" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="ManualRadioButton" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label2" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="button1" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="removeUpdateFileCheckBox" Row="7" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="textBoxLog" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,Absolute,40,AutoSize,0,Percent,100,AutoSize,0,AutoSize,0,Absolute,20" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AccessibleName" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>96, 96</value>
|
||||
</data>
|
||||
<data name="$this.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>563, 347</value>
|
||||
<value>565, 467</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>PatchingWizard_ModePage</value>
|
||||
|
@ -67,6 +67,7 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
public Pool_patch Patch { private get; set; }
|
||||
public string ManualTextInstructions { private get; set; }
|
||||
public bool IsAutomaticMode { private get; set; }
|
||||
public bool RemoveUpdateFile { private get; set; }
|
||||
public string SelectedNewPatch { private get; set; }
|
||||
public List<Problem> ProblemsResolvedPreCheck { private get; set; }
|
||||
public Dictionary<Host, VDI> SuppPackVdis { private get; set; }
|
||||
@ -178,6 +179,10 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
}
|
||||
}
|
||||
}
|
||||
if (RemoveUpdateFile)
|
||||
{
|
||||
planActions.Add(new RemoveUpdateFile(pool, poolPatch));
|
||||
}
|
||||
}
|
||||
planActions.Add(new UnwindProblemsAction(ProblemsResolvedPreCheck));
|
||||
|
||||
|
@ -0,0 +1,54 @@
|
||||
/* Copyright (c) Citrix Systems Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using XenAPI;
|
||||
|
||||
namespace XenAdmin.Wizards.PatchingWizard.PlanActions
|
||||
{
|
||||
class RemoveUpdateFile : PlanActionWithSession
|
||||
{
|
||||
private readonly XenRef<Pool_patch> _patchRef;
|
||||
|
||||
public RemoveUpdateFile(Pool pool, Pool_patch patch)
|
||||
: base(pool.Connection, string.Format(Messages.UPDATES_WIZARD_REMOVING_UPDATE, patch.Name, pool.Name))
|
||||
{
|
||||
this._patchRef = new XenRef<Pool_patch>(patch);
|
||||
}
|
||||
|
||||
protected override void RunWithSession(ref Session session)
|
||||
{
|
||||
|
||||
XenRef<Task> task = Pool_patch.async_pool_clean(session, _patchRef.opaque_ref);
|
||||
|
||||
PollTaskForResultAndDestroy(Connection, ref session, task);
|
||||
}
|
||||
}
|
||||
}
|
@ -831,6 +831,7 @@
|
||||
<Compile Include="Wizards\PatchingWizard\PatchingWizard_UploadPage.Designer.cs">
|
||||
<DependentUpon>PatchingWizard_UploadPage.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Wizards\PatchingWizard\PlanActions\RemoveUpdateFile.cs" />
|
||||
<Compile Include="Wizards\PatchingWizard\PlanActions\InstallSupplementalPackPlanAction.cs" />
|
||||
<Compile Include="XenSearch\TreeNodeGroupAcceptor.cs">
|
||||
</Compile>
|
||||
|
@ -1,4 +1,35 @@
|
||||
using System;
|
||||
/* Copyright (c) Citrix Systems Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
|
@ -1,4 +1,35 @@
|
||||
using System.Collections.Generic;
|
||||
/* Copyright (c) Citrix Systems Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using XenAPI;
|
||||
|
||||
namespace XenAdmin.Actions
|
||||
|
@ -1,4 +1,35 @@
|
||||
using System.Collections.Generic;
|
||||
/* Copyright (c) Citrix Systems Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using XenAPI;
|
||||
using XenAdmin.Core;
|
||||
using System;
|
||||
|
@ -1,4 +1,35 @@
|
||||
using System;
|
||||
/* Copyright (c) Citrix Systems Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using XenAdmin.Core;
|
||||
using XenAPI;
|
||||
|
9
XenModel/Messages.Designer.cs
generated
9
XenModel/Messages.Designer.cs
generated
@ -32814,6 +32814,15 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Removing update {0} from {1}... .
|
||||
/// </summary>
|
||||
public static string UPDATES_WIZARD_REMOVING_UPDATE {
|
||||
get {
|
||||
return ResourceManager.GetString("UPDATES_WIZARD_REMOVING_UPDATE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Click here to repair.
|
||||
/// </summary>
|
||||
|
@ -11338,6 +11338,9 @@ Check your settings and try again.</value>
|
||||
<data name="UPDATES_WIZARD_REBOOTING" xml:space="preserve">
|
||||
<value>Rebooting {0} ... </value>
|
||||
</data>
|
||||
<data name="UPDATES_WIZARD_REMOVING_UPDATE" xml:space="preserve">
|
||||
<value>Removing update {0} from {1}... </value>
|
||||
</data>
|
||||
<data name="UPDATES_WIZARD_REPAIR_SR" xml:space="preserve">
|
||||
<value>Click here to repair</value>
|
||||
</data>
|
||||
|
@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using XenAdmin;
|
||||
|
||||
namespace XenAPI
|
||||
@ -54,6 +55,15 @@ namespace XenAPI
|
||||
: String.Format(Messages.GPU_GROUP_NAME_AND_NO_OF_GPUS, Name, PGPUs.Count);
|
||||
}
|
||||
|
||||
public bool HasVGpu
|
||||
{
|
||||
get
|
||||
{
|
||||
return Connection.ResolveAll(PGPUs).Any(pgpu => pgpu.HasVGpu);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region IEquatable<GPU_group> Members
|
||||
|
||||
/// <summary>
|
||||
|
@ -476,7 +476,7 @@ namespace XenAPI
|
||||
|
||||
private bool _RestrictHealthCheck
|
||||
{
|
||||
get { return true; /* BoolKeyPreferTrue(license_params, "restrict_health_check"); */}
|
||||
get { return BoolKeyPreferTrue(license_params, "restrict_health_check"); }
|
||||
}
|
||||
|
||||
public static bool RestrictHealthCheck(Host h)
|
||||
|
2
XenModel/XenAPI/FriendlyErrorNames.Designer.cs
generated
2
XenModel/XenAPI/FriendlyErrorNames.Designer.cs
generated
@ -4773,7 +4773,7 @@ namespace XenAPI {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The VM is incompatible with the Virtual Hardware Platform version of this host..
|
||||
/// Looks up a localized string similar to The VM's Virtual Hardware Platform version is incompatible with this host..
|
||||
/// </summary>
|
||||
public static string VM_HOST_INCOMPATIBLE_VIRTUAL_HARDWARE_PLATFORM_VERSION {
|
||||
get {
|
||||
|
@ -1701,7 +1701,7 @@ Authorized Roles: {1}</value>
|
||||
<value>This VM operation cannot be performed on an older-versioned host during an upgrade.</value>
|
||||
</data>
|
||||
<data name="VM_HOST_INCOMPATIBLE_VIRTUAL_HARDWARE_PLATFORM_VERSION" xml:space="preserve">
|
||||
<value>The VM is incompatible with the Virtual Hardware Platform version of this host.</value>
|
||||
<value>The VM's Virtual Hardware Platform version is incompatible with this host.</value>
|
||||
</data>
|
||||
<data name="VM_HVM_REQUIRED" xml:space="preserve">
|
||||
<value>HVM is required for this operation</value>
|
||||
@ -1898,4 +1898,4 @@ Authorized Roles: {1}</value>
|
||||
<data name="XMLRPC_UNMARSHAL_FAILURE" xml:space="preserve">
|
||||
<value>The server failed to unmarshal the XMLRPC message; it was expecting one element and received something else.</value>
|
||||
</data>
|
||||
</root>
|
||||
</root>
|
32
XenServerHealthCheck/Settings.Designer.cs
generated
32
XenServerHealthCheck/Settings.Designer.cs
generated
@ -55,5 +55,37 @@ namespace XenServerHealthCheck.Properties {
|
||||
this["UUID"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
[global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
|
||||
public string UPLOAD_URL
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((string)(this["UPLOAD_URL"]));
|
||||
}
|
||||
set
|
||||
{
|
||||
this["UPLOAD_URL"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
||||
[global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
|
||||
public int UploadTimeIntervalInMinutes
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((int)(this["UploadTimeIntervalInMinutes"]));
|
||||
}
|
||||
set
|
||||
{
|
||||
this["UploadTimeIntervalInMinutes"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,11 +59,12 @@ namespace XenServerHealthCheck
|
||||
|
||||
private static void initConfig()
|
||||
{
|
||||
if (Properties.Settings.Default.UUID.Length == 0)
|
||||
if (string.IsNullOrEmpty(Properties.Settings.Default.UUID))
|
||||
{
|
||||
Properties.Settings.Default.UUID = System.Guid.NewGuid().ToString();
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
log.InfoFormat("XenServer Health Check Service {0} starting...", Properties.Settings.Default.UUID);
|
||||
}
|
||||
|
||||
@ -77,7 +78,10 @@ namespace XenServerHealthCheck
|
||||
ServerListHelper.instance.Init();
|
||||
|
||||
System.Timers.Timer timer = new System.Timers.Timer();
|
||||
timer.Interval = 30 * 60000; // 30 minitues
|
||||
if (Properties.Settings.Default.UploadTimeIntervalInMinutes != 0)
|
||||
timer.Interval = Properties.Settings.Default.UploadTimeIntervalInMinutes * 60000;
|
||||
else
|
||||
timer.Interval = 30 * 60000; // 30 minitues
|
||||
timer.Elapsed += new System.Timers.ElapsedEventHandler(this.OnTimer);
|
||||
timer.Start();
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ namespace XenServerHealthCheck
|
||||
public class XenServerHealthCheckUpload
|
||||
{
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
public const string UPLOAD_URL = "https://rttf-staging.citrix.com/feeds/api/";
|
||||
public string UPLOAD_URL = "https://rttf-staging.citrix.com/feeds/api/";
|
||||
public const int CHUNK_SIZE = 1 * 1024 * 1024;
|
||||
private JavaScriptSerializer serializer;
|
||||
private int verbosityLevel;
|
||||
@ -55,7 +55,11 @@ namespace XenServerHealthCheck
|
||||
uploadToken = token;
|
||||
verbosityLevel = verbosity;
|
||||
serializer = new JavaScriptSerializer();
|
||||
serializer.MaxJsonLength = int.MaxValue;
|
||||
serializer.MaxJsonLength = int.MaxValue;
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.UUID))
|
||||
{
|
||||
UPLOAD_URL = Properties.Settings.Default.UPLOAD_URL;
|
||||
}
|
||||
}
|
||||
|
||||
// Request an upload and fetch the uploading id from CIS.
|
||||
|
17
mk/build.sh
17
mk/build.sh
@ -38,23 +38,20 @@
|
||||
# or from a build automation system.
|
||||
|
||||
|
||||
for DEP in nunit-console zip unzip mkisofs wget curl hg git patch
|
||||
FATAL=""
|
||||
for DEP in nunit-console.exe zip unzip mkisofs wget curl hg git patch
|
||||
do
|
||||
which $DEP >>/dev/null
|
||||
which $DEP >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: $DEP was not found, install it or add it to the PATH."
|
||||
FATAL=1
|
||||
FATAL="$DEP $FATAL"
|
||||
fi
|
||||
done
|
||||
if [ -z ${FATAL+x} ]; then
|
||||
echo ""
|
||||
else
|
||||
echo "FATAL: One or more build tools were not found."
|
||||
if [ -n "${FATAL}" ]; then
|
||||
echo "FATAL: One or more build tools were not found in PATH: $FATAL"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
DEBUG=1
|
||||
if [ -n "${DEBUG+xxx}" ];
|
||||
then
|
||||
echo "DEBUG mode activated (verbose)"
|
||||
@ -87,7 +84,7 @@ fi
|
||||
|
||||
production_jenkins_build()
|
||||
{
|
||||
source ${XENADMIN_DIR}/mk/bumpBuildNumber.sh
|
||||
#source ${XENADMIN_DIR}/mk/bumpBuildNumber.sh
|
||||
source ${XENADMIN_DIR}/devtools/check-roaming.sh
|
||||
source ${XENADMIN_DIR}/devtools/i18ncheck/i18ncheck.sh
|
||||
source ${XENADMIN_DIR}/devtools/deadcheck/deadcheck.sh
|
||||
|
@ -137,8 +137,8 @@ TEST_DIR=${ROOT}/tmp
|
||||
mkdir -p ${TEST_DIR}
|
||||
BUILD_ARCHIVE=${ROOT}/../builds/${get_BUILD_ID}/archive
|
||||
SECURE_BUILD_ARCHIVE_UNC=//10.80.13.10/distfiles/distfiles/windowsbuilds/WindowsBuilds/$get_JOB_NAME/$BUILD_NUMBER/
|
||||
#XENCENTER_LOGDIR="/cygdrive/c/Users/Administrator/AppData/Roaming/Citrix/XenCenter/logs"
|
||||
XENCENTER_LOGDIR="/cygdrive/c/Citrix/XenCenter/logs"
|
||||
XENCENTER_LOGDIR="${ROOT}/log"
|
||||
mkdir -p ${XENCENTER_LOGDIR}
|
||||
|
||||
# WEB_LIB is where the libraries stored in /usr/groups/linux/distfiles are exposed
|
||||
#WEB_LATEST_BUILD is where the current build will retrieve some of its dependendencies,
|
||||
@ -156,7 +156,7 @@ WEB_XE_PHASE_1=${WEB_LATEST_BUILD}/xe-phase-1
|
||||
WEB_XE_PHASE_2=${WEB_LATEST_BUILD}/xe-phase-2
|
||||
|
||||
#this is where the build will find stuff from the latest dotnet-packages build
|
||||
WEB_DOTNET="http://localhost:8080/job/carbon_${XS_BRANCH}_dotnet-packages/lastSuccessfulBuild/artifact"
|
||||
WEB_DOTNET="http://tocco.do.citrite.net:8080/job/carbon_${XS_BRANCH}_dotnet-packages/lastSuccessfulBuild/artifact"
|
||||
|
||||
# used to copy results out of the secure build enclave
|
||||
BUILD_TOOLS_REPO=git://admin/git/closed/windows/buildtools.git
|
||||
@ -164,5 +164,5 @@ BUILD_TOOLS=${SCRATCH_DIR}/buildtools.git
|
||||
STORE_FILES=${BUILD_TOOLS}/scripts/storefiles.py
|
||||
|
||||
#check there are xenserver builds on this branch before proceeding
|
||||
wget -N -q --spider ${WEB_XE_PHASE_1}/globals || { echo 'FATAL: Unable to locate globals, xenadmin cannot be built if there is no succesfull build of xenserver published for the same branch.' ; exit 1; }
|
||||
wget -T 10 -N -q --spider ${WEB_XE_PHASE_1}/globals || { echo 'FATAL: Unable to locate globals, xenadmin cannot be built if there is no succesfull build of xenserver published for the same branch.' ; exit 1; }
|
||||
|
||||
|
@ -46,6 +46,7 @@ ps -W -s | grep nunit | cut -b-10 | xargs kill -f || true
|
||||
cp ${OUTPUT_DIR}/XenAdminTests.tgz ${TEST_DIR}
|
||||
cd ${TEST_DIR} && tar xzf XenAdminTests.tgz && chmod -R 777 Release
|
||||
|
||||
|
||||
set +e
|
||||
nunit-console /nologo /nodots /process=separate /noshadow /labels /err="$(cygpath -d ${TEST_DIR})\error.nunit.log" /timeout=40000 /output="$(cygpath -d ${TEST_DIR})\output.nunit.log" /xml="$(cygpath -d ${TEST_DIR})\XenAdminTests.xml" "$(cygpath -d ${TEST_DIR})\Release\XenAdminTests.dll" "/framework=net-4.0" &
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user