mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-24 22:06:59 +01:00
Merge pull request #3046 from kc284/feature/vtpm
vTPM original implementation
This commit is contained in:
commit
00c3a87dad
@ -917,6 +917,7 @@ namespace XenAdmin.Commands
|
||||
items.AddIfEnabled(new AssignGroupToolStripMenuItem<VM_appliance>(mainWindow, selection, true));
|
||||
items.AddSeparator();
|
||||
|
||||
items.AddIfEnabled(new VtpmCommand(mainWindow, selection));
|
||||
items.AddIfEnabled(new InstallToolsCommand(mainWindow, selection));
|
||||
items.AddSeparator();
|
||||
|
||||
|
86
XenAdmin/Commands/VtpmCommand.cs
Normal file
86
XenAdmin/Commands/VtpmCommand.cs
Normal file
@ -0,0 +1,86 @@
|
||||
/* Copyright (c) Citrix Systems, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
using System.Collections.Generic;
|
||||
using XenAdmin.Core;
|
||||
using XenAdmin.Dialogs;
|
||||
using XenAPI;
|
||||
|
||||
namespace XenAdmin.Commands
|
||||
{
|
||||
internal class VtpmCommand : Command
|
||||
{
|
||||
public VtpmCommand()
|
||||
{
|
||||
}
|
||||
|
||||
public VtpmCommand(IMainWindow mainWindow, VM vm)
|
||||
: base(mainWindow, vm)
|
||||
{
|
||||
}
|
||||
|
||||
public VtpmCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection)
|
||||
: base(mainWindow, selection)
|
||||
{
|
||||
}
|
||||
|
||||
protected override bool CanRunCore(SelectedItemCollection selection)
|
||||
{
|
||||
return selection.Count == 1 &&
|
||||
selection[0].XenObject is VM vm &&
|
||||
!Helpers.FeatureForbidden(vm, Host.RestrictVtpm) &&
|
||||
Helpers.XapiEqualOrGreater_vtpmtag(vm.Connection) &&
|
||||
vm.IsUEFIEnabled();
|
||||
}
|
||||
|
||||
protected override string GetCantRunReasonCore(IXenObject item)
|
||||
{
|
||||
if (item is VM vm &&
|
||||
!Helpers.FeatureForbidden(vm, Host.RestrictVtpm) &&
|
||||
Helpers.XapiEqualOrGreater_vtpmtag(vm.Connection) &&
|
||||
!vm.IsUEFIEnabled())
|
||||
return Messages.COMMAND_VTPM_DISABLED_NON_UEFI;
|
||||
|
||||
return base.GetCantRunReasonCore(item);
|
||||
}
|
||||
|
||||
protected override void RunCore(SelectedItemCollection selection)
|
||||
{
|
||||
var vm = selection[0].XenObject as VM;
|
||||
new VtpmManagementDialog(vm).ShowPerXenObject(vm, MainWindowCommandInterface.Form);
|
||||
}
|
||||
|
||||
public override string ContextMenuText => MenuText;
|
||||
|
||||
public override string MenuText => Messages.COMMAND_VTPM_MENU;
|
||||
}
|
||||
}
|
@ -112,8 +112,6 @@ namespace XenAdmin.Dialogs
|
||||
this.Controls.Add(this.linkLabelTellMeMore);
|
||||
this.Controls.Add(this.BlurbLabel);
|
||||
this.Name = "NetworkingProperties";
|
||||
this.HelpButtonClicked += new System.ComponentModel.CancelEventHandler(this.NetworkingProperties_HelpButtonClicked);
|
||||
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.NetworkingProperties_HelpRequested);
|
||||
this.Controls.SetChildIndex(this.okButton, 0);
|
||||
this.Controls.SetChildIndex(this.cancelButton, 0);
|
||||
this.Controls.SetChildIndex(this.splitContainer, 0);
|
||||
|
@ -629,16 +629,6 @@ namespace XenAdmin.Dialogs
|
||||
return (XenAPI.Network)((NetworkingPropertiesPage)verticalTabs.Items[0]).NetworkComboBox.SelectedItem;
|
||||
}
|
||||
|
||||
private void NetworkingProperties_HelpButtonClicked(object sender, CancelEventArgs e)
|
||||
{
|
||||
HelpManager.Launch("NetworkingProperties");
|
||||
}
|
||||
|
||||
private void NetworkingProperties_HelpRequested(object sender, HelpEventArgs hlpevent)
|
||||
{
|
||||
HelpManager.Launch("NetworkingProperties");
|
||||
}
|
||||
|
||||
private void splitContainer_Panel1_Resize(object sender, EventArgs e)
|
||||
{
|
||||
ResizeVerticalTabs(verticalTabs.Items.Count);
|
||||
|
1
XenAdmin/Dialogs/PropertiesDialog.Designer.cs
generated
1
XenAdmin/Dialogs/PropertiesDialog.Designer.cs
generated
@ -76,6 +76,7 @@ namespace XenAdmin.Dialogs
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.Name = "PropertiesDialog";
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.PropertiesDialog_FormClosed);
|
||||
this.Move += new System.EventHandler(this.PropertiesDialog_Move);
|
||||
this.splitContainer.Panel1.ResumeLayout(false);
|
||||
this.splitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
|
||||
|
@ -569,7 +569,7 @@ namespace XenAdmin.Dialogs
|
||||
}
|
||||
}
|
||||
|
||||
private void PropertiesDialog_Moved(object sender, EventArgs e)
|
||||
private void PropertiesDialog_Move(object sender, EventArgs e)
|
||||
{
|
||||
HideToolTips();
|
||||
}
|
||||
|
@ -63,11 +63,9 @@ namespace XenAdmin.Dialogs
|
||||
TabTitle.Font = titleFont;
|
||||
}
|
||||
|
||||
public VerticalTabs.IVerticalTab[] Tabs =>
|
||||
verticalTabs.Items.Cast<VerticalTabs.IVerticalTab>().ToArray();
|
||||
public VerticalTabs.IVerticalTab[] Tabs => verticalTabs.Items.Cast<VerticalTabs.IVerticalTab>().ToArray();
|
||||
|
||||
public VerticalTabs.IVerticalTab SelectedTab =>
|
||||
verticalTabs.SelectedItem as VerticalTabs.IVerticalTab;
|
||||
public VerticalTabs.IVerticalTab SelectedTab => verticalTabs.SelectedItem as VerticalTabs.IVerticalTab;
|
||||
|
||||
protected void SelectPage(VerticalTabs.IVerticalTab page)
|
||||
{
|
||||
@ -79,34 +77,27 @@ namespace XenAdmin.Dialogs
|
||||
|
||||
private void verticalTabs_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ListBox listBox = sender as ListBox;
|
||||
if (sender == null)
|
||||
return;
|
||||
if (sender is ListBox listBox &&
|
||||
listBox.SelectedItem is VerticalTabs.IVerticalTab editPage &&
|
||||
editPage is Control control)
|
||||
{
|
||||
TabImage.Image = editPage.Image;
|
||||
TabTitle.Text = GetTabTitle(editPage);
|
||||
|
||||
VerticalTabs.IVerticalTab editPage = listBox.SelectedItem as VerticalTabs.IVerticalTab;
|
||||
if (editPage == null)
|
||||
return;
|
||||
control.Show();
|
||||
control.BringToFront();
|
||||
|
||||
Control control = editPage as Control;
|
||||
if (control == null)
|
||||
return;
|
||||
|
||||
TabImage.Image = editPage.Image;
|
||||
TabTitle.Text = GetTabTitle(editPage);
|
||||
|
||||
control.Show();
|
||||
control.BringToFront();
|
||||
|
||||
foreach(Control other in ContentPanel.Controls)
|
||||
if (other != control)
|
||||
foreach (Control other in ContentPanel.Controls)
|
||||
{
|
||||
other.Hide();
|
||||
if (other != control)
|
||||
other.Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual string GetTabTitle(VerticalTabs.IVerticalTab verticalTab)
|
||||
{
|
||||
return verticalTab != null ? verticalTab.Text : String.Empty;
|
||||
return verticalTab != null ? verticalTab.Text : string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -119,8 +110,7 @@ namespace XenAdmin.Dialogs
|
||||
if (!DesignMode)
|
||||
return;
|
||||
|
||||
VerticalTabs.IVerticalTab verticalTab = e.Control as VerticalTabs.IVerticalTab;
|
||||
if (verticalTab == null)
|
||||
if (!(e.Control is VerticalTabs.IVerticalTab verticalTab))
|
||||
return;
|
||||
|
||||
foreach (VerticalTabs.IVerticalTab vt in verticalTabs.Items)
|
||||
@ -138,8 +128,7 @@ namespace XenAdmin.Dialogs
|
||||
if (!DesignMode)
|
||||
return;
|
||||
|
||||
VerticalTabs.IVerticalTab verticalTab = e.Control as VerticalTabs.IVerticalTab;
|
||||
if (verticalTab == null)
|
||||
if (!(e.Control is VerticalTabs.IVerticalTab verticalTab))
|
||||
return;
|
||||
|
||||
verticalTabs.Items.Remove(verticalTab);
|
||||
|
149
XenAdmin/Dialogs/VtmpManagementDialog.Designer.cs
generated
Normal file
149
XenAdmin/Dialogs/VtmpManagementDialog.Designer.cs
generated
Normal file
@ -0,0 +1,149 @@
|
||||
namespace XenAdmin.Dialogs
|
||||
{
|
||||
partial class VtpmManagementDialog
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
UnregisterEvents();
|
||||
if (components != null)
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VtpmManagementDialog));
|
||||
this.BlurbLabel = new System.Windows.Forms.Label();
|
||||
this.addButton = new System.Windows.Forms.Button();
|
||||
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.toolTipContainerAdd = new XenAdmin.Controls.ToolTipContainer();
|
||||
this.labelNoVtpms = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
|
||||
this.splitContainer.Panel1.SuspendLayout();
|
||||
this.splitContainer.Panel2.SuspendLayout();
|
||||
this.splitContainer.SuspendLayout();
|
||||
this.blueBorder.SuspendLayout();
|
||||
this.toolTipContainerAdd.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// ContentPanel
|
||||
//
|
||||
resources.ApplyResources(this.ContentPanel, "ContentPanel");
|
||||
//
|
||||
// verticalTabs
|
||||
//
|
||||
this.verticalTabs.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
resources.ApplyResources(this.verticalTabs, "verticalTabs");
|
||||
this.verticalTabs.MouseClick += new System.Windows.Forms.MouseEventHandler(this.verticalTabs_MouseClick);
|
||||
this.verticalTabs.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.verticalTabs_DrawItem);
|
||||
this.verticalTabs.MouseMove += new System.Windows.Forms.MouseEventHandler(this.verticalTabs_MouseMove);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.cancelButton, "cancelButton");
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
//
|
||||
// splitContainer
|
||||
//
|
||||
this.splitContainer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
resources.ApplyResources(this.splitContainer, "splitContainer");
|
||||
//
|
||||
// splitContainer.Panel1
|
||||
//
|
||||
this.splitContainer.Panel1.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.splitContainer.Panel1.Controls.Add(this.toolTipContainerAdd);
|
||||
this.splitContainer.Panel1.Resize += new System.EventHandler(this.splitContainer_Panel1_Resize);
|
||||
//
|
||||
// splitContainer.Panel2
|
||||
//
|
||||
this.splitContainer.Panel2.Controls.Add(this.labelNoVtpms);
|
||||
//
|
||||
// blueBorder
|
||||
//
|
||||
resources.ApplyResources(this.blueBorder, "blueBorder");
|
||||
//
|
||||
// BlurbLabel
|
||||
//
|
||||
resources.ApplyResources(this.BlurbLabel, "BlurbLabel");
|
||||
this.BlurbLabel.Name = "BlurbLabel";
|
||||
this.BlurbLabel.UseMnemonic = false;
|
||||
//
|
||||
// addButton
|
||||
//
|
||||
this.addButton.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.addButton.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
resources.ApplyResources(this.addButton, "addButton");
|
||||
this.addButton.FlatAppearance.BorderSize = 0;
|
||||
this.addButton.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
|
||||
this.addButton.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
|
||||
this.addButton.Image = global::XenAdmin.Properties.Resources.sl_add_storage_system_small_16;
|
||||
this.addButton.Name = "addButton";
|
||||
this.addButton.UseVisualStyleBackColor = false;
|
||||
this.addButton.Click += new System.EventHandler(this.addButton_Click);
|
||||
//
|
||||
// toolTipContainerAdd
|
||||
//
|
||||
this.toolTipContainerAdd.Controls.Add(this.addButton);
|
||||
this.toolTipContainerAdd.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
resources.ApplyResources(this.toolTipContainerAdd, "toolTipContainerAdd");
|
||||
this.toolTipContainerAdd.Name = "toolTipContainerAdd";
|
||||
//
|
||||
// labelNoVtpms
|
||||
//
|
||||
this.labelNoVtpms.BackColor = System.Drawing.SystemColors.Window;
|
||||
resources.ApplyResources(this.labelNoVtpms, "labelNoVtpms");
|
||||
this.labelNoVtpms.Name = "labelNoVtpms";
|
||||
//
|
||||
// VtpmManagementDialog
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.Controls.Add(this.BlurbLabel);
|
||||
this.Name = "VtpmManagementDialog";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
|
||||
this.Controls.SetChildIndex(this.okButton, 0);
|
||||
this.Controls.SetChildIndex(this.cancelButton, 0);
|
||||
this.Controls.SetChildIndex(this.splitContainer, 0);
|
||||
this.Controls.SetChildIndex(this.BlurbLabel, 0);
|
||||
this.splitContainer.Panel1.ResumeLayout(false);
|
||||
this.splitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
|
||||
this.splitContainer.ResumeLayout(false);
|
||||
this.blueBorder.ResumeLayout(false);
|
||||
this.toolTipContainerAdd.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label BlurbLabel;
|
||||
private System.Windows.Forms.Button addButton;
|
||||
private System.Windows.Forms.ToolTip toolTip;
|
||||
private Controls.ToolTipContainer toolTipContainerAdd;
|
||||
private System.Windows.Forms.Label labelNoVtpms;
|
||||
}
|
||||
}
|
320
XenAdmin/Dialogs/VtmpManagementDialog.cs
Normal file
320
XenAdmin/Dialogs/VtmpManagementDialog.cs
Normal file
@ -0,0 +1,320 @@
|
||||
/* 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.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using XenAdmin.Actions;
|
||||
using XenAdmin.Core;
|
||||
using XenAdmin.Help;
|
||||
using XenAPI;
|
||||
|
||||
|
||||
namespace XenAdmin.Dialogs
|
||||
{
|
||||
public partial class VtpmManagementDialog : VerticallyTabbedDialog
|
||||
{
|
||||
private readonly VM _vm;
|
||||
private bool _toolTipVisible;
|
||||
private XenRef<VTPM> _selectedVtpm;
|
||||
|
||||
public VtpmManagementDialog(VM vm)
|
||||
{
|
||||
InitializeComponent();
|
||||
_vm = vm;
|
||||
RegisterEvents();
|
||||
}
|
||||
|
||||
protected override void OnHandleCreated(EventArgs e)
|
||||
{
|
||||
base.OnHandleCreated(e);
|
||||
|
||||
Text = string.Format(Text, _vm.Name().Ellipsise(50));
|
||||
BlurbLabel.Text = string.Format(BlurbLabel.Text, _vm.Name().Ellipsise(80));
|
||||
RefreshTabs();
|
||||
}
|
||||
|
||||
private void RegisterEvents()
|
||||
{
|
||||
_vm.PropertyChanged += _vm_PropertyChanged;
|
||||
}
|
||||
|
||||
private void UnregisterEvents()
|
||||
{
|
||||
_vm.PropertyChanged -= _vm_PropertyChanged;
|
||||
}
|
||||
|
||||
private VtpmManagementPage CreateVtpmPage(VTPM vtpm)
|
||||
{
|
||||
var page = new VtpmManagementPage(vtpm)
|
||||
{
|
||||
Parent = ContentPanel,
|
||||
TabStop = true,
|
||||
Dock = DockStyle.Fill
|
||||
};
|
||||
page.RemoveButtonClicked += Page_RemoveButtonClicked;
|
||||
return page;
|
||||
}
|
||||
|
||||
private void RefreshTabs()
|
||||
{
|
||||
if (verticalTabs.SelectedItem is VtpmManagementPage p)
|
||||
_selectedVtpm = new XenRef<VTPM>(p.Vtpm.opaque_ref);
|
||||
else
|
||||
_selectedVtpm = null;
|
||||
|
||||
var tabsToRemove = (from object tab in verticalTabs.Items
|
||||
let page = tab as VtpmManagementPage
|
||||
where page != null && _vm.VTPMs.All(t => t.opaque_ref != page.Vtpm.opaque_ref)
|
||||
select page).ToList();
|
||||
|
||||
foreach (var tab in tabsToRemove)
|
||||
{
|
||||
verticalTabs.Items.Remove(tab);
|
||||
ContentPanel.Controls.Remove(tab);
|
||||
}
|
||||
|
||||
var newVtpmPages = new List<object>();
|
||||
|
||||
foreach (var vtpmRef in _vm.VTPMs)
|
||||
{
|
||||
var page = FindTabFromVtpm(vtpmRef);
|
||||
if (page == null)
|
||||
{
|
||||
VTPM vtpm = _vm.Connection.Resolve(vtpmRef);
|
||||
if (vtpm != null)
|
||||
{
|
||||
page = CreateVtpmPage(vtpm);
|
||||
newVtpmPages.Add(page);
|
||||
}
|
||||
}
|
||||
|
||||
page?.Repopulate();
|
||||
}
|
||||
|
||||
verticalTabs.Items.AddRange(newVtpmPages.ToArray());
|
||||
ResizeVerticalTabs();
|
||||
|
||||
VtpmManagementPage selectedPage = null;
|
||||
if (_selectedVtpm != null)
|
||||
selectedPage = FindTabFromVtpm(_selectedVtpm);
|
||||
else if (verticalTabs.Items.Count > 0)
|
||||
selectedPage = verticalTabs.Items[0] as VtpmManagementPage;
|
||||
|
||||
verticalTabs.SelectedItem = selectedPage;
|
||||
|
||||
blueBorder.Visible = verticalTabs.SelectedItem != null;
|
||||
labelNoVtpms.Visible = verticalTabs.SelectedItem == null;
|
||||
|
||||
addButton.Enabled = _vm.CanAddVtpm(out var cannotReason);
|
||||
if (string.IsNullOrEmpty(cannotReason))
|
||||
toolTipContainerAdd.RemoveAll();
|
||||
else
|
||||
toolTipContainerAdd.SetToolTip(cannotReason);
|
||||
}
|
||||
|
||||
private VtpmManagementPage FindTabFromVtpm(XenRef<VTPM> vtpmRef)
|
||||
{
|
||||
foreach (var tab in verticalTabs.Items)
|
||||
{
|
||||
if (tab is VtpmManagementPage page && page.Vtpm.opaque_ref == vtpmRef.opaque_ref)
|
||||
return page;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void AddVtpm()
|
||||
{
|
||||
if (!_vm.Connection.Session.IsLocalSuperuser && !Registry.DontSudo &&
|
||||
_vm.Connection.Session.Roles.All(r => r.name_label != Role.MR_ROLE_VM_ADMIN))
|
||||
{
|
||||
var currentRoles = _vm.Connection.Session.Roles;
|
||||
currentRoles.Sort();
|
||||
|
||||
var msg = string.Format(Messages.VTPM_RBAC_RESTRICTION_CREATE, currentRoles[0].FriendlyName(),
|
||||
Role.FriendlyName(Role.MR_ROLE_VM_ADMIN));
|
||||
|
||||
using (var dlg = new ErrorDialog(msg))
|
||||
dlg.ShowDialog(Parent);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var action = new NewVtpmAction(_vm.Connection, _vm);
|
||||
using (var dlg = new ActionProgressDialog(action, ProgressBarStyle.Marquee))
|
||||
dlg.ShowDialog(this);
|
||||
}
|
||||
|
||||
private void RemoveVtpm(VTPM vtpm)
|
||||
{
|
||||
HideTooltip();
|
||||
|
||||
using (var dlg = new WarningDialog(Messages.VTPM_REMOVE_WARNING, ThreeButtonDialog.ButtonYes, ThreeButtonDialog.ButtonNo))
|
||||
{
|
||||
if (dlg.ShowDialog() != DialogResult.Yes)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_vm.Connection.Session.IsLocalSuperuser && !Registry.DontSudo &&
|
||||
_vm.Connection.Session.Roles.All(r => r.name_label != Role.MR_ROLE_VM_ADMIN))
|
||||
{
|
||||
var currentRoles = _vm.Connection.Session.Roles;
|
||||
currentRoles.Sort();
|
||||
|
||||
var msg = string.Format(Messages.VTPM_RBAC_RESTRICTION_REMOVE, currentRoles[0].FriendlyName(),
|
||||
Role.FriendlyName(Role.MR_ROLE_VM_ADMIN));
|
||||
|
||||
using (var dlg = new ErrorDialog(msg))
|
||||
dlg.ShowDialog(Parent);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var action = new RemoveVtpmAction(vtpm.Connection, vtpm);
|
||||
using (var dlg = new ActionProgressDialog(action, ProgressBarStyle.Marquee))
|
||||
dlg.ShowDialog(this);
|
||||
}
|
||||
|
||||
private void ResizeVerticalTabs()
|
||||
{
|
||||
int maxHeight = splitContainer.Panel1.Height - toolTipContainerAdd.Height;
|
||||
verticalTabs.Height = Math.Min(maxHeight, verticalTabs.Items.Count * verticalTabs.ItemHeight);
|
||||
toolTipContainerAdd.Top = verticalTabs.Top + verticalTabs.Height;
|
||||
}
|
||||
|
||||
private void ShowTooltip(Point location)
|
||||
{
|
||||
if (!_toolTipVisible)
|
||||
{
|
||||
Cursor = Cursors.Hand;
|
||||
var msg = _vm.CanRemoveVtpm(out var cannotReason) ? Messages.VTPM_REMOVE : cannotReason;
|
||||
|
||||
if (!string.IsNullOrEmpty(cannotReason))
|
||||
{
|
||||
toolTip.Show(msg, verticalTabs, location.X, location.Y + 20);
|
||||
_toolTipVisible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void HideTooltip()
|
||||
{
|
||||
toolTip.Hide(verticalTabs);
|
||||
_toolTipVisible = false;
|
||||
Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
#region Event handlers
|
||||
|
||||
private void _vm_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
if (!(sender is VM))
|
||||
return;
|
||||
|
||||
if (e.PropertyName != "power_state" && e.PropertyName != "VTPMs")
|
||||
return;
|
||||
|
||||
Program.Invoke(this, RefreshTabs);
|
||||
}
|
||||
|
||||
private void splitContainer_Panel1_Resize(object sender, EventArgs e)
|
||||
{
|
||||
ResizeVerticalTabs();
|
||||
}
|
||||
|
||||
private void verticalTabs_DrawItem(object sender, DrawItemEventArgs e)
|
||||
{
|
||||
int pageIndex = e.Index;
|
||||
if (pageIndex < 0 || verticalTabs.Items.Count <= pageIndex)
|
||||
return;
|
||||
|
||||
if (!(verticalTabs.Items[pageIndex] is VtpmManagementPage page))
|
||||
return;
|
||||
|
||||
var deleteIcon = _vm.CanRemoveVtpm(out _) ? Images.StaticImages._000_Abort_h32bit_16 : Images.StaticImages._000_Abort_gray_h32bit_16;
|
||||
|
||||
page.DeleteIconBounds = new Rectangle(e.Bounds.Right - deleteIcon.Width - (32 - deleteIcon.Width) / 2,
|
||||
e.Bounds.Y + (32 - deleteIcon.Height) / 2, deleteIcon.Width, deleteIcon.Height);
|
||||
|
||||
e.Graphics.DrawImage(deleteIcon, page.DeleteIconBounds);
|
||||
}
|
||||
|
||||
private void verticalTabs_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
int pageIndex = verticalTabs.IndexFromPoint(e.Location);
|
||||
if (pageIndex < 0 || verticalTabs.Items.Count <= pageIndex)
|
||||
return;
|
||||
|
||||
if (!(verticalTabs.Items[pageIndex] is VtpmManagementPage page))
|
||||
return;
|
||||
|
||||
if (page.DeleteIconBounds.Contains(e.Location))
|
||||
ShowTooltip(e.Location);
|
||||
else
|
||||
HideTooltip();
|
||||
}
|
||||
|
||||
private void verticalTabs_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
int pageIndex = verticalTabs.IndexFromPoint(e.Location);
|
||||
if (pageIndex < 0 || verticalTabs.Items.Count <= pageIndex)
|
||||
return;
|
||||
|
||||
if (!(verticalTabs.Items[pageIndex] is VtpmManagementPage page))
|
||||
return;
|
||||
|
||||
if (page.DeleteIconBounds.Contains(e.Location) && _vm.CanRemoveVtpm(out _))
|
||||
RemoveVtpm(page.Vtpm);
|
||||
}
|
||||
|
||||
private void Page_RemoveButtonClicked(VtpmManagementPage page)
|
||||
{
|
||||
RemoveVtpm(page.Vtpm);
|
||||
}
|
||||
|
||||
private void addButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
AddVtpm();
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
123
XenAdmin/Dialogs/VtmpManagementDialog.ja.resx
Normal file
123
XenAdmin/Dialogs/VtmpManagementDialog.ja.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
|
||||
<xsd:element msdata:IsDataSet="true" name="root">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs="0" name="value" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="type" type="xsd:string"/>
|
||||
<xsd:attribute name="mimetype" type="xsd:string"/>
|
||||
<xsd:attribute ref="xml:space"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string"/>
|
||||
<xsd:attribute name="name" type="xsd:string"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs="0" msdata:Ordinal="1" name="value" type="xsd:string"/>
|
||||
<xsd:element minOccurs="0" msdata:Ordinal="2" name="comment" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute msdata:Ordinal="1" name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute msdata:Ordinal="3" name="type" type="xsd:string"/>
|
||||
<xsd:attribute msdata:Ordinal="4" name="mimetype" type="xsd:string"/>
|
||||
<xsd:attribute ref="xml:space"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs="0" msdata:Ordinal="1" name="value" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<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>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
441
XenAdmin/Dialogs/VtmpManagementDialog.resx
Normal file
441
XenAdmin/Dialogs/VtmpManagementDialog.resx
Normal file
@ -0,0 +1,441 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="ContentPanel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>536, 327</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="ContentPanel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>ContentPanel.Name" xml:space="preserve">
|
||||
<value>ContentPanel</value>
|
||||
</data>
|
||||
<data name=">>ContentPanel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>ContentPanel.Parent" xml:space="preserve">
|
||||
<value>blueBorder</value>
|
||||
</data>
|
||||
<data name=">>ContentPanel.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="verticalTabs.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
</data>
|
||||
<data name="verticalTabs.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>213, 255</value>
|
||||
</data>
|
||||
<data name="verticalTabs.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>verticalTabs.Name" xml:space="preserve">
|
||||
<value>verticalTabs</value>
|
||||
</data>
|
||||
<data name=">>verticalTabs.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Controls.VerticalTabs, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>verticalTabs.Parent" xml:space="preserve">
|
||||
<value>splitContainer.Panel1</value>
|
||||
</data>
|
||||
<data name=">>verticalTabs.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>700, 426</value>
|
||||
</data>
|
||||
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="cancelButton.Text" xml:space="preserve">
|
||||
<value>Close</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Name" xml:space="preserve">
|
||||
<value>cancelButton</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>620, 426</value>
|
||||
</data>
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="okButton.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name=">>okButton.Name" xml:space="preserve">
|
||||
<value>okButton</value>
|
||||
</data>
|
||||
<data name=">>okButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>okButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="splitContainer.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 46</value>
|
||||
</data>
|
||||
<data name="addButton.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="addButton.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
|
||||
<value>Flat</value>
|
||||
</data>
|
||||
<data name="addButton.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="addButton.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleLeft</value>
|
||||
</data>
|
||||
<data name="addButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="addButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="addButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>88, 25</value>
|
||||
</data>
|
||||
<data name="addButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="addButton.Text" xml:space="preserve">
|
||||
<value>A&dd vTPM</value>
|
||||
</data>
|
||||
<data name="addButton.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleLeft</value>
|
||||
</data>
|
||||
<data name="addButton.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageBeforeText</value>
|
||||
</data>
|
||||
<data name=">>addButton.Name" xml:space="preserve">
|
||||
<value>addButton</value>
|
||||
</data>
|
||||
<data name=">>addButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>addButton.Parent" xml:space="preserve">
|
||||
<value>toolTipContainerAdd</value>
|
||||
</data>
|
||||
<data name=">>addButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="toolTipContainerAdd.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="toolTipContainerAdd.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 300</value>
|
||||
</data>
|
||||
<data name="toolTipContainerAdd.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="toolTipContainerAdd.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>88, 25</value>
|
||||
</data>
|
||||
<data name="toolTipContainerAdd.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>toolTipContainerAdd.Name" xml:space="preserve">
|
||||
<value>toolTipContainerAdd</value>
|
||||
</data>
|
||||
<data name=">>toolTipContainerAdd.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Controls.ToolTipContainer, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>toolTipContainerAdd.Parent" xml:space="preserve">
|
||||
<value>splitContainer.Panel1</value>
|
||||
</data>
|
||||
<data name=">>toolTipContainerAdd.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel1.Name" xml:space="preserve">
|
||||
<value>splitContainer.Panel1</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel1.Parent" xml:space="preserve">
|
||||
<value>splitContainer</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="labelNoVtpms.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="labelNoVtpms.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="labelNoVtpms.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="labelNoVtpms.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>542, 372</value>
|
||||
</data>
|
||||
<data name="labelNoVtpms.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="labelNoVtpms.Text" xml:space="preserve">
|
||||
<value>There are no vTPMs attached to this VM.</value>
|
||||
</data>
|
||||
<data name="labelNoVtpms.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleCenter</value>
|
||||
</data>
|
||||
<data name=">>labelNoVtpms.Name" xml:space="preserve">
|
||||
<value>labelNoVtpms</value>
|
||||
</data>
|
||||
<data name=">>labelNoVtpms.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelNoVtpms.Parent" xml:space="preserve">
|
||||
<value>splitContainer.Panel2</value>
|
||||
</data>
|
||||
<data name=">>labelNoVtpms.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel2.Name" xml:space="preserve">
|
||||
<value>splitContainer.Panel2</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel2.Parent" xml:space="preserve">
|
||||
<value>splitContainer</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Panel2.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="splitContainer.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>763, 374</value>
|
||||
</data>
|
||||
<data name="splitContainer.SplitterDistance" type="System.Int32, mscorlib">
|
||||
<value>215</value>
|
||||
</data>
|
||||
<data name="splitContainer.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Name" xml:space="preserve">
|
||||
<value>splitContainer</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>splitContainer.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="blueBorder.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>542, 372</value>
|
||||
</data>
|
||||
<data name="blueBorder.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>blueBorder.Name" xml:space="preserve">
|
||||
<value>blueBorder</value>
|
||||
</data>
|
||||
<data name=">>blueBorder.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>blueBorder.Parent" xml:space="preserve">
|
||||
<value>splitContainer.Panel2</value>
|
||||
</data>
|
||||
<data name=">>blueBorder.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="BlurbLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Left, Right</value>
|
||||
</data>
|
||||
<data name="BlurbLabel.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="BlurbLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="BlurbLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 9</value>
|
||||
</data>
|
||||
<data name="BlurbLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>763, 34</value>
|
||||
</data>
|
||||
<data name="BlurbLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="BlurbLabel.Text" xml:space="preserve">
|
||||
<value>Attach, remove, and configure vTPMs on '{0}'.</value>
|
||||
</data>
|
||||
<data name=">>BlurbLabel.Name" xml:space="preserve">
|
||||
<value>BlurbLabel</value>
|
||||
</data>
|
||||
<data name=">>BlurbLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>BlurbLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>BlurbLabel.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<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">
|
||||
<value>96, 96</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>784, 461</value>
|
||||
</data>
|
||||
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Tahoma, 8pt</value>
|
||||
</data>
|
||||
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>800, 500</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Trusted Platform Module (TPM) Manager - {0}</value>
|
||||
</data>
|
||||
<data name=">>toolTip.Name" xml:space="preserve">
|
||||
<value>toolTip</value>
|
||||
</data>
|
||||
<data name=">>toolTip.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>VtpmManagementDialog</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Dialogs.VerticallyTabbedDialog, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
</root>
|
123
XenAdmin/Dialogs/VtmpManagementDialog.zh-CN.resx
Normal file
123
XenAdmin/Dialogs/VtmpManagementDialog.zh-CN.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
|
||||
<xsd:element msdata:IsDataSet="true" name="root">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs="0" name="value" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="type" type="xsd:string"/>
|
||||
<xsd:attribute name="mimetype" type="xsd:string"/>
|
||||
<xsd:attribute ref="xml:space"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string"/>
|
||||
<xsd:attribute name="name" type="xsd:string"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs="0" msdata:Ordinal="1" name="value" type="xsd:string"/>
|
||||
<xsd:element minOccurs="0" msdata:Ordinal="2" name="comment" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute msdata:Ordinal="1" name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute msdata:Ordinal="3" name="type" type="xsd:string"/>
|
||||
<xsd:attribute msdata:Ordinal="4" name="mimetype" type="xsd:string"/>
|
||||
<xsd:attribute ref="xml:space"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs="0" msdata:Ordinal="1" name="value" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<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>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
148
XenAdmin/Dialogs/VtpmManagementPage.Designer.cs
generated
Normal file
148
XenAdmin/Dialogs/VtpmManagementPage.Designer.cs
generated
Normal file
@ -0,0 +1,148 @@
|
||||
namespace XenAdmin.Dialogs
|
||||
{
|
||||
partial class VtpmManagementPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
UnregisterEvents();
|
||||
|
||||
if (components != null)
|
||||
components.Dispose();
|
||||
}
|
||||
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VtpmManagementPage));
|
||||
this.tableLayoutPanelBody = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.buttonReset = new System.Windows.Forms.Button();
|
||||
this.groupBoxProperties = new System.Windows.Forms.GroupBox();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.labelProtectedKey = new System.Windows.Forms.Label();
|
||||
this.labelUniqueValue = new System.Windows.Forms.Label();
|
||||
this.labelProtectedValue = new System.Windows.Forms.Label();
|
||||
this.labelUniqueKey = new System.Windows.Forms.Label();
|
||||
this.toolTipContainerRemove = new XenAdmin.Controls.ToolTipContainer();
|
||||
this.buttonRemove = new System.Windows.Forms.Button();
|
||||
this.tableLayoutPanelBody.SuspendLayout();
|
||||
this.groupBoxProperties.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.toolTipContainerRemove.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tableLayoutPanelBody
|
||||
//
|
||||
this.tableLayoutPanelBody.BackColor = System.Drawing.Color.Transparent;
|
||||
resources.ApplyResources(this.tableLayoutPanelBody, "tableLayoutPanelBody");
|
||||
this.tableLayoutPanelBody.Controls.Add(this.buttonReset, 0, 2);
|
||||
this.tableLayoutPanelBody.Controls.Add(this.groupBoxProperties, 0, 0);
|
||||
this.tableLayoutPanelBody.Controls.Add(this.toolTipContainerRemove, 1, 2);
|
||||
this.tableLayoutPanelBody.Name = "tableLayoutPanelBody";
|
||||
//
|
||||
// buttonReset
|
||||
//
|
||||
resources.ApplyResources(this.buttonReset, "buttonReset");
|
||||
this.buttonReset.Name = "buttonReset";
|
||||
this.buttonReset.UseVisualStyleBackColor = true;
|
||||
this.buttonReset.Click += new System.EventHandler(this.buttonReset_Click);
|
||||
//
|
||||
// groupBoxProperties
|
||||
//
|
||||
this.tableLayoutPanelBody.SetColumnSpan(this.groupBoxProperties, 2);
|
||||
this.groupBoxProperties.Controls.Add(this.tableLayoutPanel1);
|
||||
resources.ApplyResources(this.groupBoxProperties, "groupBoxProperties");
|
||||
this.groupBoxProperties.Name = "groupBoxProperties";
|
||||
this.groupBoxProperties.TabStop = false;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelProtectedKey, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelUniqueValue, 1, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelProtectedValue, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelUniqueKey, 0, 1);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
//
|
||||
// labelProtectedKey
|
||||
//
|
||||
resources.ApplyResources(this.labelProtectedKey, "labelProtectedKey");
|
||||
this.labelProtectedKey.Name = "labelProtectedKey";
|
||||
//
|
||||
// labelUniqueValue
|
||||
//
|
||||
resources.ApplyResources(this.labelUniqueValue, "labelUniqueValue");
|
||||
this.labelUniqueValue.Name = "labelUniqueValue";
|
||||
//
|
||||
// labelProtectedValue
|
||||
//
|
||||
resources.ApplyResources(this.labelProtectedValue, "labelProtectedValue");
|
||||
this.labelProtectedValue.Name = "labelProtectedValue";
|
||||
//
|
||||
// labelUniqueKey
|
||||
//
|
||||
resources.ApplyResources(this.labelUniqueKey, "labelUniqueKey");
|
||||
this.labelUniqueKey.Name = "labelUniqueKey";
|
||||
//
|
||||
// toolTipContainerRemove
|
||||
//
|
||||
this.toolTipContainerRemove.Controls.Add(this.buttonRemove);
|
||||
resources.ApplyResources(this.toolTipContainerRemove, "toolTipContainerRemove");
|
||||
this.toolTipContainerRemove.Name = "toolTipContainerRemove";
|
||||
//
|
||||
// buttonRemove
|
||||
//
|
||||
resources.ApplyResources(this.buttonRemove, "buttonRemove");
|
||||
this.buttonRemove.Image = global::XenAdmin.Properties.Resources._000_Abort_h32bit_16;
|
||||
this.buttonRemove.Name = "buttonRemove";
|
||||
this.buttonRemove.Tag = "";
|
||||
this.buttonRemove.UseVisualStyleBackColor = true;
|
||||
this.buttonRemove.Click += new System.EventHandler(this.buttonRemove_Click);
|
||||
//
|
||||
// VtpmManagementPage
|
||||
//
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.tableLayoutPanelBody);
|
||||
this.DoubleBuffered = true;
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.Name = "VtpmManagementPage";
|
||||
this.tableLayoutPanelBody.ResumeLayout(false);
|
||||
this.groupBoxProperties.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
this.toolTipContainerRemove.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelBody;
|
||||
private System.Windows.Forms.Button buttonRemove;
|
||||
private System.Windows.Forms.Button buttonReset;
|
||||
private System.Windows.Forms.Label labelProtectedKey;
|
||||
private System.Windows.Forms.GroupBox groupBoxProperties;
|
||||
private System.Windows.Forms.Label labelUniqueKey;
|
||||
private System.Windows.Forms.Label labelUniqueValue;
|
||||
private System.Windows.Forms.Label labelProtectedValue;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private Controls.ToolTipContainer toolTipContainerRemove;
|
||||
}
|
||||
}
|
114
XenAdmin/Dialogs/VtpmManagementPage.cs
Normal file
114
XenAdmin/Dialogs/VtpmManagementPage.cs
Normal file
@ -0,0 +1,114 @@
|
||||
/* 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.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using XenAdmin.Controls;
|
||||
using XenAdmin.Core;
|
||||
using XenAPI;
|
||||
|
||||
|
||||
namespace XenAdmin.Dialogs
|
||||
{
|
||||
public partial class VtpmManagementPage : UserControl, VerticalTabs.IVerticalTab
|
||||
{
|
||||
public event Action<VtpmManagementPage> RemoveButtonClicked;
|
||||
|
||||
public VtpmManagementPage(VTPM vtpm)
|
||||
{
|
||||
InitializeComponent();
|
||||
buttonReset.Visible = false;
|
||||
Vtpm = vtpm;
|
||||
RegisterEvents();
|
||||
}
|
||||
|
||||
public override string Text => Messages.VTPM;
|
||||
public VTPM Vtpm { get; }
|
||||
public string SubText { get; }
|
||||
public Image Image => Images.StaticImages.tpm;
|
||||
public Rectangle DeleteIconBounds { get; set; }
|
||||
|
||||
private void RegisterEvents()
|
||||
{
|
||||
Vtpm.PropertyChanged += Vtpm_PropertyChanged;
|
||||
}
|
||||
|
||||
private void UnregisterEvents()
|
||||
{
|
||||
Vtpm.PropertyChanged -= Vtpm_PropertyChanged;
|
||||
}
|
||||
|
||||
public void Repopulate()
|
||||
{
|
||||
UpdateProperties();
|
||||
UpdateButtons();
|
||||
}
|
||||
|
||||
private void UpdateProperties()
|
||||
{
|
||||
labelProtectedValue.Text = Vtpm.is_protected.ToYesNoStringI18n();
|
||||
labelUniqueValue.Text = Vtpm.is_unique.ToYesNoStringI18n();
|
||||
}
|
||||
|
||||
private void UpdateButtons()
|
||||
{
|
||||
var vm = Vtpm.Connection.Resolve(Vtpm.VM);
|
||||
string cannotReason = null;
|
||||
buttonRemove.Enabled = vm!= null && vm.CanRemoveVtpm(out cannotReason);
|
||||
|
||||
if (buttonRemove.Enabled)
|
||||
toolTipContainerRemove.RemoveAll();
|
||||
else if (!string.IsNullOrEmpty(cannotReason))
|
||||
toolTipContainerRemove.SetToolTip(cannotReason);
|
||||
}
|
||||
|
||||
private void Vtpm_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
if (!(sender is VTPM))
|
||||
return;
|
||||
|
||||
if (e.PropertyName == "is_protected" || e.PropertyName == "is_unique")
|
||||
Program.Invoke(this, UpdateProperties);
|
||||
}
|
||||
|
||||
private void buttonRemove_Click(object sender, EventArgs e)
|
||||
{
|
||||
RemoveButtonClicked?.Invoke(this);
|
||||
}
|
||||
|
||||
private void buttonReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
//TODO:
|
||||
}
|
||||
}
|
||||
}
|
123
XenAdmin/Dialogs/VtpmManagementPage.ja.resx
Normal file
123
XenAdmin/Dialogs/VtpmManagementPage.ja.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
|
||||
<xsd:element msdata:IsDataSet="true" name="root">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs="0" name="value" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="type" type="xsd:string"/>
|
||||
<xsd:attribute name="mimetype" type="xsd:string"/>
|
||||
<xsd:attribute ref="xml:space"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string"/>
|
||||
<xsd:attribute name="name" type="xsd:string"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs="0" msdata:Ordinal="1" name="value" type="xsd:string"/>
|
||||
<xsd:element minOccurs="0" msdata:Ordinal="2" name="comment" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute msdata:Ordinal="1" name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute msdata:Ordinal="3" name="type" type="xsd:string"/>
|
||||
<xsd:attribute msdata:Ordinal="4" name="mimetype" type="xsd:string"/>
|
||||
<xsd:attribute ref="xml:space"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs="0" msdata:Ordinal="1" name="value" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
435
XenAdmin/Dialogs/VtpmManagementPage.resx
Normal file
435
XenAdmin/Dialogs/VtpmManagementPage.resx
Normal file
@ -0,0 +1,435 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="tableLayoutPanelBody.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="buttonReset.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 301</value>
|
||||
</data>
|
||||
<data name="buttonReset.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 23</value>
|
||||
</data>
|
||||
<data name="buttonReset.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="buttonReset.Text" xml:space="preserve">
|
||||
<value>&Clear vTPM</value>
|
||||
</data>
|
||||
<data name=">>buttonReset.Name" xml:space="preserve">
|
||||
<value>buttonReset</value>
|
||||
</data>
|
||||
<data name=">>buttonReset.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>buttonReset.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanelBody</value>
|
||||
</data>
|
||||
<data name=">>buttonReset.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="labelProtectedKey.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="labelProtectedKey.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 5</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="labelProtectedKey.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 5, 5, 5</value>
|
||||
</data>
|
||||
<data name="labelProtectedKey.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>56, 13</value>
|
||||
</data>
|
||||
<data name="labelProtectedKey.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="labelProtectedKey.Text" xml:space="preserve">
|
||||
<value>Protected:</value>
|
||||
</data>
|
||||
<data name=">>labelProtectedKey.Name" xml:space="preserve">
|
||||
<value>labelProtectedKey</value>
|
||||
</data>
|
||||
<data name=">>labelProtectedKey.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelProtectedKey.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>labelProtectedKey.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="labelUniqueValue.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="labelUniqueValue.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>61, 28</value>
|
||||
</data>
|
||||
<data name="labelUniqueValue.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 5, 5, 5</value>
|
||||
</data>
|
||||
<data name="labelUniqueValue.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 13</value>
|
||||
</data>
|
||||
<data name="labelUniqueValue.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="labelUniqueValue.Text" xml:space="preserve">
|
||||
<value>labelUniqueValue</value>
|
||||
</data>
|
||||
<data name=">>labelUniqueValue.Name" xml:space="preserve">
|
||||
<value>labelUniqueValue</value>
|
||||
</data>
|
||||
<data name=">>labelUniqueValue.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelUniqueValue.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>labelUniqueValue.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="labelProtectedValue.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="labelProtectedValue.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>61, 5</value>
|
||||
</data>
|
||||
<data name="labelProtectedValue.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 5, 5, 5</value>
|
||||
</data>
|
||||
<data name="labelProtectedValue.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>102, 13</value>
|
||||
</data>
|
||||
<data name="labelProtectedValue.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="labelProtectedValue.Text" xml:space="preserve">
|
||||
<value>labelProtectedValue</value>
|
||||
</data>
|
||||
<data name=">>labelProtectedValue.Name" xml:space="preserve">
|
||||
<value>labelProtectedValue</value>
|
||||
</data>
|
||||
<data name=">>labelProtectedValue.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelProtectedValue.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>labelProtectedValue.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="labelUniqueKey.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="labelUniqueKey.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 28</value>
|
||||
</data>
|
||||
<data name="labelUniqueKey.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 5, 5, 5</value>
|
||||
</data>
|
||||
<data name="labelUniqueKey.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>44, 13</value>
|
||||
</data>
|
||||
<data name="labelUniqueKey.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="labelUniqueKey.Text" xml:space="preserve">
|
||||
<value>Unique:</value>
|
||||
</data>
|
||||
<data name=">>labelUniqueKey.Name" xml:space="preserve">
|
||||
<value>labelUniqueKey</value>
|
||||
</data>
|
||||
<data name=">>labelUniqueKey.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelUniqueKey.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>labelUniqueKey.ZOrder" xml:space="preserve">
|
||||
<value>3</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>3, 16</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 0, 3, 0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>393, 81</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Name" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Parent" xml:space="preserve">
|
||||
<value>groupBoxProperties</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.ZOrder" xml:space="preserve">
|
||||
<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="labelProtectedKey" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelUniqueValue" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelProtectedValue" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelUniqueKey" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0,Percent,100" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<data name="groupBoxProperties.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="groupBoxProperties.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="groupBoxProperties.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>399, 100</value>
|
||||
</data>
|
||||
<data name="groupBoxProperties.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="groupBoxProperties.Text" xml:space="preserve">
|
||||
<value>Properties</value>
|
||||
</data>
|
||||
<data name=">>groupBoxProperties.Name" xml:space="preserve">
|
||||
<value>groupBoxProperties</value>
|
||||
</data>
|
||||
<data name=">>groupBoxProperties.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>groupBoxProperties.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanelBody</value>
|
||||
</data>
|
||||
<data name=">>groupBoxProperties.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="buttonRemove.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="buttonRemove.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="buttonRemove.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="buttonRemove.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>5, 0, 0, 0</value>
|
||||
</data>
|
||||
<data name="buttonRemove.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>118, 23</value>
|
||||
</data>
|
||||
<data name="buttonRemove.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="buttonRemove.Text" xml:space="preserve">
|
||||
<value>&Remove vTPM</value>
|
||||
</data>
|
||||
<data name="buttonRemove.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
|
||||
<value>ImageBeforeText</value>
|
||||
</data>
|
||||
<data name=">>buttonRemove.Name" xml:space="preserve">
|
||||
<value>buttonRemove</value>
|
||||
</data>
|
||||
<data name=">>buttonRemove.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>buttonRemove.Parent" xml:space="preserve">
|
||||
<value>toolTipContainerRemove</value>
|
||||
</data>
|
||||
<data name=">>buttonRemove.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="toolTipContainerRemove.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>284, 301</value>
|
||||
</data>
|
||||
<data name="toolTipContainerRemove.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>118, 23</value>
|
||||
</data>
|
||||
<data name="toolTipContainerRemove.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>toolTipContainerRemove.Name" xml:space="preserve">
|
||||
<value>toolTipContainerRemove</value>
|
||||
</data>
|
||||
<data name=">>toolTipContainerRemove.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Controls.ToolTipContainer, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>toolTipContainerRemove.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanelBody</value>
|
||||
</data>
|
||||
<data name=">>toolTipContainerRemove.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelBody.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelBody.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelBody.RowCount" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelBody.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>405, 327</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelBody.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanelBody.Name" xml:space="preserve">
|
||||
<value>tableLayoutPanelBody</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanelBody.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanelBody.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanelBody.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanelBody.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="buttonReset" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="groupBoxProperties" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="toolTipContainerRemove" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,100,AutoSize,0" /><Rows Styles="AutoSize,0,Percent,100,AutoSize,0" /></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.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 3, 0, 3</value>
|
||||
</data>
|
||||
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>405, 327</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>VtpmManagementPage</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
123
XenAdmin/Dialogs/VtpmManagementPage.zh-CN.resx
Normal file
123
XenAdmin/Dialogs/VtpmManagementPage.zh-CN.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
|
||||
<xsd:element msdata:IsDataSet="true" name="root">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs="0" name="value" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="type" type="xsd:string"/>
|
||||
<xsd:attribute name="mimetype" type="xsd:string"/>
|
||||
<xsd:attribute ref="xml:space"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string"/>
|
||||
<xsd:attribute name="name" type="xsd:string"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs="0" msdata:Ordinal="1" name="value" type="xsd:string"/>
|
||||
<xsd:element minOccurs="0" msdata:Ordinal="2" name="comment" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute msdata:Ordinal="1" name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute msdata:Ordinal="3" name="type" type="xsd:string"/>
|
||||
<xsd:attribute msdata:Ordinal="4" name="mimetype" type="xsd:string"/>
|
||||
<xsd:attribute ref="xml:space"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs="0" msdata:Ordinal="1" name="value" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
@ -598,6 +598,7 @@ namespace XenAdmin
|
||||
// the following are generated from Resources using:
|
||||
// cat Resources.Designer.cs | grep 'internal static System.Drawing.Bitmap' | sed "s/ {//g" | awk -F"Bitmap " '{print"public static Bitmap " $2 " = Properties.Resources." $2 ";"}'
|
||||
public static Bitmap _000_Abort_h32bit_16 = Properties.Resources._000_Abort_h32bit_16;
|
||||
public static Bitmap _000_Abort_gray_h32bit_16 = Properties.Resources._000_Abort_gray_h32bit_16;
|
||||
public static Bitmap _000_AddApplicationServer_h32bit_16 = Properties.Resources._000_AddApplicationServer_h32bit_16;
|
||||
public static Bitmap _000_AddApplicationServer_h32bit_24 = Properties.Resources._000_AddApplicationServer_h32bit_24;
|
||||
public static Bitmap _000_AddIPAddress_h32bit_16 = Properties.Resources._000_AddIPAddress_h32bit_16;
|
||||
@ -895,6 +896,7 @@ namespace XenAdmin
|
||||
public static Bitmap tools_notinstalled_16x = Properties.Resources.tools_notinstalled_16x;
|
||||
public static Bitmap tools_outofdate_16x = Properties.Resources.tools_outofdate_16x;
|
||||
public static Bitmap tools_uptodate_16x = Properties.Resources.tools_uptodate_16x;
|
||||
public static Bitmap tpm = Properties.Resources.tpm;
|
||||
public static Bitmap tree_minus = Properties.Resources.tree_minus;
|
||||
public static Bitmap tree_plus = Properties.Resources.tree_plus;
|
||||
public static Bitmap tshadowdown = Properties.Resources.tshadowdown;
|
||||
|
BIN
XenAdmin/Images/000_Abort_gray_h32bit_16.png
Normal file
BIN
XenAdmin/Images/000_Abort_gray_h32bit_16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
BIN
XenAdmin/Images/tpm.png
Normal file
BIN
XenAdmin/Images/tpm.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.6 KiB |
31
XenAdmin/MainWindow.Designer.cs
generated
31
XenAdmin/MainWindow.Designer.cs
generated
@ -207,6 +207,8 @@ namespace XenAdmin
|
||||
this.snapshotToolStripMenuItem = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
this.convertToTemplateToolStripMenuItem = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
this.exportToolStripMenuItem = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
this.toolStripSeparator32 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItemVtpm = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
this.disableCbtToolStripMenuItem = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
this.enablePVSReadcachingToolStripMenuItem = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
this.disablePVSReadcachingToolStripMenuItem = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
@ -268,6 +270,7 @@ namespace XenAdmin
|
||||
this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.viewApplicationLogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem17 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItemCfu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.xenSourceOnTheWebToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.xenCenterPluginsOnlineToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
|
||||
@ -284,7 +287,6 @@ namespace XenAdmin
|
||||
this.statusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.statusLabelErrors = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.statusLabelAlerts = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripMenuItemCfu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@ -1377,6 +1379,8 @@ namespace XenAdmin
|
||||
this.snapshotToolStripMenuItem,
|
||||
this.convertToTemplateToolStripMenuItem,
|
||||
this.exportToolStripMenuItem,
|
||||
this.toolStripSeparator32,
|
||||
this.toolStripMenuItemVtpm,
|
||||
this.disableCbtToolStripMenuItem,
|
||||
this.enablePVSReadcachingToolStripMenuItem,
|
||||
this.disablePVSReadcachingToolStripMenuItem,
|
||||
@ -1468,6 +1472,17 @@ namespace XenAdmin
|
||||
this.exportToolStripMenuItem.Name = "exportToolStripMenuItem";
|
||||
resources.ApplyResources(this.exportToolStripMenuItem, "exportToolStripMenuItem");
|
||||
//
|
||||
// toolStripSeparator32
|
||||
//
|
||||
this.toolStripSeparator32.Name = "toolStripSeparator32";
|
||||
resources.ApplyResources(this.toolStripSeparator32, "toolStripSeparator32");
|
||||
//
|
||||
// toolStripMenuItemVtpm
|
||||
//
|
||||
this.toolStripMenuItemVtpm.Command = new XenAdmin.Commands.VtpmCommand();
|
||||
this.toolStripMenuItemVtpm.Name = "toolStripMenuItemVtpm";
|
||||
resources.ApplyResources(this.toolStripMenuItemVtpm, "toolStripMenuItemVtpm");
|
||||
//
|
||||
// disableCbtToolStripMenuItem
|
||||
//
|
||||
this.disableCbtToolStripMenuItem.Command = new XenAdmin.Commands.DisableChangedBlockTrackingCommand();
|
||||
@ -1874,6 +1889,12 @@ namespace XenAdmin
|
||||
this.toolStripMenuItem17.Name = "toolStripMenuItem17";
|
||||
resources.ApplyResources(this.toolStripMenuItem17, "toolStripMenuItem17");
|
||||
//
|
||||
// toolStripMenuItemCfu
|
||||
//
|
||||
this.toolStripMenuItemCfu.Name = "toolStripMenuItemCfu";
|
||||
resources.ApplyResources(this.toolStripMenuItemCfu, "toolStripMenuItemCfu");
|
||||
this.toolStripMenuItemCfu.Click += new System.EventHandler(this.toolStripMenuItemCfu_Click);
|
||||
//
|
||||
// xenSourceOnTheWebToolStripMenuItem
|
||||
//
|
||||
this.xenSourceOnTheWebToolStripMenuItem.Name = "xenSourceOnTheWebToolStripMenuItem";
|
||||
@ -2007,12 +2028,6 @@ namespace XenAdmin
|
||||
this.statusLabelAlerts.VisitedLinkColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
this.statusLabelAlerts.Click += new System.EventHandler(this.statusLabelAlerts_Click);
|
||||
//
|
||||
// toolStripMenuItemCfu
|
||||
//
|
||||
this.toolStripMenuItemCfu.Name = "toolStripMenuItemCfu";
|
||||
resources.ApplyResources(this.toolStripMenuItemCfu, "toolStripMenuItemCfu");
|
||||
this.toolStripMenuItemCfu.Click += new System.EventHandler(this.toolStripMenuItemCfu_Click);
|
||||
//
|
||||
// MainWindow
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@ -2297,6 +2312,8 @@ namespace XenAdmin
|
||||
private System.Windows.Forms.ToolStripMenuItem relNotesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem downloadInstallToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemCfu;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator32;
|
||||
private XenAdmin.Commands.CommandToolStripMenuItem toolStripMenuItemVtpm;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ using XenCenterLib;
|
||||
using System.Linq;
|
||||
using XenAdmin.Controls.GradientPanel;
|
||||
using XenAdmin.Help;
|
||||
using System.IO;
|
||||
|
||||
|
||||
namespace XenAdmin
|
||||
{
|
||||
@ -1769,13 +1769,19 @@ namespace XenAdmin
|
||||
conversionToolStripMenuItem.Available = conn != null && conn.Cache.VMs.Any(v => v.IsConversionVM());
|
||||
installToolsToolStripMenuItem.Available = SelectionManager.Selection.Any(v => !Helpers.StockholmOrGreater(v.Connection));
|
||||
toolStripMenuItemInstallCertificate.Available = Helpers.StockholmOrGreater(conn);
|
||||
|
||||
toolStripMenuItemRotateSecret.Available = SelectionManager.Selection.Any(s =>
|
||||
s.Connection != null && Helpers.StockholmOrGreater(s.Connection) &&
|
||||
!s.Connection.Cache.Hosts.Any(Host.RestrictPoolSecretRotation));
|
||||
|
||||
toolStripMenuItemEnableTls.Available = SelectionManager.Selection.Any(s =>
|
||||
s.Connection != null && Helpers.Post82X(s.Connection) && Helpers.XapiEqualOrGreater_1_290_0(s.Connection) &&
|
||||
!s.Connection.Cache.Hosts.Any(Host.RestrictCertificateVerification) &&
|
||||
s.Connection.Cache.Pools.Any(p => !p.tls_verification_enabled));
|
||||
|
||||
toolStripMenuItemVtpm.Available = SelectionManager.Selection.Any(s =>
|
||||
s.Connection != null && Helpers.Post82X(s.Connection) && Helpers.XapiEqualOrGreater_vtpmtag(s.Connection) &&
|
||||
!s.Connection.Cache.Hosts.Any(Host.RestrictVtpm));
|
||||
}
|
||||
|
||||
private void xenSourceOnTheWebToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -2311,130 +2311,139 @@
|
||||
<value>&Server</value>
|
||||
</data>
|
||||
<data name="NewVmToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="NewVmToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>&New VM...</value>
|
||||
</data>
|
||||
<data name="startShutdownToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="startShutdownToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>&Start/Shut down</value>
|
||||
</data>
|
||||
<data name="resumeOnToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="resumeOnToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Res&ume on Server</value>
|
||||
</data>
|
||||
<data name="relocateToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="relocateToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>M&igrate to Server</value>
|
||||
</data>
|
||||
<data name="startOnHostToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="startOnHostToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Start &on Server</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator20.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>239, 6</value>
|
||||
<value>261, 6</value>
|
||||
</data>
|
||||
<data name="assignSnapshotScheduleToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="assignSnapshotScheduleToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Assign to Snaps&hot Schedule...</value>
|
||||
</data>
|
||||
<data name="assignToVirtualApplianceToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="assignToVirtualApplianceToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Assign to &vApp</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItem9.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>239, 6</value>
|
||||
<value>261, 6</value>
|
||||
</data>
|
||||
<data name="copyVMtoSharedStorageMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="copyVMtoSharedStorageMenuItem.Text" xml:space="preserve">
|
||||
<value>&Copy VM</value>
|
||||
</data>
|
||||
<data name="MoveVMToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="MoveVMToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>&Move VM</value>
|
||||
</data>
|
||||
<data name="snapshotToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="snapshotToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Ta&ke a Snapshot</value>
|
||||
</data>
|
||||
<data name="convertToTemplateToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="convertToTemplateToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Convert to &Template</value>
|
||||
</data>
|
||||
<data name="exportToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="exportToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>&Export...</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator32.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>261, 6</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItemVtpm.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItemVtpm.Text" xml:space="preserve">
|
||||
<value>Trusted Plat&form Module Manager...</value>
|
||||
</data>
|
||||
<data name="disableCbtToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="disableCbtToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>D&isable Changed Block Tracking</value>
|
||||
</data>
|
||||
<data name="enablePVSReadcachingToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="disablePVSReadcachingToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItem12.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>239, 6</value>
|
||||
<value>261, 6</value>
|
||||
</data>
|
||||
<data name="installToolsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="installToolsToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>installToolsToolStripMenuItem</value>
|
||||
</data>
|
||||
<data name="sendCtrlAltDelToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="sendCtrlAltDelToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Send Ctrl+&Alt+Del</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>239, 6</value>
|
||||
<value>261, 6</value>
|
||||
</data>
|
||||
<data name="uninstallToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="uninstallToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>&Delete VM</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator10.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>239, 6</value>
|
||||
<value>261, 6</value>
|
||||
</data>
|
||||
<data name="pluginItemsPlaceHolderToolStripMenuItem4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="pluginItemsPlaceHolderToolStripMenuItem4.Text" xml:space="preserve">
|
||||
<value>PluginItemsPlaceHolder</value>
|
||||
</data>
|
||||
<data name="VMPropertiesToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>242, 22</value>
|
||||
<value>264, 22</value>
|
||||
</data>
|
||||
<data name="VMPropertiesToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>P&roperties</value>
|
||||
@ -3651,6 +3660,18 @@
|
||||
<data name=">>exportToolStripMenuItem.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Commands.CommandToolStripMenuItem, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator32.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator32</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator32.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItemVtpm.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItemVtpm</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItemVtpm.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Commands.CommandToolStripMenuItem, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>disableCbtToolStripMenuItem.Name" xml:space="preserve">
|
||||
<value>disableCbtToolStripMenuItem</value>
|
||||
</data>
|
||||
@ -4017,6 +4038,12 @@
|
||||
<data name=">>toolStripMenuItem17.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItemCfu.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItemCfu</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItemCfu.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>xenSourceOnTheWebToolStripMenuItem.Name" xml:space="preserve">
|
||||
<value>xenSourceOnTheWebToolStripMenuItem</value>
|
||||
</data>
|
||||
@ -4095,12 +4122,6 @@
|
||||
<data name=">>statusLabelAlerts.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItemCfu.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItemCfu</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItemCfu.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>MainWindow</value>
|
||||
</data>
|
||||
|
@ -39,6 +39,7 @@ using XenAPI;
|
||||
using XenAdmin.XenSearch;
|
||||
using XenAdmin.Core;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
namespace XenAdmin
|
||||
@ -396,8 +397,13 @@ namespace XenAdmin
|
||||
|
||||
private VirtualTreeNode AddVMNode(VM vm)
|
||||
{
|
||||
if (vm.Connection.Cache.Hosts.Any(Host.RestrictVtpm) &&
|
||||
vm.is_a_template &&
|
||||
vm.platform.TryGetValue("vtpm", out var result) && result.ToLower() == "true")
|
||||
return null;
|
||||
|
||||
bool hidden = vm.IsHidden();
|
||||
string name = hidden ? String.Format(Messages.X_HIDDEN, vm.Name()) : vm.Name();
|
||||
string name = hidden ? string.Format(Messages.X_HIDDEN, vm.Name()) : vm.Name();
|
||||
|
||||
return AddNode(name, Images.GetIconFor(vm), hidden, vm);
|
||||
}
|
||||
|
40
XenAdmin/Properties/Resources.Designer.cs
generated
40
XenAdmin/Properties/Resources.Designer.cs
generated
@ -60,6 +60,16 @@ namespace XenAdmin.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap _000_Abort_gray_h32bit_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("_000_Abort_gray_h32bit_16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@ -2169,16 +2179,6 @@ namespace XenAdmin.Properties {
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap rocky_16x {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("rocky_16x", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
@ -2800,6 +2800,16 @@ namespace XenAdmin.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap rocky_16x {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("rocky_16x", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@ -3110,6 +3120,16 @@ namespace XenAdmin.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap tpm {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("tpm", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
@ -1132,4 +1132,10 @@
|
||||
<data name="RightArrow" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\..\Branding\Images\RightArrow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="_000_Abort_gray_h32bit_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Images\000_Abort_gray_h32bit_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="tpm" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Images\tpm.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
20
XenAdmin/TabPages/GeneralTabPage.Designer.cs
generated
20
XenAdmin/TabPages/GeneralTabPage.Designer.cs
generated
@ -77,6 +77,8 @@ namespace XenAdmin.TabPages
|
||||
this.panelGeneral = new System.Windows.Forms.Panel();
|
||||
this.pdSectionGeneral = new XenAdmin.Controls.PDSection();
|
||||
this.tableLayoutPanelButtons = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.panel1DeviceSecurity = new System.Windows.Forms.Panel();
|
||||
this.pdSectionDeviceSecurity = new XenAdmin.Controls.PDSection();
|
||||
this.pageContainerPanel.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.panelReadCaching.SuspendLayout();
|
||||
@ -100,6 +102,7 @@ namespace XenAdmin.TabPages
|
||||
this.panelCertificate.SuspendLayout();
|
||||
this.panelGeneral.SuspendLayout();
|
||||
this.tableLayoutPanelButtons.SuspendLayout();
|
||||
this.panel1DeviceSecurity.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pageContainerPanel
|
||||
@ -133,6 +136,7 @@ namespace XenAdmin.TabPages
|
||||
//
|
||||
resources.ApplyResources(this.panel2, "panel2");
|
||||
this.panel2.Controls.Add(this.panelReadCaching);
|
||||
this.panel2.Controls.Add(this.panel1DeviceSecurity);
|
||||
this.panel2.Controls.Add(this.panelDockerInfo);
|
||||
this.panel2.Controls.Add(this.panelDockerVersion);
|
||||
this.panel2.Controls.Add(this.panelStorageLinkSystemCapabilities);
|
||||
@ -423,6 +427,19 @@ namespace XenAdmin.TabPages
|
||||
this.tableLayoutPanelButtons.Controls.Add(this.linkLabelExpand, 4, 0);
|
||||
this.tableLayoutPanelButtons.Name = "tableLayoutPanelButtons";
|
||||
//
|
||||
// panel1DeviceSecurity
|
||||
//
|
||||
resources.ApplyResources(this.panel1DeviceSecurity, "panel1DeviceSecurity");
|
||||
this.panel1DeviceSecurity.Controls.Add(this.pdSectionDeviceSecurity);
|
||||
this.panel1DeviceSecurity.Name = "panel1DeviceSecurity";
|
||||
//
|
||||
// pdSectionDeviceSecurity
|
||||
//
|
||||
this.pdSectionDeviceSecurity.BackColor = System.Drawing.Color.Gainsboro;
|
||||
resources.ApplyResources(this.pdSectionDeviceSecurity, "pdSectionDeviceSecurity");
|
||||
this.pdSectionDeviceSecurity.Name = "pdSectionDeviceSecurity";
|
||||
this.pdSectionDeviceSecurity.ShowCellToolTips = false;
|
||||
//
|
||||
// GeneralTabPage
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@ -455,6 +472,7 @@ namespace XenAdmin.TabPages
|
||||
this.panelGeneral.ResumeLayout(false);
|
||||
this.tableLayoutPanelButtons.ResumeLayout(false);
|
||||
this.tableLayoutPanelButtons.PerformLayout();
|
||||
this.panel1DeviceSecurity.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -507,5 +525,7 @@ namespace XenAdmin.TabPages
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelButtons;
|
||||
private System.Windows.Forms.Panel panelCertificate;
|
||||
private Controls.PDSection pdSectionCertificate;
|
||||
private System.Windows.Forms.Panel panel1DeviceSecurity;
|
||||
private Controls.PDSection pdSectionDeviceSecurity;
|
||||
}
|
||||
}
|
||||
|
@ -428,6 +428,7 @@ namespace XenAdmin.TabPages
|
||||
GenerateVCPUsBox();
|
||||
GenerateDockerInfoBox();
|
||||
GenerateReadCachingBox();
|
||||
GenerateDeviceSecurityBox();
|
||||
}
|
||||
|
||||
// hide all the sections which haven't been populated, those that have make sure are visible
|
||||
@ -1637,6 +1638,22 @@ namespace XenAdmin.TabPages
|
||||
}
|
||||
}
|
||||
|
||||
private void GenerateDeviceSecurityBox()
|
||||
{
|
||||
if (!(xenObject is VM vm) || Helpers.FeatureForbidden(vm, Host.RestrictVtpm) ||
|
||||
!Helpers.XapiEqualOrGreater_vtpmtag(vm.Connection))
|
||||
return;
|
||||
|
||||
PDSection s = pdSectionDeviceSecurity;
|
||||
|
||||
if (vm.VTPMs.Count > 0)
|
||||
{
|
||||
s.AddEntry(Messages.VTPM,
|
||||
vm.VTPMs.Count == 1 ? Messages.VTPM_ATTACHED_ONE : string.Format(Messages.VTPM_ATTACHED_MANY, vm.VTPMs.Count),
|
||||
new CommandToolStripMenuItem(new VtpmCommand(Program.MainWindow, vm), true));
|
||||
}
|
||||
}
|
||||
|
||||
private static bool VMCanChooseHomeServer(VM vm)
|
||||
{
|
||||
if (vm != null && !vm.is_a_template)
|
||||
|
@ -169,7 +169,7 @@
|
||||
<value>Top</value>
|
||||
</data>
|
||||
<data name="panelReadCaching.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 836</value>
|
||||
<value>0, 880</value>
|
||||
</data>
|
||||
<data name="panelReadCaching.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 5, 0, 5</value>
|
||||
@ -192,6 +192,75 @@
|
||||
<data name=">>panelReadCaching.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="panel1DeviceSecurity.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="panel1DeviceSecurity.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="pdSectionDeviceSecurity.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
</data>
|
||||
<data name="pdSectionDeviceSecurity.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 5</value>
|
||||
</data>
|
||||
<data name="pdSectionDeviceSecurity.MaximumSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>900, 9999999</value>
|
||||
</data>
|
||||
<data name="pdSectionDeviceSecurity.MinimumSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>0, 34</value>
|
||||
</data>
|
||||
<data name="pdSectionDeviceSecurity.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>1, 1, 1, 1</value>
|
||||
</data>
|
||||
<data name="pdSectionDeviceSecurity.SectionTitle" xml:space="preserve">
|
||||
<value>Device Security</value>
|
||||
</data>
|
||||
<data name="pdSectionDeviceSecurity.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>715, 34</value>
|
||||
</data>
|
||||
<data name="pdSectionDeviceSecurity.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>pdSectionDeviceSecurity.Name" xml:space="preserve">
|
||||
<value>pdSectionDeviceSecurity</value>
|
||||
</data>
|
||||
<data name=">>pdSectionDeviceSecurity.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Controls.PDSection, [XenCenter_No_Space]Main, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>pdSectionDeviceSecurity.Parent" xml:space="preserve">
|
||||
<value>panel1DeviceSecurity</value>
|
||||
</data>
|
||||
<data name=">>pdSectionDeviceSecurity.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="panel1DeviceSecurity.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
</data>
|
||||
<data name="panel1DeviceSecurity.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 836</value>
|
||||
</data>
|
||||
<data name="panel1DeviceSecurity.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 5, 0, 5</value>
|
||||
</data>
|
||||
<data name="panel1DeviceSecurity.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>715, 44</value>
|
||||
</data>
|
||||
<data name="panel1DeviceSecurity.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name=">>panel1DeviceSecurity.Name" xml:space="preserve">
|
||||
<value>panel1DeviceSecurity</value>
|
||||
</data>
|
||||
<data name=">>panel1DeviceSecurity.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>panel1DeviceSecurity.Parent" xml:space="preserve">
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panel1DeviceSecurity.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="panelDockerInfo.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
@ -259,7 +328,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelDockerInfo.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="panelDockerVersion.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -328,7 +397,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelDockerVersion.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="panelStorageLinkSystemCapabilities.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -397,7 +466,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelStorageLinkSystemCapabilities.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="panelMultipathBoot.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -466,7 +535,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelMultipathBoot.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="panelStorageLink.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -535,7 +604,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelStorageLink.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="panelMemoryAndVCPUs.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -604,7 +673,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelMemoryAndVCPUs.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="panelMultipathing.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -673,7 +742,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelMultipathing.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="panelStatus.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -742,7 +811,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelStatus.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="panelHighAvailability.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -811,7 +880,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelHighAvailability.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="panelBootOptions.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -880,7 +949,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelBootOptions.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="panelCPU.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -949,7 +1018,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelCPU.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="panelMemory.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -1018,7 +1087,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelMemory.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="panelManagementInterfaces.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -1087,7 +1156,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelManagementInterfaces.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="panelUpdates.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -1156,7 +1225,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelUpdates.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="panelVersion.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -1225,7 +1294,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelVersion.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="panelLicense.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -1294,7 +1363,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelLicense.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="panelCustomFields.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -1363,7 +1432,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelCustomFields.ZOrder" xml:space="preserve">
|
||||
<value>17</value>
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="panelCertificate.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -1432,7 +1501,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelCertificate.ZOrder" xml:space="preserve">
|
||||
<value>18</value>
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name="panelGeneral.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -1501,7 +1570,7 @@
|
||||
<value>panel2</value>
|
||||
</data>
|
||||
<data name=">>panelGeneral.ZOrder" xml:space="preserve">
|
||||
<value>19</value>
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
|
@ -37,6 +37,7 @@ using XenAPI;
|
||||
using XenAdmin.Controls;
|
||||
using XenCenterLib;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using XenAdmin.Core;
|
||||
|
||||
|
||||
@ -45,6 +46,7 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
public partial class Page_Template : XenTabPage
|
||||
{
|
||||
private bool templatesLoaded;
|
||||
private VM m_selectedTemplate;
|
||||
|
||||
public Page_Template()
|
||||
{
|
||||
@ -80,20 +82,11 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
}
|
||||
}
|
||||
|
||||
public override string Text
|
||||
{
|
||||
get { return Messages.NEWVMWIZARD_TEMPLATEPAGE_NAME; }
|
||||
}
|
||||
public override string Text => Messages.NEWVMWIZARD_TEMPLATEPAGE_NAME;
|
||||
|
||||
public override string PageTitle
|
||||
{
|
||||
get { return Messages.NEWVMWIZARD_TEMPLATEPAGE_TITLE; }
|
||||
}
|
||||
public override string PageTitle => Messages.NEWVMWIZARD_TEMPLATEPAGE_TITLE;
|
||||
|
||||
public override string HelpID
|
||||
{
|
||||
get { return "Template"; }
|
||||
}
|
||||
public override string HelpID => "Template";
|
||||
|
||||
public override List<KeyValuePair<string, string>> PageSummary
|
||||
{
|
||||
@ -112,9 +105,8 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
|
||||
#endregion
|
||||
|
||||
public bool CopyBiosStrings { get { return checkBoxCopyBiosStrings.Checked; } }
|
||||
public bool CopyBiosStrings => checkBoxCopyBiosStrings.Checked;
|
||||
|
||||
private VM m_selectedTemplate;
|
||||
public VM SelectedTemplate
|
||||
{
|
||||
get
|
||||
@ -141,25 +133,29 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
|
||||
private void AddRows()
|
||||
{
|
||||
List<TemplatesGridViewItem> SelectedRows = new List<TemplatesGridViewItem>();
|
||||
List<TemplatesGridViewItem> selectedRows = new List<TemplatesGridViewItem>();
|
||||
|
||||
foreach (TemplatesGridViewItem item in TemplatesGridView.SelectedRows)
|
||||
{
|
||||
SelectedRows.Add(item);
|
||||
}
|
||||
selectedRows.Add(item);
|
||||
|
||||
TemplatesGridView.SuspendLayout();
|
||||
TemplatesGridView.Rows.Clear();
|
||||
|
||||
foreach (VM vm in Connection.Cache.VMs)
|
||||
{
|
||||
if (!vm.is_a_template || !vm.Show(Properties.Settings.Default.ShowHiddenVMs))
|
||||
continue;
|
||||
|
||||
if (vm.Connection.Cache.Hosts.Any(Host.RestrictVtpm) &&
|
||||
vm.platform.TryGetValue("vtpm", out var result) && result.ToLower() == "true")
|
||||
continue;
|
||||
|
||||
TemplatesGridView.Rows.Add(new TemplatesGridViewItem(vm));
|
||||
}
|
||||
|
||||
foreach (TemplatesGridViewItem temp in TemplatesGridView.Rows)
|
||||
{
|
||||
if (SelectedRows.Contains(temp))
|
||||
if (selectedRows.Contains(temp))
|
||||
temp.Selected = true;
|
||||
}
|
||||
|
||||
@ -171,12 +167,9 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
|
||||
private void RefreshRows()
|
||||
{
|
||||
|
||||
var rows = new List<DataGridViewRow>();
|
||||
foreach (DataGridViewRow row in TemplatesGridView.Rows)
|
||||
{
|
||||
rows.Add(row);
|
||||
}
|
||||
|
||||
TemplatesGridView.Rows.Clear();
|
||||
|
||||
@ -244,22 +237,25 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
{
|
||||
public int Compare(object x, object y)
|
||||
{
|
||||
TemplatesGridViewItem xItem = (TemplatesGridViewItem)x;
|
||||
TemplatesGridViewItem yItem = (TemplatesGridViewItem)y;
|
||||
var xItem = x as TemplatesGridViewItem;
|
||||
var yItem = y as TemplatesGridViewItem;
|
||||
|
||||
int xScore = xItem.SortOrder;
|
||||
int yScore = yItem.SortOrder;
|
||||
if (xItem == null && yItem == null)
|
||||
return 0;
|
||||
if (xItem == null)
|
||||
return -1;
|
||||
if (yItem == null)
|
||||
return 1;
|
||||
|
||||
if (xScore != yScore)
|
||||
return (xScore - yScore);
|
||||
else
|
||||
{
|
||||
int result = StringUtility.NaturalCompare(xItem.Template.Name(), yItem.Template.Name());
|
||||
if (result != 0)
|
||||
return result;
|
||||
else
|
||||
return xItem.Template.opaque_ref.CompareTo(yItem.Template.opaque_ref);
|
||||
}
|
||||
int result = xItem.SortOrder - yItem.SortOrder;
|
||||
if (result != 0)
|
||||
return result;
|
||||
|
||||
result = StringUtility.NaturalCompare(xItem.Template.Name(), yItem.Template.Name());
|
||||
if (result != 0)
|
||||
return result;
|
||||
|
||||
return xItem.Template.opaque_ref.CompareTo(yItem.Template.opaque_ref);
|
||||
}
|
||||
}
|
||||
|
||||
@ -276,20 +272,16 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
if (template.IsHidden())
|
||||
SortOrder += (int)VM.VmTemplateType.Count;
|
||||
|
||||
var ImageCell = new DataGridViewImageCell(false)
|
||||
{
|
||||
ValueType = typeof(Image),
|
||||
Value = typ.ToBitmap()
|
||||
};
|
||||
var TypeCell = new DataGridViewTextBoxCell { Value = typ.ToDisplayString() };
|
||||
var NameCell = new DataGridViewTextBoxCell { Value = template.Name() };
|
||||
var imageCell = new DataGridViewImageCell(false) {ValueType = typeof(Image), Value = typ.ToBitmap()};
|
||||
var typeCell = new DataGridViewTextBoxCell {Value = typ.ToDisplayString()};
|
||||
var nameCell = new DataGridViewTextBoxCell {Value = template.Name()};
|
||||
|
||||
Cells.AddRange(ImageCell, NameCell, TypeCell);
|
||||
Cells.AddRange(imageCell, nameCell, typeCell);
|
||||
}
|
||||
|
||||
public bool Equals(TemplatesGridViewItem other)
|
||||
{
|
||||
return Template.Equals(other.Template);
|
||||
return Template.Equals(other?.Template);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -111,6 +111,7 @@
|
||||
<Compile Include="Alerts\Types\MessageAlert.cs" />
|
||||
<Compile Include="Alerts\Types\XenServerPatchAlert.cs" />
|
||||
<Compile Include="Alerts\Types\XenServerVersionAlert.cs" />
|
||||
<Compile Include="Commands\VtpmCommand.cs" />
|
||||
<Compile Include="Controls\SmartScrollTextBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
@ -303,6 +304,18 @@
|
||||
<Compile Include="Dialogs\InstallCertificateDialog.Designer.cs">
|
||||
<DependentUpon>InstallCertificateDialog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\VtpmManagementPage.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\VtpmManagementPage.Designer.cs">
|
||||
<DependentUpon>VtpmManagementPage.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\VtmpManagementDialog.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\VtmpManagementDialog.Designer.cs">
|
||||
<DependentUpon>VtmpManagementDialog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\OptionsPages\ConfirmationOptionsPage.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
@ -1803,6 +1816,28 @@
|
||||
<EmbeddedResource Include="Dialogs\InstallCertificateDialog.zh-CN.resx">
|
||||
<DependentUpon>InstallCertificateDialog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Dialogs\VtpmManagementPage.ja.resx">
|
||||
<DependentUpon>VtpmManagementPage.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Dialogs\VtpmManagementPage.resx">
|
||||
<DependentUpon>VtpmManagementPage.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Dialogs\VtpmManagementPage.zh-CN.resx">
|
||||
<DependentUpon>VtpmManagementPage.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Dialogs\VtmpManagementDialog.ja.resx">
|
||||
<DependentUpon>VtmpManagementDialog.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Dialogs\VtmpManagementDialog.resx">
|
||||
<DependentUpon>VtmpManagementDialog.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Dialogs\VtmpManagementDialog.zh-CN.resx">
|
||||
<DependentUpon>VtmpManagementDialog.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Dialogs\OptionsPages\ConfirmationOptionsPage.ja.resx">
|
||||
<DependentUpon>ConfirmationOptionsPage.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@ -4305,6 +4340,7 @@
|
||||
<None Include="Images\000_error_h32bit_32.png" />
|
||||
<None Include="Images\000_AddIPAddress_h32bit_16.png" />
|
||||
<None Include="Images\000_ConfigureIPAddresses_h32bit_16.png" />
|
||||
<None Include="Images\000_Abort_gray_h32bit_16.png" />
|
||||
<Content Include="Images\000_AddSite_h32bit_16.png" />
|
||||
<Content Include="Images\000_FilterDates_h32bit_16.png" />
|
||||
<Content Include="Images\000_FilterServer_h32bit_16.png" />
|
||||
@ -4555,6 +4591,7 @@
|
||||
<Content Include="Images\tools_uptodate_16x.png" />
|
||||
<None Include="Images\tree_plus.png" />
|
||||
<None Include="Images\tree_minus.png" />
|
||||
<None Include="Images\tpm.png" />
|
||||
<Content Include="Images\tshadowdown.png" />
|
||||
<Content Include="Images\tshadowdownleft.png" />
|
||||
<Content Include="Images\tshadowdownright.png" />
|
||||
|
75
XenModel/Actions/VtpmAction.cs
Normal file
75
XenModel/Actions/VtpmAction.cs
Normal file
@ -0,0 +1,75 @@
|
||||
/* Copyright (c) Citrix Systems, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using XenAdmin.Network;
|
||||
using XenAPI;
|
||||
|
||||
namespace XenAdmin.Actions
|
||||
{
|
||||
public class NewVtpmAction : AsyncAction
|
||||
{
|
||||
private readonly VM _vm;
|
||||
|
||||
public VTPM Vtpm { get; private set; }
|
||||
|
||||
public NewVtpmAction(IXenConnection connection, VM vm)
|
||||
: base(connection, "", "", false)
|
||||
{
|
||||
_vm = vm;
|
||||
|
||||
ApiMethodsToRoleCheck.Add("vtpm.create");
|
||||
}
|
||||
|
||||
protected override void Run()
|
||||
{
|
||||
var vtpmRef = VTPM.create(Session, _vm.opaque_ref, true);
|
||||
Vtpm = Connection.TryResolveWithTimeout(vtpmRef);
|
||||
}
|
||||
}
|
||||
|
||||
public class RemoveVtpmAction : AsyncAction
|
||||
{
|
||||
private readonly VTPM _vtpm;
|
||||
|
||||
public RemoveVtpmAction(IXenConnection connection, VTPM vtpm)
|
||||
: base(connection, "", "", false)
|
||||
{
|
||||
_vtpm = vtpm;
|
||||
|
||||
ApiMethodsToRoleCheck.AddRange("vtpm.destroy");
|
||||
}
|
||||
|
||||
protected override void Run()
|
||||
{
|
||||
VTPM.destroy(Session, _vtpm.opaque_ref);
|
||||
}
|
||||
}
|
||||
}
|
18
XenModel/FriendlyNames.Designer.cs
generated
18
XenModel/FriendlyNames.Designer.cs
generated
@ -429,6 +429,15 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to vTPM's root CAs and other related debug information.
|
||||
/// </summary>
|
||||
public static string Description_host_system_status_vtpm {
|
||||
get {
|
||||
return ResourceManager.GetString("Description-host.system_status-vtpm", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Logs and status information from the WLB server monitoring this pool..
|
||||
/// </summary>
|
||||
@ -1293,6 +1302,15 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to vTPM.
|
||||
/// </summary>
|
||||
public static string Label_host_system_status_vtpm {
|
||||
get {
|
||||
return ResourceManager.GetString("Label-host.system_status-vtpm", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Workload Balancing status.
|
||||
/// </summary>
|
||||
|
@ -240,6 +240,9 @@
|
||||
<data name="Description-host.system_status-vncterm" xml:space="preserve">
|
||||
<value>Crash dumps files from the VNCTerm daemon</value>
|
||||
</data>
|
||||
<data name="Description-host.system_status-vtpm" xml:space="preserve">
|
||||
<value>vTPM's root CAs and other related debug information</value>
|
||||
</data>
|
||||
<data name="Description-host.system_status-wlb" xml:space="preserve">
|
||||
<value>Logs and status information from the WLB server monitoring this pool.</value>
|
||||
</data>
|
||||
@ -528,6 +531,9 @@
|
||||
<data name="Label-host.system_status-vncterm" xml:space="preserve">
|
||||
<value>VNCTerm crash dumps</value>
|
||||
</data>
|
||||
<data name="Label-host.system_status-vtpm" xml:space="preserve">
|
||||
<value>vTPM</value>
|
||||
</data>
|
||||
<data name="Label-host.system_status-wlb" xml:space="preserve">
|
||||
<value>Workload Balancing status</value>
|
||||
</data>
|
||||
|
143
XenModel/Messages.Designer.cs
generated
143
XenModel/Messages.Designer.cs
generated
@ -19,7 +19,7 @@ namespace XenAdmin {
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class Messages {
|
||||
@ -8024,6 +8024,33 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Resetting the vTPM that is attached to a VM to its original state may result in the deactivation of some security features on the VM. Do you want to continue?.
|
||||
/// </summary>
|
||||
public static string COMMAND_RESET_VTPM_WARNING {
|
||||
get {
|
||||
return ResourceManager.GetString("COMMAND_RESET_VTPM_WARNING", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to TPM is supported only for VMs using the UEFI or UEFI secure boot modes..
|
||||
/// </summary>
|
||||
public static string COMMAND_VTPM_DISABLED_NON_UEFI {
|
||||
get {
|
||||
return ResourceManager.GetString("COMMAND_VTPM_DISABLED_NON_UEFI", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Mana&ge vTPMs....
|
||||
/// </summary>
|
||||
public static string COMMAND_VTPM_MENU {
|
||||
get {
|
||||
return ResourceManager.GetString("COMMAND_VTPM_MENU", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0}: for use with Common Criteria versions of {1} only.
|
||||
/// </summary>
|
||||
@ -40598,6 +40625,120 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Trusted Platform Module.
|
||||
/// </summary>
|
||||
public static string VTPM {
|
||||
get {
|
||||
return ResourceManager.GetString("VTPM", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} vTPMs are attached to this VM..
|
||||
/// </summary>
|
||||
public static string VTPM_ATTACHED_MANY {
|
||||
get {
|
||||
return ResourceManager.GetString("VTPM_ATTACHED_MANY", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to A vTPM is attached to this VM..
|
||||
/// </summary>
|
||||
public static string VTPM_ATTACHED_ONE {
|
||||
get {
|
||||
return ResourceManager.GetString("VTPM_ATTACHED_ONE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The maximum number of vTPMs that can be attached to this VM is {0}..
|
||||
/// </summary>
|
||||
public static string VTPM_MAX_REACHED {
|
||||
get {
|
||||
return ResourceManager.GetString("VTPM_MAX_REACHED", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to There are no vTPMs attached to this VM..
|
||||
/// </summary>
|
||||
public static string VTPM_NONE_ATTACHED {
|
||||
get {
|
||||
return ResourceManager.GetString("VTPM_NONE_ATTACHED", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You need to shut down this VM before you can attach a new vTPM to it..
|
||||
/// </summary>
|
||||
public static string VTPM_POWER_STATE_WRONG_ATTACH {
|
||||
get {
|
||||
return ResourceManager.GetString("VTPM_POWER_STATE_WRONG_ATTACH", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You need to shut down the VM before you can remove this vTPM..
|
||||
/// </summary>
|
||||
public static string VTPM_POWER_STATE_WRONG_REMOVE {
|
||||
get {
|
||||
return ResourceManager.GetString("VTPM_POWER_STATE_WRONG_REMOVE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to A {0} user does not have sufficient permissions to attach a vTPM to a VM. Please login using an account with one of the following roles:
|
||||
///
|
||||
///{1}.
|
||||
/// </summary>
|
||||
public static string VTPM_RBAC_RESTRICTION_CREATE {
|
||||
get {
|
||||
return ResourceManager.GetString("VTPM_RBAC_RESTRICTION_CREATE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to A {0} user does not have sufficient permissions to remove a vTPM from a VM. Please login using an account with one of the following roles:
|
||||
///
|
||||
///{1}.
|
||||
/// </summary>
|
||||
public static string VTPM_RBAC_RESTRICTION_REMOVE {
|
||||
get {
|
||||
return ResourceManager.GetString("VTPM_RBAC_RESTRICTION_REMOVE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to A {0} user does not have sufficient permissions to reset the vTPM that is attached to a VM to its original state. Please login using an account with one of the following roles:
|
||||
///
|
||||
///{1}.
|
||||
/// </summary>
|
||||
public static string VTPM_RBAC_RESTRICTION_RESET {
|
||||
get {
|
||||
return ResourceManager.GetString("VTPM_RBAC_RESTRICTION_RESET", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Remove vTPM.
|
||||
/// </summary>
|
||||
public static string VTPM_REMOVE {
|
||||
get {
|
||||
return ResourceManager.GetString("VTPM_REMOVE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Removing the vTPM may result in the deactivation of some security features on the VM and prevent it from starting. Do you want to continue?.
|
||||
/// </summary>
|
||||
public static string VTPM_REMOVE_WARNING {
|
||||
get {
|
||||
return ResourceManager.GetString("VTPM_REMOVE_WARNING", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Waiting.
|
||||
/// </summary>
|
||||
|
@ -2891,6 +2891,15 @@ Do you want to assign these VMs to the schedule '{0}' instead?</value>
|
||||
<data name="COLLAPSE_CHILDREN" xml:space="preserve">
|
||||
<value>&Collapse Children</value>
|
||||
</data>
|
||||
<data name="COMMAND_RESET_VTPM_WARNING" xml:space="preserve">
|
||||
<value>Resetting the vTPM that is attached to a VM to its original state may result in the deactivation of some security features on the VM. Do you want to continue?</value>
|
||||
</data>
|
||||
<data name="COMMAND_VTPM_DISABLED_NON_UEFI" xml:space="preserve">
|
||||
<value>TPM is supported only for VMs using the UEFI or UEFI secure boot modes.</value>
|
||||
</data>
|
||||
<data name="COMMAND_VTPM_MENU" xml:space="preserve">
|
||||
<value>Mana&ge vTPMs...</value>
|
||||
</data>
|
||||
<data name="COMMON_CRITERIA_TEXT" xml:space="preserve">
|
||||
<value>{0}: for use with Common Criteria versions of {1} only</value>
|
||||
</data>
|
||||
@ -14018,6 +14027,48 @@ Schedule:
|
||||
<data name="VOLUMES" xml:space="preserve">
|
||||
<value>Volumes</value>
|
||||
</data>
|
||||
<data name="VTPM" xml:space="preserve">
|
||||
<value>Trusted Platform Module</value>
|
||||
</data>
|
||||
<data name="VTPM_ATTACHED_MANY" xml:space="preserve">
|
||||
<value>{0} vTPMs are attached to this VM.</value>
|
||||
</data>
|
||||
<data name="VTPM_ATTACHED_ONE" xml:space="preserve">
|
||||
<value>A vTPM is attached to this VM.</value>
|
||||
</data>
|
||||
<data name="VTPM_MAX_REACHED" xml:space="preserve">
|
||||
<value>The maximum number of vTPMs that can be attached to this VM is {0}.</value>
|
||||
</data>
|
||||
<data name="VTPM_NONE_ATTACHED" xml:space="preserve">
|
||||
<value>There are no vTPMs attached to this VM.</value>
|
||||
</data>
|
||||
<data name="VTPM_POWER_STATE_WRONG_ATTACH" xml:space="preserve">
|
||||
<value>You need to shut down this VM before you can attach a new vTPM to it.</value>
|
||||
</data>
|
||||
<data name="VTPM_POWER_STATE_WRONG_REMOVE" xml:space="preserve">
|
||||
<value>You need to shut down the VM before you can remove this vTPM.</value>
|
||||
</data>
|
||||
<data name="VTPM_RBAC_RESTRICTION_CREATE" xml:space="preserve">
|
||||
<value>A {0} user does not have sufficient permissions to attach a vTPM to a VM. Please login using an account with one of the following roles:
|
||||
|
||||
{1}</value>
|
||||
</data>
|
||||
<data name="VTPM_RBAC_RESTRICTION_REMOVE" xml:space="preserve">
|
||||
<value>A {0} user does not have sufficient permissions to remove a vTPM from a VM. Please login using an account with one of the following roles:
|
||||
|
||||
{1}</value>
|
||||
</data>
|
||||
<data name="VTPM_RBAC_RESTRICTION_RESET" xml:space="preserve">
|
||||
<value>A {0} user does not have sufficient permissions to reset the vTPM that is attached to a VM to its original state. Please login using an account with one of the following roles:
|
||||
|
||||
{1}</value>
|
||||
</data>
|
||||
<data name="VTPM_REMOVE" xml:space="preserve">
|
||||
<value>Remove vTPM</value>
|
||||
</data>
|
||||
<data name="VTPM_REMOVE_WARNING" xml:space="preserve">
|
||||
<value>Removing the vTPM may result in the deactivation of some security features on the VM and prevent it from starting. Do you want to continue?</value>
|
||||
</data>
|
||||
<data name="WAITING" xml:space="preserve">
|
||||
<value>Waiting</value>
|
||||
</data>
|
||||
|
@ -101,6 +101,7 @@ namespace XenAdmin.Network
|
||||
private readonly ChangeableDictionary<XenRef<VM_appliance>, VM_appliance> _vm_appliance = new ChangeableDictionary<XenRef<VM_appliance>, VM_appliance>();
|
||||
private readonly ChangeableDictionary<XenRef<Crashdump>, Crashdump> _crashdump = new ChangeableDictionary<XenRef<Crashdump>, Crashdump>();
|
||||
private readonly ChangeableDictionary<XenRef<Certificate>, Certificate> _certificates = new ChangeableDictionary<XenRef<Certificate>, Certificate>();
|
||||
private readonly ChangeableDictionary<XenRef<VTPM>, VTPM> _vtpms = new ChangeableDictionary<XenRef<VTPM>, VTPM>();
|
||||
|
||||
#pragma warning restore 0414
|
||||
|
||||
@ -200,6 +201,8 @@ namespace XenAdmin.Network
|
||||
|
||||
public VM[] VMs => contents(_vm);
|
||||
|
||||
public VTPM[] VTPMs => contents(_vtpms);
|
||||
|
||||
|
||||
private static T[] contents<T>(ChangeableDictionary<XenRef<T>, T> d) where T : XenObject<T>
|
||||
{
|
||||
|
@ -439,6 +439,13 @@ namespace XenAdmin.Core
|
||||
return host == null || ProductVersionCompare(host.GetXapiVersion(), "22.20.0") >= 0;
|
||||
}
|
||||
|
||||
public static bool XapiEqualOrGreater_vtpmtag(IXenConnection conn)
|
||||
{
|
||||
//TODO: replace with correct tag
|
||||
var coordinator = GetCoordinator(conn);
|
||||
return coordinator == null || ProductVersionCompare(coordinator.GetXapiVersion(), "22.23.0.66.g56cd7935e-next") >= 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -553,8 +553,7 @@ namespace XenAdmin.Core
|
||||
/// </summary>
|
||||
public static bool FeatureForbidden(IXenObject iXenObject, Predicate<Host> restrictionTest)
|
||||
{
|
||||
IXenConnection connection = (iXenObject == null ? null : iXenObject.Connection);
|
||||
return FeatureForbidden(connection, restrictionTest);
|
||||
return FeatureForbidden(iXenObject?.Connection, restrictionTest);
|
||||
}
|
||||
|
||||
public static bool FeatureForbidden(IXenConnection xenConnection, Predicate<Host> restrictionTest)
|
||||
|
@ -463,6 +463,11 @@ namespace XenAPI
|
||||
return BoolKeyPreferTrue(h.license_params, "restrict_corosync");
|
||||
}
|
||||
|
||||
public static bool RestrictVtpm(Host h)
|
||||
{
|
||||
return BoolKeyPreferTrue(h.license_params, "restrict_vtpm");
|
||||
}
|
||||
|
||||
#region Experimental Features
|
||||
|
||||
public static bool CorosyncDisabled(Host h)
|
||||
|
@ -62,6 +62,7 @@ namespace XenAPI
|
||||
public const long MAX_SOCKETS = 16; // current hard limit in Xen: CA-198276
|
||||
|
||||
private XmlDocument xdRecommendations = null;
|
||||
public const int MAX_ALLOWED_VTPMS = 1;
|
||||
|
||||
public int MaxVCPUsAllowed()
|
||||
{
|
||||
@ -1795,6 +1796,38 @@ namespace XenAPI
|
||||
{
|
||||
return last_boot_CPU_flags == null || last_boot_CPU_flags.Count == 0;
|
||||
}
|
||||
|
||||
public bool CanAddVtpm(out string cannotReason)
|
||||
{
|
||||
cannotReason = null;
|
||||
|
||||
if (VTPMs.Count >= VM.MAX_ALLOWED_VTPMS)
|
||||
{
|
||||
cannotReason = string.Format(Messages.VTPM_MAX_REACHED, VM.MAX_ALLOWED_VTPMS);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (power_state != vm_power_state.Halted)
|
||||
{
|
||||
cannotReason = Messages.VTPM_POWER_STATE_WRONG_ATTACH;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool CanRemoveVtpm(out string cannotReason)
|
||||
{
|
||||
cannotReason = null;
|
||||
|
||||
if (power_state != vm_power_state.Halted)
|
||||
{
|
||||
cannotReason = Messages.VTPM_POWER_STATE_WRONG_REMOVE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public struct VMStartupOptions
|
||||
|
18
XenModel/XenAPI/FriendlyErrorNames.Designer.cs
generated
18
XenModel/XenAPI/FriendlyErrorNames.Designer.cs
generated
@ -5483,6 +5483,15 @@ namespace XenAPI {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Guidance for the update has changed.
|
||||
/// </summary>
|
||||
public static string UPDATE_GUIDANCE_CHANGED {
|
||||
get {
|
||||
return ResourceManager.GetString("UPDATE_GUIDANCE_CHANGED", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The specified update has been applied and cannot be destroyed..
|
||||
/// </summary>
|
||||
@ -6725,6 +6734,15 @@ namespace XenAPI {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The VM cannot be associated with more VTPMs..
|
||||
/// </summary>
|
||||
public static string VTPM_MAX_AMOUNT_REACHED {
|
||||
get {
|
||||
return ResourceManager.GetString("VTPM_MAX_AMOUNT_REACHED", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to WLB rejected our configured authentication details..
|
||||
/// </summary>
|
||||
|
@ -1934,6 +1934,9 @@ Authorized Roles: {1}</value>
|
||||
<data name="UPDATE_APPLY_FAILED" xml:space="preserve">
|
||||
<value>The update failed to apply. View logs for more details.</value>
|
||||
</data>
|
||||
<data name="UPDATE_GUIDANCE_CHANGED" xml:space="preserve">
|
||||
<value>Guidance for the update has changed</value>
|
||||
</data>
|
||||
<data name="UPDATE_IS_APPLIED" xml:space="preserve">
|
||||
<value>The specified update has been applied and cannot be destroyed.</value>
|
||||
</data>
|
||||
@ -2342,6 +2345,9 @@ Authorized Roles: {1}</value>
|
||||
<data name="VM_UNSAFE_BOOT" xml:space="preserve">
|
||||
<value>You attempted an operation on VM {0} that was judged to be unsafe by the server. This can happen if the VM would run on a CPU that has a potentially incompatible set of feature flags to those the VM requires. If you want to override this warning then use the 'force' option.</value>
|
||||
</data>
|
||||
<data name="VTPM_MAX_AMOUNT_REACHED" xml:space="preserve">
|
||||
<value>The VM cannot be associated with more VTPMs.</value>
|
||||
</data>
|
||||
<data name="WLB_AUTHENTICATION_FAILED" xml:space="preserve">
|
||||
<value>WLB rejected our configured authentication details.</value>
|
||||
</data>
|
||||
|
@ -11855,34 +11855,6 @@ namespace XenAPI
|
||||
return Rpc<XenRef<VTPM>>("VTPM.get_by_uuid", new JArray(session, _uuid ?? ""), serializer);
|
||||
}
|
||||
|
||||
public XenRef<VTPM> vtpm_create(string session, VTPM _record)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefConverter<VTPM>()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<XenRef<VTPM>>("VTPM.create", new JArray(session, _record.ToJObject()), serializer);
|
||||
}
|
||||
|
||||
public XenRef<Task> async_vtpm_create(string session, VTPM _record)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefConverter<Task>()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<XenRef<Task>>("Async.VTPM.create", new JArray(session, _record.ToJObject()), serializer);
|
||||
}
|
||||
|
||||
public void vtpm_destroy(string session, string _vtpm)
|
||||
{
|
||||
var converters = new List<JsonConverter> {};
|
||||
var serializer = CreateSerializer(converters);
|
||||
Rpc("VTPM.destroy", new JArray(session, _vtpm ?? ""), serializer);
|
||||
}
|
||||
|
||||
public XenRef<Task> async_vtpm_destroy(string session, string _vtpm)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefConverter<Task>()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<XenRef<Task>>("Async.VTPM.destroy", new JArray(session, _vtpm ?? ""), serializer);
|
||||
}
|
||||
|
||||
public string vtpm_get_uuid(string session, string _vtpm)
|
||||
{
|
||||
var converters = new List<JsonConverter> {};
|
||||
@ -11904,6 +11876,62 @@ namespace XenAPI
|
||||
return Rpc<XenRef<VM>>("VTPM.get_backend", new JArray(session, _vtpm ?? ""), serializer);
|
||||
}
|
||||
|
||||
public persistence_backend vtpm_get_persistence_backend(string session, string _vtpm)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new persistence_backendConverter()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<persistence_backend>("VTPM.get_persistence_backend", new JArray(session, _vtpm ?? ""), serializer);
|
||||
}
|
||||
|
||||
public bool vtpm_get_is_unique(string session, string _vtpm)
|
||||
{
|
||||
var converters = new List<JsonConverter> {};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<bool>("VTPM.get_is_unique", new JArray(session, _vtpm ?? ""), serializer);
|
||||
}
|
||||
|
||||
public bool vtpm_get_is_protected(string session, string _vtpm)
|
||||
{
|
||||
var converters = new List<JsonConverter> {};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<bool>("VTPM.get_is_protected", new JArray(session, _vtpm ?? ""), serializer);
|
||||
}
|
||||
|
||||
public XenRef<VTPM> vtpm_create(string session, string _vm, bool _is_unique)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefConverter<VTPM>(), new XenRefConverter<VM>()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<XenRef<VTPM>>("VTPM.create", new JArray(session, _vm ?? "", _is_unique), serializer);
|
||||
}
|
||||
|
||||
public XenRef<Task> async_vtpm_create(string session, string _vm, bool _is_unique)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefConverter<Task>(), new XenRefConverter<VM>()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<XenRef<Task>>("Async.VTPM.create", new JArray(session, _vm ?? "", _is_unique), serializer);
|
||||
}
|
||||
|
||||
public void vtpm_destroy(string session, string _vtpm)
|
||||
{
|
||||
var converters = new List<JsonConverter> {};
|
||||
var serializer = CreateSerializer(converters);
|
||||
Rpc("VTPM.destroy", new JArray(session, _vtpm ?? ""), serializer);
|
||||
}
|
||||
|
||||
public XenRef<Task> async_vtpm_destroy(string session, string _vtpm)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefConverter<Task>()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<XenRef<Task>>("Async.VTPM.destroy", new JArray(session, _vtpm ?? ""), serializer);
|
||||
}
|
||||
|
||||
public List<XenRef<VTPM>> vtpm_get_all(string session)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefListConverter<VTPM>()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<List<XenRef<VTPM>>>("VTPM.get_all", new JArray(session), serializer);
|
||||
}
|
||||
|
||||
public Dictionary<XenRef<VTPM>, VTPM> vtpm_get_all_records(string session)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefXenObjectMapConverter<VTPM>()};
|
||||
|
@ -6794,22 +6794,6 @@ namespace XenAPI
|
||||
Response<string>
|
||||
vtpm_get_by_uuid(string session, string _uuid);
|
||||
|
||||
[XmlRpcMethod("VTPM.create")]
|
||||
Response<string>
|
||||
vtpm_create(string session, Proxy_VTPM _record);
|
||||
|
||||
[XmlRpcMethod("Async.VTPM.create")]
|
||||
Response<string>
|
||||
async_vtpm_create(string session, Proxy_VTPM _record);
|
||||
|
||||
[XmlRpcMethod("VTPM.destroy")]
|
||||
Response<string>
|
||||
vtpm_destroy(string session, string _vtpm);
|
||||
|
||||
[XmlRpcMethod("Async.VTPM.destroy")]
|
||||
Response<string>
|
||||
async_vtpm_destroy(string session, string _vtpm);
|
||||
|
||||
[XmlRpcMethod("VTPM.get_uuid")]
|
||||
Response<string>
|
||||
vtpm_get_uuid(string session, string _vtpm);
|
||||
@ -6822,6 +6806,38 @@ namespace XenAPI
|
||||
Response<string>
|
||||
vtpm_get_backend(string session, string _vtpm);
|
||||
|
||||
[XmlRpcMethod("VTPM.get_persistence_backend")]
|
||||
Response<string>
|
||||
vtpm_get_persistence_backend(string session, string _vtpm);
|
||||
|
||||
[XmlRpcMethod("VTPM.get_is_unique")]
|
||||
Response<bool>
|
||||
vtpm_get_is_unique(string session, string _vtpm);
|
||||
|
||||
[XmlRpcMethod("VTPM.get_is_protected")]
|
||||
Response<bool>
|
||||
vtpm_get_is_protected(string session, string _vtpm);
|
||||
|
||||
[XmlRpcMethod("VTPM.create")]
|
||||
Response<string>
|
||||
vtpm_create(string session, string _vm, bool _is_unique);
|
||||
|
||||
[XmlRpcMethod("Async.VTPM.create")]
|
||||
Response<string>
|
||||
async_vtpm_create(string session, string _vm, bool _is_unique);
|
||||
|
||||
[XmlRpcMethod("VTPM.destroy")]
|
||||
Response<string>
|
||||
vtpm_destroy(string session, string _vtpm);
|
||||
|
||||
[XmlRpcMethod("Async.VTPM.destroy")]
|
||||
Response<string>
|
||||
async_vtpm_destroy(string session, string _vtpm);
|
||||
|
||||
[XmlRpcMethod("VTPM.get_all")]
|
||||
Response<string []>
|
||||
vtpm_get_all(string session);
|
||||
|
||||
[XmlRpcMethod("VTPM.get_all_records")]
|
||||
Response<Object>
|
||||
vtpm_get_all_records(string session);
|
||||
@ -9527,6 +9543,9 @@ namespace XenAPI
|
||||
public string uuid;
|
||||
public string VM;
|
||||
public string backend;
|
||||
public string persistence_backend;
|
||||
public bool is_unique;
|
||||
public bool is_protected;
|
||||
}
|
||||
|
||||
[XmlRpcMissingMapping(MappingAction.Ignore)]
|
||||
|
@ -3544,7 +3544,7 @@ namespace XenAPI
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vm">The opaque_ref of the given vm</param>
|
||||
/// <param name="_host">The target host</param>
|
||||
/// <param name="_options">Extra configuration operations</param>
|
||||
/// <param name="_options">Extra configuration operations: force, live, copy, compress. Each is a boolean option, taking 'true' or 'false' as a value. Option 'compress' controls the use of stream compression during migration.</param>
|
||||
public static void pool_migrate(Session session, string _vm, string _host, Dictionary<string, string> _options)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
@ -3560,7 +3560,7 @@ namespace XenAPI
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vm">The opaque_ref of the given vm</param>
|
||||
/// <param name="_host">The target host</param>
|
||||
/// <param name="_options">Extra configuration operations</param>
|
||||
/// <param name="_options">Extra configuration operations: force, live, copy, compress. Each is a boolean option, taking 'true' or 'false' as a value. Option 'compress' controls the use of stream compression during migration.</param>
|
||||
public static XenRef<Task> async_pool_migrate(Session session, string _vm, string _host, Dictionary<string, string> _options)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
|
@ -54,11 +54,17 @@ namespace XenAPI
|
||||
|
||||
public VTPM(string uuid,
|
||||
XenRef<VM> VM,
|
||||
XenRef<VM> backend)
|
||||
XenRef<VM> backend,
|
||||
persistence_backend persistence_backend,
|
||||
bool is_unique,
|
||||
bool is_protected)
|
||||
{
|
||||
this.uuid = uuid;
|
||||
this.VM = VM;
|
||||
this.backend = backend;
|
||||
this.persistence_backend = persistence_backend;
|
||||
this.is_unique = is_unique;
|
||||
this.is_protected = is_protected;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -93,6 +99,9 @@ namespace XenAPI
|
||||
uuid = record.uuid;
|
||||
VM = record.VM;
|
||||
backend = record.backend;
|
||||
persistence_backend = record.persistence_backend;
|
||||
is_unique = record.is_unique;
|
||||
is_protected = record.is_protected;
|
||||
}
|
||||
|
||||
internal void UpdateFrom(Proxy_VTPM proxy)
|
||||
@ -100,6 +109,9 @@ namespace XenAPI
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
VM = proxy.VM == null ? null : XenRef<VM>.Create(proxy.VM);
|
||||
backend = proxy.backend == null ? null : XenRef<VM>.Create(proxy.backend);
|
||||
persistence_backend = proxy.persistence_backend == null ? (persistence_backend) 0 : (persistence_backend)Helper.EnumParseDefault(typeof(persistence_backend), (string)proxy.persistence_backend);
|
||||
is_unique = (bool)proxy.is_unique;
|
||||
is_protected = (bool)proxy.is_protected;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -116,6 +128,12 @@ namespace XenAPI
|
||||
VM = Marshalling.ParseRef<VM>(table, "VM");
|
||||
if (table.ContainsKey("backend"))
|
||||
backend = Marshalling.ParseRef<VM>(table, "backend");
|
||||
if (table.ContainsKey("persistence_backend"))
|
||||
persistence_backend = (persistence_backend)Helper.EnumParseDefault(typeof(persistence_backend), Marshalling.ParseString(table, "persistence_backend"));
|
||||
if (table.ContainsKey("is_unique"))
|
||||
is_unique = Marshalling.ParseBool(table, "is_unique");
|
||||
if (table.ContainsKey("is_protected"))
|
||||
is_protected = Marshalling.ParseBool(table, "is_protected");
|
||||
}
|
||||
|
||||
public Proxy_VTPM ToProxy()
|
||||
@ -124,6 +142,9 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.VM = VM ?? "";
|
||||
result_.backend = backend ?? "";
|
||||
result_.persistence_backend = persistence_backend_helper.ToString(persistence_backend);
|
||||
result_.is_unique = is_unique;
|
||||
result_.is_protected = is_protected;
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -136,15 +157,18 @@ namespace XenAPI
|
||||
|
||||
return Helper.AreEqual2(this._uuid, other._uuid) &&
|
||||
Helper.AreEqual2(this._VM, other._VM) &&
|
||||
Helper.AreEqual2(this._backend, other._backend);
|
||||
Helper.AreEqual2(this._backend, other._backend) &&
|
||||
Helper.AreEqual2(this._persistence_backend, other._persistence_backend) &&
|
||||
Helper.AreEqual2(this._is_unique, other._is_unique) &&
|
||||
Helper.AreEqual2(this._is_protected, other._is_protected);
|
||||
}
|
||||
|
||||
public override string SaveChanges(Session session, string opaqueRef, VTPM server)
|
||||
{
|
||||
if (opaqueRef == null)
|
||||
{
|
||||
var reference = create(session, this);
|
||||
return reference == null ? null : reference.opaque_ref;
|
||||
System.Diagnostics.Debug.Assert(false, "Cannot create instances of this type on the server");
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -180,62 +204,6 @@ namespace XenAPI
|
||||
return XenRef<VTPM>.Create(session.XmlRpcProxy.vtpm_get_by_uuid(session.opaque_ref, _uuid ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new VTPM instance, and return its handle.
|
||||
/// First published in XenServer 4.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_record">All constructor arguments</param>
|
||||
public static XenRef<VTPM> create(Session session, VTPM _record)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vtpm_create(session.opaque_ref, _record);
|
||||
else
|
||||
return XenRef<VTPM>.Create(session.XmlRpcProxy.vtpm_create(session.opaque_ref, _record.ToProxy()).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new VTPM instance, and return its handle.
|
||||
/// First published in XenServer 4.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_record">All constructor arguments</param>
|
||||
public static XenRef<Task> async_create(Session session, VTPM _record)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_vtpm_create(session.opaque_ref, _record);
|
||||
else
|
||||
return XenRef<Task>.Create(session.XmlRpcProxy.async_vtpm_create(session.opaque_ref, _record.ToProxy()).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destroy the specified VTPM instance.
|
||||
/// First published in XenServer 4.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vtpm">The opaque_ref of the given vtpm</param>
|
||||
public static void destroy(Session session, string _vtpm)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
session.JsonRpcClient.vtpm_destroy(session.opaque_ref, _vtpm);
|
||||
else
|
||||
session.XmlRpcProxy.vtpm_destroy(session.opaque_ref, _vtpm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destroy the specified VTPM instance.
|
||||
/// First published in XenServer 4.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vtpm">The opaque_ref of the given vtpm</param>
|
||||
public static XenRef<Task> async_destroy(Session session, string _vtpm)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_vtpm_destroy(session.opaque_ref, _vtpm);
|
||||
else
|
||||
return XenRef<Task>.Create(session.XmlRpcProxy.async_vtpm_destroy(session.opaque_ref, _vtpm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the uuid field of the given VTPM.
|
||||
/// First published in XenServer 4.0.
|
||||
@ -278,6 +246,132 @@ namespace XenAPI
|
||||
return XenRef<VM>.Create(session.XmlRpcProxy.vtpm_get_backend(session.opaque_ref, _vtpm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the persistence_backend field of the given VTPM.
|
||||
/// Experimental. First published in 22.23.0.66.g56cd7935e-next.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vtpm">The opaque_ref of the given vtpm</param>
|
||||
public static persistence_backend get_persistence_backend(Session session, string _vtpm)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vtpm_get_persistence_backend(session.opaque_ref, _vtpm);
|
||||
else
|
||||
return (persistence_backend)Helper.EnumParseDefault(typeof(persistence_backend), (string)session.XmlRpcProxy.vtpm_get_persistence_backend(session.opaque_ref, _vtpm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the is_unique field of the given VTPM.
|
||||
/// Experimental. First published in 22.23.0.66.g56cd7935e-next.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vtpm">The opaque_ref of the given vtpm</param>
|
||||
public static bool get_is_unique(Session session, string _vtpm)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vtpm_get_is_unique(session.opaque_ref, _vtpm);
|
||||
else
|
||||
return (bool)session.XmlRpcProxy.vtpm_get_is_unique(session.opaque_ref, _vtpm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the is_protected field of the given VTPM.
|
||||
/// Experimental. First published in 22.23.0.66.g56cd7935e-next.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vtpm">The opaque_ref of the given vtpm</param>
|
||||
public static bool get_is_protected(Session session, string _vtpm)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vtpm_get_is_protected(session.opaque_ref, _vtpm);
|
||||
else
|
||||
return (bool)session.XmlRpcProxy.vtpm_get_is_protected(session.opaque_ref, _vtpm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new VTPM instance, and return its handle.
|
||||
/// First published in XenServer 4.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vm">The VM reference the VTPM will be attached to</param>
|
||||
/// <param name="_is_unique">Whether the VTPM must be unique</param>
|
||||
public static XenRef<VTPM> create(Session session, string _vm, bool _is_unique)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vtpm_create(session.opaque_ref, _vm, _is_unique);
|
||||
else
|
||||
return XenRef<VTPM>.Create(session.XmlRpcProxy.vtpm_create(session.opaque_ref, _vm ?? "", _is_unique).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new VTPM instance, and return its handle.
|
||||
/// First published in XenServer 4.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vm">The VM reference the VTPM will be attached to</param>
|
||||
/// <param name="_is_unique">Whether the VTPM must be unique</param>
|
||||
public static XenRef<Task> async_create(Session session, string _vm, bool _is_unique)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_vtpm_create(session.opaque_ref, _vm, _is_unique);
|
||||
else
|
||||
return XenRef<Task>.Create(session.XmlRpcProxy.async_vtpm_create(session.opaque_ref, _vm ?? "", _is_unique).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destroy the specified VTPM instance, along with its state.
|
||||
/// First published in XenServer 4.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vtpm">The opaque_ref of the given vtpm</param>
|
||||
public static void destroy(Session session, string _vtpm)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
session.JsonRpcClient.vtpm_destroy(session.opaque_ref, _vtpm);
|
||||
else
|
||||
session.XmlRpcProxy.vtpm_destroy(session.opaque_ref, _vtpm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destroy the specified VTPM instance, along with its state.
|
||||
/// First published in XenServer 4.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vtpm">The opaque_ref of the given vtpm</param>
|
||||
public static XenRef<Task> async_destroy(Session session, string _vtpm)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_vtpm_destroy(session.opaque_ref, _vtpm);
|
||||
else
|
||||
return XenRef<Task>.Create(session.XmlRpcProxy.async_vtpm_destroy(session.opaque_ref, _vtpm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return a list of all the VTPMs known to the system.
|
||||
/// First published in XenServer 4.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
public static List<XenRef<VTPM>> get_all(Session session)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vtpm_get_all(session.opaque_ref);
|
||||
else
|
||||
return XenRef<VTPM>.Create(session.XmlRpcProxy.vtpm_get_all(session.opaque_ref).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all the VTPM Records at once, in a single XML RPC call
|
||||
/// First published in XenServer 4.0.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
public static Dictionary<XenRef<VTPM>, VTPM> get_all_records(Session session)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vtpm_get_all_records(session.opaque_ref);
|
||||
else
|
||||
return XenRef<VTPM>.Create<Proxy_VTPM>(session.XmlRpcProxy.vtpm_get_all_records(session.opaque_ref).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unique identifier/object reference
|
||||
/// </summary>
|
||||
@ -296,7 +390,7 @@ namespace XenAPI
|
||||
private string _uuid = "";
|
||||
|
||||
/// <summary>
|
||||
/// the virtual machine
|
||||
/// The virtual machine the TPM is attached to
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(XenRefConverter<VM>))]
|
||||
public virtual XenRef<VM> VM
|
||||
@ -314,7 +408,7 @@ namespace XenAPI
|
||||
private XenRef<VM> _VM = new XenRef<VM>(Helper.NullOpaqueRef);
|
||||
|
||||
/// <summary>
|
||||
/// the domain where the backend is located
|
||||
/// The domain where the backend is located (unused)
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(XenRefConverter<VM>))]
|
||||
public virtual XenRef<VM> backend
|
||||
@ -329,6 +423,61 @@ namespace XenAPI
|
||||
}
|
||||
}
|
||||
}
|
||||
private XenRef<VM> _backend = new XenRef<VM>(Helper.NullOpaqueRef);
|
||||
private XenRef<VM> _backend = new XenRef<VM>("OpaqueRef:NULL");
|
||||
|
||||
/// <summary>
|
||||
/// The backend where the vTPM is persisted
|
||||
/// Experimental. First published in 22.23.0.66.g56cd7935e-next.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(persistence_backendConverter))]
|
||||
public virtual persistence_backend persistence_backend
|
||||
{
|
||||
get { return _persistence_backend; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _persistence_backend))
|
||||
{
|
||||
_persistence_backend = value;
|
||||
NotifyPropertyChanged("persistence_backend");
|
||||
}
|
||||
}
|
||||
}
|
||||
private persistence_backend _persistence_backend = persistence_backend.xapi;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the contents are never copied, satisfying the TPM spec
|
||||
/// Experimental. First published in 22.23.0.66.g56cd7935e-next.
|
||||
/// </summary>
|
||||
public virtual bool is_unique
|
||||
{
|
||||
get { return _is_unique; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _is_unique))
|
||||
{
|
||||
_is_unique = value;
|
||||
NotifyPropertyChanged("is_unique");
|
||||
}
|
||||
}
|
||||
}
|
||||
private bool _is_unique = false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the contents of the VTPM are secured according to the TPM spec
|
||||
/// Experimental. First published in 22.23.0.66.g56cd7935e-next.
|
||||
/// </summary>
|
||||
public virtual bool is_protected
|
||||
{
|
||||
get { return _is_protected; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _is_protected))
|
||||
{
|
||||
_is_protected = value;
|
||||
NotifyPropertyChanged("is_protected");
|
||||
}
|
||||
}
|
||||
}
|
||||
private bool _is_protected = false;
|
||||
}
|
||||
}
|
||||
|
75
XenModel/XenAPI/persistence_backend.cs
Normal file
75
XenModel/XenAPI/persistence_backend.cs
Normal file
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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:
|
||||
*
|
||||
* 1) Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2) 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 Newtonsoft.Json;
|
||||
|
||||
|
||||
namespace XenAPI
|
||||
{
|
||||
[JsonConverter(typeof(persistence_backendConverter))]
|
||||
public enum persistence_backend
|
||||
{
|
||||
/// <summary>
|
||||
/// This VTPM is persisted in XAPI's DB
|
||||
/// </summary>
|
||||
xapi,
|
||||
unknown
|
||||
}
|
||||
|
||||
public static class persistence_backend_helper
|
||||
{
|
||||
public static string ToString(persistence_backend x)
|
||||
{
|
||||
return x.StringOf();
|
||||
}
|
||||
}
|
||||
|
||||
public static partial class EnumExt
|
||||
{
|
||||
public static string StringOf(this persistence_backend x)
|
||||
{
|
||||
switch (x)
|
||||
{
|
||||
case persistence_backend.xapi:
|
||||
return "xapi";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class persistence_backendConverter : XenEnumConverter
|
||||
{
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WriteValue(((persistence_backend)value).StringOf());
|
||||
}
|
||||
}
|
||||
}
|
@ -163,6 +163,7 @@
|
||||
<Compile Include="Actions\VM\VMCrossPoolMigrateAction.cs" />
|
||||
<Compile Include="Actions\VM\VMSnapshotCreateAction.cs" />
|
||||
<Compile Include="Actions\VM\VMStartAction.cs" />
|
||||
<Compile Include="Actions\VtpmAction.cs" />
|
||||
<Compile Include="Actions\WLB\WlbEvacuateRecommendationsAction.cs" />
|
||||
<Compile Include="Actions\WLB\WlbRetrieveVmRecommendationsAction.cs" />
|
||||
<Compile Include="Actions\XCM\ActivateConversionVpxAction.cs" />
|
||||
@ -409,6 +410,7 @@
|
||||
<Compile Include="XenAPI\network_purpose.cs" />
|
||||
<Compile Include="XenAPI\Network_sriov.cs" />
|
||||
<Compile Include="XenAPI\PCI.cs" />
|
||||
<Compile Include="XenAPI\persistence_backend.cs" />
|
||||
<Compile Include="XenAPI\PGPU.cs" />
|
||||
<Compile Include="XenAPI\pgpu_dom0_access.cs" />
|
||||
<Compile Include="XenAPI\pif_igmp_status.cs" />
|
||||
|
@ -156,7 +156,6 @@ namespace XenAdmin.Core
|
||||
{
|
||||
case "session":
|
||||
case "event":
|
||||
case "vtpm":
|
||||
case "user":
|
||||
case "secret":
|
||||
// We don't track events on these objects
|
||||
|
@ -34,6 +34,7 @@ using System.Collections.Generic;
|
||||
using XenAdmin.Model;
|
||||
using XenAdmin.Network;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using XenAPI;
|
||||
using XenAdmin.Core;
|
||||
using XenCenterLib;
|
||||
@ -108,11 +109,14 @@ namespace XenAdmin.XenSearch
|
||||
if (XenAdminConfigManager.Provider.ObjectIsHidden(o.opaque_ref))
|
||||
return true;
|
||||
|
||||
if (o is VM)
|
||||
if (o is VM vm)
|
||||
{
|
||||
VM vm = o as VM;
|
||||
if (vm.is_control_domain
|
||||
|| !vm.Show(XenAdminConfigManager.Provider.ShowHiddenVMs))
|
||||
if (vm.Connection.Cache.Hosts.Any(Host.RestrictVtpm) &&
|
||||
vm.is_a_template &&
|
||||
vm.platform.TryGetValue("vtpm", out var result) && result.ToLower() == "true")
|
||||
return true;
|
||||
|
||||
if (vm.is_control_domain || !vm.Show(XenAdminConfigManager.Provider.ShowHiddenVMs))
|
||||
return true;
|
||||
|
||||
// Hide VMs on non-live hosts
|
||||
@ -120,9 +124,8 @@ namespace XenAdmin.XenSearch
|
||||
if (host != null && !host.IsLive())
|
||||
return true;
|
||||
}
|
||||
else if (o is SR)
|
||||
else if (o is SR sr)
|
||||
{
|
||||
SR sr = o as SR;
|
||||
if (!sr.Show(XenAdminConfigManager.Provider.ShowHiddenVMs) || sr.IsToolsSR())
|
||||
return true;
|
||||
|
||||
@ -131,16 +134,13 @@ namespace XenAdmin.XenSearch
|
||||
if (host != null && !host.IsLive())
|
||||
return true;
|
||||
}
|
||||
else if (o is XenAPI.Network)
|
||||
else if (o is XenAPI.Network network)
|
||||
{
|
||||
XenAPI.Network network = o as XenAPI.Network;
|
||||
|
||||
return !network.Show(XenAdminConfigManager.Provider.ShowHiddenVMs);
|
||||
}
|
||||
else if (o is Folder)
|
||||
else if (o is Folder folder)
|
||||
{
|
||||
// Hide the root folder
|
||||
Folder folder = o as Folder;
|
||||
return folder.IsRootFolder;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user