mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-22 00:00:40 +01:00
Merge pull request #2024 from MihaelaStoica/master
Merge REQ-477 into master
This commit is contained in:
commit
956ff93000
@ -30,13 +30,9 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using XenAdmin.Wizards.NewSRWizard_Pages;
|
||||
using XenAdmin.Actions;
|
||||
using XenAdmin.Network;
|
||||
using XenAPI;
|
||||
|
||||
|
||||
namespace XenAdmin.Dialogs
|
||||
@ -51,13 +47,16 @@ namespace XenAdmin.Dialogs
|
||||
/// </summary>
|
||||
public partial class IscsiChoicesDialog : XenDialogBase
|
||||
{
|
||||
public IscsiChoicesDialog(IXenConnection connection, XenAPI.SR.SRInfo srInfo)
|
||||
public IscsiChoicesDialog(IXenConnection connection, SR.SRInfo srInfo, SR.SRTypes existingSrType, SR.SRTypes requestedSrType)
|
||||
: base(connection)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.labelSRinfo.Text = String.Format(Messages.ISCSI_DIALOG_SR_DETAILS,
|
||||
Util.DiskSizeString(srInfo.Size), srInfo.UUID);
|
||||
|
||||
this.labelMessage.Text = String.Format(Messages.EXISTING_SR_FOUND_ON_LUN, SR.getFriendlyTypeName(existingSrType),
|
||||
SR.getFriendlyTypeName(requestedSrType));
|
||||
}
|
||||
|
||||
public IscsiChoicesDialog(IXenConnection connection, FibreChannelDevice dev)
|
||||
|
@ -32,9 +32,10 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using XenAdmin.Actions;
|
||||
using XenAdmin.Core;
|
||||
using XenAdmin.Wizards.NewSRWizard_Pages;
|
||||
using XenAdmin.Wizards.NewSRWizard_Pages.Frontends;
|
||||
using XenAPI;
|
||||
|
||||
namespace XenAdmin.Dialogs.WarningDialogs
|
||||
{
|
||||
@ -44,17 +45,21 @@ namespace XenAdmin.Dialogs.WarningDialogs
|
||||
private FibreChannelDevice currentDevice;
|
||||
private int remainingDevicesCount;
|
||||
private bool foundExistingSR;
|
||||
private readonly SR.SRTypes existingSrType;
|
||||
private readonly SR.SRTypes requestedSrType;
|
||||
|
||||
public LVMoHBA.UserSelectedOption SelectedOption { get; private set; }
|
||||
public bool RepeatForRemainingLUNs { get { return checkBoxRepeat.Checked; } }
|
||||
|
||||
public LVMoHBAWarningDialog(FibreChannelDevice currentDevice, int remainingDevicesCount,
|
||||
bool foundExistingSR)
|
||||
bool foundExistingSR, SR.SRTypes existingSrType, SR.SRTypes requestedSrType)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.currentDevice = currentDevice;
|
||||
this.remainingDevicesCount = remainingDevicesCount;
|
||||
this.foundExistingSR = foundExistingSR;
|
||||
this.existingSrType = existingSrType;
|
||||
this.requestedSrType = requestedSrType;
|
||||
PopulateControls();
|
||||
ActiveControl = buttonCancel;
|
||||
}
|
||||
@ -128,7 +133,7 @@ namespace XenAdmin.Dialogs.WarningDialogs
|
||||
private void PopulateControls()
|
||||
{
|
||||
labelHeader.Text = foundExistingSR
|
||||
? Messages.LVMOHBA_WARNING_DIALOG_HEADER_FOUND_EXISTING_SR
|
||||
? string.Format(Messages.LVMOHBA_WARNING_DIALOG_HEADER_FOUND_EXISTING_SR, SR.getFriendlyTypeName(existingSrType))
|
||||
: Messages.LVMOHBA_WARNING_DIALOG_HEADER_NO_EXISTING_SRS;
|
||||
|
||||
checkBoxRepeat.Text = foundExistingSR
|
||||
@ -143,12 +148,17 @@ namespace XenAdmin.Dialogs.WarningDialogs
|
||||
: currentDevice.SCSIid,
|
||||
Util.DiskSizeString(currentDevice.Size));
|
||||
|
||||
labelReattachInfo.Text = foundExistingSR
|
||||
? string.Format(Messages.LVMOHBA_WARNING_DIALOG_REATTACH_INFO, SR.getFriendlyTypeName(existingSrType))
|
||||
: Messages.LVMOHBA_WARNING_DIALOG_REATTACH_LABEL_TEXT;
|
||||
|
||||
labelFormatInfo.Text = string.Format(Messages.LVMOHBA_WARNING_DIALOG_FORMAT_INFO, SR.getFriendlyTypeName(requestedSrType));
|
||||
|
||||
panelReattach.Enabled = foundExistingSR;
|
||||
if (!panelReattach.Enabled)
|
||||
{
|
||||
labelReattachInfo.Text = Messages.LVMOHBA_WARNING_DIALOG_REATTACH_LABEL_TEXT;
|
||||
pictureBoxArrowReattach.Image = Drawing.ConvertToGreyScale(pictureBoxArrowReattach.Image);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
|
@ -112,16 +112,16 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="buttonCancel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="buttonCancel.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
@ -131,7 +131,7 @@
|
||||
<data name="buttonCancel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="buttonCancel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
@ -142,7 +142,7 @@
|
||||
<value>buttonCancel</value>
|
||||
</data>
|
||||
<data name=">>buttonCancel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>buttonCancel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
@ -181,7 +181,7 @@
|
||||
<value>checkBoxRepeat</value>
|
||||
</data>
|
||||
<data name=">>checkBoxRepeat.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>checkBoxRepeat.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
@ -211,7 +211,7 @@
|
||||
<value>labelHeader</value>
|
||||
</data>
|
||||
<data name=">>labelHeader.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelHeader.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
@ -241,7 +241,7 @@
|
||||
<value>labelSelectOption</value>
|
||||
</data>
|
||||
<data name=">>labelSelectOption.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelSelectOption.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
@ -274,7 +274,7 @@
|
||||
<value>pictureBoxArrowReattach</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxArrowReattach.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxArrowReattach.Parent" xml:space="preserve">
|
||||
<value>panelReattach</value>
|
||||
@ -310,7 +310,7 @@
|
||||
<value>buttonReattach</value>
|
||||
</data>
|
||||
<data name=">>buttonReattach.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>buttonReattach.Parent" xml:space="preserve">
|
||||
<value>panelReattach</value>
|
||||
@ -318,9 +318,6 @@
|
||||
<data name=">>buttonReattach.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="labelReattachInfo.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="labelReattachInfo.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
@ -328,7 +325,7 @@
|
||||
<value>33, 32</value>
|
||||
</data>
|
||||
<data name="labelReattachInfo.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 15</value>
|
||||
<value>358, 30</value>
|
||||
</data>
|
||||
<data name="labelReattachInfo.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
@ -340,7 +337,7 @@
|
||||
<value>labelReattachInfo</value>
|
||||
</data>
|
||||
<data name=">>labelReattachInfo.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelReattachInfo.Parent" xml:space="preserve">
|
||||
<value>panelReattach</value>
|
||||
@ -355,7 +352,7 @@
|
||||
<value>12, 135</value>
|
||||
</data>
|
||||
<data name="panelReattach.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>393, 58</value>
|
||||
<value>393, 62</value>
|
||||
</data>
|
||||
<data name="panelReattach.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
@ -397,7 +394,7 @@
|
||||
<value>pictureBoxArrowFormat</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxArrowFormat.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxArrowFormat.Parent" xml:space="preserve">
|
||||
<value>panelFormat</value>
|
||||
@ -436,7 +433,7 @@
|
||||
<value>buttonFormat</value>
|
||||
</data>
|
||||
<data name=">>buttonFormat.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>buttonFormat.Parent" xml:space="preserve">
|
||||
<value>panelFormat</value>
|
||||
@ -444,17 +441,17 @@
|
||||
<data name=">>buttonFormat.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="labelFormatInfo.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="labelFormatInfo.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="labelFormatInfo.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="labelFormatInfo.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>33, 32</value>
|
||||
</data>
|
||||
<data name="labelFormatInfo.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>306, 15</value>
|
||||
<value>357, 30</value>
|
||||
</data>
|
||||
<data name="labelFormatInfo.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
@ -466,7 +463,7 @@
|
||||
<value>labelFormatInfo</value>
|
||||
</data>
|
||||
<data name=">>labelFormatInfo.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelFormatInfo.Parent" xml:space="preserve">
|
||||
<value>panelFormat</value>
|
||||
@ -481,7 +478,7 @@
|
||||
<value>12, 199</value>
|
||||
</data>
|
||||
<data name="panelFormat.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>393, 58</value>
|
||||
<value>393, 64</value>
|
||||
</data>
|
||||
<data name="panelFormat.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
@ -559,7 +556,7 @@
|
||||
<value>pictureBox2</value>
|
||||
</data>
|
||||
<data name=">>pictureBox2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>pictureBox2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
@ -589,7 +586,7 @@
|
||||
<value>labelWarning</value>
|
||||
</data>
|
||||
<data name=">>labelWarning.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelWarning.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
@ -623,7 +620,7 @@ Size:
|
||||
<value>labelLUNDetails</value>
|
||||
</data>
|
||||
<data name=">>labelLUNDetails.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelLUNDetails.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
@ -631,7 +628,7 @@ Size:
|
||||
<data name=">>labelLUNDetails.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
|
@ -248,6 +248,7 @@ namespace XenAdmin.Wizards.DRWizards
|
||||
|
||||
private const String LUNSERIAL = "LUNSerial";
|
||||
private const String SCSIID = "SCSIid";
|
||||
private const String METADATA = "metadata";
|
||||
|
||||
private void ScanForSRs(SR.SRTypes type)
|
||||
{
|
||||
@ -262,7 +263,8 @@ namespace XenAdmin.Wizards.DRWizards
|
||||
foreach (FibreChannelDevice device in devices)
|
||||
{
|
||||
string deviceId = string.IsNullOrEmpty(device.SCSIid) ? device.Path : device.SCSIid;
|
||||
var metadataSrs = ScanDeviceForSRs(SR.SRTypes.lvmohba, deviceId, GetFCDeviceConfig(device));
|
||||
var metadataSrs = ScanDeviceForSRs(SR.SRTypes.lvmohba, deviceId,
|
||||
new Dictionary<string, string> {{SCSIID, device.SCSIid}});
|
||||
if (metadataSrs != null && metadataSrs.Count > 0)
|
||||
srs.AddRange(metadataSrs);
|
||||
}
|
||||
@ -303,49 +305,22 @@ namespace XenAdmin.Wizards.DRWizards
|
||||
if (master == null)
|
||||
return null;
|
||||
|
||||
FibreChannelProbeAction action = new FibreChannelProbeAction(master);
|
||||
var action = new FibreChannelProbeAction(master);
|
||||
using (var dialog = new ActionProgressDialog(action, ProgressBarStyle.Marquee))
|
||||
dialog.ShowDialog(this); //Will block until dialog closes, action completed
|
||||
|
||||
if (!action.Succeeded)
|
||||
return null;
|
||||
|
||||
try
|
||||
{
|
||||
return FibreChannelProbeParsing.ProcessXML(action.Result);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.Debug("Exception parsing result of fibre channel scan", e);
|
||||
log.Debug(e, e);
|
||||
return null;
|
||||
}
|
||||
return action.Succeeded ? action.FibreChannelDevices : null;
|
||||
}
|
||||
|
||||
private Dictionary<String, String> GetFCDeviceConfig(FibreChannelDevice device)
|
||||
{
|
||||
if (device == null)
|
||||
return null;
|
||||
|
||||
var dconf = new Dictionary<string, string>();
|
||||
dconf[SrProbeAction.SCSIid] = device.SCSIid;
|
||||
|
||||
return dconf;
|
||||
}
|
||||
|
||||
private const String METADATA = "metadata";
|
||||
|
||||
private List<SR.SRInfo> ScanDeviceForSRs(SR.SRTypes type, string deviceId, Dictionary<string, string> dconf)
|
||||
{
|
||||
Host master = Helpers.GetMaster(Connection);
|
||||
if (master == null || dconf == null)
|
||||
return null;
|
||||
|
||||
Dictionary<string, string> smconf = new Dictionary<string, string>();
|
||||
smconf[METADATA] = "true";
|
||||
|
||||
// Start probe
|
||||
SrProbeAction srProbeAction = new SrProbeAction(Connection, master, type, dconf, smconf);
|
||||
SrProbeAction srProbeAction = new SrProbeAction(Connection, master, type, dconf,
|
||||
new Dictionary<string, string> {{METADATA, "true"}});
|
||||
using (var dlg = new ActionProgressDialog(srProbeAction, ProgressBarStyle.Marquee))
|
||||
dlg.ShowDialog(this);
|
||||
|
||||
|
@ -84,6 +84,8 @@ namespace XenAdmin.Wizards
|
||||
|
||||
private readonly bool _rbac;
|
||||
|
||||
private bool showProvisioningPage;
|
||||
|
||||
public NewSRWizard(IXenConnection connection)
|
||||
: this(connection, null)
|
||||
{
|
||||
@ -148,8 +150,6 @@ namespace XenAdmin.Wizards
|
||||
AddPage(xenTabPageRbacWarning, 0);
|
||||
ConfigureRbacPage(disasterRecoveryTask);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void ConfigureRbacPage(bool disasterRecoveryTask)
|
||||
@ -199,7 +199,7 @@ namespace XenAdmin.Wizards
|
||||
return success;
|
||||
}
|
||||
|
||||
private bool CanShowLVMoHBASummaryPage(List<LvmOhbaSrDescriptor> SrDescriptors)
|
||||
private bool CanShowLVMoHBASummaryPage(List<FibreChannelDescriptor> SrDescriptors)
|
||||
{
|
||||
string description = m_srWizardType.Description;
|
||||
string name = m_srWizardType.SrName;
|
||||
@ -207,14 +207,14 @@ namespace XenAdmin.Wizards
|
||||
List<string> names = xenConnection.Cache.SRs.Select(sr => sr.Name()).ToList();
|
||||
|
||||
m_srWizardType.SrDescriptors.Clear();
|
||||
foreach (var lvmOhbaSrDescriptor in SrDescriptors)
|
||||
foreach (var descriptor in SrDescriptors)
|
||||
{
|
||||
lvmOhbaSrDescriptor.Name = name;
|
||||
descriptor.Name = name;
|
||||
if (!string.IsNullOrEmpty(description))
|
||||
lvmOhbaSrDescriptor.Description = description;
|
||||
descriptor.Description = description;
|
||||
|
||||
m_srWizardType.SrDescriptors.Add(lvmOhbaSrDescriptor);
|
||||
m_srWizardType.IsGfs2 = lvmOhbaSrDescriptor is Gfs2HbaSrDescriptor || lvmOhbaSrDescriptor is Gfs2FcoeSrDescriptor;
|
||||
m_srWizardType.SrDescriptors.Add(descriptor);
|
||||
m_srWizardType.IsGfs2 = descriptor is Gfs2HbaSrDescriptor || descriptor is Gfs2FcoeSrDescriptor;
|
||||
names.Add(name);
|
||||
name = SrWizardHelpers.DefaultSRName(m_srWizardType is SrWizardType_Hba
|
||||
? Messages.NEWSR_HBA_DEFAULT_NAME
|
||||
@ -231,21 +231,23 @@ namespace XenAdmin.Wizards
|
||||
|
||||
protected override bool RunNextPagePrecheck(XenTabPage senderPage)
|
||||
{
|
||||
// if reattaching and RBAC warning page is visible, then we run the prechecks when leaving the RBAC warning page
|
||||
// otherwise, when leaving xenTabPageSrName (Ref. CA-61525)
|
||||
bool runPrechecks = _srToReattach != null && _rbac
|
||||
? senderPage == xenTabPageRbacWarning
|
||||
: senderPage == xenTabPageSrName;
|
||||
var runPrechecks = showProvisioningPage
|
||||
? senderPage == xenTabPageChooseSrProv
|
||||
: (_srToReattach != null && _rbac
|
||||
? senderPage == xenTabPageRbacWarning
|
||||
: senderPage == xenTabPageSrName);
|
||||
|
||||
if (runPrechecks)
|
||||
{
|
||||
|
||||
if (m_srWizardType is SrWizardType_Fcoe)
|
||||
{
|
||||
xenTabPageLvmoFcoe.SrType = showProvisioningPage && xenTabPageChooseSrProv.IsGfs2 ? SR.SRTypes.gfs2 : SR.SRTypes.lvmofcoe;
|
||||
return SetFCDevicesOnLVMoHBAPage(xenTabPageLvmoFcoe);
|
||||
}
|
||||
if (m_srWizardType is SrWizardType_Hba)
|
||||
{
|
||||
xenTabPageLvmoHba.SrType = showProvisioningPage && xenTabPageChooseSrProv.IsGfs2 ? SR.SRTypes.gfs2 : SR.SRTypes.lvmohba;
|
||||
return SetFCDevicesOnLVMoHBAPage(xenTabPageLvmoHba);
|
||||
}
|
||||
if (m_srWizardType is SrWizardType_Cslg || m_srWizardType is SrWizardType_NetApp || m_srWizardType is SrWizardType_EqualLogic)
|
||||
@ -277,6 +279,7 @@ namespace XenAdmin.Wizards
|
||||
if (senderPagetype == typeof(ChooseSrTypePage))
|
||||
{
|
||||
#region
|
||||
showProvisioningPage = false;
|
||||
RemovePagesFrom(_rbac ? 3 : 2);
|
||||
m_srWizardType = xenTabPageChooseSrType.SrWizardType;
|
||||
|
||||
@ -284,12 +287,18 @@ namespace XenAdmin.Wizards
|
||||
AddPage(xenTabPageVhdoNFS);
|
||||
else if (m_srWizardType is SrWizardType_Iscsi)
|
||||
{
|
||||
AddPage(xenTabPageChooseSrProv);
|
||||
showProvisioningPage = Helpers.KolkataOrGreater(xenConnection) &&
|
||||
!Helpers.FeatureForbidden(xenConnection, Host.CorosyncDisabled);
|
||||
if (showProvisioningPage)
|
||||
AddPage(xenTabPageChooseSrProv);
|
||||
AddPage(xenTabPageLvmoIscsi);
|
||||
}
|
||||
else if (m_srWizardType is SrWizardType_Hba)
|
||||
{
|
||||
AddPage(xenTabPageChooseSrProv);
|
||||
showProvisioningPage = Helpers.KolkataOrGreater(xenConnection) &&
|
||||
!Helpers.FeatureForbidden(xenConnection, Host.CorosyncDisabled);
|
||||
if (showProvisioningPage)
|
||||
AddPage(xenTabPageChooseSrProv);
|
||||
AddPage(xenTabPageLvmoHba);
|
||||
AddPage(xenTabPageLvmoHbaSummary);
|
||||
}
|
||||
@ -628,6 +637,7 @@ namespace XenAdmin.Wizards
|
||||
|
||||
foreach (var srDescriptor in m_srWizardType.SrDescriptors)
|
||||
{
|
||||
var srType = srDescriptor is FibreChannelDescriptor ? (srDescriptor as FibreChannelDescriptor).SrType : m_srWizardType.Type;
|
||||
if (String.IsNullOrEmpty(srDescriptor.UUID))
|
||||
{
|
||||
// Don't need to show any warning, as the only destructive creates
|
||||
@ -635,7 +645,7 @@ namespace XenAdmin.Wizards
|
||||
finalActions.Add(new SrCreateAction(xenConnection, master,
|
||||
srDescriptor.Name,
|
||||
srDescriptor.Description,
|
||||
m_srWizardType.Type,
|
||||
srType,
|
||||
m_srWizardType.ContentType,
|
||||
srDescriptor.DeviceConfig,
|
||||
srDescriptor.SMConfig));
|
||||
@ -647,7 +657,7 @@ namespace XenAdmin.Wizards
|
||||
(_srToReattach == null || SR.SupportsDatabaseReplication(xenConnection, _srToReattach)))
|
||||
{
|
||||
// "Find existing SRs" or "Attach SR needed for DR" cases
|
||||
ScannedDeviceInfo deviceInfo = new ScannedDeviceInfo(m_srWizardType.Type,
|
||||
ScannedDeviceInfo deviceInfo = new ScannedDeviceInfo(srType,
|
||||
srDescriptor.DeviceConfig,
|
||||
srDescriptor.UUID);
|
||||
finalActions.Add(new DrTaskCreateAction(xenConnection, deviceInfo));
|
||||
@ -657,7 +667,7 @@ namespace XenAdmin.Wizards
|
||||
srDescriptor.UUID,
|
||||
srDescriptor.Name,
|
||||
srDescriptor.Description,
|
||||
m_srWizardType.Type,
|
||||
srType,
|
||||
m_srWizardType.ContentType,
|
||||
srDescriptor.DeviceConfig));
|
||||
}
|
||||
|
@ -1,132 +0,0 @@
|
||||
/* 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.Text;
|
||||
using System.Xml;
|
||||
|
||||
namespace XenAdmin.Wizards.NewSRWizard_Pages
|
||||
{
|
||||
class FibreChannelProbeParsing
|
||||
{
|
||||
internal static List<FibreChannelDevice> ProcessXML(string p)
|
||||
{
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.LoadXml(p);
|
||||
|
||||
var devices = new List<FibreChannelDevice>();
|
||||
|
||||
foreach (XmlNode device in doc.GetElementsByTagName("BlockDevice"))
|
||||
{
|
||||
var dev = ParseDevice(device);
|
||||
devices.Add(dev);
|
||||
}
|
||||
return devices;
|
||||
}
|
||||
|
||||
private static FibreChannelDevice ParseDevice(XmlNode device)
|
||||
{
|
||||
string vendor = "";
|
||||
long size = 0;
|
||||
string serial = "";
|
||||
string path = "";
|
||||
string scsiid = "";
|
||||
string adapter = "";
|
||||
string channel = "";
|
||||
string id = "";
|
||||
string lun = "";
|
||||
string name_label = "";
|
||||
string name_description = "";
|
||||
bool pool_metadata_detected = false;
|
||||
string eth = "";
|
||||
|
||||
foreach (XmlNode node in device.ChildNodes)
|
||||
{
|
||||
if (node.Name.ToLowerInvariant() == "vendor")
|
||||
vendor = node.InnerText.Trim();
|
||||
if (node.Name.ToLowerInvariant() == "size")
|
||||
size = ParseSizeWithUnits(node.InnerText.Trim());
|
||||
if (node.Name.ToLowerInvariant() == "serial")
|
||||
serial = node.InnerText.Trim();
|
||||
if (node.Name.ToLowerInvariant() == "path")
|
||||
path = node.InnerText.Trim();
|
||||
if (node.Name.ToLowerInvariant() == "scsiid")
|
||||
scsiid = node.InnerText.Trim();
|
||||
if (node.Name.ToLowerInvariant() == "adapter")
|
||||
adapter = node.InnerText.Trim();
|
||||
if (node.Name.ToLowerInvariant() == "channel")
|
||||
channel = node.InnerText.Trim();
|
||||
if (node.Name.ToLowerInvariant() == "id")
|
||||
id = node.InnerText.Trim();
|
||||
if (node.Name.ToLowerInvariant() == "lun")
|
||||
lun = node.InnerText.Trim();
|
||||
if (node.Name.ToLowerInvariant() == "name_label")
|
||||
name_label = node.InnerText.Trim();
|
||||
if (node.Name.ToLowerInvariant() == "name_description")
|
||||
name_description = node.InnerText.Trim();
|
||||
if (node.Name.ToLowerInvariant() == "pool_metadata_detected")
|
||||
pool_metadata_detected = bool.Parse(node.InnerText.Trim());
|
||||
if (node.Name.ToLowerInvariant() == "eth")
|
||||
eth = node.InnerText.Trim();
|
||||
}
|
||||
|
||||
return new FibreChannelDevice(serial, path, vendor, size,
|
||||
scsiid, adapter, channel, id, lun, name_label, name_description, pool_metadata_detected, eth);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sometimes, the XML that is returned contains units. I think that we're not doing this in
|
||||
/// Miami GA.
|
||||
/// </summary>
|
||||
private static long ParseSizeWithUnits(string p)
|
||||
{
|
||||
p = p.ToLowerInvariant();
|
||||
|
||||
if (p.Contains("kb"))
|
||||
{
|
||||
return long.Parse(p.Replace("kb", "")) * Util.BINARY_KILO;
|
||||
}
|
||||
else if (p.Contains("mb"))
|
||||
{
|
||||
return long.Parse(p.Replace("mb", "")) * Util.BINARY_MEGA;
|
||||
}
|
||||
else if (p.Contains("gb"))
|
||||
{
|
||||
return long.Parse(p.Replace("gb", "")) * Util.BINARY_GIGA;
|
||||
}
|
||||
else
|
||||
{
|
||||
return long.Parse(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -29,6 +29,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using XenAdmin.Actions;
|
||||
using XenAPI;
|
||||
|
||||
namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
@ -38,6 +39,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
public LVMoFCoE()
|
||||
{
|
||||
InitializeComponent();
|
||||
SrType = SR.SRTypes.lvmofcoe;
|
||||
}
|
||||
|
||||
#region LVMoHBA overrides
|
||||
@ -46,16 +48,16 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
|
||||
public override string HelpID { get { return "Location_FCOE"; } }
|
||||
|
||||
public override LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
|
||||
{
|
||||
return SrType == SR.SRTypes.gfs2 ? new Gfs2FcoeSrDescriptor(device) : new FcoeSrDescriptor(device);
|
||||
}
|
||||
|
||||
public override LvmOhbaSrDescriptor CreateLvmSrDescriptor(FibreChannelDevice device)
|
||||
protected override FibreChannelDescriptor CreateLvmSrDescriptor(FibreChannelDevice device)
|
||||
{
|
||||
return new FcoeSrDescriptor(device);
|
||||
}
|
||||
|
||||
protected override FibreChannelDescriptor CreateGfs2Descriptor(FibreChannelDevice device)
|
||||
{
|
||||
return new Gfs2FcoeSrDescriptor(device);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -54,20 +54,26 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
public LVMoHBA()
|
||||
{
|
||||
InitializeComponent();
|
||||
SrType = SR.SRTypes.lvmohba;
|
||||
}
|
||||
|
||||
public virtual SR.SRTypes SrType { get; set; }
|
||||
public SR.SRTypes SrType { get; set; }
|
||||
|
||||
public virtual bool ShowNicColumn { get { return false; } }
|
||||
|
||||
public virtual LvmOhbaSrDescriptor CreateSrDescriptor(FibreChannelDevice device)
|
||||
private FibreChannelDescriptor CreateSrDescriptor(FibreChannelDevice device)
|
||||
{
|
||||
return SrType == SR.SRTypes.gfs2 ? new Gfs2HbaSrDescriptor(device) : new LvmOhbaSrDescriptor(device, Connection);
|
||||
return SrType == SR.SRTypes.gfs2 ? CreateGfs2Descriptor(device) : CreateLvmSrDescriptor(device);
|
||||
}
|
||||
|
||||
public virtual LvmOhbaSrDescriptor CreateLvmSrDescriptor(FibreChannelDevice device)
|
||||
protected virtual FibreChannelDescriptor CreateLvmSrDescriptor(FibreChannelDevice device)
|
||||
{
|
||||
return new LvmOhbaSrDescriptor(device, Connection);
|
||||
return new LvmOhbaSrDescriptor(device);
|
||||
}
|
||||
|
||||
protected virtual FibreChannelDescriptor CreateGfs2Descriptor(FibreChannelDevice device)
|
||||
{
|
||||
return new Gfs2HbaSrDescriptor(device);
|
||||
}
|
||||
|
||||
#region XenTabPage overrides
|
||||
@ -90,37 +96,48 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
return;
|
||||
}
|
||||
|
||||
SrDescriptors = new List<LvmOhbaSrDescriptor>();
|
||||
SrDescriptors = new List<FibreChannelDescriptor>();
|
||||
|
||||
var existingSrDescriptors = new List<LvmOhbaSrDescriptor>();
|
||||
var formatDiskDescriptors = new List<LvmOhbaSrDescriptor>();
|
||||
var existingSrDescriptors = new List<FibreChannelDescriptor>();
|
||||
var formatDiskDescriptors = new List<FibreChannelDescriptor>();
|
||||
|
||||
var performSecondProbe = Helpers.KolkataOrGreater(Connection) && !Helpers.FeatureForbidden(Connection, Host.CorosyncDisabled)
|
||||
&& SrType != SR.SRTypes.lvmofcoe; // gfs2 over fcoe is not supported yet
|
||||
|
||||
foreach (var device in _selectedDevices)
|
||||
{
|
||||
LvmOhbaSrDescriptor descr = CreateSrDescriptor(device);
|
||||
// Start probe
|
||||
var formatDiskDescriptor = CreateSrDescriptor(device);
|
||||
List<SR.SRInfo> srs;
|
||||
|
||||
// create an LVM descriptor, to be used with sr.probe
|
||||
LvmOhbaSrDescriptor lvmdescr = CreateLvmSrDescriptor(device);
|
||||
SR.SRTypes srType = lvmdescr is FcoeSrDescriptor ? SR.SRTypes.lvmofcoe : SR.SRTypes.lvmohba; //srType is a workaround instead of SrType
|
||||
var currentSrDescriptor = formatDiskDescriptor;
|
||||
|
||||
var action = new SrProbeAction(Connection, master, srType, lvmdescr.DeviceConfig);// TODO: use SRType and descr
|
||||
using (var dlg = new ActionProgressDialog(action, ProgressBarStyle.Marquee))
|
||||
dlg.ShowDialog(this);
|
||||
|
||||
if (!action.Succeeded)
|
||||
if (!RunProbe(master, currentSrDescriptor, out srs))
|
||||
{
|
||||
cancel = true;
|
||||
return;
|
||||
}
|
||||
|
||||
descr.UUID = SrWizardHelpers.ExtractUUID(action.Result);
|
||||
if (performSecondProbe && srs.Count == 0)
|
||||
{
|
||||
// Start second probe
|
||||
currentSrDescriptor = SrType == SR.SRTypes.gfs2 ? CreateLvmSrDescriptor(device) : CreateGfs2Descriptor(device);
|
||||
|
||||
if (!RunProbe(master, currentSrDescriptor, out srs))
|
||||
{
|
||||
cancel = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
currentSrDescriptor.UUID = srs.Select(sr => sr.UUID).FirstOrDefault();
|
||||
|
||||
if (!string.IsNullOrEmpty(SrWizardType.UUID))
|
||||
{
|
||||
// Check LUN contains correct SR
|
||||
if (descr.UUID == SrWizardType.UUID)
|
||||
if (currentSrDescriptor.UUID == SrWizardType.UUID)
|
||||
{
|
||||
SrDescriptors.Add(descr);
|
||||
SrDescriptors.Add(currentSrDescriptor);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -135,7 +152,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(descr.UUID))
|
||||
if (string.IsNullOrEmpty(currentSrDescriptor.UUID))
|
||||
{
|
||||
// No existing SRs were found on this LUN. If allowed to create
|
||||
// a new SR, ask the user if they want to proceed and format.
|
||||
@ -153,26 +170,45 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
}
|
||||
|
||||
if (!Program.RunInAutomatedTestMode)
|
||||
formatDiskDescriptors.Add(descr);
|
||||
formatDiskDescriptors.Add(formatDiskDescriptor);
|
||||
}
|
||||
else
|
||||
{
|
||||
// CA-17230: Check this isn't a detached SR. If it is then just continue
|
||||
SR sr = SrWizardHelpers.SrInUse(descr.UUID);
|
||||
if (sr != null)
|
||||
// Check this isn't an existing SR on the current pool
|
||||
var existingSr = Connection.Cache.SRs.FirstOrDefault(sr => sr.uuid == currentSrDescriptor.UUID);
|
||||
if (existingSr != null)
|
||||
{
|
||||
SrDescriptors.Add(descr);
|
||||
var pool = Helpers.GetPool(existingSr.Connection);
|
||||
var errorText = pool != null
|
||||
? string.Format(Messages.NEWSR_LUN_IN_USE_ON_SELECTED_POOL, device.SCSIid, existingSr.Name())
|
||||
: string.Format(Messages.NEWSR_LUN_IN_USE_ON_SELECTED_SERVER, device.SCSIid, existingSr.Name());
|
||||
|
||||
using (var dlog = new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Error,
|
||||
errorText, Messages.XENCENTER)))
|
||||
{
|
||||
dlog.ShowDialog(this);
|
||||
}
|
||||
cancel = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// CA-17230: Check this isn't an existing SR on any of the known pools.
|
||||
// If it is then just continue (i.e. do not ask the user if they want to format or reattach it, we will just reattach it)
|
||||
existingSr = SrWizardHelpers.SrInUse(currentSrDescriptor.UUID);
|
||||
if (existingSr != null)
|
||||
{
|
||||
SrDescriptors.Add(currentSrDescriptor);
|
||||
continue;
|
||||
}
|
||||
|
||||
// We found a SR on this LUN. Will ask user for choice later.
|
||||
existingSrDescriptors.Add(descr);
|
||||
existingSrDescriptors.Add(currentSrDescriptor);
|
||||
}
|
||||
}
|
||||
|
||||
if (!cancel && existingSrDescriptors.Count > 0)
|
||||
{
|
||||
var launcher = new LVMoHBAWarningDialogLauncher(this, existingSrDescriptors, true);
|
||||
var launcher = new LVMoHBAWarningDialogLauncher(this, existingSrDescriptors, true, SrType);
|
||||
launcher.ShowWarnings();
|
||||
cancel = launcher.Cancelled;
|
||||
if (!cancel && launcher.SrDescriptors.Count > 0)
|
||||
@ -181,7 +217,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
|
||||
if (!cancel && formatDiskDescriptors.Count > 0)
|
||||
{
|
||||
var launcher = new LVMoHBAWarningDialogLauncher(this, formatDiskDescriptors, false);
|
||||
var launcher = new LVMoHBAWarningDialogLauncher(this, formatDiskDescriptors, false, SrType);
|
||||
launcher.ShowWarnings();
|
||||
cancel = launcher.Cancelled;
|
||||
if (!cancel && launcher.SrDescriptors.Count > 0)
|
||||
@ -189,6 +225,29 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
}
|
||||
}
|
||||
|
||||
private bool RunProbe(Host master, FibreChannelDescriptor srDescriptor, out List<SR.SRInfo> srs)
|
||||
{
|
||||
srs = null;
|
||||
var action = new SrProbeAction(Connection, master, srDescriptor.SrType, srDescriptor.DeviceConfig);
|
||||
|
||||
using (var dlg = new ActionProgressDialog(action, ProgressBarStyle.Marquee))
|
||||
dlg.ShowDialog(this);
|
||||
|
||||
if (action.Succeeded)
|
||||
{
|
||||
try
|
||||
{
|
||||
srs = action.ProbeExtResult != null ? SR.ParseSRList(action.ProbeExtResult) : SR.ParseSRListXML(action.Result);
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool EnableNext()
|
||||
{
|
||||
UpdateSelectionButtons();
|
||||
@ -203,8 +262,11 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PopulatePage()
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
if (direction == PageLoadedDirection.Back)
|
||||
return;
|
||||
|
||||
colNic.Visible = ShowNicColumn;
|
||||
dataGridView.Rows.Clear();
|
||||
|
||||
@ -340,43 +402,23 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
if (master == null)
|
||||
return false;
|
||||
|
||||
SR.SRTypes srType = this is LVMoFCoE ? SR.SRTypes.lvmofcoe : SR.SRTypes.lvmohba; //srType is a workaround instead of SrType
|
||||
|
||||
FibreChannelProbeAction action = new FibreChannelProbeAction(master, srType);// TODO: use SRType
|
||||
var action = new FibreChannelProbeAction(master, SrType);
|
||||
using (var dialog = new ActionProgressDialog(action, ProgressBarStyle.Marquee))
|
||||
dialog.ShowDialog(owner); //Will block until dialog closes, action completed
|
||||
|
||||
if (!action.Succeeded)
|
||||
return false;
|
||||
|
||||
try
|
||||
{
|
||||
devices = FibreChannelProbeParsing.ProcessXML(action.Result);
|
||||
|
||||
if (devices.Count == 0)
|
||||
{
|
||||
using (var dlg = new ThreeButtonDialog(
|
||||
new ThreeButtonDialog.Details(SystemIcons.Warning, Messages.FIBRECHANNEL_NO_RESULTS, Messages.XENCENTER)))
|
||||
{
|
||||
dlg.ShowDialog();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
devices = action.FibreChannelDevices;
|
||||
if (devices != null && devices.Count > 0)
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.Debug("Exception parsing result of fibre channel scan", e);
|
||||
log.Debug(e, e);
|
||||
using (var dlg = new ThreeButtonDialog(
|
||||
new ThreeButtonDialog.Details(SystemIcons.Warning, Messages.FIBRECHANNEL_XML_ERROR, Messages.XENCENTER)))
|
||||
{
|
||||
dlg.ShowDialog();
|
||||
}
|
||||
|
||||
return false;
|
||||
using (var dlg = new ThreeButtonDialog(
|
||||
new ThreeButtonDialog.Details(SystemIcons.Warning, Messages.FIBRECHANNEL_NO_RESULTS, Messages.XENCENTER)))
|
||||
{
|
||||
dlg.ShowDialog();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#region Accessors
|
||||
|
||||
@ -404,7 +446,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
}
|
||||
}
|
||||
|
||||
public List<LvmOhbaSrDescriptor> SrDescriptors { get; private set; }
|
||||
public List<FibreChannelDescriptor> SrDescriptors { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// min size
|
||||
@ -479,28 +521,29 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
|
||||
private class LVMoHBAWarningDialogLauncher
|
||||
{
|
||||
private readonly List<LvmOhbaSrDescriptor> inputSrDescriptors;
|
||||
private readonly List<FibreChannelDescriptor> inputSrDescriptors;
|
||||
private readonly bool foundExistingSRs;
|
||||
private readonly IWin32Window owner;
|
||||
private readonly SR.SRTypes requestedSrType;
|
||||
|
||||
public List<LvmOhbaSrDescriptor> SrDescriptors { get; private set; }
|
||||
public List<FibreChannelDescriptor> SrDescriptors { get; private set; }
|
||||
public bool Cancelled { get; private set; }
|
||||
|
||||
public LVMoHBAWarningDialogLauncher(IWin32Window owner, List<LvmOhbaSrDescriptor> srDescriptors,
|
||||
bool foundExistingSRs)
|
||||
public LVMoHBAWarningDialogLauncher(IWin32Window owner, List<FibreChannelDescriptor> srDescriptors,
|
||||
bool foundExistingSRs, SR.SRTypes requestedSrType)
|
||||
{
|
||||
this.owner = owner;
|
||||
this.foundExistingSRs = foundExistingSRs;
|
||||
inputSrDescriptors = srDescriptors;
|
||||
SrDescriptors = new List<LvmOhbaSrDescriptor>();
|
||||
this.requestedSrType = requestedSrType;
|
||||
SrDescriptors = new List<FibreChannelDescriptor>();
|
||||
}
|
||||
|
||||
private UserSelectedOption GetSelectedOption(LvmOhbaSrDescriptor lvmOhbaSrDescriptor,
|
||||
private UserSelectedOption GetSelectedOption(FibreChannelDescriptor descriptor,
|
||||
out bool repeatForRemainingLUNs)
|
||||
{
|
||||
int remainingCount = inputSrDescriptors.Count - 1 - inputSrDescriptors.IndexOf(lvmOhbaSrDescriptor);
|
||||
|
||||
using (var dialog = new LVMoHBAWarningDialog(lvmOhbaSrDescriptor.Device, remainingCount, foundExistingSRs))
|
||||
int remainingCount = inputSrDescriptors.Count - 1 - inputSrDescriptors.IndexOf(descriptor);
|
||||
using (var dialog = new LVMoHBAWarningDialog(descriptor.Device, remainingCount, foundExistingSRs, descriptor.SrType, requestedSrType))
|
||||
{
|
||||
dialog.ShowDialog(owner);
|
||||
repeatForRemainingLUNs = dialog.RepeatForRemainingLUNs;
|
||||
@ -513,21 +556,21 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
bool repeatForRemainingLUNs = false;
|
||||
UserSelectedOption selectedOption = UserSelectedOption.Cancel;
|
||||
|
||||
foreach (LvmOhbaSrDescriptor lvmOhbaSrDescriptor in inputSrDescriptors)
|
||||
foreach (var descriptor in inputSrDescriptors)
|
||||
{
|
||||
if (!repeatForRemainingLUNs)
|
||||
{
|
||||
selectedOption = GetSelectedOption(lvmOhbaSrDescriptor, out repeatForRemainingLUNs);
|
||||
selectedOption = GetSelectedOption(descriptor, out repeatForRemainingLUNs);
|
||||
}
|
||||
|
||||
switch (selectedOption)
|
||||
{
|
||||
case UserSelectedOption.Format:
|
||||
lvmOhbaSrDescriptor.UUID = null;
|
||||
SrDescriptors.Add(lvmOhbaSrDescriptor);
|
||||
descriptor.UUID = null;
|
||||
SrDescriptors.Add(descriptor);
|
||||
break;
|
||||
case UserSelectedOption.Reattach:
|
||||
SrDescriptors.Add(lvmOhbaSrDescriptor);
|
||||
SrDescriptors.Add(descriptor);
|
||||
break;
|
||||
case UserSelectedOption.Cancel:
|
||||
SrDescriptors.Clear();
|
||||
|
@ -104,9 +104,9 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
return;
|
||||
|
||||
dataGridViewSummary.Rows.Add(new LVMoHBASummaryHeaderGridViewRow(success, srDescriptors.Count));
|
||||
foreach (var lvmOhbaSrDescriptor in srDescriptors)
|
||||
foreach (var descriptor in srDescriptors)
|
||||
{
|
||||
DataGridViewRow row = new LVMoHBASrDescriptorGridViewRow(lvmOhbaSrDescriptor) {Visible = false};
|
||||
DataGridViewRow row = new LVMoHBASrDescriptorGridViewRow(descriptor) { Visible = false };
|
||||
dataGridViewSummary.Rows.Add(row);
|
||||
}
|
||||
}
|
||||
@ -241,19 +241,19 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
|
||||
protected override DataGridViewTextBoxCell GetDetailsCell()
|
||||
{
|
||||
LvmOhbaSrDescriptor lvmOhbaSrDescriptor = srDescriptor as LvmOhbaSrDescriptor;
|
||||
string text = lvmOhbaSrDescriptor != null
|
||||
? string.Format(Messages.NEWSR_LVMOHBA_SUMMARY_DETAILS_CELL_TEXT,
|
||||
lvmOhbaSrDescriptor.Name,
|
||||
Util.DiskSizeString(lvmOhbaSrDescriptor.Device.Size),
|
||||
lvmOhbaSrDescriptor.Device.Serial)
|
||||
: srDescriptor.Name;
|
||||
var descriptor = srDescriptor as FibreChannelDescriptor;
|
||||
string text = descriptor != null
|
||||
? string.Format(Messages.NEWSR_LVMOHBA_SUMMARY_DETAILS_CELL_TEXT,
|
||||
descriptor.Name,
|
||||
Util.DiskSizeString(descriptor.Device.Size),
|
||||
descriptor.Device.Serial)
|
||||
: srDescriptor.Name;
|
||||
|
||||
return new DataGridViewTextBoxCell
|
||||
{
|
||||
Value = text,
|
||||
Style = {Padding = new Padding(10, 0, 0, 0)}
|
||||
};
|
||||
{
|
||||
Value = text,
|
||||
Style = {Padding = new Padding(10, 0, 0, 0)}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,6 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
private const string SCSIID = "SCSIid";
|
||||
private const string CHAPUSER = "chapuser";
|
||||
private const string CHAPPASSWORD = "chappassword";
|
||||
private const string URI = "uri";
|
||||
|
||||
private IEnumerable<Control> ErrorIcons
|
||||
{
|
||||
@ -107,6 +106,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
public LVMoISCSI()
|
||||
{
|
||||
InitializeComponent();
|
||||
SrType = SR.SRTypes.lvmoiscsi;
|
||||
}
|
||||
|
||||
#region XentabPage overrides
|
||||
@ -142,24 +142,83 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
return;
|
||||
}
|
||||
|
||||
Dictionary<String, String> dconf = GetDeviceConfig(SR.SRTypes.lvmoiscsi); // TODO: use SRType
|
||||
if (dconf == null)
|
||||
// Start probe
|
||||
|
||||
List<SR.SRInfo> srs;
|
||||
var currentSrType = SrType;
|
||||
|
||||
if (!RunProbe(master, currentSrType, out srs))
|
||||
{
|
||||
cancel = true;
|
||||
cancel = iscsiProbeError = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// Start probe
|
||||
SrProbeAction IscsiProbeAction = new SrProbeAction(Connection, master, SR.SRTypes.lvmoiscsi, dconf); // TODO: use SRType
|
||||
using (var dialog = new ActionProgressDialog(IscsiProbeAction, ProgressBarStyle.Marquee))
|
||||
var performSecondProbe = Helpers.KolkataOrGreater(Connection) &&
|
||||
!Helpers.FeatureForbidden(Connection, Host.CorosyncDisabled);
|
||||
if (performSecondProbe && srs.Count == 0)
|
||||
{
|
||||
// Start second probe
|
||||
currentSrType = SrType == SR.SRTypes.gfs2 ? SR.SRTypes.lvmoiscsi : SR.SRTypes.gfs2;
|
||||
|
||||
if (!RunProbe(master, currentSrType, out srs))
|
||||
{
|
||||
cancel = iscsiProbeError = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Probe has been performed. Now ask the user if they want to Reattach/Format/Cancel.
|
||||
// Will return false on cancel
|
||||
cancel = iscsiProbeError = !ExamineIscsiProbeResults(currentSrType, srs);
|
||||
}
|
||||
|
||||
private bool RunProbe(Host master, SR.SRTypes srType, out List<SR.SRInfo> srs)
|
||||
{
|
||||
srs = null;
|
||||
|
||||
Dictionary<String, String> dconf = GetDeviceConfig(srType);
|
||||
if (dconf == null)
|
||||
return false;
|
||||
|
||||
var action = new SrProbeAction(Connection, master, srType, dconf);
|
||||
using (var dialog = new ActionProgressDialog(action, ProgressBarStyle.Marquee))
|
||||
{
|
||||
dialog.ShowCancel = true;
|
||||
dialog.ShowDialog(this);
|
||||
}
|
||||
// Probe has been performed. Now ask the user if they want to Reattach/Format/Cancel.
|
||||
// Will return false on cancel
|
||||
cancel = !ExamineIscsiProbeResults(IscsiProbeAction);
|
||||
iscsiProbeError = cancel;
|
||||
|
||||
_srToIntroduce = null;
|
||||
if (action.Succeeded)
|
||||
{
|
||||
try
|
||||
{
|
||||
srs = action.ProbeExtResult != null ? SR.ParseSRList(action.ProbeExtResult) : SR.ParseSRListXML(action.Result);
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Exception exn = action.Exception;
|
||||
log.Warn(exn, exn);
|
||||
|
||||
Failure failure = exn as Failure;
|
||||
if (failure != null)
|
||||
{
|
||||
errorIconAtHostOrIP.Visible = true;
|
||||
errorLabelAtHostname.Visible = true;
|
||||
|
||||
errorLabelAtHostname.Text = failure.ErrorDescription[0] == "SR_BACKEND_FAILURE_140"
|
||||
? Messages.INVALID_HOST
|
||||
: (failure.ErrorDescription.Count > 2
|
||||
? failure.ErrorDescription[2]
|
||||
: failure.ErrorDescription[0]);
|
||||
|
||||
textBoxIscsiHost.Focus();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool iscsiProbeError = false;
|
||||
@ -328,7 +387,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
{
|
||||
foreach (SR sr in connection.Cache.SRs)
|
||||
{
|
||||
if (sr.GetSRType(false) != SR.SRTypes.lvmoiscsi) // TODO: use SRType
|
||||
if (sr.GetSRType(false) != SR.SRTypes.lvmoiscsi && sr.GetSRType(false) != SR.SRTypes.gfs2)
|
||||
continue;
|
||||
|
||||
if (sr.PBDs.Count < 1)
|
||||
@ -355,10 +414,15 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
/// <returns></returns>
|
||||
private bool UniquenessCheckMiami(IXenConnection connection, PBD pbd)
|
||||
{
|
||||
if (!pbd.device_config.ContainsKey(SCSIID))
|
||||
String scsiID;
|
||||
|
||||
if (pbd.device_config.ContainsKey(SCSIID))
|
||||
scsiID = pbd.device_config[SCSIID];
|
||||
else if (pbd.device_config.ContainsKey("ScsiId"))
|
||||
scsiID = pbd.device_config["ScsiId"];
|
||||
else
|
||||
return false;
|
||||
|
||||
String scsiID = pbd.device_config[SCSIID];
|
||||
String myLUN = getIscsiLUN();
|
||||
|
||||
if (!LunMap.ContainsKey(myLUN))
|
||||
@ -464,16 +528,12 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
|
||||
UpdateButtons();
|
||||
|
||||
if (IscsiUseChapCheckBox.Checked)
|
||||
{
|
||||
IscsiPopulateIqnsAction = new ISCSIPopulateIQNsAction(Connection,
|
||||
getIscsiHost(), getIscsiPort(), IScsiChapUserTextBox.Text, IScsiChapSecretTextBox.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
IscsiPopulateIqnsAction = new ISCSIPopulateIQNsAction(Connection,
|
||||
getIscsiHost(), getIscsiPort(), null, null);
|
||||
}
|
||||
var chapUser = IscsiUseChapCheckBox.Checked ? IScsiChapUserTextBox.Text : null;
|
||||
var chapPwd = IscsiUseChapCheckBox.Checked ? IScsiChapSecretTextBox.Text : null;
|
||||
|
||||
IscsiPopulateIqnsAction = SrType == SR.SRTypes.gfs2
|
||||
? new Gfs2PopulateIQNsAction(Connection, getIscsiHost(), getIscsiPort(), chapUser, chapPwd)
|
||||
: new ISCSIPopulateIQNsAction(Connection, getIscsiHost(), getIscsiPort(), chapUser, chapPwd);
|
||||
|
||||
IscsiPopulateIqnsAction.Completed += IscsiPopulateIqnsAction_Completed;
|
||||
|
||||
@ -593,16 +653,12 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
comboBoxIscsiLuns.Items.Clear();
|
||||
LunMap.Clear();
|
||||
|
||||
if (IscsiUseChapCheckBox.Checked)
|
||||
{
|
||||
IscsiPopulateLunsAction = new Actions.ISCSIPopulateLunsAction(Connection,
|
||||
getIscsiHost(), getIscsiPort(), getIscsiIQN(), IScsiChapUserTextBox.Text, IScsiChapSecretTextBox.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
IscsiPopulateLunsAction = new Actions.ISCSIPopulateLunsAction(Connection,
|
||||
getIscsiHost(), getIscsiPort(), getIscsiIQN(), null, null);
|
||||
}
|
||||
var chapUser = IscsiUseChapCheckBox.Checked ? IScsiChapUserTextBox.Text : null;
|
||||
var chapPwd = IscsiUseChapCheckBox.Checked ? IScsiChapSecretTextBox.Text : null;
|
||||
|
||||
IscsiPopulateLunsAction = SrType == SR.SRTypes.gfs2
|
||||
? new Gfs2PopulateLunsAction(Connection, getIscsiHost(), getIscsiPort(), getIscsiIQN(), chapUser, chapPwd)
|
||||
: new ISCSIPopulateLunsAction(Connection, getIscsiHost(), getIscsiPort(), getIscsiIQN(), chapUser, chapPwd);
|
||||
|
||||
IscsiPopulateLunsAction.Completed += IscsiPopulateLunsAction_Completed;
|
||||
|
||||
@ -704,42 +760,22 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
/// Whether to continue or not - wheter to format or not is stored in
|
||||
/// iScsiFormatLUN.
|
||||
/// </returns>
|
||||
private bool ExamineIscsiProbeResults(SrProbeAction action)
|
||||
private bool ExamineIscsiProbeResults(SR.SRTypes currentSrType, List<SR.SRInfo> srs)
|
||||
{
|
||||
_srToIntroduce = null;
|
||||
|
||||
if (!action.Succeeded)
|
||||
{
|
||||
Exception exn = action.Exception;
|
||||
log.Warn(exn, exn);
|
||||
Failure failure = exn as Failure;
|
||||
if (failure != null && failure.ErrorDescription[0] == "SR_BACKEND_FAILURE_140")
|
||||
{
|
||||
errorIconAtHostOrIP.Visible = true;
|
||||
errorLabelAtHostname.Visible = true;
|
||||
errorLabelAtHostname.Text = Messages.INVALID_HOST;
|
||||
textBoxIscsiHost.Focus();
|
||||
}
|
||||
else if (failure != null)
|
||||
{
|
||||
errorIconAtHostOrIP.Visible = true;
|
||||
errorLabelAtHostname.Visible = true;
|
||||
errorLabelAtHostname.Text = failure.ErrorDescription.Count > 2 ? failure.ErrorDescription[2] : failure.ErrorDescription[0];
|
||||
textBoxIscsiHost.Focus();
|
||||
}
|
||||
if (srs == null)
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
List<SR.SRInfo> SRs = SR.ParseSRListXML(action.Result);
|
||||
|
||||
if (!String.IsNullOrEmpty(SrWizardType.UUID))
|
||||
{
|
||||
// Check LUN contains correct SR
|
||||
if (SRs.Count == 1 && SRs[0].UUID == SrWizardType.UUID)
|
||||
if (srs.Count == 1 && srs[0].UUID == SrWizardType.UUID)
|
||||
{
|
||||
_srToIntroduce = SRs[0];
|
||||
_srToIntroduce = srs[0];
|
||||
SrType = currentSrType; // the type of the existing SR
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -749,7 +785,7 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
|
||||
return false;
|
||||
}
|
||||
else if (SRs.Count == 0)
|
||||
else if (srs.Count == 0)
|
||||
{
|
||||
// No existing SRs were found on this LUN. If allowed to create new SR, ask the user if they want to proceed and format.
|
||||
if (!SrWizardType.AllowToCreateNewSr)
|
||||
@ -779,11 +815,11 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
else
|
||||
{
|
||||
// There should be 0 or 1 SRs on the LUN
|
||||
System.Diagnostics.Trace.Assert(SRs.Count == 1);
|
||||
System.Diagnostics.Trace.Assert(srs.Count == 1);
|
||||
|
||||
// CA-17230
|
||||
// Check this isn't a detached SR
|
||||
SR.SRInfo info = SRs[0];
|
||||
SR.SRInfo info = srs[0];
|
||||
SR sr = SrWizardHelpers.SrInUse(info.UUID);
|
||||
if (sr != null)
|
||||
{
|
||||
@ -800,19 +836,21 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
return false;
|
||||
|
||||
_srToIntroduce = info;
|
||||
SrType = currentSrType; // the type of the existing SR
|
||||
return true;
|
||||
}
|
||||
|
||||
// An SR exists on this LUN. Ask the user if they want to attach it, format it and
|
||||
// create a new SR, or cancel.
|
||||
DialogResult result = Program.RunInAutomatedTestMode ? DialogResult.Yes :
|
||||
new IscsiChoicesDialog(Connection, info).ShowDialog(this);
|
||||
new IscsiChoicesDialog(Connection, info, currentSrType, SrType).ShowDialog(this);
|
||||
|
||||
switch (result)
|
||||
{
|
||||
case DialogResult.Yes:
|
||||
// Reattach
|
||||
_srToIntroduce = SRs[0];
|
||||
_srToIntroduce = srs[0];
|
||||
SrType = currentSrType; // the type of the existing SR
|
||||
return true;
|
||||
|
||||
case DialogResult.No:
|
||||
@ -854,18 +892,13 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
|
||||
if (srType == SR.SRTypes.gfs2)
|
||||
{
|
||||
// build the uri for gfs2
|
||||
var jsonUri = new JavaScriptSerializer().Serialize(new
|
||||
{
|
||||
provider = "iscsi",
|
||||
ips = iqn.item.IpAddress,
|
||||
port = iqn.item.Port.ToString(),
|
||||
iqns = getIscsiIQN(),
|
||||
ScsiId = LunMap[getIscsiLUN()].ScsiID,
|
||||
chapuser = IScsiChapUserTextBox.Text,
|
||||
chappassword = IScsiChapSecretTextBox.Text
|
||||
});
|
||||
dconf[URI] = jsonUri;
|
||||
dconf["provider"] = "iscsi";
|
||||
dconf["ips"] = iqn.item.IpAddress;
|
||||
dconf["port"] = iqn.item.Port.ToString();
|
||||
dconf["iqns"] = getIscsiIQN();
|
||||
dconf["ScsiId"] = LunMap[getIscsiLUN()].ScsiID;
|
||||
dconf["chapuser"] = IScsiChapUserTextBox.Text;
|
||||
dconf["chappassword"] = IScsiChapSecretTextBox.Text;
|
||||
|
||||
return dconf;
|
||||
}
|
||||
|
@ -107,25 +107,5 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages
|
||||
{
|
||||
return DefaultSRName(potentialName, connection.Cache.SRs.Select(sr => sr.Name()));
|
||||
}
|
||||
|
||||
public static String ExtractUUID(String p)
|
||||
{
|
||||
List<SR.SRInfo> lst = SR.ParseSRListXML(p);
|
||||
|
||||
foreach (SR.SRInfo sr in lst)
|
||||
{
|
||||
return sr.UUID;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String GetEntry(Dictionary<String, String> dconf, String Key, String Default)
|
||||
{
|
||||
if (dconf.ContainsKey(Key))
|
||||
return dconf[Key];
|
||||
|
||||
return Default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,9 +31,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Script.Serialization;
|
||||
using XenAdmin.Actions;
|
||||
using XenAdmin.Core;
|
||||
using XenAdmin.Network;
|
||||
using XenAPI;
|
||||
|
||||
@ -54,64 +52,76 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages
|
||||
public string UUID { get; set; }
|
||||
}
|
||||
|
||||
public class LvmOhbaSrDescriptor : SrDescriptor
|
||||
public abstract class FibreChannelDescriptor : SrDescriptor
|
||||
{
|
||||
public LvmOhbaSrDescriptor(FibreChannelDevice device, IXenConnection connection)
|
||||
protected FibreChannelDescriptor(FibreChannelDevice device, string descrFormat)
|
||||
{
|
||||
Device = device;
|
||||
DeviceConfig[SrProbeAction.SCSIid] = device.SCSIid;
|
||||
|
||||
Description = string.Format(Messages.NEWSR_LVMOHBA_DESCRIPTION, device.Vendor, device.Serial);
|
||||
Description = string.Format(descrFormat, device.Vendor, device.Serial);
|
||||
}
|
||||
|
||||
public LvmOhbaSrDescriptor(FibreChannelDevice device)
|
||||
{
|
||||
Device = device;
|
||||
|
||||
Description = string.Format(Messages.NEWSR_LVMOHBA_DESCRIPTION, device.Vendor, device.Serial);
|
||||
}
|
||||
public abstract SR.SRTypes SrType { get; }
|
||||
|
||||
public FibreChannelDevice Device { get; private set; }
|
||||
}
|
||||
|
||||
public class FcoeSrDescriptor : LvmOhbaSrDescriptor
|
||||
public class LvmOhbaSrDescriptor : FibreChannelDescriptor
|
||||
{
|
||||
public FcoeSrDescriptor(FibreChannelDevice device) : base(device)
|
||||
public LvmOhbaSrDescriptor(FibreChannelDevice device)
|
||||
: base(device, Messages.NEWSR_LVMOHBA_DESCRIPTION)
|
||||
{
|
||||
DeviceConfig[SrProbeAction.SCSIid] = device.SCSIid;
|
||||
DeviceConfig[SrProbeAction.PATH] = device.Path;
|
||||
DeviceConfig["SCSIid"] = device.SCSIid;
|
||||
}
|
||||
|
||||
Description = string.Format(Messages.NEWSR_LVMOFCOE_DESCRIPTION, device.Vendor, device.Serial);
|
||||
public override SR.SRTypes SrType
|
||||
{
|
||||
get { return SR.SRTypes.lvmohba; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Gfs2HbaSrDescriptor : LvmOhbaSrDescriptor
|
||||
public class FcoeSrDescriptor : FibreChannelDescriptor
|
||||
{
|
||||
public FcoeSrDescriptor(FibreChannelDevice device)
|
||||
: base(device, Messages.NEWSR_LVMOFCOE_DESCRIPTION)
|
||||
{
|
||||
DeviceConfig["SCSIid"] = device.SCSIid;
|
||||
DeviceConfig["path"] = device.Path;
|
||||
}
|
||||
|
||||
public override SR.SRTypes SrType
|
||||
{
|
||||
get { return SR.SRTypes.lvmofcoe; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Gfs2HbaSrDescriptor : FibreChannelDescriptor
|
||||
{
|
||||
public Gfs2HbaSrDescriptor(FibreChannelDevice device)
|
||||
: base(device)
|
||||
: base(device, Messages.NEWSR_LVMOHBA_DESCRIPTION)
|
||||
{
|
||||
var jsonUri = new JavaScriptSerializer().Serialize(new
|
||||
{
|
||||
provider = "hba",
|
||||
ScsiId = device.SCSIid
|
||||
});
|
||||
DeviceConfig[SrProbeAction.URI] = jsonUri;
|
||||
Description = string.Format(Messages.NEWSR_LVMOHBA_DESCRIPTION, device.Vendor, device.Serial);
|
||||
DeviceConfig["provider"] = "hba";
|
||||
DeviceConfig["ScsiId"] = device.SCSIid;
|
||||
}
|
||||
|
||||
public override SR.SRTypes SrType
|
||||
{
|
||||
get { return SR.SRTypes.gfs2; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Gfs2FcoeSrDescriptor : FcoeSrDescriptor
|
||||
public class Gfs2FcoeSrDescriptor : FibreChannelDescriptor
|
||||
{
|
||||
public Gfs2FcoeSrDescriptor(FibreChannelDevice device)
|
||||
: base(device)
|
||||
: base(device, Messages.NEWSR_LVMOFCOE_DESCRIPTION)
|
||||
{
|
||||
var jsonUri = new JavaScriptSerializer().Serialize(new
|
||||
{
|
||||
provider = "fcoe",
|
||||
ScsiId = device.SCSIid
|
||||
});
|
||||
DeviceConfig[SrProbeAction.URI] = jsonUri;
|
||||
Description = string.Format(Messages.NEWSR_LVMOFCOE_DESCRIPTION, device.Vendor, device.Serial);
|
||||
DeviceConfig["provider"] = "fcoe";
|
||||
DeviceConfig["ScsiId"] = device.SCSIid;
|
||||
DeviceConfig["path"] = device.Path;
|
||||
}
|
||||
|
||||
public override SR.SRTypes SrType
|
||||
{
|
||||
get { return SR.SRTypes.gfs2; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -862,7 +862,6 @@
|
||||
<Compile Include="Wizards\NewSRWizard_Pages\Frontends\CIFS_ISO.Designer.cs">
|
||||
<DependentUpon>CIFS_ISO.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Wizards\NewSRWizard_Pages\FibreChannelProbeParsing.cs" />
|
||||
<Compile Include="Wizards\NewSRWizard_Pages\Frontends\EqualLogic.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
@ -1516,7 +1515,6 @@
|
||||
<Compile Include="Wizards\NewSRWizard.Designer.cs">
|
||||
<DependentUpon>NewSRWizard.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Wizards\NewSRWizard_Pages\FibreChannelDevice.cs" />
|
||||
<Compile Include="Wizards\NewSRWizard_Pages\Frontends\LVMoHBA.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -33,9 +33,10 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using NUnit.Framework;
|
||||
using XenAdmin.Actions;
|
||||
using XenAdmin.Dialogs;
|
||||
using XenAdmin.Network;
|
||||
using XenAdmin.Wizards.NewVMWizard;
|
||||
using XenAPI;
|
||||
|
||||
namespace XenAdminTests.DialogTests.state1_xml.DialogsForConnection
|
||||
{
|
||||
@ -113,7 +114,7 @@ namespace XenAdminTests.DialogTests.state1_xml.DialogsForConnection
|
||||
protected override IscsiChoicesDialog NewDialog()
|
||||
{
|
||||
XenAPI.SR.SRInfo srinfo = new XenAPI.SR.SRInfo("1234-5678-9012-3456", 200000000000);
|
||||
return new IscsiChoicesDialog(GetAnyConnection(), srinfo);
|
||||
return new IscsiChoicesDialog(GetAnyConnection(), srinfo, SR.SRTypes.lvmoiscsi, SR.SRTypes.lvmoiscsi);
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,7 +123,7 @@ namespace XenAdminTests.DialogTests.state1_xml.DialogsForConnection
|
||||
{
|
||||
protected override IscsiChoicesDialog NewDialog()
|
||||
{
|
||||
XenAdmin.Wizards.NewSRWizard_Pages.FibreChannelDevice dev = new XenAdmin.Wizards.NewSRWizard_Pages.FibreChannelDevice(
|
||||
var dev = new FibreChannelDevice(
|
||||
"1234-5678-9012-3456", "path", "vendor", 200000000000, null, "adapter", "1", "ID", "lun");
|
||||
return new IscsiChoicesDialog(GetAnyConnection(), dev);
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ namespace XenAdminTests.WizardTests.state1_xml.NewSRWizardTests
|
||||
public class NewSRWizardTest_iSCSI : WizardTest<NewSRWizard>
|
||||
{
|
||||
public NewSRWizardTest_iSCSI()
|
||||
: base(new string[] { "Type", "Name", "Provisioning", "Location" }, false, false) // can't finish because we haven't implemented probes of iSCSI LUNs etc.
|
||||
: base(new string[] { "Type", "Name", "Location" }, false, false) // can't finish because we haven't implemented probes of iSCSI LUNs etc.
|
||||
{ }
|
||||
|
||||
protected override NewSRWizard NewWizard()
|
||||
@ -125,7 +125,7 @@ namespace XenAdminTests.WizardTests.state1_xml.NewSRWizardTests
|
||||
public class NewSRWizardTest_HBA : WizardTest<NewSRWizard>
|
||||
{
|
||||
public NewSRWizardTest_HBA()
|
||||
: base(new string[] { "Type", "Name", "Provisioning", "Location" }, true, false)
|
||||
: base(new string[] { "Type", "Name", "Location" }, true, false)
|
||||
{ }
|
||||
|
||||
protected override NewSRWizard NewWizard()
|
||||
@ -149,7 +149,7 @@ namespace XenAdminTests.WizardTests.state1_xml.NewSRWizardTests
|
||||
public class NewSRWizardTest_HBANoSelection : WizardTest<NewSRWizard>
|
||||
{
|
||||
public NewSRWizardTest_HBANoSelection()
|
||||
: base(new string[] { "Type", "Name", "Provisioning", "Location" }, false, false)
|
||||
: base(new string[] { "Type", "Name", "Location" }, false, false)
|
||||
{ }
|
||||
|
||||
protected override NewSRWizard NewWizard()
|
||||
|
@ -34,7 +34,7 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using XenCenterLib;
|
||||
|
||||
namespace XenAdmin.Wizards.NewSRWizard_Pages
|
||||
namespace XenAdmin.Actions
|
||||
{
|
||||
public class FibreChannelDevice : IComparable<FibreChannelDevice>
|
||||
{
|
||||
@ -70,25 +70,30 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages
|
||||
this.pool_metadata_detected = false;
|
||||
}
|
||||
|
||||
public FibreChannelDevice(String serial, String path,
|
||||
String vendor, long size, String SCSIid, String adapter,
|
||||
String channel, String id, String lun,
|
||||
String name_label, String name_description, bool pool_metadata_detected,
|
||||
String eth)
|
||||
public FibreChannelDevice(Dictionary<string, string> dict)
|
||||
{
|
||||
this.Serial = serial;
|
||||
this.Path = path;
|
||||
this.Vendor = vendor;
|
||||
this.Size = size;
|
||||
this.SCSIid = SCSIid;
|
||||
this.adapter = adapter;
|
||||
this.channel = channel;
|
||||
this.id = id;
|
||||
this.lun = lun;
|
||||
this.name_label = name_label;
|
||||
this.name_description = name_description;
|
||||
this.pool_metadata_detected = pool_metadata_detected;
|
||||
this.eth = eth;
|
||||
Vendor = dict.ContainsKey("vendor") ? dict["vendor"] : "";
|
||||
Serial = dict.ContainsKey("serial") ? dict["serial"] : "";
|
||||
Path = dict.ContainsKey("path") ? dict["path"] : "";
|
||||
adapter = dict.ContainsKey("adapter") ? dict["adapter"] : "";
|
||||
channel = dict.ContainsKey("channel") ? dict["channel"] : "";
|
||||
id = dict.ContainsKey("id") ? dict["id"] : "";
|
||||
lun = dict.ContainsKey("lun") ? dict["lun"] : "";
|
||||
name_label = dict.ContainsKey("name_label") ? dict["name_label"] : "";
|
||||
name_description = dict.ContainsKey("name_description") ? dict["name_description"] : "";
|
||||
eth = dict.ContainsKey("eth") ? dict["eth"] : "";
|
||||
|
||||
SCSIid = dict.ContainsKey("scsiid")
|
||||
? dict["scsiid"]
|
||||
: dict.ContainsKey("ScsiId")
|
||||
? dict["ScsiId"] : "";
|
||||
|
||||
if (!dict.ContainsKey("size") || !TryParseSizeWithUnits(dict["size"], out Size))
|
||||
Size = 0;
|
||||
|
||||
if (!dict.ContainsKey("pool_metadata_detected") ||
|
||||
!bool.TryParse(dict["pool_metadata_detected"], out pool_metadata_detected))
|
||||
pool_metadata_detected = false;
|
||||
}
|
||||
|
||||
public int CompareTo(FibreChannelDevice other)
|
||||
@ -96,5 +101,46 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages
|
||||
long n = Size - other.Size;
|
||||
return n == 0 ? StringUtility.NaturalCompare(Serial, other.Serial) : (int)n;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sometimes, the XML that is returned contains units.
|
||||
/// (SR.probe XML earlier than Miami GA.
|
||||
/// </summary>
|
||||
private bool TryParseSizeWithUnits(string p, out long size)
|
||||
{
|
||||
if (long.TryParse(p, out size))
|
||||
return true;
|
||||
|
||||
p = p.ToLowerInvariant();
|
||||
|
||||
if (p.Contains("kb"))
|
||||
{
|
||||
if (!long.TryParse(p.Replace("kb", ""), out size))
|
||||
return false;
|
||||
|
||||
size *= Util.BINARY_KILO;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (p.Contains("mb"))
|
||||
{
|
||||
if (!long.TryParse(p.Replace("mb", ""), out size))
|
||||
return false;
|
||||
|
||||
size *= Util.BINARY_MEGA;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (p.Contains("gb"))
|
||||
{
|
||||
if (!long.TryParse(p.Replace("mb", ""), out size))
|
||||
return false;
|
||||
|
||||
size *= Util.BINARY_GIGA;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
@ -30,6 +30,8 @@
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using XenAPI;
|
||||
|
||||
|
||||
@ -37,37 +39,83 @@ namespace XenAdmin.Actions
|
||||
{
|
||||
public class FibreChannelProbeAction : PureAsyncAction
|
||||
{
|
||||
private readonly SR.SRTypes srType;
|
||||
|
||||
public FibreChannelProbeAction(Host master)
|
||||
public List<FibreChannelDevice> FibreChannelDevices;
|
||||
|
||||
public FibreChannelProbeAction(Host master, SR.SRTypes srType = SR.SRTypes.lvmohba)
|
||||
: base(master.Connection, string.Format(Messages.PROBING_HBA_TITLE, master.Name()), null, true)
|
||||
{
|
||||
Host = master;
|
||||
}
|
||||
|
||||
private SR.SRTypes srType = SR.SRTypes.lvmohba;
|
||||
|
||||
public FibreChannelProbeAction(Host master, SR.SRTypes srType)
|
||||
: this(master)
|
||||
{
|
||||
this.srType = srType;
|
||||
}
|
||||
|
||||
protected override void Run()
|
||||
{
|
||||
this.Description = Messages.PROBING_HBA;
|
||||
Description = Messages.PROBING_HBA;
|
||||
if (srType != SR.SRTypes.gfs2)
|
||||
{
|
||||
try
|
||||
{
|
||||
Result = SR.probe(Session, Host.opaque_ref, new Dictionary<string, string>(), srType.ToString(), new Dictionary<string, string>());
|
||||
}
|
||||
catch (Failure f)
|
||||
{
|
||||
if (f.ErrorDescription[0] == "SR_BACKEND_FAILURE_90"
|
||||
|| f.ErrorDescription[0] == "SR_BACKEND_FAILURE_107")
|
||||
Result = f.ErrorDescription[3];
|
||||
else
|
||||
throw;
|
||||
}
|
||||
|
||||
FibreChannelDevices = ProcessXml(Result);
|
||||
}
|
||||
else
|
||||
{
|
||||
var deviceConfig = new Dictionary<string, string>();
|
||||
deviceConfig["provider"] = "hba";
|
||||
var result = SR.probe_ext(Session, Host.opaque_ref, deviceConfig, srType.ToString(), new Dictionary<string, string>());
|
||||
|
||||
var list = new List<FibreChannelDevice>();
|
||||
foreach (var r in result)
|
||||
{
|
||||
var dict = new Dictionary<string, string>(r.configuration);
|
||||
r.extra_info.ToList().ForEach(kvp => dict.Add(kvp.Key, kvp.Value));
|
||||
list.Add(new FibreChannelDevice(dict));
|
||||
}
|
||||
FibreChannelDevices = list;
|
||||
}
|
||||
Description = Messages.PROBED_HBA;
|
||||
}
|
||||
|
||||
|
||||
private static List<FibreChannelDevice> ProcessXml(string p)
|
||||
{
|
||||
try
|
||||
{
|
||||
Result = XenAPI.SR.probe(Session, Host.opaque_ref, new Dictionary<string, string>(), srType.ToString(), new Dictionary<string, string>());
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.LoadXml(p);
|
||||
|
||||
var devices = new List<FibreChannelDevice>();
|
||||
|
||||
var blockDevices = doc.GetElementsByTagName("BlockDevice");
|
||||
|
||||
foreach (XmlNode device in blockDevices)
|
||||
{
|
||||
var properties = new Dictionary<string, string>();
|
||||
|
||||
foreach (XmlNode node in device.ChildNodes)
|
||||
properties.Add(node.Name.ToLowerInvariant(), node.InnerText.Trim());
|
||||
|
||||
devices.Add(new FibreChannelDevice(properties));
|
||||
}
|
||||
|
||||
return devices;
|
||||
}
|
||||
catch (XenAPI.Failure f)
|
||||
catch (XmlException e)
|
||||
{
|
||||
if (f.ErrorDescription[0] == "SR_BACKEND_FAILURE_90"
|
||||
|| f.ErrorDescription[0] == "SR_BACKEND_FAILURE_107")
|
||||
Result = f.ErrorDescription[3];
|
||||
else
|
||||
throw;
|
||||
throw new Failure(Messages.FIBRECHANNEL_XML_ERROR, e);
|
||||
}
|
||||
this.Description = Messages.PROBED_HBA;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -47,12 +47,12 @@ namespace XenAdmin.Actions
|
||||
/// </summary>
|
||||
public class ISCSIPopulateIQNsAction : AsyncAction
|
||||
{
|
||||
private readonly string targetHost;
|
||||
private readonly UInt16 targetPort;
|
||||
private readonly string chapUsername;
|
||||
private readonly string chapPassword;
|
||||
protected readonly string targetHost;
|
||||
protected readonly UInt16 targetPort;
|
||||
protected readonly string chapUsername;
|
||||
protected readonly string chapPassword;
|
||||
|
||||
private IScsiIqnInfo[] _iqns;
|
||||
protected IScsiIqnInfo[] _iqns;
|
||||
/// <summary>
|
||||
/// Will be null if the scan has not yet successfully returned.
|
||||
/// </summary>
|
||||
@ -119,25 +119,25 @@ namespace XenAdmin.Actions
|
||||
Dictionary<string, string> settings = new Dictionary<string, string>();
|
||||
settings["target"] = targetHost;
|
||||
settings["port"] = targetPort.ToString(CultureInfo.InvariantCulture);
|
||||
if (!string.IsNullOrEmpty(this.chapUsername))
|
||||
if (!string.IsNullOrEmpty(chapUsername))
|
||||
{
|
||||
settings["chapuser"] = this.chapUsername;
|
||||
settings["chappassword"] = this.chapPassword;
|
||||
settings["chapuser"] = chapUsername;
|
||||
settings["chappassword"] = chapPassword;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Perform a create with some missing params: should fail with the error
|
||||
// containing the list of SRs on the filer.
|
||||
RelatedTask = XenAPI.SR.async_create(Session, pool.master,
|
||||
RelatedTask = SR.async_create(Session, pool.master,
|
||||
settings, 0, Helpers.GuiTempObjectPrefix, Messages.ISCSI_SHOULD_NO_BE_CREATED,
|
||||
XenAPI.SR.SRTypes.lvmoiscsi.ToString(), "user", true, new Dictionary<string, string>());
|
||||
SR.SRTypes.lvmoiscsi.ToString(), "user", true, new Dictionary<string, string>());
|
||||
this.PollToCompletion();
|
||||
|
||||
// Create should always fail and never get here
|
||||
throw new InvalidOperationException(Messages.ISCSI_FAIL);
|
||||
}
|
||||
catch (XenAPI.Failure exn)
|
||||
catch (Failure exn)
|
||||
{
|
||||
if (exn.ErrorDescription.Count < 1)
|
||||
throw new BadServerResponse(targetHost);
|
||||
@ -156,7 +156,7 @@ namespace XenAdmin.Actions
|
||||
List<IScsiIqnInfo> results = new List<IScsiIqnInfo>();
|
||||
try
|
||||
{
|
||||
doc.LoadXml(exn.ErrorDescription[3].ToString());
|
||||
doc.LoadXml(exn.ErrorDescription[3]);
|
||||
foreach (XmlNode targetListNode in doc.GetElementsByTagName("iscsi-target-iqns"))
|
||||
{
|
||||
foreach (XmlNode targetNode in targetListNode.ChildNodes)
|
||||
@ -170,7 +170,7 @@ namespace XenAdmin.Actions
|
||||
{
|
||||
if (infoNode.Name.ToLowerInvariant() == "index")
|
||||
{
|
||||
index = int.Parse(infoNode.InnerText, System.Globalization.CultureInfo.InvariantCulture);
|
||||
index = int.Parse(infoNode.InnerText, CultureInfo.InvariantCulture);
|
||||
}
|
||||
else if (infoNode.Name.ToLowerInvariant() == "ipaddress")
|
||||
{
|
||||
@ -179,7 +179,7 @@ namespace XenAdmin.Actions
|
||||
}
|
||||
else if (infoNode.Name.ToLowerInvariant() == "port")
|
||||
{
|
||||
port = UInt16.Parse(infoNode.InnerText, System.Globalization.CultureInfo.InvariantCulture);
|
||||
port = UInt16.Parse(infoNode.InnerText, CultureInfo.InvariantCulture);
|
||||
}
|
||||
else if (infoNode.Name.ToLowerInvariant() == "targetiqn")
|
||||
{
|
||||
@ -203,6 +203,52 @@ namespace XenAdmin.Actions
|
||||
}
|
||||
}
|
||||
|
||||
public class Gfs2PopulateIQNsAction : ISCSIPopulateIQNsAction
|
||||
{
|
||||
public Gfs2PopulateIQNsAction(IXenConnection connection, string targetHost,
|
||||
UInt16 targetPort, string chapUsername, string chapPassword)
|
||||
: base(connection, targetHost, targetPort, chapUsername, chapPassword)
|
||||
{ }
|
||||
|
||||
protected override void Run()
|
||||
{
|
||||
Pool pool = Helpers.GetPoolOfOne(Connection);
|
||||
if (pool == null)
|
||||
throw new Failure(Failure.INTERNAL_ERROR, Messages.POOL_GONE);
|
||||
var deviceConfig = new Dictionary<string, string>();
|
||||
deviceConfig["provider"] = "iscsi";
|
||||
deviceConfig["ips"] = targetHost;
|
||||
deviceConfig["port"] = targetPort.ToString(CultureInfo.InvariantCulture);
|
||||
if (!string.IsNullOrEmpty(chapUsername))
|
||||
{
|
||||
deviceConfig["chapuser"] = chapUsername;
|
||||
deviceConfig["chappassword"] = chapPassword;
|
||||
}
|
||||
|
||||
var probeResults = SR.probe_ext(Session, pool.master.opaque_ref,
|
||||
deviceConfig, SR.SRTypes.gfs2.ToString(), new Dictionary<string, string>());
|
||||
|
||||
var results = new List<IScsiIqnInfo>();
|
||||
var index = -1;
|
||||
foreach (var probeResult in probeResults)
|
||||
{
|
||||
index++;
|
||||
var address = probeResult.configuration.ContainsKey("ips") ? probeResult.configuration["ips"] : "";
|
||||
UInt16 port;
|
||||
if (!probeResult.configuration.ContainsKey("port") || !UInt16.TryParse(probeResult.configuration["port"], out port))
|
||||
port = Util.DEFAULT_ISCSI_PORT;
|
||||
var targetIQN = probeResult.configuration.ContainsKey("iqns") ? probeResult.configuration["iqns"] : "";
|
||||
|
||||
results.Add(new IScsiIqnInfo(index, targetIQN, address, port));
|
||||
}
|
||||
results.Sort();
|
||||
_iqns = results.ToArray();
|
||||
|
||||
if (_iqns.Length < 1)
|
||||
throw new NoIQNsFoundException(targetHost);
|
||||
}
|
||||
}
|
||||
|
||||
public struct IScsiIqnInfo : IComparable<IScsiIqnInfo>, IEquatable<IScsiIqnInfo>
|
||||
{
|
||||
public readonly int Index;
|
||||
|
@ -31,8 +31,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Globalization;
|
||||
using System.Xml;
|
||||
|
||||
using XenAdmin.Core;
|
||||
@ -47,13 +46,13 @@ namespace XenAdmin.Actions
|
||||
/// </summary>
|
||||
public class ISCSIPopulateLunsAction : AsyncAction
|
||||
{
|
||||
private readonly string targetHost;
|
||||
private readonly UInt16 targetPort;
|
||||
private readonly string targetIQN;
|
||||
private readonly string chapUsername;
|
||||
private readonly string chapPassword;
|
||||
protected readonly string targetHost;
|
||||
protected readonly UInt16 targetPort;
|
||||
protected readonly string targetIQN;
|
||||
protected readonly string chapUsername;
|
||||
protected readonly string chapPassword;
|
||||
|
||||
private ISCSIInfo[] _luns;
|
||||
protected ISCSIInfo[] _luns;
|
||||
/// <summary>
|
||||
/// Will be null if the scan has not yet successfully returned.
|
||||
/// </summary>
|
||||
@ -98,11 +97,12 @@ namespace XenAdmin.Actions
|
||||
{
|
||||
Pool pool = Helpers.GetPoolOfOne(Connection);
|
||||
if (pool == null)
|
||||
throw new XenAPI.Failure(XenAPI.Failure.INTERNAL_ERROR, Messages.POOL_GONE);
|
||||
throw new Failure(Failure.INTERNAL_ERROR, Messages.POOL_GONE);
|
||||
|
||||
Dictionary<string, string> settings = new Dictionary<string, string>();
|
||||
|
||||
settings["target"] = targetHost;
|
||||
settings["port"] = targetPort.ToString(System.Globalization.CultureInfo.InvariantCulture);
|
||||
settings["port"] = targetPort.ToString(CultureInfo.InvariantCulture);
|
||||
settings["targetIQN"] = targetIQN;
|
||||
if (!string.IsNullOrEmpty(this.chapUsername))
|
||||
{
|
||||
@ -112,13 +112,13 @@ namespace XenAdmin.Actions
|
||||
|
||||
try
|
||||
{
|
||||
RelatedTask = XenAPI.SR.async_create(Session, pool.master, settings, 0,
|
||||
RelatedTask = SR.async_create(Session, pool.master, settings, 0,
|
||||
Helpers.GuiTempObjectPrefix, Messages.ISCSI_SHOULD_NO_BE_CREATED,
|
||||
XenAPI.SR.SRTypes.lvmoiscsi.ToString(), "user", true, new Dictionary<string, string>());
|
||||
SR.SRTypes.lvmoiscsi.ToString(), "user", true, new Dictionary<string, string>());
|
||||
this.PollToCompletion();
|
||||
throw new InvalidOperationException(Messages.ISCSI_FAIL);
|
||||
}
|
||||
catch (XenAPI.Failure exn)
|
||||
catch (Failure exn)
|
||||
{
|
||||
if (exn.ErrorDescription.Count < 1)
|
||||
throw new BadServerResponse(targetHost);
|
||||
@ -138,7 +138,7 @@ namespace XenAdmin.Actions
|
||||
{
|
||||
List<ISCSIInfo> results = new List<ISCSIInfo>();
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.LoadXml(exn.ErrorDescription[3].ToString());
|
||||
doc.LoadXml(exn.ErrorDescription[3]);
|
||||
foreach (XmlNode target_node in doc.GetElementsByTagName("iscsi-target"))
|
||||
{
|
||||
foreach (XmlNode lun_node in target_node.ChildNodes)
|
||||
@ -152,7 +152,7 @@ namespace XenAdmin.Actions
|
||||
{
|
||||
if (n.Name.ToLowerInvariant() == "lunid")
|
||||
{
|
||||
lunid = int.Parse(n.InnerText.Trim(), System.Globalization.CultureInfo.InvariantCulture);
|
||||
lunid = int.Parse(n.InnerText.Trim(), CultureInfo.InvariantCulture);
|
||||
}
|
||||
else if (n.Name.ToLowerInvariant() == "vendor")
|
||||
{
|
||||
@ -188,6 +188,56 @@ namespace XenAdmin.Actions
|
||||
}
|
||||
}
|
||||
|
||||
public class Gfs2PopulateLunsAction : ISCSIPopulateLunsAction
|
||||
{
|
||||
public Gfs2PopulateLunsAction(IXenConnection connection, string targetHost,
|
||||
UInt16 targetPort, string targetIQN, string chapUsername, string chapPassword)
|
||||
: base(connection, targetHost, targetPort, targetIQN, chapUsername, chapPassword)
|
||||
{ }
|
||||
|
||||
protected override void Run()
|
||||
{
|
||||
Pool pool = Helpers.GetPoolOfOne(Connection);
|
||||
if (pool == null)
|
||||
throw new Failure(Failure.INTERNAL_ERROR, Messages.POOL_GONE);
|
||||
|
||||
var deviceConfig = new Dictionary<string, string>();
|
||||
deviceConfig["provider"] = "iscsi";
|
||||
deviceConfig["ips"] = targetHost;
|
||||
deviceConfig["port"] = targetPort.ToString(CultureInfo.InvariantCulture);
|
||||
deviceConfig["iqns"] = targetIQN;
|
||||
if (!string.IsNullOrEmpty(chapUsername))
|
||||
{
|
||||
deviceConfig["chapuser"] = chapUsername;
|
||||
deviceConfig["chappassword"] = chapPassword;
|
||||
}
|
||||
|
||||
var probeResults = SR.probe_ext(Session, pool.master.opaque_ref,
|
||||
deviceConfig, SR.SRTypes.gfs2.ToString().ToLowerInvariant(), new Dictionary<string, string>());
|
||||
|
||||
var results = new List<ISCSIInfo>();
|
||||
foreach (var probeResult in probeResults)
|
||||
{
|
||||
int lunid;
|
||||
if (!probeResult.extra_info.ContainsKey("LUNid") || !int.TryParse(probeResult.extra_info["LUNid"], out lunid))
|
||||
lunid = -1;
|
||||
var vendor = probeResult.extra_info.ContainsKey("vendor") ? probeResult.extra_info["vendor"] : "";
|
||||
var serial = probeResult.extra_info.ContainsKey("serial") ? probeResult.extra_info["serial"] : "";
|
||||
long size;
|
||||
if (!probeResult.extra_info.ContainsKey("size") || !long.TryParse(probeResult.extra_info["size"], out size))
|
||||
size = -1;
|
||||
var scsiid = probeResult.configuration.ContainsKey("ScsiId") ? probeResult.configuration["ScsiId"] : "";
|
||||
|
||||
results.Add(new ISCSIInfo(scsiid, lunid, vendor, serial, size));
|
||||
}
|
||||
results.Sort();
|
||||
_luns = results.ToArray();
|
||||
|
||||
if (_luns.Length < 1)
|
||||
throw new NoLUNsFoundException(targetHost);
|
||||
}
|
||||
}
|
||||
|
||||
public struct ISCSIInfo : IComparable<ISCSIInfo>
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -41,61 +41,68 @@ namespace XenAdmin.Actions
|
||||
public class SrProbeAction : PureAsyncAction
|
||||
{
|
||||
private readonly Host host;
|
||||
private readonly SR.SRTypes srType;
|
||||
public readonly SR.SRTypes SrType;
|
||||
private readonly Dictionary<String, String> dconf;
|
||||
public const String DEVICE = "device";
|
||||
public const String SCSIid = "SCSIid";
|
||||
public const String PATH = "path";
|
||||
public const String URI = "uri";
|
||||
|
||||
public List<Probe_result> ProbeExtResult;
|
||||
|
||||
private readonly Dictionary<String, String> smconf;
|
||||
|
||||
/// <summary>
|
||||
/// Won't appear in the program history (SuppressHistory == true).
|
||||
/// </summary>
|
||||
/// <param name="masterUuid">The UUID of the host from which to perform the probe (usually the pool master).</param>
|
||||
/// <param name="srType">netapp or iscsi</param>
|
||||
public SrProbeAction(IXenConnection connection, Host host, SR.SRTypes srType, Dictionary<String, String> dconf)
|
||||
public SrProbeAction(IXenConnection connection, Host host, SR.SRTypes srType,
|
||||
Dictionary<String, String> dconf, Dictionary<String, String> smconf)
|
||||
: base(connection, string.Format(Messages.ACTION_SCANNING_SR_FROM, Helpers.GetName(connection)), null, true)
|
||||
{
|
||||
this.host = host;
|
||||
this.srType = srType;
|
||||
this.SrType = srType;
|
||||
this.dconf = dconf;
|
||||
|
||||
switch (srType) {
|
||||
case XenAPI.SR.SRTypes.nfs:
|
||||
Description = string.Format(Messages.ACTION_SR_SCANNING,
|
||||
XenAPI.SR.getFriendlyTypeName(srType), dconf["server"]);
|
||||
string target;
|
||||
switch (srType)
|
||||
{
|
||||
case SR.SRTypes.nfs:
|
||||
target = dconf["server"];
|
||||
break;
|
||||
case XenAPI.SR.SRTypes.lvmoiscsi:
|
||||
Description = string.Format(Messages.ACTION_SR_SCANNING,
|
||||
XenAPI.SR.getFriendlyTypeName(srType), dconf["target"]);
|
||||
case SR.SRTypes.lvmoiscsi:
|
||||
target = dconf["target"];
|
||||
break;
|
||||
case XenAPI.SR.SRTypes.lvmohba:
|
||||
case XenAPI.SR.SRTypes.lvmofcoe:
|
||||
String device = dconf.ContainsKey(DEVICE) ?
|
||||
dconf[DEVICE] : dconf[SCSIid];
|
||||
Description = string.Format(Messages.ACTION_SR_SCANNING,
|
||||
XenAPI.SR.getFriendlyTypeName(srType), device);
|
||||
case SR.SRTypes.lvmohba:
|
||||
case SR.SRTypes.lvmofcoe:
|
||||
target = dconf.ContainsKey("device") ? dconf["device"] : dconf["SCSIid"];
|
||||
break;
|
||||
case SR.SRTypes.gfs2:
|
||||
target = dconf.ContainsKey("ips") ? dconf["ips"] : dconf["ScsiId"];
|
||||
break;
|
||||
default:
|
||||
Description = string.Format(Messages.ACTION_SR_SCANNING,
|
||||
XenAPI.SR.getFriendlyTypeName(srType), Messages.REPAIRSR_SERVER); // this is a bit minging: CA-22111
|
||||
target = Messages.REPAIRSR_SERVER;
|
||||
break;
|
||||
}
|
||||
smconf = new Dictionary<string, string>();
|
||||
|
||||
Description = string.Format(Messages.ACTION_SR_SCANNING, SR.getFriendlyTypeName(srType), target);
|
||||
|
||||
this.smconf = smconf;
|
||||
}
|
||||
|
||||
public SrProbeAction(IXenConnection connection, Host host, SR.SRTypes srType, Dictionary<String, String> dconf, Dictionary<String, String> smconf)
|
||||
: this(connection, host, srType, dconf)
|
||||
public SrProbeAction(IXenConnection connection, Host host, SR.SRTypes srType, Dictionary<String, String> dconf)
|
||||
: this(connection, host, srType, dconf, new Dictionary<string, string>())
|
||||
{
|
||||
this.smconf = smconf;
|
||||
}
|
||||
|
||||
protected override void Run()
|
||||
{
|
||||
RelatedTask = XenAPI.SR.async_probe(this.Session, host.opaque_ref,
|
||||
dconf, srType.ToString().ToLowerInvariant(), smconf);
|
||||
PollToCompletion();
|
||||
if (SrType != SR.SRTypes.gfs2)
|
||||
{
|
||||
RelatedTask = SR.async_probe(this.Session, host.opaque_ref,
|
||||
dconf, SrType.ToString().ToLowerInvariant(), smconf);
|
||||
PollToCompletion();
|
||||
}
|
||||
else
|
||||
{
|
||||
ProbeExtResult = SR.probe_ext(this.Session, host.opaque_ref,
|
||||
dconf, SrType.ToString().ToLowerInvariant(), smconf);
|
||||
}
|
||||
Description = Messages.ACTION_SR_SCAN_SUCCESSFUL;
|
||||
}
|
||||
}
|
||||
|
51
XenModel/Messages.Designer.cs
generated
51
XenModel/Messages.Designer.cs
generated
@ -14664,6 +14664,17 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to An existing {0} SR was found on the selected LUN. Click Reattach to use the existing SR, or click Format to destroy any data present on the disk and create a new {1} SR.
|
||||
///
|
||||
///Warning: to prevent data loss you must ensure that the LUN is not in use by any other system, including [XenServer] hosts that are not connected to [XenCenter]..
|
||||
/// </summary>
|
||||
public static string EXISTING_SR_FOUND_ON_LUN {
|
||||
get {
|
||||
return ResourceManager.GetString("EXISTING_SR_FOUND_ON_LUN", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Exit &Maintenance Mode.
|
||||
/// </summary>
|
||||
@ -15296,7 +15307,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The scan failed. Please try again..
|
||||
/// Looks up a localized string similar to The scan failed..
|
||||
/// </summary>
|
||||
public static string FIBRECHANNEL_XML_ERROR {
|
||||
get {
|
||||
@ -20662,7 +20673,16 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to An existing SR was found on the selected LUN.
|
||||
/// Looks up a localized string similar to Destroy any data present on the disk and create a new {0} SR.
|
||||
/// </summary>
|
||||
public static string LVMOHBA_WARNING_DIALOG_FORMAT_INFO {
|
||||
get {
|
||||
return ResourceManager.GetString("LVMOHBA_WARNING_DIALOG_FORMAT_INFO", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to An existing {0} SR was found on the selected LUN.
|
||||
/// </summary>
|
||||
public static string LVMOHBA_WARNING_DIALOG_HEADER_FOUND_EXISTING_SR {
|
||||
get {
|
||||
@ -20691,6 +20711,15 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use the existing {0} SR.
|
||||
/// </summary>
|
||||
public static string LVMOHBA_WARNING_DIALOG_REATTACH_INFO {
|
||||
get {
|
||||
return ResourceManager.GetString("LVMOHBA_WARNING_DIALOG_REATTACH_INFO", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to There is no existing SR to reattach.
|
||||
/// </summary>
|
||||
@ -24469,6 +24498,24 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The LUN {0} is already in use as SR {1} on your pool. Please select another LUN..
|
||||
/// </summary>
|
||||
public static string NEWSR_LUN_IN_USE_ON_SELECTED_POOL {
|
||||
get {
|
||||
return ResourceManager.GetString("NEWSR_LUN_IN_USE_ON_SELECTED_POOL", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The LUN {0} is already in use as SR {1} on your server. Please select another LUN..
|
||||
/// </summary>
|
||||
public static string NEWSR_LUN_IN_USE_ON_SELECTED_SERVER {
|
||||
get {
|
||||
return ResourceManager.GetString("NEWSR_LUN_IN_USE_ON_SELECTED_SERVER", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This LUN is already in use as SR {0} on server {1}..
|
||||
/// </summary>
|
||||
|
@ -5159,6 +5159,11 @@ Would you like to eject these ISOs before continuing?</value>
|
||||
<data name="EXCEPTION_USER_CANCELLED_MASTER" xml:space="preserve">
|
||||
<value>User canceled. Master needs to be upgraded first.</value>
|
||||
</data>
|
||||
<data name="EXISTING_SR_FOUND_ON_LUN" xml:space="preserve">
|
||||
<value>An existing {0} SR was found on the selected LUN. Click Reattach to use the existing SR, or click Format to destroy any data present on the disk and create a new {1} SR.
|
||||
|
||||
Warning: to prevent data loss you must ensure that the LUN is not in use by any other system, including [XenServer] hosts that are not connected to [XenCenter].</value>
|
||||
</data>
|
||||
<data name="EXIT_MAINTENANCE_MODE" xml:space="preserve">
|
||||
<value>Exit &Maintenance Mode</value>
|
||||
</data>
|
||||
@ -5371,7 +5376,7 @@ Would you like to eject these ISOs before continuing?</value>
|
||||
<value>No LUNs were found. Please verify your hardware configuration.</value>
|
||||
</data>
|
||||
<data name="FIBRECHANNEL_XML_ERROR" xml:space="preserve">
|
||||
<value>The scan failed. Please try again.</value>
|
||||
<value>The scan failed.</value>
|
||||
</data>
|
||||
<data name="FIELD_DISABLED" xml:space="preserve">
|
||||
<value>This feature is disabled due to license restrictions on the server.</value>
|
||||
@ -7192,8 +7197,11 @@ Standard features only</value>
|
||||
<data name="LUNPERVDI_PAGE_TITLE" xml:space="preserve">
|
||||
<value>Map virtual disks (VDIs) to individual LUNs on the target SR</value>
|
||||
</data>
|
||||
<data name="LVMOHBA_WARNING_DIALOG_FORMAT_INFO" xml:space="preserve">
|
||||
<value>Destroy any data present on the disk and create a new {0} SR</value>
|
||||
</data>
|
||||
<data name="LVMOHBA_WARNING_DIALOG_HEADER_FOUND_EXISTING_SR" xml:space="preserve">
|
||||
<value>An existing SR was found on the selected LUN</value>
|
||||
<value>An existing {0} SR was found on the selected LUN</value>
|
||||
</data>
|
||||
<data name="LVMOHBA_WARNING_DIALOG_HEADER_NO_EXISTING_SRS" xml:space="preserve">
|
||||
<value>No existing SRs were found on the selected LUN</value>
|
||||
@ -7204,6 +7212,9 @@ Serial Number: {1}
|
||||
SCSI ID: {2}
|
||||
Size: {3}</value>
|
||||
</data>
|
||||
<data name="LVMOHBA_WARNING_DIALOG_REATTACH_INFO" xml:space="preserve">
|
||||
<value>Use the existing {0} SR</value>
|
||||
</data>
|
||||
<data name="LVMOHBA_WARNING_DIALOG_REATTACH_LABEL_TEXT" xml:space="preserve">
|
||||
<value>There is no existing SR to reattach</value>
|
||||
</data>
|
||||
@ -8346,6 +8357,12 @@ Do you want to format the disk?</value>
|
||||
<data name="NEWSR_LUN_IN_USE_ON_POOL" xml:space="preserve">
|
||||
<value>This LUN is already in use as SR {0} on pool {1}.</value>
|
||||
</data>
|
||||
<data name="NEWSR_LUN_IN_USE_ON_SELECTED_POOL" xml:space="preserve">
|
||||
<value>The LUN {0} is already in use as SR {1} on your pool. Please select another LUN.</value>
|
||||
</data>
|
||||
<data name="NEWSR_LUN_IN_USE_ON_SELECTED_SERVER" xml:space="preserve">
|
||||
<value>The LUN {0} is already in use as SR {1} on your server. Please select another LUN.</value>
|
||||
</data>
|
||||
<data name="NEWSR_LUN_IN_USE_ON_SERVER" xml:space="preserve">
|
||||
<value>This LUN is already in use as SR {0} on server {1}.</value>
|
||||
</data>
|
||||
|
@ -52,6 +52,7 @@ namespace XenAdmin.Network
|
||||
private readonly ChangeableDictionary<XenRef<Cluster>, Cluster> _cluster = new ChangeableDictionary<XenRef<Cluster>, Cluster>();
|
||||
private readonly ChangeableDictionary<XenRef<Cluster_host>, Cluster_host> _cluster_host = new ChangeableDictionary<XenRef<Cluster_host>, Cluster_host>();
|
||||
private readonly ChangeableDictionary<XenRef<XenAPI.Console>, XenAPI.Console> _console = new ChangeableDictionary<XenRef<XenAPI.Console>, XenAPI.Console>();
|
||||
private readonly ChangeableDictionary<XenRef<Feature>, Feature> _feature = new ChangeableDictionary<XenRef<Feature>, Feature>();
|
||||
private readonly ChangeableDictionary<XenRef<Folder>, Folder> _folders = new ChangeableDictionary<XenRef<Folder>, Folder>();
|
||||
private readonly ChangeableDictionary<XenRef<DockerContainer>, DockerContainer> _dockerContainers = new ChangeableDictionary<XenRef<DockerContainer>, DockerContainer>();
|
||||
|
||||
@ -142,6 +143,11 @@ namespace XenAdmin.Network
|
||||
get { return contents(_cluster_host); }
|
||||
}
|
||||
|
||||
public Feature[] Features
|
||||
{
|
||||
get { return contents(_feature); }
|
||||
}
|
||||
|
||||
public Folder[] Folders
|
||||
{
|
||||
get { return contents(_folders); }
|
||||
|
@ -91,5 +91,6 @@ namespace XenAdmin.Network
|
||||
void CheckDockerContainersBatchChange();
|
||||
Cluster[] Clusters { get; }
|
||||
Cluster_host[] Cluster_hosts { get; }
|
||||
Feature[] Features { get; }
|
||||
}
|
||||
}
|
||||
|
@ -445,6 +445,21 @@ namespace XenAPI
|
||||
return BoolKeyPreferTrue(h.license_params, "restrict_corosync");
|
||||
}
|
||||
|
||||
public static bool CorosyncDisabled(Host h)
|
||||
{
|
||||
return RestrictCorosync(h) && FeatureDisabled(h, "corosync");
|
||||
}
|
||||
|
||||
public static bool FeatureDisabled(Host h, string featureName)
|
||||
{
|
||||
foreach (var feature in h.Connection.ResolveAll(h.features))
|
||||
{
|
||||
if (feature.name_label.Equals(featureName, StringComparison.OrdinalIgnoreCase))
|
||||
return !feature.enabled;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool HasPBDTo(SR sr)
|
||||
{
|
||||
foreach (XenRef<PBD> pbd in PBDs)
|
||||
|
@ -475,6 +475,23 @@ namespace XenAPI
|
||||
return sm != null && -1 != Array.IndexOf(sm.capabilities, "VDI_CREATE");
|
||||
}
|
||||
|
||||
public static List<SRInfo> ParseSRList(List<Probe_result> probeExtResult)
|
||||
{
|
||||
List<SRInfo> results = new List<SRInfo>();
|
||||
foreach (var probeResult in probeExtResult.Where(p => p.sr != null))
|
||||
{
|
||||
string uuid = probeResult.sr.uuid;
|
||||
long size = probeResult.sr.total_space;
|
||||
string aggr = "";
|
||||
string name_label = probeResult.sr.name_label;
|
||||
string name_description = probeResult.sr.name_description;
|
||||
bool pool_metadata_detected = false;
|
||||
|
||||
results.Add(new SRInfo(uuid, size, aggr, name_label, name_description, pool_metadata_detected));
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses an XML list of SRs (as returned by the SR.probe() call) into a list of SRInfos.
|
||||
/// </summary>
|
||||
|
@ -140,7 +140,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.auth_get_subject_identifier(session.opaque_ref, _subject_name);
|
||||
else
|
||||
return (string)session.proxy.auth_get_subject_identifier(session.opaque_ref, _subject_name ?? "").parse();
|
||||
return session.proxy.auth_get_subject_identifier(session.opaque_ref, _subject_name ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -93,13 +93,13 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Blob proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
size = proxy.size == null ? 0 : long.Parse((string)proxy.size);
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
size = proxy.size == null ? 0 : long.Parse(proxy.size);
|
||||
pubblic = (bool)proxy.pubblic;
|
||||
last_updated = proxy.last_updated;
|
||||
mime_type = proxy.mime_type == null ? null : (string)proxy.mime_type;
|
||||
mime_type = proxy.mime_type == null ? null : proxy.mime_type;
|
||||
}
|
||||
|
||||
public Proxy_Blob ToProxy()
|
||||
@ -249,7 +249,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.blob_get_uuid(session.opaque_ref, _blob);
|
||||
else
|
||||
return (string)session.proxy.blob_get_uuid(session.opaque_ref, _blob ?? "").parse();
|
||||
return session.proxy.blob_get_uuid(session.opaque_ref, _blob ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -263,7 +263,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.blob_get_name_label(session.opaque_ref, _blob);
|
||||
else
|
||||
return (string)session.proxy.blob_get_name_label(session.opaque_ref, _blob ?? "").parse();
|
||||
return session.proxy.blob_get_name_label(session.opaque_ref, _blob ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -277,7 +277,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.blob_get_name_description(session.opaque_ref, _blob);
|
||||
else
|
||||
return (string)session.proxy.blob_get_name_description(session.opaque_ref, _blob ?? "").parse();
|
||||
return session.proxy.blob_get_name_description(session.opaque_ref, _blob ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -291,7 +291,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.blob_get_size(session.opaque_ref, _blob);
|
||||
else
|
||||
return long.Parse((string)session.proxy.blob_get_size(session.opaque_ref, _blob ?? "").parse());
|
||||
return long.Parse(session.proxy.blob_get_size(session.opaque_ref, _blob ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -333,7 +333,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.blob_get_mime_type(session.opaque_ref, _blob);
|
||||
else
|
||||
return (string)session.proxy.blob_get_mime_type(session.opaque_ref, _blob ?? "").parse();
|
||||
return session.proxy.blob_get_mime_type(session.opaque_ref, _blob ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -96,14 +96,14 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Bond proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
master = proxy.master == null ? null : XenRef<PIF>.Create(proxy.master);
|
||||
slaves = proxy.slaves == null ? null : XenRef<PIF>.Create(proxy.slaves);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
primary_slave = proxy.primary_slave == null ? null : XenRef<PIF>.Create(proxy.primary_slave);
|
||||
mode = proxy.mode == null ? (bond_mode) 0 : (bond_mode)Helper.EnumParseDefault(typeof(bond_mode), (string)proxy.mode);
|
||||
properties = proxy.properties == null ? null : Maps.convert_from_proxy_string_string(proxy.properties);
|
||||
links_up = proxy.links_up == null ? 0 : long.Parse((string)proxy.links_up);
|
||||
links_up = proxy.links_up == null ? 0 : long.Parse(proxy.links_up);
|
||||
}
|
||||
|
||||
public Proxy_Bond ToProxy()
|
||||
@ -111,7 +111,7 @@ namespace XenAPI
|
||||
Proxy_Bond result_ = new Proxy_Bond();
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.master = master ?? "";
|
||||
result_.slaves = (slaves != null) ? Helper.RefListToStringArray(slaves) : new string[] {};
|
||||
result_.slaves = slaves == null ? new string[] {} : Helper.RefListToStringArray(slaves);
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.primary_slave = primary_slave ?? "";
|
||||
result_.mode = bond_mode_helper.ToString(mode);
|
||||
@ -239,7 +239,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.bond_get_uuid(session.opaque_ref, _bond);
|
||||
else
|
||||
return (string)session.proxy.bond_get_uuid(session.opaque_ref, _bond ?? "").parse();
|
||||
return session.proxy.bond_get_uuid(session.opaque_ref, _bond ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -337,7 +337,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.bond_get_links_up(session.opaque_ref, _bond);
|
||||
else
|
||||
return long.Parse((string)session.proxy.bond_get_links_up(session.opaque_ref, _bond ?? "").parse());
|
||||
return long.Parse(session.proxy.bond_get_links_up(session.opaque_ref, _bond ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -399,7 +399,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.bond_create(session.opaque_ref, _network, _members, _mac);
|
||||
else
|
||||
return XenRef<Bond>.Create(session.proxy.bond_create(session.opaque_ref, _network ?? "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] {}, _mac ?? "").parse());
|
||||
return XenRef<Bond>.Create(session.proxy.bond_create(session.opaque_ref, _network ?? "", _members == null ? new string[] {} : Helper.RefListToStringArray(_members), _mac ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -415,7 +415,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_bond_create(session.opaque_ref, _network, _members, _mac);
|
||||
else
|
||||
return XenRef<Task>.Create(session.proxy.async_bond_create(session.opaque_ref, _network ?? "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] {}, _mac ?? "").parse());
|
||||
return XenRef<Task>.Create(session.proxy.async_bond_create(session.opaque_ref, _network ?? "", _members == null ? new string[] {} : Helper.RefListToStringArray(_members), _mac ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -432,7 +432,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.bond_create(session.opaque_ref, _network, _members, _mac, _mode);
|
||||
else
|
||||
return XenRef<Bond>.Create(session.proxy.bond_create(session.opaque_ref, _network ?? "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] {}, _mac ?? "", bond_mode_helper.ToString(_mode)).parse());
|
||||
return XenRef<Bond>.Create(session.proxy.bond_create(session.opaque_ref, _network ?? "", _members == null ? new string[] {} : Helper.RefListToStringArray(_members), _mac ?? "", bond_mode_helper.ToString(_mode)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -449,7 +449,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_bond_create(session.opaque_ref, _network, _members, _mac, _mode);
|
||||
else
|
||||
return XenRef<Task>.Create(session.proxy.async_bond_create(session.opaque_ref, _network ?? "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] {}, _mac ?? "", bond_mode_helper.ToString(_mode)).parse());
|
||||
return XenRef<Task>.Create(session.proxy.async_bond_create(session.opaque_ref, _network ?? "", _members == null ? new string[] {} : Helper.RefListToStringArray(_members), _mac ?? "", bond_mode_helper.ToString(_mode)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -467,7 +467,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.bond_create(session.opaque_ref, _network, _members, _mac, _mode, _properties);
|
||||
else
|
||||
return XenRef<Bond>.Create(session.proxy.bond_create(session.opaque_ref, _network ?? "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] {}, _mac ?? "", bond_mode_helper.ToString(_mode), Maps.convert_to_proxy_string_string(_properties)).parse());
|
||||
return XenRef<Bond>.Create(session.proxy.bond_create(session.opaque_ref, _network ?? "", _members == null ? new string[] {} : Helper.RefListToStringArray(_members), _mac ?? "", bond_mode_helper.ToString(_mode), Maps.convert_to_proxy_string_string(_properties)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -485,7 +485,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_bond_create(session.opaque_ref, _network, _members, _mac, _mode, _properties);
|
||||
else
|
||||
return XenRef<Task>.Create(session.proxy.async_bond_create(session.opaque_ref, _network ?? "", (_members != null) ? Helper.RefListToStringArray(_members) : new string[] {}, _mac ?? "", bond_mode_helper.ToString(_mode), Maps.convert_to_proxy_string_string(_properties)).parse());
|
||||
return XenRef<Task>.Create(session.proxy.async_bond_create(session.opaque_ref, _network ?? "", _members == null ? new string[] {} : Helper.RefListToStringArray(_members), _mac ?? "", bond_mode_helper.ToString(_mode), Maps.convert_to_proxy_string_string(_properties)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -107,16 +107,16 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Cluster proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
cluster_hosts = proxy.cluster_hosts == null ? null : XenRef<Cluster_host>.Create(proxy.cluster_hosts);
|
||||
network = proxy.network == null ? null : XenRef<Network>.Create(proxy.network);
|
||||
cluster_token = proxy.cluster_token == null ? null : (string)proxy.cluster_token;
|
||||
cluster_stack = proxy.cluster_stack == null ? null : (string)proxy.cluster_stack;
|
||||
cluster_token = proxy.cluster_token == null ? null : proxy.cluster_token;
|
||||
cluster_stack = proxy.cluster_stack == null ? null : proxy.cluster_stack;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<cluster_operation>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_cluster_operation(proxy.current_operations);
|
||||
pool_auto_join = (bool)proxy.pool_auto_join;
|
||||
token_timeout = proxy.token_timeout == null ? 0 : long.Parse((string)proxy.token_timeout);
|
||||
token_timeout_coefficient = proxy.token_timeout_coefficient == null ? 0 : long.Parse((string)proxy.token_timeout_coefficient);
|
||||
token_timeout = proxy.token_timeout == null ? 0 : long.Parse(proxy.token_timeout);
|
||||
token_timeout_coefficient = proxy.token_timeout_coefficient == null ? 0 : long.Parse(proxy.token_timeout_coefficient);
|
||||
cluster_config = proxy.cluster_config == null ? null : Maps.convert_from_proxy_string_string(proxy.cluster_config);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
@ -125,11 +125,11 @@ namespace XenAPI
|
||||
{
|
||||
Proxy_Cluster result_ = new Proxy_Cluster();
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.cluster_hosts = (cluster_hosts != null) ? Helper.RefListToStringArray(cluster_hosts) : new string[] {};
|
||||
result_.cluster_hosts = cluster_hosts == null ? new string[] {} : Helper.RefListToStringArray(cluster_hosts);
|
||||
result_.network = network ?? "";
|
||||
result_.cluster_token = cluster_token ?? "";
|
||||
result_.cluster_stack = cluster_stack ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_cluster_operation(current_operations);
|
||||
result_.pool_auto_join = pool_auto_join;
|
||||
result_.token_timeout = token_timeout.ToString();
|
||||
@ -272,7 +272,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.cluster_get_uuid(session.opaque_ref, _cluster);
|
||||
else
|
||||
return (string)session.proxy.cluster_get_uuid(session.opaque_ref, _cluster ?? "").parse();
|
||||
return session.proxy.cluster_get_uuid(session.opaque_ref, _cluster ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -314,7 +314,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.cluster_get_cluster_token(session.opaque_ref, _cluster);
|
||||
else
|
||||
return (string)session.proxy.cluster_get_cluster_token(session.opaque_ref, _cluster ?? "").parse();
|
||||
return session.proxy.cluster_get_cluster_token(session.opaque_ref, _cluster ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -328,7 +328,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.cluster_get_cluster_stack(session.opaque_ref, _cluster);
|
||||
else
|
||||
return (string)session.proxy.cluster_get_cluster_stack(session.opaque_ref, _cluster ?? "").parse();
|
||||
return session.proxy.cluster_get_cluster_stack(session.opaque_ref, _cluster ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -382,7 +382,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.cluster_get_token_timeout(session.opaque_ref, _cluster);
|
||||
else
|
||||
return long.Parse((string)session.proxy.cluster_get_token_timeout(session.opaque_ref, _cluster ?? "").parse());
|
||||
return long.Parse(session.proxy.cluster_get_token_timeout(session.opaque_ref, _cluster ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -396,7 +396,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.cluster_get_token_timeout_coefficient(session.opaque_ref, _cluster);
|
||||
else
|
||||
return long.Parse((string)session.proxy.cluster_get_token_timeout_coefficient(session.opaque_ref, _cluster ?? "").parse());
|
||||
return long.Parse(session.proxy.cluster_get_token_timeout_coefficient(session.opaque_ref, _cluster ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -92,7 +92,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Cluster_host proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
cluster = proxy.cluster == null ? null : XenRef<Cluster>.Create(proxy.cluster);
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
enabled = (bool)proxy.enabled;
|
||||
@ -108,7 +108,7 @@ namespace XenAPI
|
||||
result_.cluster = cluster ?? "";
|
||||
result_.host = host ?? "";
|
||||
result_.enabled = enabled;
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_cluster_host_operation(current_operations);
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
return result_;
|
||||
@ -227,7 +227,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.cluster_host_get_uuid(session.opaque_ref, _cluster_host);
|
||||
else
|
||||
return (string)session.proxy.cluster_host_get_uuid(session.opaque_ref, _cluster_host ?? "").parse();
|
||||
return session.proxy.cluster_host_get_uuid(session.opaque_ref, _cluster_host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,9 +87,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Console proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
protocol = proxy.protocol == null ? (console_protocol) 0 : (console_protocol)Helper.EnumParseDefault(typeof(console_protocol), (string)proxy.protocol);
|
||||
location = proxy.location == null ? null : (string)proxy.location;
|
||||
location = proxy.location == null ? null : proxy.location;
|
||||
VM = proxy.VM == null ? null : XenRef<VM>.Create(proxy.VM);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
@ -271,7 +271,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.console_get_uuid(session.opaque_ref, _console);
|
||||
else
|
||||
return (string)session.proxy.console_get_uuid(session.opaque_ref, _console ?? "").parse();
|
||||
return session.proxy.console_get_uuid(session.opaque_ref, _console ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -299,7 +299,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.console_get_location(session.opaque_ref, _console);
|
||||
else
|
||||
return (string)session.proxy.console_get_location(session.opaque_ref, _console ?? "").parse();
|
||||
return session.proxy.console_get_location(session.opaque_ref, _console ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -84,7 +84,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Crashdump proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
VM = proxy.VM == null ? null : XenRef<VM>.Create(proxy.VM);
|
||||
VDI = proxy.VDI == null ? null : XenRef<VDI>.Create(proxy.VDI);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
@ -211,7 +211,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.crashdump_get_uuid(session.opaque_ref, _crashdump);
|
||||
else
|
||||
return (string)session.proxy.crashdump_get_uuid(session.opaque_ref, _crashdump ?? "").parse();
|
||||
return session.proxy.crashdump_get_uuid(session.opaque_ref, _crashdump ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -78,7 +78,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_DR_task proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
introduced_SRs = proxy.introduced_SRs == null ? null : XenRef<SR>.Create(proxy.introduced_SRs);
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ namespace XenAPI
|
||||
{
|
||||
Proxy_DR_task result_ = new Proxy_DR_task();
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.introduced_SRs = (introduced_SRs != null) ? Helper.RefListToStringArray(introduced_SRs) : new string[] {};
|
||||
result_.introduced_SRs = introduced_SRs == null ? new string[] {} : Helper.RefListToStringArray(introduced_SRs);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -186,7 +186,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.dr_task_get_uuid(session.opaque_ref, _dr_task);
|
||||
else
|
||||
return (string)session.proxy.dr_task_get_uuid(session.opaque_ref, _dr_task ?? "").parse();
|
||||
return session.proxy.dr_task_get_uuid(session.opaque_ref, _dr_task ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -96,11 +96,11 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Data_source proxy)
|
||||
{
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
enabled = (bool)proxy.enabled;
|
||||
standard = (bool)proxy.standard;
|
||||
units = proxy.units == null ? null : (string)proxy.units;
|
||||
units = proxy.units == null ? null : proxy.units;
|
||||
min = Convert.ToDouble(proxy.min);
|
||||
max = Convert.ToDouble(proxy.max);
|
||||
value = Convert.ToDouble(proxy.value);
|
||||
|
@ -93,12 +93,12 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Feature proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
enabled = (bool)proxy.enabled;
|
||||
experimental = (bool)proxy.experimental;
|
||||
version = proxy.version == null ? null : (string)proxy.version;
|
||||
version = proxy.version == null ? null : proxy.version;
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
}
|
||||
|
||||
@ -240,7 +240,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.feature_get_uuid(session.opaque_ref, _feature);
|
||||
else
|
||||
return (string)session.proxy.feature_get_uuid(session.opaque_ref, _feature ?? "").parse();
|
||||
return session.proxy.feature_get_uuid(session.opaque_ref, _feature ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -254,7 +254,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.feature_get_name_label(session.opaque_ref, _feature);
|
||||
else
|
||||
return (string)session.proxy.feature_get_name_label(session.opaque_ref, _feature ?? "").parse();
|
||||
return session.proxy.feature_get_name_label(session.opaque_ref, _feature ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -268,7 +268,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.feature_get_name_description(session.opaque_ref, _feature);
|
||||
else
|
||||
return (string)session.proxy.feature_get_name_description(session.opaque_ref, _feature ?? "").parse();
|
||||
return session.proxy.feature_get_name_description(session.opaque_ref, _feature ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -310,7 +310,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.feature_get_version(session.opaque_ref, _feature);
|
||||
else
|
||||
return (string)session.proxy.feature_get_version(session.opaque_ref, _feature ?? "").parse();
|
||||
return session.proxy.feature_get_version(session.opaque_ref, _feature ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -102,9 +102,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_GPU_group proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
PGPUs = proxy.PGPUs == null ? null : XenRef<PGPU>.Create(proxy.PGPUs);
|
||||
VGPUs = proxy.VGPUs == null ? null : XenRef<VGPU>.Create(proxy.VGPUs);
|
||||
GPU_types = proxy.GPU_types == null ? new string[] {} : (string [])proxy.GPU_types;
|
||||
@ -120,13 +120,13 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.PGPUs = (PGPUs != null) ? Helper.RefListToStringArray(PGPUs) : new string[] {};
|
||||
result_.VGPUs = (VGPUs != null) ? Helper.RefListToStringArray(VGPUs) : new string[] {};
|
||||
result_.PGPUs = PGPUs == null ? new string[] {} : Helper.RefListToStringArray(PGPUs);
|
||||
result_.VGPUs = VGPUs == null ? new string[] {} : Helper.RefListToStringArray(VGPUs);
|
||||
result_.GPU_types = GPU_types;
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.allocation_algorithm = allocation_algorithm_helper.ToString(allocation_algorithm);
|
||||
result_.supported_VGPU_types = (supported_VGPU_types != null) ? Helper.RefListToStringArray(supported_VGPU_types) : new string[] {};
|
||||
result_.enabled_VGPU_types = (enabled_VGPU_types != null) ? Helper.RefListToStringArray(enabled_VGPU_types) : new string[] {};
|
||||
result_.supported_VGPU_types = supported_VGPU_types == null ? new string[] {} : Helper.RefListToStringArray(supported_VGPU_types);
|
||||
result_.enabled_VGPU_types = enabled_VGPU_types == null ? new string[] {} : Helper.RefListToStringArray(enabled_VGPU_types);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -281,7 +281,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.gpu_group_get_uuid(session.opaque_ref, _gpu_group);
|
||||
else
|
||||
return (string)session.proxy.gpu_group_get_uuid(session.opaque_ref, _gpu_group ?? "").parse();
|
||||
return session.proxy.gpu_group_get_uuid(session.opaque_ref, _gpu_group ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -295,7 +295,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.gpu_group_get_name_label(session.opaque_ref, _gpu_group);
|
||||
else
|
||||
return (string)session.proxy.gpu_group_get_name_label(session.opaque_ref, _gpu_group ?? "").parse();
|
||||
return session.proxy.gpu_group_get_name_label(session.opaque_ref, _gpu_group ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -309,7 +309,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.gpu_group_get_name_description(session.opaque_ref, _gpu_group);
|
||||
else
|
||||
return (string)session.proxy.gpu_group_get_name_description(session.opaque_ref, _gpu_group ?? "").parse();
|
||||
return session.proxy.gpu_group_get_name_description(session.opaque_ref, _gpu_group ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -573,7 +573,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.gpu_group_get_remaining_capacity(session.opaque_ref, _gpu_group, _vgpu_type);
|
||||
else
|
||||
return long.Parse((string)session.proxy.gpu_group_get_remaining_capacity(session.opaque_ref, _gpu_group ?? "", _vgpu_type ?? "").parse());
|
||||
return long.Parse(session.proxy.gpu_group_get_remaining_capacity(session.opaque_ref, _gpu_group ?? "", _vgpu_type ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -246,22 +246,22 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Host proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
memory_overhead = proxy.memory_overhead == null ? 0 : long.Parse((string)proxy.memory_overhead);
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
memory_overhead = proxy.memory_overhead == null ? 0 : long.Parse(proxy.memory_overhead);
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<host_allowed_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_host_allowed_operations(proxy.current_operations);
|
||||
API_version_major = proxy.API_version_major == null ? 0 : long.Parse((string)proxy.API_version_major);
|
||||
API_version_minor = proxy.API_version_minor == null ? 0 : long.Parse((string)proxy.API_version_minor);
|
||||
API_version_vendor = proxy.API_version_vendor == null ? null : (string)proxy.API_version_vendor;
|
||||
API_version_major = proxy.API_version_major == null ? 0 : long.Parse(proxy.API_version_major);
|
||||
API_version_minor = proxy.API_version_minor == null ? 0 : long.Parse(proxy.API_version_minor);
|
||||
API_version_vendor = proxy.API_version_vendor == null ? null : proxy.API_version_vendor;
|
||||
API_version_vendor_implementation = proxy.API_version_vendor_implementation == null ? null : Maps.convert_from_proxy_string_string(proxy.API_version_vendor_implementation);
|
||||
enabled = (bool)proxy.enabled;
|
||||
software_version = proxy.software_version == null ? null : Maps.convert_from_proxy_string_string(proxy.software_version);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
capabilities = proxy.capabilities == null ? new string[] {} : (string [])proxy.capabilities;
|
||||
cpu_configuration = proxy.cpu_configuration == null ? null : Maps.convert_from_proxy_string_string(proxy.cpu_configuration);
|
||||
sched_policy = proxy.sched_policy == null ? null : (string)proxy.sched_policy;
|
||||
sched_policy = proxy.sched_policy == null ? null : proxy.sched_policy;
|
||||
supported_bootloaders = proxy.supported_bootloaders == null ? new string[] {} : (string [])proxy.supported_bootloaders;
|
||||
resident_VMs = proxy.resident_VMs == null ? null : XenRef<VM>.Create(proxy.resident_VMs);
|
||||
logging = proxy.logging == null ? null : Maps.convert_from_proxy_string_string(proxy.logging);
|
||||
@ -274,21 +274,21 @@ namespace XenAPI
|
||||
PBDs = proxy.PBDs == null ? null : XenRef<PBD>.Create(proxy.PBDs);
|
||||
host_CPUs = proxy.host_CPUs == null ? null : XenRef<Host_cpu>.Create(proxy.host_CPUs);
|
||||
cpu_info = proxy.cpu_info == null ? null : Maps.convert_from_proxy_string_string(proxy.cpu_info);
|
||||
hostname = proxy.hostname == null ? null : (string)proxy.hostname;
|
||||
address = proxy.address == null ? null : (string)proxy.address;
|
||||
hostname = proxy.hostname == null ? null : proxy.hostname;
|
||||
address = proxy.address == null ? null : proxy.address;
|
||||
metrics = proxy.metrics == null ? null : XenRef<Host_metrics>.Create(proxy.metrics);
|
||||
license_params = proxy.license_params == null ? null : Maps.convert_from_proxy_string_string(proxy.license_params);
|
||||
ha_statefiles = proxy.ha_statefiles == null ? new string[] {} : (string [])proxy.ha_statefiles;
|
||||
ha_network_peers = proxy.ha_network_peers == null ? new string[] {} : (string [])proxy.ha_network_peers;
|
||||
blobs = proxy.blobs == null ? null : Maps.convert_from_proxy_string_XenRefBlob(proxy.blobs);
|
||||
tags = proxy.tags == null ? new string[] {} : (string [])proxy.tags;
|
||||
external_auth_type = proxy.external_auth_type == null ? null : (string)proxy.external_auth_type;
|
||||
external_auth_service_name = proxy.external_auth_service_name == null ? null : (string)proxy.external_auth_service_name;
|
||||
external_auth_type = proxy.external_auth_type == null ? null : proxy.external_auth_type;
|
||||
external_auth_service_name = proxy.external_auth_service_name == null ? null : proxy.external_auth_service_name;
|
||||
external_auth_configuration = proxy.external_auth_configuration == null ? null : Maps.convert_from_proxy_string_string(proxy.external_auth_configuration);
|
||||
edition = proxy.edition == null ? null : (string)proxy.edition;
|
||||
edition = proxy.edition == null ? null : proxy.edition;
|
||||
license_server = proxy.license_server == null ? null : Maps.convert_from_proxy_string_string(proxy.license_server);
|
||||
bios_strings = proxy.bios_strings == null ? null : Maps.convert_from_proxy_string_string(proxy.bios_strings);
|
||||
power_on_mode = proxy.power_on_mode == null ? null : (string)proxy.power_on_mode;
|
||||
power_on_mode = proxy.power_on_mode == null ? null : proxy.power_on_mode;
|
||||
power_on_config = proxy.power_on_config == null ? null : Maps.convert_from_proxy_string_string(proxy.power_on_config);
|
||||
local_cache_sr = proxy.local_cache_sr == null ? null : XenRef<SR>.Create(proxy.local_cache_sr);
|
||||
chipset_info = proxy.chipset_info == null ? null : Maps.convert_from_proxy_string_string(proxy.chipset_info);
|
||||
@ -302,7 +302,7 @@ namespace XenAPI
|
||||
control_domain = proxy.control_domain == null ? null : XenRef<VM>.Create(proxy.control_domain);
|
||||
updates_requiring_reboot = proxy.updates_requiring_reboot == null ? null : XenRef<Pool_update>.Create(proxy.updates_requiring_reboot);
|
||||
features = proxy.features == null ? null : XenRef<Feature>.Create(proxy.features);
|
||||
iscsi_iqn = proxy.iscsi_iqn == null ? null : (string)proxy.iscsi_iqn;
|
||||
iscsi_iqn = proxy.iscsi_iqn == null ? null : proxy.iscsi_iqn;
|
||||
multipathing = (bool)proxy.multipathing;
|
||||
}
|
||||
|
||||
@ -313,7 +313,7 @@ namespace XenAPI
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.memory_overhead = memory_overhead.ToString();
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_host_allowed_operations(current_operations);
|
||||
result_.API_version_major = API_version_major.ToString();
|
||||
result_.API_version_minor = API_version_minor.ToString();
|
||||
@ -326,16 +326,16 @@ namespace XenAPI
|
||||
result_.cpu_configuration = Maps.convert_to_proxy_string_string(cpu_configuration);
|
||||
result_.sched_policy = sched_policy ?? "";
|
||||
result_.supported_bootloaders = supported_bootloaders;
|
||||
result_.resident_VMs = (resident_VMs != null) ? Helper.RefListToStringArray(resident_VMs) : new string[] {};
|
||||
result_.resident_VMs = resident_VMs == null ? new string[] {} : Helper.RefListToStringArray(resident_VMs);
|
||||
result_.logging = Maps.convert_to_proxy_string_string(logging);
|
||||
result_.PIFs = (PIFs != null) ? Helper.RefListToStringArray(PIFs) : new string[] {};
|
||||
result_.PIFs = PIFs == null ? new string[] {} : Helper.RefListToStringArray(PIFs);
|
||||
result_.suspend_image_sr = suspend_image_sr ?? "";
|
||||
result_.crash_dump_sr = crash_dump_sr ?? "";
|
||||
result_.crashdumps = (crashdumps != null) ? Helper.RefListToStringArray(crashdumps) : new string[] {};
|
||||
result_.patches = (patches != null) ? Helper.RefListToStringArray(patches) : new string[] {};
|
||||
result_.updates = (updates != null) ? Helper.RefListToStringArray(updates) : new string[] {};
|
||||
result_.PBDs = (PBDs != null) ? Helper.RefListToStringArray(PBDs) : new string[] {};
|
||||
result_.host_CPUs = (host_CPUs != null) ? Helper.RefListToStringArray(host_CPUs) : new string[] {};
|
||||
result_.crashdumps = crashdumps == null ? new string[] {} : Helper.RefListToStringArray(crashdumps);
|
||||
result_.patches = patches == null ? new string[] {} : Helper.RefListToStringArray(patches);
|
||||
result_.updates = updates == null ? new string[] {} : Helper.RefListToStringArray(updates);
|
||||
result_.PBDs = PBDs == null ? new string[] {} : Helper.RefListToStringArray(PBDs);
|
||||
result_.host_CPUs = host_CPUs == null ? new string[] {} : Helper.RefListToStringArray(host_CPUs);
|
||||
result_.cpu_info = Maps.convert_to_proxy_string_string(cpu_info);
|
||||
result_.hostname = hostname ?? "";
|
||||
result_.address = address ?? "";
|
||||
@ -355,16 +355,16 @@ namespace XenAPI
|
||||
result_.power_on_config = Maps.convert_to_proxy_string_string(power_on_config);
|
||||
result_.local_cache_sr = local_cache_sr ?? "";
|
||||
result_.chipset_info = Maps.convert_to_proxy_string_string(chipset_info);
|
||||
result_.PCIs = (PCIs != null) ? Helper.RefListToStringArray(PCIs) : new string[] {};
|
||||
result_.PGPUs = (PGPUs != null) ? Helper.RefListToStringArray(PGPUs) : new string[] {};
|
||||
result_.PUSBs = (PUSBs != null) ? Helper.RefListToStringArray(PUSBs) : new string[] {};
|
||||
result_.PCIs = PCIs == null ? new string[] {} : Helper.RefListToStringArray(PCIs);
|
||||
result_.PGPUs = PGPUs == null ? new string[] {} : Helper.RefListToStringArray(PGPUs);
|
||||
result_.PUSBs = PUSBs == null ? new string[] {} : Helper.RefListToStringArray(PUSBs);
|
||||
result_.ssl_legacy = ssl_legacy;
|
||||
result_.guest_VCPUs_params = Maps.convert_to_proxy_string_string(guest_VCPUs_params);
|
||||
result_.display = host_display_helper.ToString(display);
|
||||
result_.virtual_hardware_platform_versions = (virtual_hardware_platform_versions != null) ? Helper.LongArrayToStringArray(virtual_hardware_platform_versions) : new string[] {};
|
||||
result_.virtual_hardware_platform_versions = virtual_hardware_platform_versions == null ? new string[] {} : Helper.LongArrayToStringArray(virtual_hardware_platform_versions);
|
||||
result_.control_domain = control_domain ?? "";
|
||||
result_.updates_requiring_reboot = (updates_requiring_reboot != null) ? Helper.RefListToStringArray(updates_requiring_reboot) : new string[] {};
|
||||
result_.features = (features != null) ? Helper.RefListToStringArray(features) : new string[] {};
|
||||
result_.updates_requiring_reboot = updates_requiring_reboot == null ? new string[] {} : Helper.RefListToStringArray(updates_requiring_reboot);
|
||||
result_.features = features == null ? new string[] {} : Helper.RefListToStringArray(features);
|
||||
result_.iscsi_iqn = iscsi_iqn ?? "";
|
||||
result_.multipathing = multipathing;
|
||||
return result_;
|
||||
@ -711,7 +711,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_uuid(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_uuid(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_uuid(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -725,7 +725,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_name_label(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_name_label(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_name_label(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -739,7 +739,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_name_description(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_name_description(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_name_description(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -753,7 +753,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_memory_overhead(session.opaque_ref, _host);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_get_memory_overhead(session.opaque_ref, _host ?? "").parse());
|
||||
return long.Parse(session.proxy.host_get_memory_overhead(session.opaque_ref, _host ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -795,7 +795,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_api_version_major(session.opaque_ref, _host);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_get_api_version_major(session.opaque_ref, _host ?? "").parse());
|
||||
return long.Parse(session.proxy.host_get_api_version_major(session.opaque_ref, _host ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -809,7 +809,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_api_version_minor(session.opaque_ref, _host);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_get_api_version_minor(session.opaque_ref, _host ?? "").parse());
|
||||
return long.Parse(session.proxy.host_get_api_version_minor(session.opaque_ref, _host ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -823,7 +823,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_api_version_vendor(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_api_version_vendor(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_api_version_vendor(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -921,7 +921,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_sched_policy(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_sched_policy(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_sched_policy(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1105,7 +1105,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_hostname(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_hostname(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_hostname(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1119,7 +1119,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_address(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_address(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_address(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1217,7 +1217,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_external_auth_type(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_external_auth_type(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_external_auth_type(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1231,7 +1231,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_external_auth_service_name(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_external_auth_service_name(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_external_auth_service_name(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1259,7 +1259,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_edition(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_edition(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_edition(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1301,7 +1301,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_power_on_mode(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_power_on_mode(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_power_on_mode(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1497,7 +1497,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_iscsi_iqn(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_iscsi_iqn(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_iscsi_iqn(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1971,7 +1971,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_dmesg(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_dmesg(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_dmesg(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1999,7 +1999,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_dmesg_clear(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_dmesg_clear(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_dmesg_clear(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2027,7 +2027,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_log(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_log(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_log(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2574,7 +2574,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_system_status_capabilities(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_system_status_capabilities(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_system_status_capabilities(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2644,7 +2644,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_compute_free_memory(session.opaque_ref, _host);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_compute_free_memory(session.opaque_ref, _host ?? "").parse());
|
||||
return long.Parse(session.proxy.host_compute_free_memory(session.opaque_ref, _host ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2672,7 +2672,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_compute_memory_overhead(session.opaque_ref, _host);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_compute_memory_overhead(session.opaque_ref, _host ?? "").parse());
|
||||
return long.Parse(session.proxy.host_compute_memory_overhead(session.opaque_ref, _host ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2798,7 +2798,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_call_plugin(session.opaque_ref, _host, _plugin, _fn, _args);
|
||||
else
|
||||
return (string)session.proxy.host_call_plugin(session.opaque_ref, _host ?? "", _plugin ?? "", _fn ?? "", Maps.convert_to_proxy_string_string(_args)).parse();
|
||||
return session.proxy.host_call_plugin(session.opaque_ref, _host ?? "", _plugin ?? "", _fn ?? "", Maps.convert_to_proxy_string_string(_args)).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2860,7 +2860,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_call_extension(session.opaque_ref, _host, _call);
|
||||
else
|
||||
return (string)session.proxy.host_call_extension(session.opaque_ref, _host ?? "", _call ?? "").parse();
|
||||
return session.proxy.host_call_extension(session.opaque_ref, _host ?? "", _call ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2962,7 +2962,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_get_server_certificate(session.opaque_ref, _host);
|
||||
else
|
||||
return (string)session.proxy.host_get_server_certificate(session.opaque_ref, _host ?? "").parse();
|
||||
return session.proxy.host_get_server_certificate(session.opaque_ref, _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -111,17 +111,17 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Host_cpu proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
number = proxy.number == null ? 0 : long.Parse((string)proxy.number);
|
||||
vendor = proxy.vendor == null ? null : (string)proxy.vendor;
|
||||
speed = proxy.speed == null ? 0 : long.Parse((string)proxy.speed);
|
||||
modelname = proxy.modelname == null ? null : (string)proxy.modelname;
|
||||
family = proxy.family == null ? 0 : long.Parse((string)proxy.family);
|
||||
model = proxy.model == null ? 0 : long.Parse((string)proxy.model);
|
||||
stepping = proxy.stepping == null ? null : (string)proxy.stepping;
|
||||
flags = proxy.flags == null ? null : (string)proxy.flags;
|
||||
features = proxy.features == null ? null : (string)proxy.features;
|
||||
number = proxy.number == null ? 0 : long.Parse(proxy.number);
|
||||
vendor = proxy.vendor == null ? null : proxy.vendor;
|
||||
speed = proxy.speed == null ? 0 : long.Parse(proxy.speed);
|
||||
modelname = proxy.modelname == null ? null : proxy.modelname;
|
||||
family = proxy.family == null ? 0 : long.Parse(proxy.family);
|
||||
model = proxy.model == null ? 0 : long.Parse(proxy.model);
|
||||
stepping = proxy.stepping == null ? null : proxy.stepping;
|
||||
flags = proxy.flags == null ? null : proxy.flags;
|
||||
features = proxy.features == null ? null : proxy.features;
|
||||
utilisation = Convert.ToDouble(proxy.utilisation);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
@ -283,7 +283,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_uuid(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return (string)session.proxy.host_cpu_get_uuid(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
return session.proxy.host_cpu_get_uuid(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -311,7 +311,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_number(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_cpu_get_number(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
return long.Parse(session.proxy.host_cpu_get_number(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -325,7 +325,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_vendor(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return (string)session.proxy.host_cpu_get_vendor(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
return session.proxy.host_cpu_get_vendor(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -339,7 +339,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_speed(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_cpu_get_speed(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
return long.Parse(session.proxy.host_cpu_get_speed(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -353,7 +353,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_modelname(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return (string)session.proxy.host_cpu_get_modelname(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
return session.proxy.host_cpu_get_modelname(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -367,7 +367,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_family(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_cpu_get_family(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
return long.Parse(session.proxy.host_cpu_get_family(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -381,7 +381,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_model(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_cpu_get_model(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
return long.Parse(session.proxy.host_cpu_get_model(session.opaque_ref, _host_cpu ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -395,7 +395,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_stepping(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return (string)session.proxy.host_cpu_get_stepping(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
return session.proxy.host_cpu_get_stepping(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -409,7 +409,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_flags(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return (string)session.proxy.host_cpu_get_flags(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
return session.proxy.host_cpu_get_flags(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -423,7 +423,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_cpu_get_features(session.opaque_ref, _host_cpu);
|
||||
else
|
||||
return (string)session.proxy.host_cpu_get_features(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
return session.proxy.host_cpu_get_features(session.opaque_ref, _host_cpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,10 +87,10 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Host_crashdump proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
timestamp = proxy.timestamp;
|
||||
size = proxy.size == null ? 0 : long.Parse((string)proxy.size);
|
||||
size = proxy.size == null ? 0 : long.Parse(proxy.size);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_crashdump_get_uuid(session.opaque_ref, _host_crashdump);
|
||||
else
|
||||
return (string)session.proxy.host_crashdump_get_uuid(session.opaque_ref, _host_crashdump ?? "").parse();
|
||||
return session.proxy.host_crashdump_get_uuid(session.opaque_ref, _host_crashdump ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -257,7 +257,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_crashdump_get_size(session.opaque_ref, _host_crashdump);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_crashdump_get_size(session.opaque_ref, _host_crashdump ?? "").parse());
|
||||
return long.Parse(session.proxy.host_crashdump_get_size(session.opaque_ref, _host_crashdump ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -90,9 +90,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Host_metrics proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
memory_total = proxy.memory_total == null ? 0 : long.Parse((string)proxy.memory_total);
|
||||
memory_free = proxy.memory_free == null ? 0 : long.Parse((string)proxy.memory_free);
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
memory_total = proxy.memory_total == null ? 0 : long.Parse(proxy.memory_total);
|
||||
memory_free = proxy.memory_free == null ? 0 : long.Parse(proxy.memory_free);
|
||||
live = (bool)proxy.live;
|
||||
last_updated = proxy.last_updated;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
@ -223,7 +223,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_metrics_get_uuid(session.opaque_ref, _host_metrics);
|
||||
else
|
||||
return (string)session.proxy.host_metrics_get_uuid(session.opaque_ref, _host_metrics ?? "").parse();
|
||||
return session.proxy.host_metrics_get_uuid(session.opaque_ref, _host_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -237,7 +237,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_metrics_get_memory_total(session.opaque_ref, _host_metrics);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_metrics_get_memory_total(session.opaque_ref, _host_metrics ?? "").parse());
|
||||
return long.Parse(session.proxy.host_metrics_get_memory_total(session.opaque_ref, _host_metrics ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -253,7 +253,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_metrics_get_memory_free(session.opaque_ref, _host_metrics);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_metrics_get_memory_free(session.opaque_ref, _host_metrics ?? "").parse());
|
||||
return long.Parse(session.proxy.host_metrics_get_memory_free(session.opaque_ref, _host_metrics ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -102,14 +102,14 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Host_patch proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
version = proxy.version == null ? null : (string)proxy.version;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
version = proxy.version == null ? null : proxy.version;
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
applied = (bool)proxy.applied;
|
||||
timestamp_applied = proxy.timestamp_applied;
|
||||
size = proxy.size == null ? 0 : long.Parse((string)proxy.size);
|
||||
size = proxy.size == null ? 0 : long.Parse(proxy.size);
|
||||
pool_patch = proxy.pool_patch == null ? null : XenRef<Pool_patch>.Create(proxy.pool_patch);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
@ -275,7 +275,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_patch_get_uuid(session.opaque_ref, _host_patch);
|
||||
else
|
||||
return (string)session.proxy.host_patch_get_uuid(session.opaque_ref, _host_patch ?? "").parse();
|
||||
return session.proxy.host_patch_get_uuid(session.opaque_ref, _host_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -289,7 +289,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_patch_get_name_label(session.opaque_ref, _host_patch);
|
||||
else
|
||||
return (string)session.proxy.host_patch_get_name_label(session.opaque_ref, _host_patch ?? "").parse();
|
||||
return session.proxy.host_patch_get_name_label(session.opaque_ref, _host_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -303,7 +303,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_patch_get_name_description(session.opaque_ref, _host_patch);
|
||||
else
|
||||
return (string)session.proxy.host_patch_get_name_description(session.opaque_ref, _host_patch ?? "").parse();
|
||||
return session.proxy.host_patch_get_name_description(session.opaque_ref, _host_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -317,7 +317,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_patch_get_version(session.opaque_ref, _host_patch);
|
||||
else
|
||||
return (string)session.proxy.host_patch_get_version(session.opaque_ref, _host_patch ?? "").parse();
|
||||
return session.proxy.host_patch_get_version(session.opaque_ref, _host_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -373,7 +373,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_patch_get_size(session.opaque_ref, _host_patch);
|
||||
else
|
||||
return long.Parse((string)session.proxy.host_patch_get_size(session.opaque_ref, _host_patch ?? "").parse());
|
||||
return long.Parse(session.proxy.host_patch_get_size(session.opaque_ref, _host_patch ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -495,7 +495,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.host_patch_apply(session.opaque_ref, _host_patch);
|
||||
else
|
||||
return (string)session.proxy.host_patch_apply(session.opaque_ref, _host_patch ?? "").parse();
|
||||
return session.proxy.host_patch_apply(session.opaque_ref, _host_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -284,7 +284,8 @@ namespace XenAPI
|
||||
Formatting = Formatting.Indented,
|
||||
#endif
|
||||
Converters = converters,
|
||||
DateParseHandling = DateParseHandling.None
|
||||
DateParseHandling = DateParseHandling.None,
|
||||
NullValueHandling = NullValueHandling.Ignore
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -9602,6 +9602,20 @@ namespace XenAPI
|
||||
return Rpc<XenRef<Task>>("Async.SR.probe", new JArray(session, _host ?? "", _device_config == null ? new JObject() : JObject.FromObject(_device_config, serializer), _type ?? "", _sm_config == null ? new JObject() : JObject.FromObject(_sm_config, serializer)), serializer);
|
||||
}
|
||||
|
||||
public List<Probe_result> sr_probe_ext(string session, string _host, Dictionary<string, string> _device_config, string _type, Dictionary<string, string> _sm_config)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefConverter<Host>(), new StringStringMapConverter(), new StringStringMapConverter()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<List<Probe_result>>("SR.probe_ext", new JArray(session, _host ?? "", _device_config == null ? new JObject() : JObject.FromObject(_device_config, serializer), _type ?? "", _sm_config == null ? new JObject() : JObject.FromObject(_sm_config, serializer)), serializer);
|
||||
}
|
||||
|
||||
public XenRef<Task> async_sr_probe_ext(string session, string _host, Dictionary<string, string> _device_config, string _type, Dictionary<string, string> _sm_config)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefConverter<Task>(), new XenRefConverter<Host>(), new StringStringMapConverter(), new StringStringMapConverter()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<XenRef<Task>>("Async.SR.probe_ext", new JArray(session, _host ?? "", _device_config == null ? new JObject() : JObject.FromObject(_device_config, serializer), _type ?? "", _sm_config == null ? new JObject() : JObject.FromObject(_sm_config, serializer)), serializer);
|
||||
}
|
||||
|
||||
public void sr_set_shared(string session, string _sr, bool _value)
|
||||
{
|
||||
var converters = new List<JsonConverter> {};
|
||||
@ -9791,6 +9805,20 @@ namespace XenAPI
|
||||
return Rpc<Dictionary<XenRef<SR>, SR>>("SR.get_all_records", new JArray(session), serializer);
|
||||
}
|
||||
|
||||
public Dictionary<XenRef<Sr_stat>, Sr_stat> sr_stat_get_all_records(string session)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefXenObjectMapConverter<Sr_stat>()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<Dictionary<XenRef<Sr_stat>, Sr_stat>>("sr_stat.get_all_records", new JArray(session), serializer);
|
||||
}
|
||||
|
||||
public Dictionary<XenRef<Probe_result>, Probe_result> probe_result_get_all_records(string session)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefXenObjectMapConverter<Probe_result>()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<Dictionary<XenRef<Probe_result>, Probe_result>>("probe_result.get_all_records", new JArray(session), serializer);
|
||||
}
|
||||
|
||||
public LVHD lvhd_get_record(string session, string _lvhd)
|
||||
{
|
||||
var converters = new List<JsonConverter> {};
|
||||
|
@ -75,7 +75,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_LVHD proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
}
|
||||
|
||||
public Proxy_LVHD ToProxy()
|
||||
@ -178,7 +178,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.lvhd_get_uuid(session.opaque_ref, _lvhd);
|
||||
else
|
||||
return (string)session.proxy.lvhd_get_uuid(session.opaque_ref, _lvhd ?? "").parse();
|
||||
return session.proxy.lvhd_get_uuid(session.opaque_ref, _lvhd ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -195,7 +195,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.lvhd_enable_thin_provisioning(session.opaque_ref, _host, _sr, _initial_allocation, _allocation_quantum);
|
||||
else
|
||||
return (string)session.proxy.lvhd_enable_thin_provisioning(session.opaque_ref, _host ?? "", _sr ?? "", _initial_allocation.ToString(), _allocation_quantum.ToString()).parse();
|
||||
return session.proxy.lvhd_enable_thin_provisioning(session.opaque_ref, _host ?? "", _sr ?? "", _initial_allocation.ToString(), _allocation_quantum.ToString()).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -255,13 +255,13 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Message proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name = proxy.name == null ? null : (string)proxy.name;
|
||||
priority = proxy.priority == null ? 0 : long.Parse((string)proxy.priority);
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name = proxy.name == null ? null : proxy.name;
|
||||
priority = proxy.priority == null ? 0 : long.Parse(proxy.priority);
|
||||
cls = proxy.cls == null ? (cls) 0 : (cls)Helper.EnumParseDefault(typeof(cls), (string)proxy.cls);
|
||||
obj_uuid = proxy.obj_uuid == null ? null : (string)proxy.obj_uuid;
|
||||
obj_uuid = proxy.obj_uuid == null ? null : proxy.obj_uuid;
|
||||
timestamp = proxy.timestamp;
|
||||
body = proxy.body == null ? null : (string)proxy.body;
|
||||
body = proxy.body == null ? null : proxy.body;
|
||||
}
|
||||
|
||||
public Proxy_Message ToProxy()
|
||||
|
@ -120,16 +120,16 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Network proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<network_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_network_operations(proxy.current_operations);
|
||||
VIFs = proxy.VIFs == null ? null : XenRef<VIF>.Create(proxy.VIFs);
|
||||
PIFs = proxy.PIFs == null ? null : XenRef<PIF>.Create(proxy.PIFs);
|
||||
MTU = proxy.MTU == null ? 0 : long.Parse((string)proxy.MTU);
|
||||
MTU = proxy.MTU == null ? 0 : long.Parse(proxy.MTU);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
bridge = proxy.bridge == null ? null : (string)proxy.bridge;
|
||||
bridge = proxy.bridge == null ? null : proxy.bridge;
|
||||
managed = (bool)proxy.managed;
|
||||
blobs = proxy.blobs == null ? null : Maps.convert_from_proxy_string_XenRefBlob(proxy.blobs);
|
||||
tags = proxy.tags == null ? new string[] {} : (string [])proxy.tags;
|
||||
@ -144,10 +144,10 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_network_operations(current_operations);
|
||||
result_.VIFs = (VIFs != null) ? Helper.RefListToStringArray(VIFs) : new string[] {};
|
||||
result_.PIFs = (PIFs != null) ? Helper.RefListToStringArray(PIFs) : new string[] {};
|
||||
result_.VIFs = VIFs == null ? new string[] {} : Helper.RefListToStringArray(VIFs);
|
||||
result_.PIFs = PIFs == null ? new string[] {} : Helper.RefListToStringArray(PIFs);
|
||||
result_.MTU = MTU.ToString();
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.bridge = bridge ?? "";
|
||||
@ -156,7 +156,7 @@ namespace XenAPI
|
||||
result_.tags = tags;
|
||||
result_.default_locking_mode = network_default_locking_mode_helper.ToString(default_locking_mode);
|
||||
result_.assigned_ips = Maps.convert_to_proxy_XenRefVIF_string(assigned_ips);
|
||||
result_.purpose = (purpose != null) ? Helper.ObjectListToStringArray(purpose) : new string[] {};
|
||||
result_.purpose = purpose == null ? new string[] {} : Helper.ObjectListToStringArray(purpose);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -391,7 +391,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.network_get_uuid(session.opaque_ref, _network);
|
||||
else
|
||||
return (string)session.proxy.network_get_uuid(session.opaque_ref, _network ?? "").parse();
|
||||
return session.proxy.network_get_uuid(session.opaque_ref, _network ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -405,7 +405,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.network_get_name_label(session.opaque_ref, _network);
|
||||
else
|
||||
return (string)session.proxy.network_get_name_label(session.opaque_ref, _network ?? "").parse();
|
||||
return session.proxy.network_get_name_label(session.opaque_ref, _network ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -419,7 +419,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.network_get_name_description(session.opaque_ref, _network);
|
||||
else
|
||||
return (string)session.proxy.network_get_name_description(session.opaque_ref, _network ?? "").parse();
|
||||
return session.proxy.network_get_name_description(session.opaque_ref, _network ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -489,7 +489,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.network_get_mtu(session.opaque_ref, _network);
|
||||
else
|
||||
return long.Parse((string)session.proxy.network_get_mtu(session.opaque_ref, _network ?? "").parse());
|
||||
return long.Parse(session.proxy.network_get_mtu(session.opaque_ref, _network ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -517,7 +517,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.network_get_bridge(session.opaque_ref, _network);
|
||||
else
|
||||
return (string)session.proxy.network_get_bridge(session.opaque_ref, _network ?? "").parse();
|
||||
return session.proxy.network_get_bridge(session.opaque_ref, _network ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -90,7 +90,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PBD proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
SR = proxy.SR == null ? null : XenRef<SR>.Create(proxy.SR);
|
||||
device_config = proxy.device_config == null ? null : Maps.convert_from_proxy_string_string(proxy.device_config);
|
||||
@ -283,7 +283,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pbd_get_uuid(session.opaque_ref, _pbd);
|
||||
else
|
||||
return (string)session.proxy.pbd_get_uuid(session.opaque_ref, _pbd ?? "").parse();
|
||||
return session.proxy.pbd_get_uuid(session.opaque_ref, _pbd ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -105,17 +105,17 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PCI proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
class_name = proxy.class_name == null ? null : (string)proxy.class_name;
|
||||
vendor_name = proxy.vendor_name == null ? null : (string)proxy.vendor_name;
|
||||
device_name = proxy.device_name == null ? null : (string)proxy.device_name;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
class_name = proxy.class_name == null ? null : proxy.class_name;
|
||||
vendor_name = proxy.vendor_name == null ? null : proxy.vendor_name;
|
||||
device_name = proxy.device_name == null ? null : proxy.device_name;
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
pci_id = proxy.pci_id == null ? null : (string)proxy.pci_id;
|
||||
pci_id = proxy.pci_id == null ? null : proxy.pci_id;
|
||||
dependencies = proxy.dependencies == null ? null : XenRef<PCI>.Create(proxy.dependencies);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
subsystem_vendor_name = proxy.subsystem_vendor_name == null ? null : (string)proxy.subsystem_vendor_name;
|
||||
subsystem_device_name = proxy.subsystem_device_name == null ? null : (string)proxy.subsystem_device_name;
|
||||
driver_name = proxy.driver_name == null ? null : (string)proxy.driver_name;
|
||||
subsystem_vendor_name = proxy.subsystem_vendor_name == null ? null : proxy.subsystem_vendor_name;
|
||||
subsystem_device_name = proxy.subsystem_device_name == null ? null : proxy.subsystem_device_name;
|
||||
driver_name = proxy.driver_name == null ? null : proxy.driver_name;
|
||||
}
|
||||
|
||||
public Proxy_PCI ToProxy()
|
||||
@ -127,7 +127,7 @@ namespace XenAPI
|
||||
result_.device_name = device_name ?? "";
|
||||
result_.host = host ?? "";
|
||||
result_.pci_id = pci_id ?? "";
|
||||
result_.dependencies = (dependencies != null) ? Helper.RefListToStringArray(dependencies) : new string[] {};
|
||||
result_.dependencies = dependencies == null ? new string[] {} : Helper.RefListToStringArray(dependencies);
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.subsystem_vendor_name = subsystem_vendor_name ?? "";
|
||||
result_.subsystem_device_name = subsystem_device_name ?? "";
|
||||
@ -263,7 +263,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pci_get_uuid(session.opaque_ref, _pci);
|
||||
else
|
||||
return (string)session.proxy.pci_get_uuid(session.opaque_ref, _pci ?? "").parse();
|
||||
return session.proxy.pci_get_uuid(session.opaque_ref, _pci ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -277,7 +277,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pci_get_class_name(session.opaque_ref, _pci);
|
||||
else
|
||||
return (string)session.proxy.pci_get_class_name(session.opaque_ref, _pci ?? "").parse();
|
||||
return session.proxy.pci_get_class_name(session.opaque_ref, _pci ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -291,7 +291,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pci_get_vendor_name(session.opaque_ref, _pci);
|
||||
else
|
||||
return (string)session.proxy.pci_get_vendor_name(session.opaque_ref, _pci ?? "").parse();
|
||||
return session.proxy.pci_get_vendor_name(session.opaque_ref, _pci ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -305,7 +305,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pci_get_device_name(session.opaque_ref, _pci);
|
||||
else
|
||||
return (string)session.proxy.pci_get_device_name(session.opaque_ref, _pci ?? "").parse();
|
||||
return session.proxy.pci_get_device_name(session.opaque_ref, _pci ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -333,7 +333,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pci_get_pci_id(session.opaque_ref, _pci);
|
||||
else
|
||||
return (string)session.proxy.pci_get_pci_id(session.opaque_ref, _pci ?? "").parse();
|
||||
return session.proxy.pci_get_pci_id(session.opaque_ref, _pci ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -375,7 +375,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pci_get_subsystem_vendor_name(session.opaque_ref, _pci);
|
||||
else
|
||||
return (string)session.proxy.pci_get_subsystem_vendor_name(session.opaque_ref, _pci ?? "").parse();
|
||||
return session.proxy.pci_get_subsystem_vendor_name(session.opaque_ref, _pci ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -389,7 +389,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pci_get_subsystem_device_name(session.opaque_ref, _pci);
|
||||
else
|
||||
return (string)session.proxy.pci_get_subsystem_device_name(session.opaque_ref, _pci ?? "").parse();
|
||||
return session.proxy.pci_get_subsystem_device_name(session.opaque_ref, _pci ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -108,7 +108,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PGPU proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
PCI = proxy.PCI == null ? null : XenRef<PCI>.Create(proxy.PCI);
|
||||
GPU_group = proxy.GPU_group == null ? null : XenRef<GPU_group>.Create(proxy.GPU_group);
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
@ -130,9 +130,9 @@ namespace XenAPI
|
||||
result_.GPU_group = GPU_group ?? "";
|
||||
result_.host = host ?? "";
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.supported_VGPU_types = (supported_VGPU_types != null) ? Helper.RefListToStringArray(supported_VGPU_types) : new string[] {};
|
||||
result_.enabled_VGPU_types = (enabled_VGPU_types != null) ? Helper.RefListToStringArray(enabled_VGPU_types) : new string[] {};
|
||||
result_.resident_VGPUs = (resident_VGPUs != null) ? Helper.RefListToStringArray(resident_VGPUs) : new string[] {};
|
||||
result_.supported_VGPU_types = supported_VGPU_types == null ? new string[] {} : Helper.RefListToStringArray(supported_VGPU_types);
|
||||
result_.enabled_VGPU_types = enabled_VGPU_types == null ? new string[] {} : Helper.RefListToStringArray(enabled_VGPU_types);
|
||||
result_.resident_VGPUs = resident_VGPUs == null ? new string[] {} : Helper.RefListToStringArray(resident_VGPUs);
|
||||
result_.supported_VGPU_max_capacities = Maps.convert_to_proxy_XenRefVGPU_type_long(supported_VGPU_max_capacities);
|
||||
result_.dom0_access = pgpu_dom0_access_helper.ToString(dom0_access);
|
||||
result_.is_system_display_device = is_system_display_device;
|
||||
@ -275,7 +275,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pgpu_get_uuid(session.opaque_ref, _pgpu);
|
||||
else
|
||||
return (string)session.proxy.pgpu_get_uuid(session.opaque_ref, _pgpu ?? "").parse();
|
||||
return session.proxy.pgpu_get_uuid(session.opaque_ref, _pgpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -550,7 +550,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
session.JsonRpcClient.pgpu_set_enabled_vgpu_types(session.opaque_ref, _pgpu, _value);
|
||||
else
|
||||
session.proxy.pgpu_set_enabled_vgpu_types(session.opaque_ref, _pgpu ?? "", (_value != null) ? Helper.RefListToStringArray(_value) : new string[] {}).parse();
|
||||
session.proxy.pgpu_set_enabled_vgpu_types(session.opaque_ref, _pgpu ?? "", _value == null ? new string[] {} : Helper.RefListToStringArray(_value)).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -565,7 +565,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_pgpu_set_enabled_vgpu_types(session.opaque_ref, _pgpu, _value);
|
||||
else
|
||||
return XenRef<Task>.Create(session.proxy.async_pgpu_set_enabled_vgpu_types(session.opaque_ref, _pgpu ?? "", (_value != null) ? Helper.RefListToStringArray(_value) : new string[] {}).parse());
|
||||
return XenRef<Task>.Create(session.proxy.async_pgpu_set_enabled_vgpu_types(session.opaque_ref, _pgpu ?? "", _value == null ? new string[] {} : Helper.RefListToStringArray(_value)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -610,7 +610,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pgpu_get_remaining_capacity(session.opaque_ref, _pgpu, _vgpu_type);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pgpu_get_remaining_capacity(session.opaque_ref, _pgpu ?? "", _vgpu_type ?? "").parse());
|
||||
return long.Parse(session.proxy.pgpu_get_remaining_capacity(session.opaque_ref, _pgpu ?? "", _vgpu_type ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -177,21 +177,21 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PIF proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
device = proxy.device == null ? null : (string)proxy.device;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
device = proxy.device == null ? null : proxy.device;
|
||||
network = proxy.network == null ? null : XenRef<Network>.Create(proxy.network);
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
MAC = proxy.MAC == null ? null : (string)proxy.MAC;
|
||||
MTU = proxy.MTU == null ? 0 : long.Parse((string)proxy.MTU);
|
||||
VLAN = proxy.VLAN == null ? 0 : long.Parse((string)proxy.VLAN);
|
||||
MAC = proxy.MAC == null ? null : proxy.MAC;
|
||||
MTU = proxy.MTU == null ? 0 : long.Parse(proxy.MTU);
|
||||
VLAN = proxy.VLAN == null ? 0 : long.Parse(proxy.VLAN);
|
||||
metrics = proxy.metrics == null ? null : XenRef<PIF_metrics>.Create(proxy.metrics);
|
||||
physical = (bool)proxy.physical;
|
||||
currently_attached = (bool)proxy.currently_attached;
|
||||
ip_configuration_mode = proxy.ip_configuration_mode == null ? (ip_configuration_mode) 0 : (ip_configuration_mode)Helper.EnumParseDefault(typeof(ip_configuration_mode), (string)proxy.ip_configuration_mode);
|
||||
IP = proxy.IP == null ? null : (string)proxy.IP;
|
||||
netmask = proxy.netmask == null ? null : (string)proxy.netmask;
|
||||
gateway = proxy.gateway == null ? null : (string)proxy.gateway;
|
||||
DNS = proxy.DNS == null ? null : (string)proxy.DNS;
|
||||
IP = proxy.IP == null ? null : proxy.IP;
|
||||
netmask = proxy.netmask == null ? null : proxy.netmask;
|
||||
gateway = proxy.gateway == null ? null : proxy.gateway;
|
||||
DNS = proxy.DNS == null ? null : proxy.DNS;
|
||||
bond_slave_of = proxy.bond_slave_of == null ? null : XenRef<Bond>.Create(proxy.bond_slave_of);
|
||||
bond_master_of = proxy.bond_master_of == null ? null : XenRef<Bond>.Create(proxy.bond_master_of);
|
||||
VLAN_master_of = proxy.VLAN_master_of == null ? null : XenRef<VLAN>.Create(proxy.VLAN_master_of);
|
||||
@ -203,7 +203,7 @@ namespace XenAPI
|
||||
tunnel_transport_PIF_of = proxy.tunnel_transport_PIF_of == null ? null : XenRef<Tunnel>.Create(proxy.tunnel_transport_PIF_of);
|
||||
ipv6_configuration_mode = proxy.ipv6_configuration_mode == null ? (ipv6_configuration_mode) 0 : (ipv6_configuration_mode)Helper.EnumParseDefault(typeof(ipv6_configuration_mode), (string)proxy.ipv6_configuration_mode);
|
||||
IPv6 = proxy.IPv6 == null ? new string[] {} : (string [])proxy.IPv6;
|
||||
ipv6_gateway = proxy.ipv6_gateway == null ? null : (string)proxy.ipv6_gateway;
|
||||
ipv6_gateway = proxy.ipv6_gateway == null ? null : proxy.ipv6_gateway;
|
||||
primary_address_type = proxy.primary_address_type == null ? (primary_address_type) 0 : (primary_address_type)Helper.EnumParseDefault(typeof(primary_address_type), (string)proxy.primary_address_type);
|
||||
managed = (bool)proxy.managed;
|
||||
properties = proxy.properties == null ? null : Maps.convert_from_proxy_string_string(proxy.properties);
|
||||
@ -233,14 +233,14 @@ namespace XenAPI
|
||||
result_.gateway = gateway ?? "";
|
||||
result_.DNS = DNS ?? "";
|
||||
result_.bond_slave_of = bond_slave_of ?? "";
|
||||
result_.bond_master_of = (bond_master_of != null) ? Helper.RefListToStringArray(bond_master_of) : new string[] {};
|
||||
result_.bond_master_of = bond_master_of == null ? new string[] {} : Helper.RefListToStringArray(bond_master_of);
|
||||
result_.VLAN_master_of = VLAN_master_of ?? "";
|
||||
result_.VLAN_slave_of = (VLAN_slave_of != null) ? Helper.RefListToStringArray(VLAN_slave_of) : new string[] {};
|
||||
result_.VLAN_slave_of = VLAN_slave_of == null ? new string[] {} : Helper.RefListToStringArray(VLAN_slave_of);
|
||||
result_.management = management;
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.disallow_unplug = disallow_unplug;
|
||||
result_.tunnel_access_PIF_of = (tunnel_access_PIF_of != null) ? Helper.RefListToStringArray(tunnel_access_PIF_of) : new string[] {};
|
||||
result_.tunnel_transport_PIF_of = (tunnel_transport_PIF_of != null) ? Helper.RefListToStringArray(tunnel_transport_PIF_of) : new string[] {};
|
||||
result_.tunnel_access_PIF_of = tunnel_access_PIF_of == null ? new string[] {} : Helper.RefListToStringArray(tunnel_access_PIF_of);
|
||||
result_.tunnel_transport_PIF_of = tunnel_transport_PIF_of == null ? new string[] {} : Helper.RefListToStringArray(tunnel_transport_PIF_of);
|
||||
result_.ipv6_configuration_mode = ipv6_configuration_mode_helper.ToString(ipv6_configuration_mode);
|
||||
result_.IPv6 = IPv6;
|
||||
result_.ipv6_gateway = ipv6_gateway ?? "";
|
||||
@ -459,7 +459,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_uuid(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_uuid(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_uuid(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -473,7 +473,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_device(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_device(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_device(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -515,7 +515,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_mac(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_mac(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_mac(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -529,7 +529,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_mtu(session.opaque_ref, _pif);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pif_get_mtu(session.opaque_ref, _pif ?? "").parse());
|
||||
return long.Parse(session.proxy.pif_get_mtu(session.opaque_ref, _pif ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -543,7 +543,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_vlan(session.opaque_ref, _pif);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pif_get_vlan(session.opaque_ref, _pif ?? "").parse());
|
||||
return long.Parse(session.proxy.pif_get_vlan(session.opaque_ref, _pif ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -613,7 +613,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_ip(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_ip(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_ip(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -627,7 +627,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_netmask(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_netmask(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_netmask(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -641,7 +641,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_gateway(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_gateway(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_gateway(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -655,7 +655,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_dns(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_dns(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_dns(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -823,7 +823,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_get_ipv6_gateway(session.opaque_ref, _pif);
|
||||
else
|
||||
return (string)session.proxy.pif_get_ipv6_gateway(session.opaque_ref, _pif ?? "").parse();
|
||||
return session.proxy.pif_get_ipv6_gateway(session.opaque_ref, _pif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -111,17 +111,17 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PIF_metrics proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
io_read_kbs = Convert.ToDouble(proxy.io_read_kbs);
|
||||
io_write_kbs = Convert.ToDouble(proxy.io_write_kbs);
|
||||
carrier = (bool)proxy.carrier;
|
||||
vendor_id = proxy.vendor_id == null ? null : (string)proxy.vendor_id;
|
||||
vendor_name = proxy.vendor_name == null ? null : (string)proxy.vendor_name;
|
||||
device_id = proxy.device_id == null ? null : (string)proxy.device_id;
|
||||
device_name = proxy.device_name == null ? null : (string)proxy.device_name;
|
||||
speed = proxy.speed == null ? 0 : long.Parse((string)proxy.speed);
|
||||
vendor_id = proxy.vendor_id == null ? null : proxy.vendor_id;
|
||||
vendor_name = proxy.vendor_name == null ? null : proxy.vendor_name;
|
||||
device_id = proxy.device_id == null ? null : proxy.device_id;
|
||||
device_name = proxy.device_name == null ? null : proxy.device_name;
|
||||
speed = proxy.speed == null ? 0 : long.Parse(proxy.speed);
|
||||
duplex = (bool)proxy.duplex;
|
||||
pci_bus_path = proxy.pci_bus_path == null ? null : (string)proxy.pci_bus_path;
|
||||
pci_bus_path = proxy.pci_bus_path == null ? null : proxy.pci_bus_path;
|
||||
last_updated = proxy.last_updated;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
@ -279,7 +279,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_metrics_get_uuid(session.opaque_ref, _pif_metrics);
|
||||
else
|
||||
return (string)session.proxy.pif_metrics_get_uuid(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
return session.proxy.pif_metrics_get_uuid(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -335,7 +335,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_metrics_get_vendor_id(session.opaque_ref, _pif_metrics);
|
||||
else
|
||||
return (string)session.proxy.pif_metrics_get_vendor_id(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
return session.proxy.pif_metrics_get_vendor_id(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -349,7 +349,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_metrics_get_vendor_name(session.opaque_ref, _pif_metrics);
|
||||
else
|
||||
return (string)session.proxy.pif_metrics_get_vendor_name(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
return session.proxy.pif_metrics_get_vendor_name(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -363,7 +363,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_metrics_get_device_id(session.opaque_ref, _pif_metrics);
|
||||
else
|
||||
return (string)session.proxy.pif_metrics_get_device_id(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
return session.proxy.pif_metrics_get_device_id(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -377,7 +377,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_metrics_get_device_name(session.opaque_ref, _pif_metrics);
|
||||
else
|
||||
return (string)session.proxy.pif_metrics_get_device_name(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
return session.proxy.pif_metrics_get_device_name(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -391,7 +391,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_metrics_get_speed(session.opaque_ref, _pif_metrics);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pif_metrics_get_speed(session.opaque_ref, _pif_metrics ?? "").parse());
|
||||
return long.Parse(session.proxy.pif_metrics_get_speed(session.opaque_ref, _pif_metrics ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -419,7 +419,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pif_metrics_get_pci_bus_path(session.opaque_ref, _pif_metrics);
|
||||
else
|
||||
return (string)session.proxy.pif_metrics_get_pci_bus_path(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
return session.proxy.pif_metrics_get_pci_bus_path(session.opaque_ref, _pif_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -111,17 +111,17 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PUSB proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
USB_group = proxy.USB_group == null ? null : XenRef<USB_group>.Create(proxy.USB_group);
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
path = proxy.path == null ? null : (string)proxy.path;
|
||||
vendor_id = proxy.vendor_id == null ? null : (string)proxy.vendor_id;
|
||||
vendor_desc = proxy.vendor_desc == null ? null : (string)proxy.vendor_desc;
|
||||
product_id = proxy.product_id == null ? null : (string)proxy.product_id;
|
||||
product_desc = proxy.product_desc == null ? null : (string)proxy.product_desc;
|
||||
serial = proxy.serial == null ? null : (string)proxy.serial;
|
||||
version = proxy.version == null ? null : (string)proxy.version;
|
||||
description = proxy.description == null ? null : (string)proxy.description;
|
||||
path = proxy.path == null ? null : proxy.path;
|
||||
vendor_id = proxy.vendor_id == null ? null : proxy.vendor_id;
|
||||
vendor_desc = proxy.vendor_desc == null ? null : proxy.vendor_desc;
|
||||
product_id = proxy.product_id == null ? null : proxy.product_id;
|
||||
product_desc = proxy.product_desc == null ? null : proxy.product_desc;
|
||||
serial = proxy.serial == null ? null : proxy.serial;
|
||||
version = proxy.version == null ? null : proxy.version;
|
||||
description = proxy.description == null ? null : proxy.description;
|
||||
passthrough_enabled = (bool)proxy.passthrough_enabled;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
@ -279,7 +279,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_uuid(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_uuid(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_uuid(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -321,7 +321,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_path(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_path(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_path(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -335,7 +335,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_vendor_id(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_vendor_id(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_vendor_id(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -349,7 +349,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_vendor_desc(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_vendor_desc(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_vendor_desc(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -363,7 +363,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_product_id(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_product_id(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_product_id(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -377,7 +377,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_product_desc(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_product_desc(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_product_desc(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -391,7 +391,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_serial(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_serial(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_serial(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -405,7 +405,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_version(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_version(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_version(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -419,7 +419,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pusb_get_description(session.opaque_ref, _pusb);
|
||||
else
|
||||
return (string)session.proxy.pusb_get_description(session.opaque_ref, _pusb ?? "").parse();
|
||||
return session.proxy.pusb_get_description(session.opaque_ref, _pusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -90,11 +90,11 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PVS_cache_storage proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
host = proxy.host == null ? null : XenRef<Host>.Create(proxy.host);
|
||||
SR = proxy.SR == null ? null : XenRef<SR>.Create(proxy.SR);
|
||||
site = proxy.site == null ? null : XenRef<PVS_site>.Create(proxy.site);
|
||||
size = proxy.size == null ? 0 : long.Parse((string)proxy.size);
|
||||
size = proxy.size == null ? 0 : long.Parse(proxy.size);
|
||||
VDI = proxy.VDI == null ? null : XenRef<VDI>.Create(proxy.VDI);
|
||||
}
|
||||
|
||||
@ -274,7 +274,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_cache_storage_get_uuid(session.opaque_ref, _pvs_cache_storage);
|
||||
else
|
||||
return (string)session.proxy.pvs_cache_storage_get_uuid(session.opaque_ref, _pvs_cache_storage ?? "").parse();
|
||||
return session.proxy.pvs_cache_storage_get_uuid(session.opaque_ref, _pvs_cache_storage ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -330,7 +330,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_cache_storage_get_size(session.opaque_ref, _pvs_cache_storage);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pvs_cache_storage_get_size(session.opaque_ref, _pvs_cache_storage ?? "").parse());
|
||||
return long.Parse(session.proxy.pvs_cache_storage_get_size(session.opaque_ref, _pvs_cache_storage ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,7 +87,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PVS_proxy proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
site = proxy.site == null ? null : XenRef<PVS_site>.Create(proxy.site);
|
||||
VIF = proxy.VIF == null ? null : XenRef<VIF>.Create(proxy.VIF);
|
||||
currently_attached = (bool)proxy.currently_attached;
|
||||
@ -210,7 +210,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_proxy_get_uuid(session.opaque_ref, _pvs_proxy);
|
||||
else
|
||||
return (string)session.proxy.pvs_proxy_get_uuid(session.opaque_ref, _pvs_proxy ?? "").parse();
|
||||
return session.proxy.pvs_proxy_get_uuid(session.opaque_ref, _pvs_proxy ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,10 +87,10 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PVS_server proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
addresses = proxy.addresses == null ? new string[] {} : (string [])proxy.addresses;
|
||||
first_port = proxy.first_port == null ? 0 : long.Parse((string)proxy.first_port);
|
||||
last_port = proxy.last_port == null ? 0 : long.Parse((string)proxy.last_port);
|
||||
first_port = proxy.first_port == null ? 0 : long.Parse(proxy.first_port);
|
||||
last_port = proxy.last_port == null ? 0 : long.Parse(proxy.last_port);
|
||||
site = proxy.site == null ? null : XenRef<PVS_site>.Create(proxy.site);
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_server_get_uuid(session.opaque_ref, _pvs_server);
|
||||
else
|
||||
return (string)session.proxy.pvs_server_get_uuid(session.opaque_ref, _pvs_server ?? "").parse();
|
||||
return session.proxy.pvs_server_get_uuid(session.opaque_ref, _pvs_server ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -238,7 +238,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_server_get_first_port(session.opaque_ref, _pvs_server);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pvs_server_get_first_port(session.opaque_ref, _pvs_server ?? "").parse());
|
||||
return long.Parse(session.proxy.pvs_server_get_first_port(session.opaque_ref, _pvs_server ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -252,7 +252,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_server_get_last_port(session.opaque_ref, _pvs_server);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pvs_server_get_last_port(session.opaque_ref, _pvs_server ?? "").parse());
|
||||
return long.Parse(session.proxy.pvs_server_get_last_port(session.opaque_ref, _pvs_server ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -93,10 +93,10 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_PVS_site proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
PVS_uuid = proxy.PVS_uuid == null ? null : (string)proxy.PVS_uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
PVS_uuid = proxy.PVS_uuid == null ? null : proxy.PVS_uuid;
|
||||
cache_storage = proxy.cache_storage == null ? null : XenRef<PVS_cache_storage>.Create(proxy.cache_storage);
|
||||
servers = proxy.servers == null ? null : XenRef<PVS_server>.Create(proxy.servers);
|
||||
proxies = proxy.proxies == null ? null : XenRef<PVS_proxy>.Create(proxy.proxies);
|
||||
@ -109,9 +109,9 @@ namespace XenAPI
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.PVS_uuid = PVS_uuid ?? "";
|
||||
result_.cache_storage = (cache_storage != null) ? Helper.RefListToStringArray(cache_storage) : new string[] {};
|
||||
result_.servers = (servers != null) ? Helper.RefListToStringArray(servers) : new string[] {};
|
||||
result_.proxies = (proxies != null) ? Helper.RefListToStringArray(proxies) : new string[] {};
|
||||
result_.cache_storage = cache_storage == null ? new string[] {} : Helper.RefListToStringArray(cache_storage);
|
||||
result_.servers = servers == null ? new string[] {} : Helper.RefListToStringArray(servers);
|
||||
result_.proxies = proxies == null ? new string[] {} : Helper.RefListToStringArray(proxies);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -253,7 +253,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_site_get_uuid(session.opaque_ref, _pvs_site);
|
||||
else
|
||||
return (string)session.proxy.pvs_site_get_uuid(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
return session.proxy.pvs_site_get_uuid(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -267,7 +267,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_site_get_name_label(session.opaque_ref, _pvs_site);
|
||||
else
|
||||
return (string)session.proxy.pvs_site_get_name_label(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
return session.proxy.pvs_site_get_name_label(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -281,7 +281,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_site_get_name_description(session.opaque_ref, _pvs_site);
|
||||
else
|
||||
return (string)session.proxy.pvs_site_get_name_description(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
return session.proxy.pvs_site_get_name_description(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -295,7 +295,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pvs_site_get_pvs_uuid(session.opaque_ref, _pvs_site);
|
||||
else
|
||||
return (string)session.proxy.pvs_site_get_pvs_uuid(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
return session.proxy.pvs_site_get_pvs_uuid(session.opaque_ref, _pvs_site ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -180,9 +180,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Pool proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
master = proxy.master == null ? null : XenRef<Host>.Create(proxy.master);
|
||||
default_SR = proxy.default_SR == null ? null : XenRef<SR>.Create(proxy.default_SR);
|
||||
suspend_image_SR = proxy.suspend_image_SR == null ? null : XenRef<SR>.Create(proxy.suspend_image_SR);
|
||||
@ -191,24 +191,24 @@ namespace XenAPI
|
||||
ha_enabled = (bool)proxy.ha_enabled;
|
||||
ha_configuration = proxy.ha_configuration == null ? null : Maps.convert_from_proxy_string_string(proxy.ha_configuration);
|
||||
ha_statefiles = proxy.ha_statefiles == null ? new string[] {} : (string [])proxy.ha_statefiles;
|
||||
ha_host_failures_to_tolerate = proxy.ha_host_failures_to_tolerate == null ? 0 : long.Parse((string)proxy.ha_host_failures_to_tolerate);
|
||||
ha_plan_exists_for = proxy.ha_plan_exists_for == null ? 0 : long.Parse((string)proxy.ha_plan_exists_for);
|
||||
ha_host_failures_to_tolerate = proxy.ha_host_failures_to_tolerate == null ? 0 : long.Parse(proxy.ha_host_failures_to_tolerate);
|
||||
ha_plan_exists_for = proxy.ha_plan_exists_for == null ? 0 : long.Parse(proxy.ha_plan_exists_for);
|
||||
ha_allow_overcommit = (bool)proxy.ha_allow_overcommit;
|
||||
ha_overcommitted = (bool)proxy.ha_overcommitted;
|
||||
blobs = proxy.blobs == null ? null : Maps.convert_from_proxy_string_XenRefBlob(proxy.blobs);
|
||||
tags = proxy.tags == null ? new string[] {} : (string [])proxy.tags;
|
||||
gui_config = proxy.gui_config == null ? null : Maps.convert_from_proxy_string_string(proxy.gui_config);
|
||||
health_check_config = proxy.health_check_config == null ? null : Maps.convert_from_proxy_string_string(proxy.health_check_config);
|
||||
wlb_url = proxy.wlb_url == null ? null : (string)proxy.wlb_url;
|
||||
wlb_username = proxy.wlb_username == null ? null : (string)proxy.wlb_username;
|
||||
wlb_url = proxy.wlb_url == null ? null : proxy.wlb_url;
|
||||
wlb_username = proxy.wlb_username == null ? null : proxy.wlb_username;
|
||||
wlb_enabled = (bool)proxy.wlb_enabled;
|
||||
wlb_verify_cert = (bool)proxy.wlb_verify_cert;
|
||||
redo_log_enabled = (bool)proxy.redo_log_enabled;
|
||||
redo_log_vdi = proxy.redo_log_vdi == null ? null : XenRef<VDI>.Create(proxy.redo_log_vdi);
|
||||
vswitch_controller = proxy.vswitch_controller == null ? null : (string)proxy.vswitch_controller;
|
||||
vswitch_controller = proxy.vswitch_controller == null ? null : proxy.vswitch_controller;
|
||||
restrictions = proxy.restrictions == null ? null : Maps.convert_from_proxy_string_string(proxy.restrictions);
|
||||
metadata_VDIs = proxy.metadata_VDIs == null ? null : XenRef<VDI>.Create(proxy.metadata_VDIs);
|
||||
ha_cluster_stack = proxy.ha_cluster_stack == null ? null : (string)proxy.ha_cluster_stack;
|
||||
ha_cluster_stack = proxy.ha_cluster_stack == null ? null : proxy.ha_cluster_stack;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<pool_allowed_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_pool_allowed_operations(proxy.current_operations);
|
||||
guest_agent_config = proxy.guest_agent_config == null ? null : Maps.convert_from_proxy_string_string(proxy.guest_agent_config);
|
||||
@ -248,9 +248,9 @@ namespace XenAPI
|
||||
result_.redo_log_vdi = redo_log_vdi ?? "";
|
||||
result_.vswitch_controller = vswitch_controller ?? "";
|
||||
result_.restrictions = Maps.convert_to_proxy_string_string(restrictions);
|
||||
result_.metadata_VDIs = (metadata_VDIs != null) ? Helper.RefListToStringArray(metadata_VDIs) : new string[] {};
|
||||
result_.metadata_VDIs = metadata_VDIs == null ? new string[] {} : Helper.RefListToStringArray(metadata_VDIs);
|
||||
result_.ha_cluster_stack = ha_cluster_stack ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_pool_allowed_operations(current_operations);
|
||||
result_.guest_agent_config = Maps.convert_to_proxy_string_string(guest_agent_config);
|
||||
result_.cpu_info = Maps.convert_to_proxy_string_string(cpu_info);
|
||||
@ -517,7 +517,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_uuid(session.opaque_ref, _pool);
|
||||
else
|
||||
return (string)session.proxy.pool_get_uuid(session.opaque_ref, _pool ?? "").parse();
|
||||
return session.proxy.pool_get_uuid(session.opaque_ref, _pool ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -531,7 +531,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_name_label(session.opaque_ref, _pool);
|
||||
else
|
||||
return (string)session.proxy.pool_get_name_label(session.opaque_ref, _pool ?? "").parse();
|
||||
return session.proxy.pool_get_name_label(session.opaque_ref, _pool ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -545,7 +545,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_name_description(session.opaque_ref, _pool);
|
||||
else
|
||||
return (string)session.proxy.pool_get_name_description(session.opaque_ref, _pool ?? "").parse();
|
||||
return session.proxy.pool_get_name_description(session.opaque_ref, _pool ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -671,7 +671,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_ha_host_failures_to_tolerate(session.opaque_ref, _pool);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pool_get_ha_host_failures_to_tolerate(session.opaque_ref, _pool ?? "").parse());
|
||||
return long.Parse(session.proxy.pool_get_ha_host_failures_to_tolerate(session.opaque_ref, _pool ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -685,7 +685,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_ha_plan_exists_for(session.opaque_ref, _pool);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pool_get_ha_plan_exists_for(session.opaque_ref, _pool ?? "").parse());
|
||||
return long.Parse(session.proxy.pool_get_ha_plan_exists_for(session.opaque_ref, _pool ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -783,7 +783,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_wlb_url(session.opaque_ref, _pool);
|
||||
else
|
||||
return (string)session.proxy.pool_get_wlb_url(session.opaque_ref, _pool ?? "").parse();
|
||||
return session.proxy.pool_get_wlb_url(session.opaque_ref, _pool ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -797,7 +797,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_wlb_username(session.opaque_ref, _pool);
|
||||
else
|
||||
return (string)session.proxy.pool_get_wlb_username(session.opaque_ref, _pool ?? "").parse();
|
||||
return session.proxy.pool_get_wlb_username(session.opaque_ref, _pool ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -869,7 +869,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_vswitch_controller(session.opaque_ref, _pool);
|
||||
else
|
||||
return (string)session.proxy.pool_get_vswitch_controller(session.opaque_ref, _pool ?? "").parse();
|
||||
return session.proxy.pool_get_vswitch_controller(session.opaque_ref, _pool ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -911,7 +911,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_get_ha_cluster_stack(session.opaque_ref, _pool);
|
||||
else
|
||||
return (string)session.proxy.pool_get_ha_cluster_stack(session.opaque_ref, _pool ?? "").parse();
|
||||
return session.proxy.pool_get_ha_cluster_stack(session.opaque_ref, _pool ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1594,7 +1594,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
session.JsonRpcClient.pool_enable_ha(session.opaque_ref, _heartbeat_srs, _configuration);
|
||||
else
|
||||
session.proxy.pool_enable_ha(session.opaque_ref, (_heartbeat_srs != null) ? Helper.RefListToStringArray(_heartbeat_srs) : new string[] {}, Maps.convert_to_proxy_string_string(_configuration)).parse();
|
||||
session.proxy.pool_enable_ha(session.opaque_ref, _heartbeat_srs == null ? new string[] {} : Helper.RefListToStringArray(_heartbeat_srs), Maps.convert_to_proxy_string_string(_configuration)).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1609,7 +1609,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_pool_enable_ha(session.opaque_ref, _heartbeat_srs, _configuration);
|
||||
else
|
||||
return XenRef<Task>.Create(session.proxy.async_pool_enable_ha(session.opaque_ref, (_heartbeat_srs != null) ? Helper.RefListToStringArray(_heartbeat_srs) : new string[] {}, Maps.convert_to_proxy_string_string(_configuration)).parse());
|
||||
return XenRef<Task>.Create(session.proxy.async_pool_enable_ha(session.opaque_ref, _heartbeat_srs == null ? new string[] {} : Helper.RefListToStringArray(_heartbeat_srs), Maps.convert_to_proxy_string_string(_configuration)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1730,7 +1730,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_ha_compute_max_host_failures_to_tolerate(session.opaque_ref);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pool_ha_compute_max_host_failures_to_tolerate(session.opaque_ref).parse());
|
||||
return long.Parse(session.proxy.pool_ha_compute_max_host_failures_to_tolerate(session.opaque_ref).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1744,7 +1744,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_ha_compute_hypothetical_max_host_failures_to_tolerate(session.opaque_ref, _configuration);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pool_ha_compute_hypothetical_max_host_failures_to_tolerate(session.opaque_ref, Maps.convert_to_proxy_XenRefVM_string(_configuration)).parse());
|
||||
return long.Parse(session.proxy.pool_ha_compute_hypothetical_max_host_failures_to_tolerate(session.opaque_ref, Maps.convert_to_proxy_XenRefVM_string(_configuration)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1759,7 +1759,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_ha_compute_vm_failover_plan(session.opaque_ref, _failed_hosts, _failed_vms);
|
||||
else
|
||||
return Maps.convert_from_proxy_XenRefVM_Dictionary_string_string(session.proxy.pool_ha_compute_vm_failover_plan(session.opaque_ref, (_failed_hosts != null) ? Helper.RefListToStringArray(_failed_hosts) : new string[] {}, (_failed_vms != null) ? Helper.RefListToStringArray(_failed_vms) : new string[] {}).parse());
|
||||
return Maps.convert_from_proxy_XenRefVM_Dictionary_string_string(session.proxy.pool_ha_compute_vm_failover_plan(session.opaque_ref, _failed_hosts == null ? new string[] {} : Helper.RefListToStringArray(_failed_hosts), _failed_vms == null ? new string[] {} : Helper.RefListToStringArray(_failed_vms)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2059,7 +2059,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_send_test_post(session.opaque_ref, _host, _port, _body);
|
||||
else
|
||||
return (string)session.proxy.pool_send_test_post(session.opaque_ref, _host ?? "", _port.ToString(), _body ?? "").parse();
|
||||
return session.proxy.pool_send_test_post(session.opaque_ref, _host ?? "", _port.ToString(), _body ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2370,7 +2370,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_test_archive_target(session.opaque_ref, _pool, _config);
|
||||
else
|
||||
return (string)session.proxy.pool_test_archive_target(session.opaque_ref, _pool ?? "", Maps.convert_to_proxy_string_string(_config)).parse();
|
||||
return session.proxy.pool_test_archive_target(session.opaque_ref, _pool ?? "", Maps.convert_to_proxy_string_string(_config)).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -102,11 +102,11 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Pool_patch proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
version = proxy.version == null ? null : (string)proxy.version;
|
||||
size = proxy.size == null ? 0 : long.Parse((string)proxy.size);
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
version = proxy.version == null ? null : proxy.version;
|
||||
size = proxy.size == null ? 0 : long.Parse(proxy.size);
|
||||
pool_applied = (bool)proxy.pool_applied;
|
||||
host_patches = proxy.host_patches == null ? null : XenRef<Host_patch>.Create(proxy.host_patches);
|
||||
after_apply_guidance = proxy.after_apply_guidance == null ? null : Helper.StringArrayToEnumList<after_apply_guidance>(proxy.after_apply_guidance);
|
||||
@ -123,8 +123,8 @@ namespace XenAPI
|
||||
result_.version = version ?? "";
|
||||
result_.size = size.ToString();
|
||||
result_.pool_applied = pool_applied;
|
||||
result_.host_patches = (host_patches != null) ? Helper.RefListToStringArray(host_patches) : new string[] {};
|
||||
result_.after_apply_guidance = (after_apply_guidance != null) ? Helper.ObjectListToStringArray(after_apply_guidance) : new string[] {};
|
||||
result_.host_patches = host_patches == null ? new string[] {} : Helper.RefListToStringArray(host_patches);
|
||||
result_.after_apply_guidance = after_apply_guidance == null ? new string[] {} : Helper.ObjectListToStringArray(after_apply_guidance);
|
||||
result_.pool_update = pool_update ?? "";
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
return result_;
|
||||
@ -275,7 +275,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_patch_get_uuid(session.opaque_ref, _pool_patch);
|
||||
else
|
||||
return (string)session.proxy.pool_patch_get_uuid(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
return session.proxy.pool_patch_get_uuid(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -289,7 +289,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_patch_get_name_label(session.opaque_ref, _pool_patch);
|
||||
else
|
||||
return (string)session.proxy.pool_patch_get_name_label(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
return session.proxy.pool_patch_get_name_label(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -303,7 +303,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_patch_get_name_description(session.opaque_ref, _pool_patch);
|
||||
else
|
||||
return (string)session.proxy.pool_patch_get_name_description(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
return session.proxy.pool_patch_get_name_description(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -317,7 +317,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_patch_get_version(session.opaque_ref, _pool_patch);
|
||||
else
|
||||
return (string)session.proxy.pool_patch_get_version(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
return session.proxy.pool_patch_get_version(session.opaque_ref, _pool_patch ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -331,7 +331,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_patch_get_size(session.opaque_ref, _pool_patch);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pool_patch_get_size(session.opaque_ref, _pool_patch ?? "").parse());
|
||||
return long.Parse(session.proxy.pool_patch_get_size(session.opaque_ref, _pool_patch ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -464,7 +464,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_patch_apply(session.opaque_ref, _pool_patch, _host);
|
||||
else
|
||||
return (string)session.proxy.pool_patch_apply(session.opaque_ref, _pool_patch ?? "", _host ?? "").parse();
|
||||
return session.proxy.pool_patch_apply(session.opaque_ref, _pool_patch ?? "", _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -530,7 +530,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_patch_precheck(session.opaque_ref, _pool_patch, _host);
|
||||
else
|
||||
return (string)session.proxy.pool_patch_precheck(session.opaque_ref, _pool_patch ?? "", _host ?? "").parse();
|
||||
return session.proxy.pool_patch_precheck(session.opaque_ref, _pool_patch ?? "", _host ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -105,12 +105,12 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Pool_update proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
version = proxy.version == null ? null : (string)proxy.version;
|
||||
installation_size = proxy.installation_size == null ? 0 : long.Parse((string)proxy.installation_size);
|
||||
key = proxy.key == null ? null : (string)proxy.key;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
version = proxy.version == null ? null : proxy.version;
|
||||
installation_size = proxy.installation_size == null ? 0 : long.Parse(proxy.installation_size);
|
||||
key = proxy.key == null ? null : proxy.key;
|
||||
after_apply_guidance = proxy.after_apply_guidance == null ? null : Helper.StringArrayToEnumList<update_after_apply_guidance>(proxy.after_apply_guidance);
|
||||
vdi = proxy.vdi == null ? null : XenRef<VDI>.Create(proxy.vdi);
|
||||
hosts = proxy.hosts == null ? null : XenRef<Host>.Create(proxy.hosts);
|
||||
@ -127,9 +127,9 @@ namespace XenAPI
|
||||
result_.version = version ?? "";
|
||||
result_.installation_size = installation_size.ToString();
|
||||
result_.key = key ?? "";
|
||||
result_.after_apply_guidance = (after_apply_guidance != null) ? Helper.ObjectListToStringArray(after_apply_guidance) : new string[] {};
|
||||
result_.after_apply_guidance = after_apply_guidance == null ? new string[] {} : Helper.ObjectListToStringArray(after_apply_guidance);
|
||||
result_.vdi = vdi ?? "";
|
||||
result_.hosts = (hosts != null) ? Helper.RefListToStringArray(hosts) : new string[] {};
|
||||
result_.hosts = hosts == null ? new string[] {} : Helper.RefListToStringArray(hosts);
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.enforce_homogeneity = enforce_homogeneity;
|
||||
return result_;
|
||||
@ -277,7 +277,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_update_get_uuid(session.opaque_ref, _pool_update);
|
||||
else
|
||||
return (string)session.proxy.pool_update_get_uuid(session.opaque_ref, _pool_update ?? "").parse();
|
||||
return session.proxy.pool_update_get_uuid(session.opaque_ref, _pool_update ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -291,7 +291,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_update_get_name_label(session.opaque_ref, _pool_update);
|
||||
else
|
||||
return (string)session.proxy.pool_update_get_name_label(session.opaque_ref, _pool_update ?? "").parse();
|
||||
return session.proxy.pool_update_get_name_label(session.opaque_ref, _pool_update ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -305,7 +305,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_update_get_name_description(session.opaque_ref, _pool_update);
|
||||
else
|
||||
return (string)session.proxy.pool_update_get_name_description(session.opaque_ref, _pool_update ?? "").parse();
|
||||
return session.proxy.pool_update_get_name_description(session.opaque_ref, _pool_update ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -319,7 +319,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_update_get_version(session.opaque_ref, _pool_update);
|
||||
else
|
||||
return (string)session.proxy.pool_update_get_version(session.opaque_ref, _pool_update ?? "").parse();
|
||||
return session.proxy.pool_update_get_version(session.opaque_ref, _pool_update ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -333,7 +333,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_update_get_installation_size(session.opaque_ref, _pool_update);
|
||||
else
|
||||
return long.Parse((string)session.proxy.pool_update_get_installation_size(session.opaque_ref, _pool_update ?? "").parse());
|
||||
return long.Parse(session.proxy.pool_update_get_installation_size(session.opaque_ref, _pool_update ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -347,7 +347,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.pool_update_get_key(session.opaque_ref, _pool_update);
|
||||
else
|
||||
return (string)session.proxy.pool_update_get_key(session.opaque_ref, _pool_update ?? "").parse();
|
||||
return session.proxy.pool_update_get_key(session.opaque_ref, _pool_update ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
240
XenModel/XenAPI/Probe_result.cs
Normal file
240
XenModel/XenAPI/Probe_result.cs
Normal file
@ -0,0 +1,240 @@
|
||||
/*
|
||||
* 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 System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
|
||||
namespace XenAPI
|
||||
{
|
||||
/// <summary>
|
||||
/// A set of properties that describe one result element of SR.probe. Result elements and properties can change dynamically based on changes to the the SR.probe input-parameters or the target.
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
public partial class Probe_result : XenObject<Probe_result>
|
||||
{
|
||||
public Probe_result()
|
||||
{
|
||||
}
|
||||
|
||||
public Probe_result(Dictionary<string, string> configuration,
|
||||
bool complete,
|
||||
Sr_stat sr,
|
||||
Dictionary<string, string> extra_info)
|
||||
{
|
||||
this.configuration = configuration;
|
||||
this.complete = complete;
|
||||
this.sr = sr;
|
||||
this.extra_info = extra_info;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new Probe_result from a Proxy_Probe_result.
|
||||
/// </summary>
|
||||
/// <param name="proxy"></param>
|
||||
public Probe_result(Proxy_Probe_result proxy)
|
||||
{
|
||||
this.UpdateFromProxy(proxy);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates each field of this instance with the value of
|
||||
/// the corresponding field of a given Probe_result.
|
||||
/// </summary>
|
||||
public override void UpdateFrom(Probe_result update)
|
||||
{
|
||||
configuration = update.configuration;
|
||||
complete = update.complete;
|
||||
sr = update.sr;
|
||||
extra_info = update.extra_info;
|
||||
}
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Probe_result proxy)
|
||||
{
|
||||
configuration = proxy.configuration == null ? null : Maps.convert_from_proxy_string_string(proxy.configuration);
|
||||
complete = (bool)proxy.complete;
|
||||
sr = proxy.sr == null ? null : new Sr_stat((Proxy_Sr_stat)proxy.sr);
|
||||
extra_info = proxy.extra_info == null ? null : Maps.convert_from_proxy_string_string(proxy.extra_info);
|
||||
}
|
||||
|
||||
public Proxy_Probe_result ToProxy()
|
||||
{
|
||||
Proxy_Probe_result result_ = new Proxy_Probe_result();
|
||||
result_.configuration = Maps.convert_to_proxy_string_string(configuration);
|
||||
result_.complete = complete;
|
||||
result_.sr = sr == null ? null : sr.ToProxy();
|
||||
result_.extra_info = Maps.convert_to_proxy_string_string(extra_info);
|
||||
return result_;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new Probe_result from a Hashtable.
|
||||
/// Note that the fields not contained in the Hashtable
|
||||
/// will be created with their default values.
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
public Probe_result(Hashtable table) : this()
|
||||
{
|
||||
UpdateFrom(table);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a Hashtable with field-value pairs, it updates the fields of this Probe_result
|
||||
/// with the values listed in the Hashtable. Note that only the fields contained
|
||||
/// in the Hashtable will be updated and the rest will remain the same.
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
public void UpdateFrom(Hashtable table)
|
||||
{
|
||||
if (table.ContainsKey("configuration"))
|
||||
configuration = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "configuration"));
|
||||
if (table.ContainsKey("complete"))
|
||||
complete = Marshalling.ParseBool(table, "complete");
|
||||
if (table.ContainsKey("sr"))
|
||||
sr = (Sr_stat)Marshalling.convertStruct(typeof(Sr_stat), Marshalling.ParseHashTable(table, "sr"));;
|
||||
if (table.ContainsKey("extra_info"))
|
||||
extra_info = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "extra_info"));
|
||||
}
|
||||
|
||||
public bool DeepEquals(Probe_result other)
|
||||
{
|
||||
if (ReferenceEquals(null, other))
|
||||
return false;
|
||||
if (ReferenceEquals(this, other))
|
||||
return true;
|
||||
|
||||
return Helper.AreEqual2(this._configuration, other._configuration) &&
|
||||
Helper.AreEqual2(this._complete, other._complete) &&
|
||||
Helper.AreEqual2(this._sr, other._sr) &&
|
||||
Helper.AreEqual2(this._extra_info, other._extra_info);
|
||||
}
|
||||
|
||||
internal static List<Probe_result> ProxyArrayToObjectList(Proxy_Probe_result[] input)
|
||||
{
|
||||
var result = new List<Probe_result>();
|
||||
foreach (var item in input)
|
||||
result.Add(new Probe_result(item));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public override string SaveChanges(Session session, string opaqueRef, Probe_result server)
|
||||
{
|
||||
if (opaqueRef == null)
|
||||
{
|
||||
System.Diagnostics.Debug.Assert(false, "Cannot create instances of this type on the server");
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException("This type has no read/write properties");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Plugin-specific configuration which describes where and how to locate the storage repository. This may include the physical block device name, a remote NFS server and path or an RBD storage pool.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringStringMapConverter))]
|
||||
public virtual Dictionary<string, string> configuration
|
||||
{
|
||||
get { return _configuration; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _configuration))
|
||||
{
|
||||
_configuration = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("configuration");
|
||||
}
|
||||
}
|
||||
}
|
||||
private Dictionary<string, string> _configuration = new Dictionary<string, string>() {};
|
||||
|
||||
/// <summary>
|
||||
/// True if this configuration is complete and can be used to call SR.create. False if it requires further iterative calls to SR.probe, to potentially narrow down on a configuration that can be used.
|
||||
/// </summary>
|
||||
public virtual bool complete
|
||||
{
|
||||
get { return _complete; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _complete))
|
||||
{
|
||||
_complete = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("complete");
|
||||
}
|
||||
}
|
||||
}
|
||||
private bool _complete;
|
||||
|
||||
/// <summary>
|
||||
/// Existing SR found for this configuration
|
||||
/// </summary>
|
||||
public virtual Sr_stat sr
|
||||
{
|
||||
get { return _sr; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _sr))
|
||||
{
|
||||
_sr = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("sr");
|
||||
}
|
||||
}
|
||||
}
|
||||
private Sr_stat _sr;
|
||||
|
||||
/// <summary>
|
||||
/// Additional plugin-specific information about this configuration, that might be of use for an API user. This can for example include the LUN or the WWPN.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringStringMapConverter))]
|
||||
public virtual Dictionary<string, string> extra_info
|
||||
{
|
||||
get { return _extra_info; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _extra_info))
|
||||
{
|
||||
_extra_info = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("extra_info");
|
||||
}
|
||||
}
|
||||
}
|
||||
private Dictionary<string, string> _extra_info = new Dictionary<string, string>() {};
|
||||
}
|
||||
}
|
@ -5508,6 +5508,14 @@ namespace XenAPI
|
||||
Response<string>
|
||||
async_sr_probe(string session, string _host, Object _device_config, string _type, Object _sm_config);
|
||||
|
||||
[XmlRpcMethod("SR.probe_ext")]
|
||||
Response<Proxy_Probe_result[]>
|
||||
sr_probe_ext(string session, string _host, Object _device_config, string _type, Object _sm_config);
|
||||
|
||||
[XmlRpcMethod("Async.SR.probe_ext")]
|
||||
Response<string>
|
||||
async_sr_probe_ext(string session, string _host, Object _device_config, string _type, Object _sm_config);
|
||||
|
||||
[XmlRpcMethod("SR.set_shared")]
|
||||
Response<string>
|
||||
sr_set_shared(string session, string _sr, bool _value);
|
||||
@ -5616,6 +5624,14 @@ namespace XenAPI
|
||||
Response<Object>
|
||||
sr_get_all_records(string session);
|
||||
|
||||
[XmlRpcMethod("sr_stat.get_all_records")]
|
||||
Response<Object>
|
||||
sr_stat_get_all_records(string session);
|
||||
|
||||
[XmlRpcMethod("probe_result.get_all_records")]
|
||||
Response<Object>
|
||||
probe_result_get_all_records(string session);
|
||||
|
||||
[XmlRpcMethod("LVHD.get_record")]
|
||||
Response<Proxy_LVHD>
|
||||
lvhd_get_record(string session, string _lvhd);
|
||||
@ -8896,6 +8912,27 @@ namespace XenAPI
|
||||
public bool is_tools_sr;
|
||||
}
|
||||
|
||||
[XmlRpcMissingMapping(MappingAction.Ignore)]
|
||||
public class Proxy_Sr_stat
|
||||
{
|
||||
public string uuid;
|
||||
public string name_label;
|
||||
public string name_description;
|
||||
public string free_space;
|
||||
public string total_space;
|
||||
public bool clustered;
|
||||
public string health;
|
||||
}
|
||||
|
||||
[XmlRpcMissingMapping(MappingAction.Ignore)]
|
||||
public class Proxy_Probe_result
|
||||
{
|
||||
public Object configuration;
|
||||
public bool complete;
|
||||
public Proxy_Sr_stat sr;
|
||||
public Object extra_info;
|
||||
}
|
||||
|
||||
[XmlRpcMissingMapping(MappingAction.Ignore)]
|
||||
public class Proxy_LVHD
|
||||
{
|
||||
|
@ -84,9 +84,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Role proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
subroles = proxy.subroles == null ? null : XenRef<Role>.Create(proxy.subroles);
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.subroles = (subroles != null) ? Helper.RefListToStringArray(subroles) : new string[] {};
|
||||
result_.subroles = subroles == null ? new string[] {} : Helper.RefListToStringArray(subroles);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -216,7 +216,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.role_get_uuid(session.opaque_ref, _role);
|
||||
else
|
||||
return (string)session.proxy.role_get_uuid(session.opaque_ref, _role ?? "").parse();
|
||||
return session.proxy.role_get_uuid(session.opaque_ref, _role ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -230,7 +230,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.role_get_name_label(session.opaque_ref, _role);
|
||||
else
|
||||
return (string)session.proxy.role_get_name_label(session.opaque_ref, _role ?? "").parse();
|
||||
return session.proxy.role_get_name_label(session.opaque_ref, _role ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -244,7 +244,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.role_get_name_description(session.opaque_ref, _role);
|
||||
else
|
||||
return (string)session.proxy.role_get_name_description(session.opaque_ref, _role ?? "").parse();
|
||||
return session.proxy.role_get_name_description(session.opaque_ref, _role ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -84,10 +84,10 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_SDN_controller proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
protocol = proxy.protocol == null ? (sdn_controller_protocol) 0 : (sdn_controller_protocol)Helper.EnumParseDefault(typeof(sdn_controller_protocol), (string)proxy.protocol);
|
||||
address = proxy.address == null ? null : (string)proxy.address;
|
||||
port = proxy.port == null ? 0 : long.Parse((string)proxy.port);
|
||||
address = proxy.address == null ? null : proxy.address;
|
||||
port = proxy.port == null ? 0 : long.Parse(proxy.port);
|
||||
}
|
||||
|
||||
public Proxy_SDN_controller ToProxy()
|
||||
@ -202,7 +202,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sdn_controller_get_uuid(session.opaque_ref, _sdn_controller);
|
||||
else
|
||||
return (string)session.proxy.sdn_controller_get_uuid(session.opaque_ref, _sdn_controller ?? "").parse();
|
||||
return session.proxy.sdn_controller_get_uuid(session.opaque_ref, _sdn_controller ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -230,7 +230,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sdn_controller_get_address(session.opaque_ref, _sdn_controller);
|
||||
else
|
||||
return (string)session.proxy.sdn_controller_get_address(session.opaque_ref, _sdn_controller ?? "").parse();
|
||||
return session.proxy.sdn_controller_get_address(session.opaque_ref, _sdn_controller ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -244,7 +244,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sdn_controller_get_port(session.opaque_ref, _sdn_controller);
|
||||
else
|
||||
return long.Parse((string)session.proxy.sdn_controller_get_port(session.opaque_ref, _sdn_controller ?? "").parse());
|
||||
return long.Parse(session.proxy.sdn_controller_get_port(session.opaque_ref, _sdn_controller ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -114,19 +114,19 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_SM proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
type = proxy.type == null ? null : (string)proxy.type;
|
||||
vendor = proxy.vendor == null ? null : (string)proxy.vendor;
|
||||
copyright = proxy.copyright == null ? null : (string)proxy.copyright;
|
||||
version = proxy.version == null ? null : (string)proxy.version;
|
||||
required_api_version = proxy.required_api_version == null ? null : (string)proxy.required_api_version;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
type = proxy.type == null ? null : proxy.type;
|
||||
vendor = proxy.vendor == null ? null : proxy.vendor;
|
||||
copyright = proxy.copyright == null ? null : proxy.copyright;
|
||||
version = proxy.version == null ? null : proxy.version;
|
||||
required_api_version = proxy.required_api_version == null ? null : proxy.required_api_version;
|
||||
configuration = proxy.configuration == null ? null : Maps.convert_from_proxy_string_string(proxy.configuration);
|
||||
capabilities = proxy.capabilities == null ? new string[] {} : (string [])proxy.capabilities;
|
||||
features = proxy.features == null ? null : Maps.convert_from_proxy_string_long(proxy.features);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
driver_filename = proxy.driver_filename == null ? null : (string)proxy.driver_filename;
|
||||
driver_filename = proxy.driver_filename == null ? null : proxy.driver_filename;
|
||||
required_cluster_stack = proxy.required_cluster_stack == null ? new string[] {} : (string [])proxy.required_cluster_stack;
|
||||
}
|
||||
|
||||
@ -301,7 +301,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_uuid(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_uuid(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_uuid(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -315,7 +315,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_name_label(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_name_label(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_name_label(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -329,7 +329,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_name_description(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_name_description(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_name_description(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -343,7 +343,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_type(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_type(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_type(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -357,7 +357,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_vendor(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_vendor(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_vendor(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -371,7 +371,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_copyright(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_copyright(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_copyright(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -385,7 +385,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_version(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_version(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_version(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -399,7 +399,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_required_api_version(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_required_api_version(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_required_api_version(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -471,7 +471,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sm_get_driver_filename(session.opaque_ref, _sm);
|
||||
else
|
||||
return (string)session.proxy.sm_get_driver_filename(session.opaque_ref, _sm ?? "").parse();
|
||||
return session.proxy.sm_get_driver_filename(session.opaque_ref, _sm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -135,18 +135,18 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_SR proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<storage_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_storage_operations(proxy.current_operations);
|
||||
VDIs = proxy.VDIs == null ? null : XenRef<VDI>.Create(proxy.VDIs);
|
||||
PBDs = proxy.PBDs == null ? null : XenRef<PBD>.Create(proxy.PBDs);
|
||||
virtual_allocation = proxy.virtual_allocation == null ? 0 : long.Parse((string)proxy.virtual_allocation);
|
||||
physical_utilisation = proxy.physical_utilisation == null ? 0 : long.Parse((string)proxy.physical_utilisation);
|
||||
physical_size = proxy.physical_size == null ? 0 : long.Parse((string)proxy.physical_size);
|
||||
type = proxy.type == null ? null : (string)proxy.type;
|
||||
content_type = proxy.content_type == null ? null : (string)proxy.content_type;
|
||||
virtual_allocation = proxy.virtual_allocation == null ? 0 : long.Parse(proxy.virtual_allocation);
|
||||
physical_utilisation = proxy.physical_utilisation == null ? 0 : long.Parse(proxy.physical_utilisation);
|
||||
physical_size = proxy.physical_size == null ? 0 : long.Parse(proxy.physical_size);
|
||||
type = proxy.type == null ? null : proxy.type;
|
||||
content_type = proxy.content_type == null ? null : proxy.content_type;
|
||||
shared = (bool)proxy.shared;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
tags = proxy.tags == null ? new string[] {} : (string [])proxy.tags;
|
||||
@ -164,10 +164,10 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_storage_operations(current_operations);
|
||||
result_.VDIs = (VDIs != null) ? Helper.RefListToStringArray(VDIs) : new string[] {};
|
||||
result_.PBDs = (PBDs != null) ? Helper.RefListToStringArray(PBDs) : new string[] {};
|
||||
result_.VDIs = VDIs == null ? new string[] {} : Helper.RefListToStringArray(VDIs);
|
||||
result_.PBDs = PBDs == null ? new string[] {} : Helper.RefListToStringArray(PBDs);
|
||||
result_.virtual_allocation = virtual_allocation.ToString();
|
||||
result_.physical_utilisation = physical_utilisation.ToString();
|
||||
result_.physical_size = physical_size.ToString();
|
||||
@ -379,7 +379,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_uuid(session.opaque_ref, _sr);
|
||||
else
|
||||
return (string)session.proxy.sr_get_uuid(session.opaque_ref, _sr ?? "").parse();
|
||||
return session.proxy.sr_get_uuid(session.opaque_ref, _sr ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -393,7 +393,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_name_label(session.opaque_ref, _sr);
|
||||
else
|
||||
return (string)session.proxy.sr_get_name_label(session.opaque_ref, _sr ?? "").parse();
|
||||
return session.proxy.sr_get_name_label(session.opaque_ref, _sr ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -407,7 +407,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_name_description(session.opaque_ref, _sr);
|
||||
else
|
||||
return (string)session.proxy.sr_get_name_description(session.opaque_ref, _sr ?? "").parse();
|
||||
return session.proxy.sr_get_name_description(session.opaque_ref, _sr ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -477,7 +477,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_virtual_allocation(session.opaque_ref, _sr);
|
||||
else
|
||||
return long.Parse((string)session.proxy.sr_get_virtual_allocation(session.opaque_ref, _sr ?? "").parse());
|
||||
return long.Parse(session.proxy.sr_get_virtual_allocation(session.opaque_ref, _sr ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -491,7 +491,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_physical_utilisation(session.opaque_ref, _sr);
|
||||
else
|
||||
return long.Parse((string)session.proxy.sr_get_physical_utilisation(session.opaque_ref, _sr ?? "").parse());
|
||||
return long.Parse(session.proxy.sr_get_physical_utilisation(session.opaque_ref, _sr ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -505,7 +505,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_physical_size(session.opaque_ref, _sr);
|
||||
else
|
||||
return long.Parse((string)session.proxy.sr_get_physical_size(session.opaque_ref, _sr ?? "").parse());
|
||||
return long.Parse(session.proxy.sr_get_physical_size(session.opaque_ref, _sr ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -519,7 +519,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_type(session.opaque_ref, _sr);
|
||||
else
|
||||
return (string)session.proxy.sr_get_type(session.opaque_ref, _sr ?? "").parse();
|
||||
return session.proxy.sr_get_type(session.opaque_ref, _sr ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -533,7 +533,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_get_content_type(session.opaque_ref, _sr);
|
||||
else
|
||||
return (string)session.proxy.sr_get_content_type(session.opaque_ref, _sr ?? "").parse();
|
||||
return session.proxy.sr_get_content_type(session.opaque_ref, _sr ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -982,7 +982,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_make(session.opaque_ref, _host, _device_config, _physical_size, _name_label, _name_description, _type, _content_type);
|
||||
else
|
||||
return (string)session.proxy.sr_make(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _physical_size.ToString(), _name_label ?? "", _name_description ?? "", _type ?? "", _content_type ?? "").parse();
|
||||
return session.proxy.sr_make(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _physical_size.ToString(), _name_label ?? "", _name_description ?? "", _type ?? "", _content_type ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1027,7 +1027,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_make(session.opaque_ref, _host, _device_config, _physical_size, _name_label, _name_description, _type, _content_type, _sm_config);
|
||||
else
|
||||
return (string)session.proxy.sr_make(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _physical_size.ToString(), _name_label ?? "", _name_description ?? "", _type ?? "", _content_type ?? "", Maps.convert_to_proxy_string_string(_sm_config)).parse();
|
||||
return session.proxy.sr_make(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _physical_size.ToString(), _name_label ?? "", _name_description ?? "", _type ?? "", _content_type ?? "", Maps.convert_to_proxy_string_string(_sm_config)).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1192,7 +1192,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_probe(session.opaque_ref, _host, _device_config, _type, _sm_config);
|
||||
else
|
||||
return (string)session.proxy.sr_probe(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _type ?? "", Maps.convert_to_proxy_string_string(_sm_config)).parse();
|
||||
return session.proxy.sr_probe(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _type ?? "", Maps.convert_to_proxy_string_string(_sm_config)).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1212,6 +1212,40 @@ namespace XenAPI
|
||||
return XenRef<Task>.Create(session.proxy.async_sr_probe(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _type ?? "", Maps.convert_to_proxy_string_string(_sm_config)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Perform a backend-specific scan, using the given device_config. If the device_config is complete, then this will return a list of the SRs present of this type on the device, if any. If the device_config is partial, then a backend-specific scan will be performed, returning results that will guide the user in improving the device_config.
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_host">The host to create/make the SR on</param>
|
||||
/// <param name="_device_config">The device config string that will be passed to backend SR driver</param>
|
||||
/// <param name="_type">The type of the SR; used to specify the SR backend driver to use</param>
|
||||
/// <param name="_sm_config">Storage backend specific configuration options</param>
|
||||
public static List<Probe_result> probe_ext(Session session, string _host, Dictionary<string, string> _device_config, string _type, Dictionary<string, string> _sm_config)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.sr_probe_ext(session.opaque_ref, _host, _device_config, _type, _sm_config);
|
||||
else
|
||||
return Probe_result.ProxyArrayToObjectList(session.proxy.sr_probe_ext(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _type ?? "", Maps.convert_to_proxy_string_string(_sm_config)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Perform a backend-specific scan, using the given device_config. If the device_config is complete, then this will return a list of the SRs present of this type on the device, if any. If the device_config is partial, then a backend-specific scan will be performed, returning results that will guide the user in improving the device_config.
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_host">The host to create/make the SR on</param>
|
||||
/// <param name="_device_config">The device config string that will be passed to backend SR driver</param>
|
||||
/// <param name="_type">The type of the SR; used to specify the SR backend driver to use</param>
|
||||
/// <param name="_sm_config">Storage backend specific configuration options</param>
|
||||
public static XenRef<Task> async_probe_ext(Session session, string _host, Dictionary<string, string> _device_config, string _type, Dictionary<string, string> _sm_config)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_sr_probe_ext(session.opaque_ref, _host, _device_config, _type, _sm_config);
|
||||
else
|
||||
return XenRef<Task>.Create(session.proxy.async_sr_probe_ext(session.opaque_ref, _host ?? "", Maps.convert_to_proxy_string_string(_device_config), _type ?? "", Maps.convert_to_proxy_string_string(_sm_config)).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the shared flag on the SR
|
||||
/// First published in XenServer 4.0.
|
||||
|
@ -81,8 +81,8 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Secret proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
value = proxy.value == null ? null : (string)proxy.value;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
value = proxy.value == null ? null : proxy.value;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
|
||||
@ -259,7 +259,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.secret_get_uuid(session.opaque_ref, _secret);
|
||||
else
|
||||
return (string)session.proxy.secret_get_uuid(session.opaque_ref, _secret ?? "").parse();
|
||||
return session.proxy.secret_get_uuid(session.opaque_ref, _secret ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -273,7 +273,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.secret_get_value(session.opaque_ref, _secret);
|
||||
else
|
||||
return (string)session.proxy.secret_get_value(session.opaque_ref, _secret ?? "").parse();
|
||||
return session.proxy.secret_get_value(session.opaque_ref, _secret ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
317
XenModel/XenAPI/Sr_stat.cs
Normal file
317
XenModel/XenAPI/Sr_stat.cs
Normal file
@ -0,0 +1,317 @@
|
||||
/*
|
||||
* 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 System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
|
||||
namespace XenAPI
|
||||
{
|
||||
/// <summary>
|
||||
/// A set of high-level properties associated with an SR.
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
public partial class Sr_stat : XenObject<Sr_stat>
|
||||
{
|
||||
public Sr_stat()
|
||||
{
|
||||
}
|
||||
|
||||
public Sr_stat(string uuid,
|
||||
string name_label,
|
||||
string name_description,
|
||||
long free_space,
|
||||
long total_space,
|
||||
bool clustered,
|
||||
sr_health health)
|
||||
{
|
||||
this.uuid = uuid;
|
||||
this.name_label = name_label;
|
||||
this.name_description = name_description;
|
||||
this.free_space = free_space;
|
||||
this.total_space = total_space;
|
||||
this.clustered = clustered;
|
||||
this.health = health;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new Sr_stat from a Proxy_Sr_stat.
|
||||
/// </summary>
|
||||
/// <param name="proxy"></param>
|
||||
public Sr_stat(Proxy_Sr_stat proxy)
|
||||
{
|
||||
this.UpdateFromProxy(proxy);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates each field of this instance with the value of
|
||||
/// the corresponding field of a given Sr_stat.
|
||||
/// </summary>
|
||||
public override void UpdateFrom(Sr_stat update)
|
||||
{
|
||||
uuid = update.uuid;
|
||||
name_label = update.name_label;
|
||||
name_description = update.name_description;
|
||||
free_space = update.free_space;
|
||||
total_space = update.total_space;
|
||||
clustered = update.clustered;
|
||||
health = update.health;
|
||||
}
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Sr_stat proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
free_space = proxy.free_space == null ? 0 : long.Parse(proxy.free_space);
|
||||
total_space = proxy.total_space == null ? 0 : long.Parse(proxy.total_space);
|
||||
clustered = (bool)proxy.clustered;
|
||||
health = proxy.health == null ? (sr_health) 0 : (sr_health)Helper.EnumParseDefault(typeof(sr_health), (string)proxy.health);
|
||||
}
|
||||
|
||||
public Proxy_Sr_stat ToProxy()
|
||||
{
|
||||
Proxy_Sr_stat result_ = new Proxy_Sr_stat();
|
||||
result_.uuid = uuid;
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.free_space = free_space.ToString();
|
||||
result_.total_space = total_space.ToString();
|
||||
result_.clustered = clustered;
|
||||
result_.health = sr_health_helper.ToString(health);
|
||||
return result_;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new Sr_stat from a Hashtable.
|
||||
/// Note that the fields not contained in the Hashtable
|
||||
/// will be created with their default values.
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
public Sr_stat(Hashtable table) : this()
|
||||
{
|
||||
UpdateFrom(table);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a Hashtable with field-value pairs, it updates the fields of this Sr_stat
|
||||
/// with the values listed in the Hashtable. Note that only the fields contained
|
||||
/// in the Hashtable will be updated and the rest will remain the same.
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
public void UpdateFrom(Hashtable table)
|
||||
{
|
||||
if (table.ContainsKey("uuid"))
|
||||
uuid = Marshalling.ParseString(table, "uuid");
|
||||
if (table.ContainsKey("name_label"))
|
||||
name_label = Marshalling.ParseString(table, "name_label");
|
||||
if (table.ContainsKey("name_description"))
|
||||
name_description = Marshalling.ParseString(table, "name_description");
|
||||
if (table.ContainsKey("free_space"))
|
||||
free_space = Marshalling.ParseLong(table, "free_space");
|
||||
if (table.ContainsKey("total_space"))
|
||||
total_space = Marshalling.ParseLong(table, "total_space");
|
||||
if (table.ContainsKey("clustered"))
|
||||
clustered = Marshalling.ParseBool(table, "clustered");
|
||||
if (table.ContainsKey("health"))
|
||||
health = (sr_health)Helper.EnumParseDefault(typeof(sr_health), Marshalling.ParseString(table, "health"));
|
||||
}
|
||||
|
||||
public bool DeepEquals(Sr_stat other)
|
||||
{
|
||||
if (ReferenceEquals(null, other))
|
||||
return false;
|
||||
if (ReferenceEquals(this, other))
|
||||
return true;
|
||||
|
||||
return Helper.AreEqual2(this._uuid, other._uuid) &&
|
||||
Helper.AreEqual2(this._name_label, other._name_label) &&
|
||||
Helper.AreEqual2(this._name_description, other._name_description) &&
|
||||
Helper.AreEqual2(this._free_space, other._free_space) &&
|
||||
Helper.AreEqual2(this._total_space, other._total_space) &&
|
||||
Helper.AreEqual2(this._clustered, other._clustered) &&
|
||||
Helper.AreEqual2(this._health, other._health);
|
||||
}
|
||||
|
||||
internal static List<Sr_stat> ProxyArrayToObjectList(Proxy_Sr_stat[] input)
|
||||
{
|
||||
var result = new List<Sr_stat>();
|
||||
foreach (var item in input)
|
||||
result.Add(new Sr_stat(item));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public override string SaveChanges(Session session, string opaqueRef, Sr_stat server)
|
||||
{
|
||||
if (opaqueRef == null)
|
||||
{
|
||||
System.Diagnostics.Debug.Assert(false, "Cannot create instances of this type on the server");
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException("This type has no read/write properties");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Uuid that uniquely identifies this SR, if one is available.
|
||||
/// </summary>
|
||||
public virtual string uuid
|
||||
{
|
||||
get { return _uuid; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _uuid))
|
||||
{
|
||||
_uuid = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("uuid");
|
||||
}
|
||||
}
|
||||
}
|
||||
private string _uuid;
|
||||
|
||||
/// <summary>
|
||||
/// Short, human-readable label for the SR.
|
||||
/// </summary>
|
||||
public virtual string name_label
|
||||
{
|
||||
get { return _name_label; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _name_label))
|
||||
{
|
||||
_name_label = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("name_label");
|
||||
}
|
||||
}
|
||||
}
|
||||
private string _name_label = "";
|
||||
|
||||
/// <summary>
|
||||
/// Longer, human-readable description of the SR. Descriptions are generally only displayed by clients when the user is examining SRs in detail.
|
||||
/// </summary>
|
||||
public virtual string name_description
|
||||
{
|
||||
get { return _name_description; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _name_description))
|
||||
{
|
||||
_name_description = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("name_description");
|
||||
}
|
||||
}
|
||||
}
|
||||
private string _name_description = "";
|
||||
|
||||
/// <summary>
|
||||
/// Number of bytes free on the backing storage (in bytes)
|
||||
/// </summary>
|
||||
public virtual long free_space
|
||||
{
|
||||
get { return _free_space; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _free_space))
|
||||
{
|
||||
_free_space = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("free_space");
|
||||
}
|
||||
}
|
||||
}
|
||||
private long _free_space;
|
||||
|
||||
/// <summary>
|
||||
/// Total physical size of the backing storage (in bytes)
|
||||
/// </summary>
|
||||
public virtual long total_space
|
||||
{
|
||||
get { return _total_space; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _total_space))
|
||||
{
|
||||
_total_space = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("total_space");
|
||||
}
|
||||
}
|
||||
}
|
||||
private long _total_space;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the SR uses clustered local storage.
|
||||
/// </summary>
|
||||
public virtual bool clustered
|
||||
{
|
||||
get { return _clustered; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _clustered))
|
||||
{
|
||||
_clustered = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("clustered");
|
||||
}
|
||||
}
|
||||
}
|
||||
private bool _clustered;
|
||||
|
||||
/// <summary>
|
||||
/// The health status of the SR.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(sr_healthConverter))]
|
||||
public virtual sr_health health
|
||||
{
|
||||
get { return _health; }
|
||||
set
|
||||
{
|
||||
if (!Helper.AreEqual(value, _health))
|
||||
{
|
||||
_health = value;
|
||||
Changed = true;
|
||||
NotifyPropertyChanged("health");
|
||||
}
|
||||
}
|
||||
}
|
||||
private sr_health _health;
|
||||
}
|
||||
}
|
@ -84,8 +84,8 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Subject proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
subject_identifier = proxy.subject_identifier == null ? null : (string)proxy.subject_identifier;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
subject_identifier = proxy.subject_identifier == null ? null : proxy.subject_identifier;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
roles = proxy.roles == null ? null : XenRef<Role>.Create(proxy.roles);
|
||||
}
|
||||
@ -96,7 +96,7 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.subject_identifier = subject_identifier ?? "";
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.roles = (roles != null) ? Helper.RefListToStringArray(roles) : new string[] {};
|
||||
result_.roles = roles == null ? new string[] {} : Helper.RefListToStringArray(roles);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -258,7 +258,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.subject_get_uuid(session.opaque_ref, _subject);
|
||||
else
|
||||
return (string)session.proxy.subject_get_uuid(session.opaque_ref, _subject ?? "").parse();
|
||||
return session.proxy.subject_get_uuid(session.opaque_ref, _subject ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -272,7 +272,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.subject_get_subject_identifier(session.opaque_ref, _subject);
|
||||
else
|
||||
return (string)session.proxy.subject_get_subject_identifier(session.opaque_ref, _subject ?? "").parse();
|
||||
return session.proxy.subject_get_subject_identifier(session.opaque_ref, _subject ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -123,9 +123,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Task proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<task_allowed_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_task_allowed_operations(proxy.current_operations);
|
||||
created = proxy.created;
|
||||
@ -133,13 +133,13 @@ namespace XenAPI
|
||||
status = proxy.status == null ? (task_status_type) 0 : (task_status_type)Helper.EnumParseDefault(typeof(task_status_type), (string)proxy.status);
|
||||
resident_on = proxy.resident_on == null ? null : XenRef<Host>.Create(proxy.resident_on);
|
||||
progress = Convert.ToDouble(proxy.progress);
|
||||
type = proxy.type == null ? null : (string)proxy.type;
|
||||
result = proxy.result == null ? null : (string)proxy.result;
|
||||
type = proxy.type == null ? null : proxy.type;
|
||||
result = proxy.result == null ? null : proxy.result;
|
||||
error_info = proxy.error_info == null ? new string[] {} : (string [])proxy.error_info;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
subtask_of = proxy.subtask_of == null ? null : XenRef<Task>.Create(proxy.subtask_of);
|
||||
subtasks = proxy.subtasks == null ? null : XenRef<Task>.Create(proxy.subtasks);
|
||||
backtrace = proxy.backtrace == null ? null : (string)proxy.backtrace;
|
||||
backtrace = proxy.backtrace == null ? null : proxy.backtrace;
|
||||
}
|
||||
|
||||
public Proxy_Task ToProxy()
|
||||
@ -148,7 +148,7 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_task_allowed_operations(current_operations);
|
||||
result_.created = created;
|
||||
result_.finished = finished;
|
||||
@ -160,7 +160,7 @@ namespace XenAPI
|
||||
result_.error_info = error_info;
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
result_.subtask_of = subtask_of ?? "";
|
||||
result_.subtasks = (subtasks != null) ? Helper.RefListToStringArray(subtasks) : new string[] {};
|
||||
result_.subtasks = subtasks == null ? new string[] {} : Helper.RefListToStringArray(subtasks);
|
||||
result_.backtrace = backtrace ?? "";
|
||||
return result_;
|
||||
}
|
||||
@ -327,7 +327,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.task_get_uuid(session.opaque_ref, _task);
|
||||
else
|
||||
return (string)session.proxy.task_get_uuid(session.opaque_ref, _task ?? "").parse();
|
||||
return session.proxy.task_get_uuid(session.opaque_ref, _task ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -341,7 +341,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.task_get_name_label(session.opaque_ref, _task);
|
||||
else
|
||||
return (string)session.proxy.task_get_name_label(session.opaque_ref, _task ?? "").parse();
|
||||
return session.proxy.task_get_name_label(session.opaque_ref, _task ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -355,7 +355,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.task_get_name_description(session.opaque_ref, _task);
|
||||
else
|
||||
return (string)session.proxy.task_get_name_description(session.opaque_ref, _task ?? "").parse();
|
||||
return session.proxy.task_get_name_description(session.opaque_ref, _task ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -467,7 +467,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.task_get_type(session.opaque_ref, _task);
|
||||
else
|
||||
return (string)session.proxy.task_get_type(session.opaque_ref, _task ?? "").parse();
|
||||
return session.proxy.task_get_type(session.opaque_ref, _task ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -481,7 +481,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.task_get_result(session.opaque_ref, _task);
|
||||
else
|
||||
return (string)session.proxy.task_get_result(session.opaque_ref, _task ?? "").parse();
|
||||
return session.proxy.task_get_result(session.opaque_ref, _task ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -551,7 +551,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.task_get_backtrace(session.opaque_ref, _task);
|
||||
else
|
||||
return (string)session.proxy.task_get_backtrace(session.opaque_ref, _task ?? "").parse();
|
||||
return session.proxy.task_get_backtrace(session.opaque_ref, _task ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,7 +87,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Tunnel proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
access_PIF = proxy.access_PIF == null ? null : XenRef<PIF>.Create(proxy.access_PIF);
|
||||
transport_PIF = proxy.transport_PIF == null ? null : XenRef<PIF>.Create(proxy.transport_PIF);
|
||||
status = proxy.status == null ? null : Maps.convert_from_proxy_string_string(proxy.status);
|
||||
@ -219,7 +219,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.tunnel_get_uuid(session.opaque_ref, _tunnel);
|
||||
else
|
||||
return (string)session.proxy.tunnel_get_uuid(session.opaque_ref, _tunnel ?? "").parse();
|
||||
return session.proxy.tunnel_get_uuid(session.opaque_ref, _tunnel ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -90,9 +90,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_USB_group proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
PUSBs = proxy.PUSBs == null ? null : XenRef<PUSB>.Create(proxy.PUSBs);
|
||||
VUSBs = proxy.VUSBs == null ? null : XenRef<VUSB>.Create(proxy.VUSBs);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
@ -104,8 +104,8 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.PUSBs = (PUSBs != null) ? Helper.RefListToStringArray(PUSBs) : new string[] {};
|
||||
result_.VUSBs = (VUSBs != null) ? Helper.RefListToStringArray(VUSBs) : new string[] {};
|
||||
result_.PUSBs = PUSBs == null ? new string[] {} : Helper.RefListToStringArray(PUSBs);
|
||||
result_.VUSBs = VUSBs == null ? new string[] {} : Helper.RefListToStringArray(VUSBs);
|
||||
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
|
||||
return result_;
|
||||
}
|
||||
@ -245,7 +245,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.usb_group_get_uuid(session.opaque_ref, _usb_group);
|
||||
else
|
||||
return (string)session.proxy.usb_group_get_uuid(session.opaque_ref, _usb_group ?? "").parse();
|
||||
return session.proxy.usb_group_get_uuid(session.opaque_ref, _usb_group ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -259,7 +259,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.usb_group_get_name_label(session.opaque_ref, _usb_group);
|
||||
else
|
||||
return (string)session.proxy.usb_group_get_name_label(session.opaque_ref, _usb_group ?? "").parse();
|
||||
return session.proxy.usb_group_get_name_label(session.opaque_ref, _usb_group ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -273,7 +273,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.usb_group_get_name_description(session.opaque_ref, _usb_group);
|
||||
else
|
||||
return (string)session.proxy.usb_group_get_name_description(session.opaque_ref, _usb_group ?? "").parse();
|
||||
return session.proxy.usb_group_get_name_description(session.opaque_ref, _usb_group ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -84,9 +84,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_User proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
short_name = proxy.short_name == null ? null : (string)proxy.short_name;
|
||||
fullname = proxy.fullname == null ? null : (string)proxy.fullname;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
short_name = proxy.short_name == null ? null : proxy.short_name;
|
||||
fullname = proxy.fullname == null ? null : proxy.fullname;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.user_get_uuid(session.opaque_ref, _user);
|
||||
else
|
||||
return (string)session.proxy.user_get_uuid(session.opaque_ref, _user ?? "").parse();
|
||||
return session.proxy.user_get_uuid(session.opaque_ref, _user ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -293,7 +293,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.user_get_short_name(session.opaque_ref, _user);
|
||||
else
|
||||
return (string)session.proxy.user_get_short_name(session.opaque_ref, _user ?? "").parse();
|
||||
return session.proxy.user_get_short_name(session.opaque_ref, _user ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -307,7 +307,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.user_get_fullname(session.opaque_ref, _user);
|
||||
else
|
||||
return (string)session.proxy.user_get_fullname(session.opaque_ref, _user ?? "").parse();
|
||||
return session.proxy.user_get_fullname(session.opaque_ref, _user ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -138,13 +138,13 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VBD proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<vbd_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_vbd_operations(proxy.current_operations);
|
||||
VM = proxy.VM == null ? null : XenRef<VM>.Create(proxy.VM);
|
||||
VDI = proxy.VDI == null ? null : XenRef<VDI>.Create(proxy.VDI);
|
||||
device = proxy.device == null ? null : (string)proxy.device;
|
||||
userdevice = proxy.userdevice == null ? null : (string)proxy.userdevice;
|
||||
device = proxy.device == null ? null : proxy.device;
|
||||
userdevice = proxy.userdevice == null ? null : proxy.userdevice;
|
||||
bootable = (bool)proxy.bootable;
|
||||
mode = proxy.mode == null ? (vbd_mode) 0 : (vbd_mode)Helper.EnumParseDefault(typeof(vbd_mode), (string)proxy.mode);
|
||||
type = proxy.type == null ? (vbd_type) 0 : (vbd_type)Helper.EnumParseDefault(typeof(vbd_type), (string)proxy.type);
|
||||
@ -153,10 +153,10 @@ namespace XenAPI
|
||||
empty = (bool)proxy.empty;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
currently_attached = (bool)proxy.currently_attached;
|
||||
status_code = proxy.status_code == null ? 0 : long.Parse((string)proxy.status_code);
|
||||
status_detail = proxy.status_detail == null ? null : (string)proxy.status_detail;
|
||||
status_code = proxy.status_code == null ? 0 : long.Parse(proxy.status_code);
|
||||
status_detail = proxy.status_detail == null ? null : proxy.status_detail;
|
||||
runtime_properties = proxy.runtime_properties == null ? null : Maps.convert_from_proxy_string_string(proxy.runtime_properties);
|
||||
qos_algorithm_type = proxy.qos_algorithm_type == null ? null : (string)proxy.qos_algorithm_type;
|
||||
qos_algorithm_type = proxy.qos_algorithm_type == null ? null : proxy.qos_algorithm_type;
|
||||
qos_algorithm_params = proxy.qos_algorithm_params == null ? null : Maps.convert_from_proxy_string_string(proxy.qos_algorithm_params);
|
||||
qos_supported_algorithms = proxy.qos_supported_algorithms == null ? new string[] {} : (string [])proxy.qos_supported_algorithms;
|
||||
metrics = proxy.metrics == null ? null : XenRef<VBD_metrics>.Create(proxy.metrics);
|
||||
@ -166,7 +166,7 @@ namespace XenAPI
|
||||
{
|
||||
Proxy_VBD result_ = new Proxy_VBD();
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_vbd_operations(current_operations);
|
||||
result_.VM = VM ?? "";
|
||||
result_.VDI = VDI ?? "";
|
||||
@ -437,7 +437,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vbd_get_uuid(session.opaque_ref, _vbd);
|
||||
else
|
||||
return (string)session.proxy.vbd_get_uuid(session.opaque_ref, _vbd ?? "").parse();
|
||||
return session.proxy.vbd_get_uuid(session.opaque_ref, _vbd ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -507,7 +507,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vbd_get_device(session.opaque_ref, _vbd);
|
||||
else
|
||||
return (string)session.proxy.vbd_get_device(session.opaque_ref, _vbd ?? "").parse();
|
||||
return session.proxy.vbd_get_device(session.opaque_ref, _vbd ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -521,7 +521,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vbd_get_userdevice(session.opaque_ref, _vbd);
|
||||
else
|
||||
return (string)session.proxy.vbd_get_userdevice(session.opaque_ref, _vbd ?? "").parse();
|
||||
return session.proxy.vbd_get_userdevice(session.opaque_ref, _vbd ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -647,7 +647,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vbd_get_status_code(session.opaque_ref, _vbd);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vbd_get_status_code(session.opaque_ref, _vbd ?? "").parse());
|
||||
return long.Parse(session.proxy.vbd_get_status_code(session.opaque_ref, _vbd ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -661,7 +661,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vbd_get_status_detail(session.opaque_ref, _vbd);
|
||||
else
|
||||
return (string)session.proxy.vbd_get_status_detail(session.opaque_ref, _vbd ?? "").parse();
|
||||
return session.proxy.vbd_get_status_detail(session.opaque_ref, _vbd ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -689,7 +689,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vbd_get_qos_algorithm_type(session.opaque_ref, _vbd);
|
||||
else
|
||||
return (string)session.proxy.vbd_get_qos_algorithm_type(session.opaque_ref, _vbd ?? "").parse();
|
||||
return session.proxy.vbd_get_qos_algorithm_type(session.opaque_ref, _vbd ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,7 +87,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VBD_metrics proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
io_read_kbs = Convert.ToDouble(proxy.io_read_kbs);
|
||||
io_write_kbs = Convert.ToDouble(proxy.io_write_kbs);
|
||||
last_updated = proxy.last_updated;
|
||||
@ -215,7 +215,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vbd_metrics_get_uuid(session.opaque_ref, _vbd_metrics);
|
||||
else
|
||||
return (string)session.proxy.vbd_metrics_get_uuid(session.opaque_ref, _vbd_metrics ?? "").parse();
|
||||
return session.proxy.vbd_metrics_get_uuid(session.opaque_ref, _vbd_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -168,22 +168,22 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VDI proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<vdi_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_vdi_operations(proxy.current_operations);
|
||||
SR = proxy.SR == null ? null : XenRef<SR>.Create(proxy.SR);
|
||||
VBDs = proxy.VBDs == null ? null : XenRef<VBD>.Create(proxy.VBDs);
|
||||
crash_dumps = proxy.crash_dumps == null ? null : XenRef<Crashdump>.Create(proxy.crash_dumps);
|
||||
virtual_size = proxy.virtual_size == null ? 0 : long.Parse((string)proxy.virtual_size);
|
||||
physical_utilisation = proxy.physical_utilisation == null ? 0 : long.Parse((string)proxy.physical_utilisation);
|
||||
virtual_size = proxy.virtual_size == null ? 0 : long.Parse(proxy.virtual_size);
|
||||
physical_utilisation = proxy.physical_utilisation == null ? 0 : long.Parse(proxy.physical_utilisation);
|
||||
type = proxy.type == null ? (vdi_type) 0 : (vdi_type)Helper.EnumParseDefault(typeof(vdi_type), (string)proxy.type);
|
||||
sharable = (bool)proxy.sharable;
|
||||
read_only = (bool)proxy.read_only;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
storage_lock = (bool)proxy.storage_lock;
|
||||
location = proxy.location == null ? null : (string)proxy.location;
|
||||
location = proxy.location == null ? null : proxy.location;
|
||||
managed = (bool)proxy.managed;
|
||||
missing = (bool)proxy.missing;
|
||||
parent = proxy.parent == null ? null : XenRef<VDI>.Create(proxy.parent);
|
||||
@ -208,11 +208,11 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_vdi_operations(current_operations);
|
||||
result_.SR = SR ?? "";
|
||||
result_.VBDs = (VBDs != null) ? Helper.RefListToStringArray(VBDs) : new string[] {};
|
||||
result_.crash_dumps = (crash_dumps != null) ? Helper.RefListToStringArray(crash_dumps) : new string[] {};
|
||||
result_.VBDs = VBDs == null ? new string[] {} : Helper.RefListToStringArray(VBDs);
|
||||
result_.crash_dumps = crash_dumps == null ? new string[] {} : Helper.RefListToStringArray(crash_dumps);
|
||||
result_.virtual_size = virtual_size.ToString();
|
||||
result_.physical_utilisation = physical_utilisation.ToString();
|
||||
result_.type = vdi_type_helper.ToString(type);
|
||||
@ -228,7 +228,7 @@ namespace XenAPI
|
||||
result_.sm_config = Maps.convert_to_proxy_string_string(sm_config);
|
||||
result_.is_a_snapshot = is_a_snapshot;
|
||||
result_.snapshot_of = snapshot_of ?? "";
|
||||
result_.snapshots = (snapshots != null) ? Helper.RefListToStringArray(snapshots) : new string[] {};
|
||||
result_.snapshots = snapshots == null ? new string[] {} : Helper.RefListToStringArray(snapshots);
|
||||
result_.snapshot_time = snapshot_time;
|
||||
result_.tags = tags;
|
||||
result_.allow_caching = allow_caching;
|
||||
@ -535,7 +535,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_get_uuid(session.opaque_ref, _vdi);
|
||||
else
|
||||
return (string)session.proxy.vdi_get_uuid(session.opaque_ref, _vdi ?? "").parse();
|
||||
return session.proxy.vdi_get_uuid(session.opaque_ref, _vdi ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -549,7 +549,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_get_name_label(session.opaque_ref, _vdi);
|
||||
else
|
||||
return (string)session.proxy.vdi_get_name_label(session.opaque_ref, _vdi ?? "").parse();
|
||||
return session.proxy.vdi_get_name_label(session.opaque_ref, _vdi ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -563,7 +563,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_get_name_description(session.opaque_ref, _vdi);
|
||||
else
|
||||
return (string)session.proxy.vdi_get_name_description(session.opaque_ref, _vdi ?? "").parse();
|
||||
return session.proxy.vdi_get_name_description(session.opaque_ref, _vdi ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -647,7 +647,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_get_virtual_size(session.opaque_ref, _vdi);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vdi_get_virtual_size(session.opaque_ref, _vdi ?? "").parse());
|
||||
return long.Parse(session.proxy.vdi_get_virtual_size(session.opaque_ref, _vdi ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -661,7 +661,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_get_physical_utilisation(session.opaque_ref, _vdi);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vdi_get_physical_utilisation(session.opaque_ref, _vdi ?? "").parse());
|
||||
return long.Parse(session.proxy.vdi_get_physical_utilisation(session.opaque_ref, _vdi ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -745,7 +745,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_get_location(session.opaque_ref, _vdi);
|
||||
else
|
||||
return (string)session.proxy.vdi_get_location(session.opaque_ref, _vdi ?? "").parse();
|
||||
return session.proxy.vdi_get_location(session.opaque_ref, _vdi ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2018,7 +2018,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_read_database_pool_uuid(session.opaque_ref, _vdi);
|
||||
else
|
||||
return (string)session.proxy.vdi_read_database_pool_uuid(session.opaque_ref, _vdi ?? "").parse();
|
||||
return session.proxy.vdi_read_database_pool_uuid(session.opaque_ref, _vdi ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2163,7 +2163,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vdi_list_changed_blocks(session.opaque_ref, _vdi, _vdi_to);
|
||||
else
|
||||
return (string)session.proxy.vdi_list_changed_blocks(session.opaque_ref, _vdi ?? "", _vdi_to ?? "").parse();
|
||||
return session.proxy.vdi_list_changed_blocks(session.opaque_ref, _vdi ?? "", _vdi_to ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -102,10 +102,10 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VGPU proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
VM = proxy.VM == null ? null : XenRef<VM>.Create(proxy.VM);
|
||||
GPU_group = proxy.GPU_group == null ? null : XenRef<GPU_group>.Create(proxy.GPU_group);
|
||||
device = proxy.device == null ? null : (string)proxy.device;
|
||||
device = proxy.device == null ? null : proxy.device;
|
||||
currently_attached = (bool)proxy.currently_attached;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
type = proxy.type == null ? null : XenRef<VGPU_type>.Create(proxy.type);
|
||||
@ -255,7 +255,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_get_uuid(session.opaque_ref, _vgpu);
|
||||
else
|
||||
return (string)session.proxy.vgpu_get_uuid(session.opaque_ref, _vgpu ?? "").parse();
|
||||
return session.proxy.vgpu_get_uuid(session.opaque_ref, _vgpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -297,7 +297,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_get_device(session.opaque_ref, _vgpu);
|
||||
else
|
||||
return (string)session.proxy.vgpu_get_device(session.opaque_ref, _vgpu ?? "").parse();
|
||||
return session.proxy.vgpu_get_device(session.opaque_ref, _vgpu ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -117,20 +117,20 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VGPU_type proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
vendor_name = proxy.vendor_name == null ? null : (string)proxy.vendor_name;
|
||||
model_name = proxy.model_name == null ? null : (string)proxy.model_name;
|
||||
framebuffer_size = proxy.framebuffer_size == null ? 0 : long.Parse((string)proxy.framebuffer_size);
|
||||
max_heads = proxy.max_heads == null ? 0 : long.Parse((string)proxy.max_heads);
|
||||
max_resolution_x = proxy.max_resolution_x == null ? 0 : long.Parse((string)proxy.max_resolution_x);
|
||||
max_resolution_y = proxy.max_resolution_y == null ? 0 : long.Parse((string)proxy.max_resolution_y);
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
vendor_name = proxy.vendor_name == null ? null : proxy.vendor_name;
|
||||
model_name = proxy.model_name == null ? null : proxy.model_name;
|
||||
framebuffer_size = proxy.framebuffer_size == null ? 0 : long.Parse(proxy.framebuffer_size);
|
||||
max_heads = proxy.max_heads == null ? 0 : long.Parse(proxy.max_heads);
|
||||
max_resolution_x = proxy.max_resolution_x == null ? 0 : long.Parse(proxy.max_resolution_x);
|
||||
max_resolution_y = proxy.max_resolution_y == null ? 0 : long.Parse(proxy.max_resolution_y);
|
||||
supported_on_PGPUs = proxy.supported_on_PGPUs == null ? null : XenRef<PGPU>.Create(proxy.supported_on_PGPUs);
|
||||
enabled_on_PGPUs = proxy.enabled_on_PGPUs == null ? null : XenRef<PGPU>.Create(proxy.enabled_on_PGPUs);
|
||||
VGPUs = proxy.VGPUs == null ? null : XenRef<VGPU>.Create(proxy.VGPUs);
|
||||
supported_on_GPU_groups = proxy.supported_on_GPU_groups == null ? null : XenRef<GPU_group>.Create(proxy.supported_on_GPU_groups);
|
||||
enabled_on_GPU_groups = proxy.enabled_on_GPU_groups == null ? null : XenRef<GPU_group>.Create(proxy.enabled_on_GPU_groups);
|
||||
implementation = proxy.implementation == null ? (vgpu_type_implementation) 0 : (vgpu_type_implementation)Helper.EnumParseDefault(typeof(vgpu_type_implementation), (string)proxy.implementation);
|
||||
identifier = proxy.identifier == null ? null : (string)proxy.identifier;
|
||||
identifier = proxy.identifier == null ? null : proxy.identifier;
|
||||
experimental = (bool)proxy.experimental;
|
||||
}
|
||||
|
||||
@ -144,11 +144,11 @@ namespace XenAPI
|
||||
result_.max_heads = max_heads.ToString();
|
||||
result_.max_resolution_x = max_resolution_x.ToString();
|
||||
result_.max_resolution_y = max_resolution_y.ToString();
|
||||
result_.supported_on_PGPUs = (supported_on_PGPUs != null) ? Helper.RefListToStringArray(supported_on_PGPUs) : new string[] {};
|
||||
result_.enabled_on_PGPUs = (enabled_on_PGPUs != null) ? Helper.RefListToStringArray(enabled_on_PGPUs) : new string[] {};
|
||||
result_.VGPUs = (VGPUs != null) ? Helper.RefListToStringArray(VGPUs) : new string[] {};
|
||||
result_.supported_on_GPU_groups = (supported_on_GPU_groups != null) ? Helper.RefListToStringArray(supported_on_GPU_groups) : new string[] {};
|
||||
result_.enabled_on_GPU_groups = (enabled_on_GPU_groups != null) ? Helper.RefListToStringArray(enabled_on_GPU_groups) : new string[] {};
|
||||
result_.supported_on_PGPUs = supported_on_PGPUs == null ? new string[] {} : Helper.RefListToStringArray(supported_on_PGPUs);
|
||||
result_.enabled_on_PGPUs = enabled_on_PGPUs == null ? new string[] {} : Helper.RefListToStringArray(enabled_on_PGPUs);
|
||||
result_.VGPUs = VGPUs == null ? new string[] {} : Helper.RefListToStringArray(VGPUs);
|
||||
result_.supported_on_GPU_groups = supported_on_GPU_groups == null ? new string[] {} : Helper.RefListToStringArray(supported_on_GPU_groups);
|
||||
result_.enabled_on_GPU_groups = enabled_on_GPU_groups == null ? new string[] {} : Helper.RefListToStringArray(enabled_on_GPU_groups);
|
||||
result_.implementation = vgpu_type_implementation_helper.ToString(implementation);
|
||||
result_.identifier = identifier ?? "";
|
||||
result_.experimental = experimental;
|
||||
@ -290,7 +290,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_uuid(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return (string)session.proxy.vgpu_type_get_uuid(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
return session.proxy.vgpu_type_get_uuid(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -304,7 +304,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_vendor_name(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return (string)session.proxy.vgpu_type_get_vendor_name(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
return session.proxy.vgpu_type_get_vendor_name(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -318,7 +318,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_model_name(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return (string)session.proxy.vgpu_type_get_model_name(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
return session.proxy.vgpu_type_get_model_name(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -332,7 +332,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_framebuffer_size(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vgpu_type_get_framebuffer_size(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
return long.Parse(session.proxy.vgpu_type_get_framebuffer_size(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -346,7 +346,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_max_heads(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vgpu_type_get_max_heads(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
return long.Parse(session.proxy.vgpu_type_get_max_heads(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -360,7 +360,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_max_resolution_x(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vgpu_type_get_max_resolution_x(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
return long.Parse(session.proxy.vgpu_type_get_max_resolution_x(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -374,7 +374,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_max_resolution_y(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vgpu_type_get_max_resolution_y(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
return long.Parse(session.proxy.vgpu_type_get_max_resolution_y(session.opaque_ref, _vgpu_type ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -472,7 +472,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vgpu_type_get_identifier(session.opaque_ref, _vgpu_type);
|
||||
else
|
||||
return (string)session.proxy.vgpu_type_get_identifier(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
return session.proxy.vgpu_type_get_identifier(session.opaque_ref, _vgpu_type ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -153,20 +153,20 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VIF proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<vif_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_vif_operations(proxy.current_operations);
|
||||
device = proxy.device == null ? null : (string)proxy.device;
|
||||
device = proxy.device == null ? null : proxy.device;
|
||||
network = proxy.network == null ? null : XenRef<Network>.Create(proxy.network);
|
||||
VM = proxy.VM == null ? null : XenRef<VM>.Create(proxy.VM);
|
||||
MAC = proxy.MAC == null ? null : (string)proxy.MAC;
|
||||
MTU = proxy.MTU == null ? 0 : long.Parse((string)proxy.MTU);
|
||||
MAC = proxy.MAC == null ? null : proxy.MAC;
|
||||
MTU = proxy.MTU == null ? 0 : long.Parse(proxy.MTU);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
currently_attached = (bool)proxy.currently_attached;
|
||||
status_code = proxy.status_code == null ? 0 : long.Parse((string)proxy.status_code);
|
||||
status_detail = proxy.status_detail == null ? null : (string)proxy.status_detail;
|
||||
status_code = proxy.status_code == null ? 0 : long.Parse(proxy.status_code);
|
||||
status_detail = proxy.status_detail == null ? null : proxy.status_detail;
|
||||
runtime_properties = proxy.runtime_properties == null ? null : Maps.convert_from_proxy_string_string(proxy.runtime_properties);
|
||||
qos_algorithm_type = proxy.qos_algorithm_type == null ? null : (string)proxy.qos_algorithm_type;
|
||||
qos_algorithm_type = proxy.qos_algorithm_type == null ? null : proxy.qos_algorithm_type;
|
||||
qos_algorithm_params = proxy.qos_algorithm_params == null ? null : Maps.convert_from_proxy_string_string(proxy.qos_algorithm_params);
|
||||
qos_supported_algorithms = proxy.qos_supported_algorithms == null ? new string[] {} : (string [])proxy.qos_supported_algorithms;
|
||||
metrics = proxy.metrics == null ? null : XenRef<VIF_metrics>.Create(proxy.metrics);
|
||||
@ -176,17 +176,17 @@ namespace XenAPI
|
||||
ipv6_allowed = proxy.ipv6_allowed == null ? new string[] {} : (string [])proxy.ipv6_allowed;
|
||||
ipv4_configuration_mode = proxy.ipv4_configuration_mode == null ? (vif_ipv4_configuration_mode) 0 : (vif_ipv4_configuration_mode)Helper.EnumParseDefault(typeof(vif_ipv4_configuration_mode), (string)proxy.ipv4_configuration_mode);
|
||||
ipv4_addresses = proxy.ipv4_addresses == null ? new string[] {} : (string [])proxy.ipv4_addresses;
|
||||
ipv4_gateway = proxy.ipv4_gateway == null ? null : (string)proxy.ipv4_gateway;
|
||||
ipv4_gateway = proxy.ipv4_gateway == null ? null : proxy.ipv4_gateway;
|
||||
ipv6_configuration_mode = proxy.ipv6_configuration_mode == null ? (vif_ipv6_configuration_mode) 0 : (vif_ipv6_configuration_mode)Helper.EnumParseDefault(typeof(vif_ipv6_configuration_mode), (string)proxy.ipv6_configuration_mode);
|
||||
ipv6_addresses = proxy.ipv6_addresses == null ? new string[] {} : (string [])proxy.ipv6_addresses;
|
||||
ipv6_gateway = proxy.ipv6_gateway == null ? null : (string)proxy.ipv6_gateway;
|
||||
ipv6_gateway = proxy.ipv6_gateway == null ? null : proxy.ipv6_gateway;
|
||||
}
|
||||
|
||||
public Proxy_VIF ToProxy()
|
||||
{
|
||||
Proxy_VIF result_ = new Proxy_VIF();
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_vif_operations(current_operations);
|
||||
result_.device = device ?? "";
|
||||
result_.network = network ?? "";
|
||||
@ -469,7 +469,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_uuid(session.opaque_ref, _vif);
|
||||
else
|
||||
return (string)session.proxy.vif_get_uuid(session.opaque_ref, _vif ?? "").parse();
|
||||
return session.proxy.vif_get_uuid(session.opaque_ref, _vif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -511,7 +511,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_device(session.opaque_ref, _vif);
|
||||
else
|
||||
return (string)session.proxy.vif_get_device(session.opaque_ref, _vif ?? "").parse();
|
||||
return session.proxy.vif_get_device(session.opaque_ref, _vif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -553,7 +553,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_mac(session.opaque_ref, _vif);
|
||||
else
|
||||
return (string)session.proxy.vif_get_mac(session.opaque_ref, _vif ?? "").parse();
|
||||
return session.proxy.vif_get_mac(session.opaque_ref, _vif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -567,7 +567,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_mtu(session.opaque_ref, _vif);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vif_get_mtu(session.opaque_ref, _vif ?? "").parse());
|
||||
return long.Parse(session.proxy.vif_get_mtu(session.opaque_ref, _vif ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -609,7 +609,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_status_code(session.opaque_ref, _vif);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vif_get_status_code(session.opaque_ref, _vif ?? "").parse());
|
||||
return long.Parse(session.proxy.vif_get_status_code(session.opaque_ref, _vif ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -623,7 +623,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_status_detail(session.opaque_ref, _vif);
|
||||
else
|
||||
return (string)session.proxy.vif_get_status_detail(session.opaque_ref, _vif ?? "").parse();
|
||||
return session.proxy.vif_get_status_detail(session.opaque_ref, _vif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -651,7 +651,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_qos_algorithm_type(session.opaque_ref, _vif);
|
||||
else
|
||||
return (string)session.proxy.vif_get_qos_algorithm_type(session.opaque_ref, _vif ?? "").parse();
|
||||
return session.proxy.vif_get_qos_algorithm_type(session.opaque_ref, _vif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -791,7 +791,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_ipv4_gateway(session.opaque_ref, _vif);
|
||||
else
|
||||
return (string)session.proxy.vif_get_ipv4_gateway(session.opaque_ref, _vif ?? "").parse();
|
||||
return session.proxy.vif_get_ipv4_gateway(session.opaque_ref, _vif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -833,7 +833,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_get_ipv6_gateway(session.opaque_ref, _vif);
|
||||
else
|
||||
return (string)session.proxy.vif_get_ipv6_gateway(session.opaque_ref, _vif ?? "").parse();
|
||||
return session.proxy.vif_get_ipv6_gateway(session.opaque_ref, _vif ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,7 +87,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VIF_metrics proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
io_read_kbs = Convert.ToDouble(proxy.io_read_kbs);
|
||||
io_write_kbs = Convert.ToDouble(proxy.io_write_kbs);
|
||||
last_updated = proxy.last_updated;
|
||||
@ -215,7 +215,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vif_metrics_get_uuid(session.opaque_ref, _vif_metrics);
|
||||
else
|
||||
return (string)session.proxy.vif_metrics_get_uuid(session.opaque_ref, _vif_metrics ?? "").parse();
|
||||
return session.proxy.vif_metrics_get_uuid(session.opaque_ref, _vif_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,10 +87,10 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VLAN proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
tagged_PIF = proxy.tagged_PIF == null ? null : XenRef<PIF>.Create(proxy.tagged_PIF);
|
||||
untagged_PIF = proxy.untagged_PIF == null ? null : XenRef<PIF>.Create(proxy.untagged_PIF);
|
||||
tag = proxy.tag == null ? 0 : long.Parse((string)proxy.tag);
|
||||
tag = proxy.tag == null ? 0 : long.Parse(proxy.tag);
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vlan_get_uuid(session.opaque_ref, _vlan);
|
||||
else
|
||||
return (string)session.proxy.vlan_get_uuid(session.opaque_ref, _vlan ?? "").parse();
|
||||
return session.proxy.vlan_get_uuid(session.opaque_ref, _vlan ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -257,7 +257,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vlan_get_tag(session.opaque_ref, _vlan);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vlan_get_tag(session.opaque_ref, _vlan ?? "").parse());
|
||||
return long.Parse(session.proxy.vlan_get_tag(session.opaque_ref, _vlan ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -324,27 +324,27 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VM proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<vm_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_vm_operations(proxy.current_operations);
|
||||
power_state = proxy.power_state == null ? (vm_power_state) 0 : (vm_power_state)Helper.EnumParseDefault(typeof(vm_power_state), (string)proxy.power_state);
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
user_version = proxy.user_version == null ? 0 : long.Parse((string)proxy.user_version);
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
user_version = proxy.user_version == null ? 0 : long.Parse(proxy.user_version);
|
||||
is_a_template = (bool)proxy.is_a_template;
|
||||
is_default_template = (bool)proxy.is_default_template;
|
||||
suspend_VDI = proxy.suspend_VDI == null ? null : XenRef<VDI>.Create(proxy.suspend_VDI);
|
||||
resident_on = proxy.resident_on == null ? null : XenRef<Host>.Create(proxy.resident_on);
|
||||
affinity = proxy.affinity == null ? null : XenRef<Host>.Create(proxy.affinity);
|
||||
memory_overhead = proxy.memory_overhead == null ? 0 : long.Parse((string)proxy.memory_overhead);
|
||||
memory_target = proxy.memory_target == null ? 0 : long.Parse((string)proxy.memory_target);
|
||||
memory_static_max = proxy.memory_static_max == null ? 0 : long.Parse((string)proxy.memory_static_max);
|
||||
memory_dynamic_max = proxy.memory_dynamic_max == null ? 0 : long.Parse((string)proxy.memory_dynamic_max);
|
||||
memory_dynamic_min = proxy.memory_dynamic_min == null ? 0 : long.Parse((string)proxy.memory_dynamic_min);
|
||||
memory_static_min = proxy.memory_static_min == null ? 0 : long.Parse((string)proxy.memory_static_min);
|
||||
memory_overhead = proxy.memory_overhead == null ? 0 : long.Parse(proxy.memory_overhead);
|
||||
memory_target = proxy.memory_target == null ? 0 : long.Parse(proxy.memory_target);
|
||||
memory_static_max = proxy.memory_static_max == null ? 0 : long.Parse(proxy.memory_static_max);
|
||||
memory_dynamic_max = proxy.memory_dynamic_max == null ? 0 : long.Parse(proxy.memory_dynamic_max);
|
||||
memory_dynamic_min = proxy.memory_dynamic_min == null ? 0 : long.Parse(proxy.memory_dynamic_min);
|
||||
memory_static_min = proxy.memory_static_min == null ? 0 : long.Parse(proxy.memory_static_min);
|
||||
VCPUs_params = proxy.VCPUs_params == null ? null : Maps.convert_from_proxy_string_string(proxy.VCPUs_params);
|
||||
VCPUs_max = proxy.VCPUs_max == null ? 0 : long.Parse((string)proxy.VCPUs_max);
|
||||
VCPUs_at_startup = proxy.VCPUs_at_startup == null ? 0 : long.Parse((string)proxy.VCPUs_at_startup);
|
||||
VCPUs_max = proxy.VCPUs_max == null ? 0 : long.Parse(proxy.VCPUs_max);
|
||||
VCPUs_at_startup = proxy.VCPUs_at_startup == null ? 0 : long.Parse(proxy.VCPUs_at_startup);
|
||||
actions_after_shutdown = proxy.actions_after_shutdown == null ? (on_normal_exit) 0 : (on_normal_exit)Helper.EnumParseDefault(typeof(on_normal_exit), (string)proxy.actions_after_shutdown);
|
||||
actions_after_reboot = proxy.actions_after_reboot == null ? (on_normal_exit) 0 : (on_normal_exit)Helper.EnumParseDefault(typeof(on_normal_exit), (string)proxy.actions_after_reboot);
|
||||
actions_after_crash = proxy.actions_after_crash == null ? (on_crash_behaviour) 0 : (on_crash_behaviour)Helper.EnumParseDefault(typeof(on_crash_behaviour), (string)proxy.actions_after_crash);
|
||||
@ -354,39 +354,39 @@ namespace XenAPI
|
||||
VUSBs = proxy.VUSBs == null ? null : XenRef<VUSB>.Create(proxy.VUSBs);
|
||||
crash_dumps = proxy.crash_dumps == null ? null : XenRef<Crashdump>.Create(proxy.crash_dumps);
|
||||
VTPMs = proxy.VTPMs == null ? null : XenRef<VTPM>.Create(proxy.VTPMs);
|
||||
PV_bootloader = proxy.PV_bootloader == null ? null : (string)proxy.PV_bootloader;
|
||||
PV_kernel = proxy.PV_kernel == null ? null : (string)proxy.PV_kernel;
|
||||
PV_ramdisk = proxy.PV_ramdisk == null ? null : (string)proxy.PV_ramdisk;
|
||||
PV_args = proxy.PV_args == null ? null : (string)proxy.PV_args;
|
||||
PV_bootloader_args = proxy.PV_bootloader_args == null ? null : (string)proxy.PV_bootloader_args;
|
||||
PV_legacy_args = proxy.PV_legacy_args == null ? null : (string)proxy.PV_legacy_args;
|
||||
HVM_boot_policy = proxy.HVM_boot_policy == null ? null : (string)proxy.HVM_boot_policy;
|
||||
PV_bootloader = proxy.PV_bootloader == null ? null : proxy.PV_bootloader;
|
||||
PV_kernel = proxy.PV_kernel == null ? null : proxy.PV_kernel;
|
||||
PV_ramdisk = proxy.PV_ramdisk == null ? null : proxy.PV_ramdisk;
|
||||
PV_args = proxy.PV_args == null ? null : proxy.PV_args;
|
||||
PV_bootloader_args = proxy.PV_bootloader_args == null ? null : proxy.PV_bootloader_args;
|
||||
PV_legacy_args = proxy.PV_legacy_args == null ? null : proxy.PV_legacy_args;
|
||||
HVM_boot_policy = proxy.HVM_boot_policy == null ? null : proxy.HVM_boot_policy;
|
||||
HVM_boot_params = proxy.HVM_boot_params == null ? null : Maps.convert_from_proxy_string_string(proxy.HVM_boot_params);
|
||||
HVM_shadow_multiplier = Convert.ToDouble(proxy.HVM_shadow_multiplier);
|
||||
platform = proxy.platform == null ? null : Maps.convert_from_proxy_string_string(proxy.platform);
|
||||
PCI_bus = proxy.PCI_bus == null ? null : (string)proxy.PCI_bus;
|
||||
PCI_bus = proxy.PCI_bus == null ? null : proxy.PCI_bus;
|
||||
other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
|
||||
domid = proxy.domid == null ? 0 : long.Parse((string)proxy.domid);
|
||||
domarch = proxy.domarch == null ? null : (string)proxy.domarch;
|
||||
domid = proxy.domid == null ? 0 : long.Parse(proxy.domid);
|
||||
domarch = proxy.domarch == null ? null : proxy.domarch;
|
||||
last_boot_CPU_flags = proxy.last_boot_CPU_flags == null ? null : Maps.convert_from_proxy_string_string(proxy.last_boot_CPU_flags);
|
||||
is_control_domain = (bool)proxy.is_control_domain;
|
||||
metrics = proxy.metrics == null ? null : XenRef<VM_metrics>.Create(proxy.metrics);
|
||||
guest_metrics = proxy.guest_metrics == null ? null : XenRef<VM_guest_metrics>.Create(proxy.guest_metrics);
|
||||
last_booted_record = proxy.last_booted_record == null ? null : (string)proxy.last_booted_record;
|
||||
recommendations = proxy.recommendations == null ? null : (string)proxy.recommendations;
|
||||
last_booted_record = proxy.last_booted_record == null ? null : proxy.last_booted_record;
|
||||
recommendations = proxy.recommendations == null ? null : proxy.recommendations;
|
||||
xenstore_data = proxy.xenstore_data == null ? null : Maps.convert_from_proxy_string_string(proxy.xenstore_data);
|
||||
ha_always_run = (bool)proxy.ha_always_run;
|
||||
ha_restart_priority = proxy.ha_restart_priority == null ? null : (string)proxy.ha_restart_priority;
|
||||
ha_restart_priority = proxy.ha_restart_priority == null ? null : proxy.ha_restart_priority;
|
||||
is_a_snapshot = (bool)proxy.is_a_snapshot;
|
||||
snapshot_of = proxy.snapshot_of == null ? null : XenRef<VM>.Create(proxy.snapshot_of);
|
||||
snapshots = proxy.snapshots == null ? null : XenRef<VM>.Create(proxy.snapshots);
|
||||
snapshot_time = proxy.snapshot_time;
|
||||
transportable_snapshot_id = proxy.transportable_snapshot_id == null ? null : (string)proxy.transportable_snapshot_id;
|
||||
transportable_snapshot_id = proxy.transportable_snapshot_id == null ? null : proxy.transportable_snapshot_id;
|
||||
blobs = proxy.blobs == null ? null : Maps.convert_from_proxy_string_XenRefBlob(proxy.blobs);
|
||||
tags = proxy.tags == null ? new string[] {} : (string [])proxy.tags;
|
||||
blocked_operations = proxy.blocked_operations == null ? null : Maps.convert_from_proxy_vm_operations_string(proxy.blocked_operations);
|
||||
snapshot_info = proxy.snapshot_info == null ? null : Maps.convert_from_proxy_string_string(proxy.snapshot_info);
|
||||
snapshot_metadata = proxy.snapshot_metadata == null ? null : (string)proxy.snapshot_metadata;
|
||||
snapshot_metadata = proxy.snapshot_metadata == null ? null : proxy.snapshot_metadata;
|
||||
parent = proxy.parent == null ? null : XenRef<VM>.Create(proxy.parent);
|
||||
children = proxy.children == null ? null : XenRef<VM>.Create(proxy.children);
|
||||
bios_strings = proxy.bios_strings == null ? null : Maps.convert_from_proxy_string_string(proxy.bios_strings);
|
||||
@ -395,18 +395,18 @@ namespace XenAPI
|
||||
snapshot_schedule = proxy.snapshot_schedule == null ? null : XenRef<VMSS>.Create(proxy.snapshot_schedule);
|
||||
is_vmss_snapshot = (bool)proxy.is_vmss_snapshot;
|
||||
appliance = proxy.appliance == null ? null : XenRef<VM_appliance>.Create(proxy.appliance);
|
||||
start_delay = proxy.start_delay == null ? 0 : long.Parse((string)proxy.start_delay);
|
||||
shutdown_delay = proxy.shutdown_delay == null ? 0 : long.Parse((string)proxy.shutdown_delay);
|
||||
order = proxy.order == null ? 0 : long.Parse((string)proxy.order);
|
||||
start_delay = proxy.start_delay == null ? 0 : long.Parse(proxy.start_delay);
|
||||
shutdown_delay = proxy.shutdown_delay == null ? 0 : long.Parse(proxy.shutdown_delay);
|
||||
order = proxy.order == null ? 0 : long.Parse(proxy.order);
|
||||
VGPUs = proxy.VGPUs == null ? null : XenRef<VGPU>.Create(proxy.VGPUs);
|
||||
attached_PCIs = proxy.attached_PCIs == null ? null : XenRef<PCI>.Create(proxy.attached_PCIs);
|
||||
suspend_SR = proxy.suspend_SR == null ? null : XenRef<SR>.Create(proxy.suspend_SR);
|
||||
version = proxy.version == null ? 0 : long.Parse((string)proxy.version);
|
||||
generation_id = proxy.generation_id == null ? null : (string)proxy.generation_id;
|
||||
hardware_platform_version = proxy.hardware_platform_version == null ? 0 : long.Parse((string)proxy.hardware_platform_version);
|
||||
version = proxy.version == null ? 0 : long.Parse(proxy.version);
|
||||
generation_id = proxy.generation_id == null ? null : proxy.generation_id;
|
||||
hardware_platform_version = proxy.hardware_platform_version == null ? 0 : long.Parse(proxy.hardware_platform_version);
|
||||
has_vendor_device = (bool)proxy.has_vendor_device;
|
||||
requires_reboot = (bool)proxy.requires_reboot;
|
||||
reference_label = proxy.reference_label == null ? null : (string)proxy.reference_label;
|
||||
reference_label = proxy.reference_label == null ? null : proxy.reference_label;
|
||||
domain_type = proxy.domain_type == null ? (domain_type) 0 : (domain_type)Helper.EnumParseDefault(typeof(domain_type), (string)proxy.domain_type);
|
||||
}
|
||||
|
||||
@ -414,7 +414,7 @@ namespace XenAPI
|
||||
{
|
||||
Proxy_VM result_ = new Proxy_VM();
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_vm_operations(current_operations);
|
||||
result_.power_state = vm_power_state_helper.ToString(power_state);
|
||||
result_.name_label = name_label ?? "";
|
||||
@ -437,12 +437,12 @@ namespace XenAPI
|
||||
result_.actions_after_shutdown = on_normal_exit_helper.ToString(actions_after_shutdown);
|
||||
result_.actions_after_reboot = on_normal_exit_helper.ToString(actions_after_reboot);
|
||||
result_.actions_after_crash = on_crash_behaviour_helper.ToString(actions_after_crash);
|
||||
result_.consoles = (consoles != null) ? Helper.RefListToStringArray(consoles) : new string[] {};
|
||||
result_.VIFs = (VIFs != null) ? Helper.RefListToStringArray(VIFs) : new string[] {};
|
||||
result_.VBDs = (VBDs != null) ? Helper.RefListToStringArray(VBDs) : new string[] {};
|
||||
result_.VUSBs = (VUSBs != null) ? Helper.RefListToStringArray(VUSBs) : new string[] {};
|
||||
result_.crash_dumps = (crash_dumps != null) ? Helper.RefListToStringArray(crash_dumps) : new string[] {};
|
||||
result_.VTPMs = (VTPMs != null) ? Helper.RefListToStringArray(VTPMs) : new string[] {};
|
||||
result_.consoles = consoles == null ? new string[] {} : Helper.RefListToStringArray(consoles);
|
||||
result_.VIFs = VIFs == null ? new string[] {} : Helper.RefListToStringArray(VIFs);
|
||||
result_.VBDs = VBDs == null ? new string[] {} : Helper.RefListToStringArray(VBDs);
|
||||
result_.VUSBs = VUSBs == null ? new string[] {} : Helper.RefListToStringArray(VUSBs);
|
||||
result_.crash_dumps = crash_dumps == null ? new string[] {} : Helper.RefListToStringArray(crash_dumps);
|
||||
result_.VTPMs = VTPMs == null ? new string[] {} : Helper.RefListToStringArray(VTPMs);
|
||||
result_.PV_bootloader = PV_bootloader ?? "";
|
||||
result_.PV_kernel = PV_kernel ?? "";
|
||||
result_.PV_ramdisk = PV_ramdisk ?? "";
|
||||
@ -468,7 +468,7 @@ namespace XenAPI
|
||||
result_.ha_restart_priority = ha_restart_priority ?? "";
|
||||
result_.is_a_snapshot = is_a_snapshot;
|
||||
result_.snapshot_of = snapshot_of ?? "";
|
||||
result_.snapshots = (snapshots != null) ? Helper.RefListToStringArray(snapshots) : new string[] {};
|
||||
result_.snapshots = snapshots == null ? new string[] {} : Helper.RefListToStringArray(snapshots);
|
||||
result_.snapshot_time = snapshot_time;
|
||||
result_.transportable_snapshot_id = transportable_snapshot_id ?? "";
|
||||
result_.blobs = Maps.convert_to_proxy_string_XenRefBlob(blobs);
|
||||
@ -477,7 +477,7 @@ namespace XenAPI
|
||||
result_.snapshot_info = Maps.convert_to_proxy_string_string(snapshot_info);
|
||||
result_.snapshot_metadata = snapshot_metadata ?? "";
|
||||
result_.parent = parent ?? "";
|
||||
result_.children = (children != null) ? Helper.RefListToStringArray(children) : new string[] {};
|
||||
result_.children = children == null ? new string[] {} : Helper.RefListToStringArray(children);
|
||||
result_.bios_strings = Maps.convert_to_proxy_string_string(bios_strings);
|
||||
result_.protection_policy = protection_policy ?? "";
|
||||
result_.is_snapshot_from_vmpp = is_snapshot_from_vmpp;
|
||||
@ -487,8 +487,8 @@ namespace XenAPI
|
||||
result_.start_delay = start_delay.ToString();
|
||||
result_.shutdown_delay = shutdown_delay.ToString();
|
||||
result_.order = order.ToString();
|
||||
result_.VGPUs = (VGPUs != null) ? Helper.RefListToStringArray(VGPUs) : new string[] {};
|
||||
result_.attached_PCIs = (attached_PCIs != null) ? Helper.RefListToStringArray(attached_PCIs) : new string[] {};
|
||||
result_.VGPUs = VGPUs == null ? new string[] {} : Helper.RefListToStringArray(VGPUs);
|
||||
result_.attached_PCIs = attached_PCIs == null ? new string[] {} : Helper.RefListToStringArray(attached_PCIs);
|
||||
result_.suspend_SR = suspend_SR ?? "";
|
||||
result_.version = version.ToString();
|
||||
result_.generation_id = generation_id ?? "";
|
||||
@ -1087,7 +1087,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_uuid(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_uuid(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_uuid(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1143,7 +1143,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_name_label(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_name_label(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_name_label(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1157,7 +1157,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_name_description(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_name_description(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_name_description(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1171,7 +1171,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_user_version(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_user_version(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_user_version(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1255,7 +1255,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_memory_overhead(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_memory_overhead(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_memory_overhead(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1271,7 +1271,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_memory_target(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_memory_target(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_memory_target(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1285,7 +1285,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_memory_static_max(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_memory_static_max(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_memory_static_max(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1299,7 +1299,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_memory_dynamic_max(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_memory_dynamic_max(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_memory_dynamic_max(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1313,7 +1313,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_memory_dynamic_min(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_memory_dynamic_min(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_memory_dynamic_min(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1327,7 +1327,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_memory_static_min(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_memory_static_min(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_memory_static_min(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1355,7 +1355,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_vcpus_max(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_vcpus_max(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_vcpus_max(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1369,7 +1369,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_vcpus_at_startup(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_vcpus_at_startup(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_vcpus_at_startup(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1509,7 +1509,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_pv_bootloader(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_pv_bootloader(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_pv_bootloader(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1523,7 +1523,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_pv_kernel(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_pv_kernel(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_pv_kernel(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1537,7 +1537,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_pv_ramdisk(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_pv_ramdisk(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_pv_ramdisk(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1551,7 +1551,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_pv_args(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_pv_args(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_pv_args(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1565,7 +1565,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_pv_bootloader_args(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_pv_bootloader_args(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_pv_bootloader_args(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1579,7 +1579,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_pv_legacy_args(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_pv_legacy_args(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_pv_legacy_args(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1595,7 +1595,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_hvm_boot_policy(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_hvm_boot_policy(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_hvm_boot_policy(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1653,7 +1653,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_pci_bus(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_pci_bus(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_pci_bus(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1681,7 +1681,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_domid(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_domid(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_domid(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1695,7 +1695,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_domarch(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_domarch(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_domarch(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1765,7 +1765,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_last_booted_record(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_last_booted_record(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_last_booted_record(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1779,7 +1779,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_recommendations(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_recommendations(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_recommendations(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1823,7 +1823,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_ha_restart_priority(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_ha_restart_priority(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_ha_restart_priority(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1893,7 +1893,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_transportable_snapshot_id(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_transportable_snapshot_id(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_transportable_snapshot_id(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1963,7 +1963,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_snapshot_metadata(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_snapshot_metadata(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_snapshot_metadata(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2093,7 +2093,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_start_delay(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_start_delay(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_start_delay(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2107,7 +2107,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_shutdown_delay(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_shutdown_delay(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_shutdown_delay(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2121,7 +2121,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_order(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_order(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_order(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2177,7 +2177,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_version(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_version(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_version(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2191,7 +2191,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_generation_id(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_generation_id(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_generation_id(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2205,7 +2205,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_hardware_platform_version(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_get_hardware_platform_version(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_get_hardware_platform_version(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -2247,12 +2247,12 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_get_reference_label(session.opaque_ref, _vm);
|
||||
else
|
||||
return (string)session.proxy.vm_get_reference_label(session.opaque_ref, _vm ?? "").parse();
|
||||
return session.proxy.vm_get_reference_label(session.opaque_ref, _vm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the domain_type field of the given VM.
|
||||
/// First published in Unreleased.
|
||||
/// First published in XenServer 7.4.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vm">The opaque_ref of the given vm</param>
|
||||
@ -3571,7 +3571,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_compute_memory_overhead(session.opaque_ref, _vm);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_compute_memory_overhead(session.opaque_ref, _vm ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_compute_memory_overhead(session.opaque_ref, _vm ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -4024,7 +4024,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_maximise_memory(session.opaque_ref, _vm, _total, _approximate);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_maximise_memory(session.opaque_ref, _vm ?? "", _total.ToString(), _approximate).parse());
|
||||
return long.Parse(session.proxy.vm_maximise_memory(session.opaque_ref, _vm ?? "", _total.ToString(), _approximate).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -4950,7 +4950,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_call_plugin(session.opaque_ref, _vm, _plugin, _fn, _args);
|
||||
else
|
||||
return (string)session.proxy.vm_call_plugin(session.opaque_ref, _vm ?? "", _plugin ?? "", _fn ?? "", Maps.convert_to_proxy_string_string(_args)).parse();
|
||||
return session.proxy.vm_call_plugin(session.opaque_ref, _vm ?? "", _plugin ?? "", _fn ?? "", Maps.convert_to_proxy_string_string(_args)).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -6688,7 +6688,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// The type of domain that will be created when the VM is started
|
||||
/// First published in Unreleased.
|
||||
/// First published in XenServer 7.4.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(domain_typeConverter))]
|
||||
public virtual domain_type domain_type
|
||||
|
@ -132,12 +132,12 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VMPP proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
is_policy_enabled = (bool)proxy.is_policy_enabled;
|
||||
backup_type = proxy.backup_type == null ? (vmpp_backup_type) 0 : (vmpp_backup_type)Helper.EnumParseDefault(typeof(vmpp_backup_type), (string)proxy.backup_type);
|
||||
backup_retention_value = proxy.backup_retention_value == null ? 0 : long.Parse((string)proxy.backup_retention_value);
|
||||
backup_retention_value = proxy.backup_retention_value == null ? 0 : long.Parse(proxy.backup_retention_value);
|
||||
backup_frequency = proxy.backup_frequency == null ? (vmpp_backup_frequency) 0 : (vmpp_backup_frequency)Helper.EnumParseDefault(typeof(vmpp_backup_frequency), (string)proxy.backup_frequency);
|
||||
backup_schedule = proxy.backup_schedule == null ? null : Maps.convert_from_proxy_string_string(proxy.backup_schedule);
|
||||
is_backup_running = (bool)proxy.is_backup_running;
|
||||
@ -173,7 +173,7 @@ namespace XenAPI
|
||||
result_.archive_schedule = Maps.convert_to_proxy_string_string(archive_schedule);
|
||||
result_.is_archive_running = is_archive_running;
|
||||
result_.archive_last_run_time = archive_last_run_time;
|
||||
result_.VMs = (VMs != null) ? Helper.RefListToStringArray(VMs) : new string[] {};
|
||||
result_.VMs = VMs == null ? new string[] {} : Helper.RefListToStringArray(VMs);
|
||||
result_.is_alarm_enabled = is_alarm_enabled;
|
||||
result_.alarm_config = Maps.convert_to_proxy_string_string(alarm_config);
|
||||
result_.recent_alerts = recent_alerts;
|
||||
@ -453,7 +453,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmpp_get_uuid(session.opaque_ref, _vmpp);
|
||||
else
|
||||
return (string)session.proxy.vmpp_get_uuid(session.opaque_ref, _vmpp ?? "").parse();
|
||||
return session.proxy.vmpp_get_uuid(session.opaque_ref, _vmpp ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -467,7 +467,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmpp_get_name_label(session.opaque_ref, _vmpp);
|
||||
else
|
||||
return (string)session.proxy.vmpp_get_name_label(session.opaque_ref, _vmpp ?? "").parse();
|
||||
return session.proxy.vmpp_get_name_label(session.opaque_ref, _vmpp ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -481,7 +481,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmpp_get_name_description(session.opaque_ref, _vmpp);
|
||||
else
|
||||
return (string)session.proxy.vmpp_get_name_description(session.opaque_ref, _vmpp ?? "").parse();
|
||||
return session.proxy.vmpp_get_name_description(session.opaque_ref, _vmpp ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -523,7 +523,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmpp_get_backup_retention_value(session.opaque_ref, _vmpp);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vmpp_get_backup_retention_value(session.opaque_ref, _vmpp ?? "").parse());
|
||||
return long.Parse(session.proxy.vmpp_get_backup_retention_value(session.opaque_ref, _vmpp ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -793,7 +793,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmpp_protect_now(session.opaque_ref, _vmpp);
|
||||
else
|
||||
return (string)session.proxy.vmpp_protect_now(session.opaque_ref, _vmpp ?? "").parse();
|
||||
return session.proxy.vmpp_protect_now(session.opaque_ref, _vmpp ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -807,7 +807,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmpp_archive_now(session.opaque_ref, _snapshot);
|
||||
else
|
||||
return (string)session.proxy.vmpp_archive_now(session.opaque_ref, _snapshot ?? "").parse();
|
||||
return session.proxy.vmpp_archive_now(session.opaque_ref, _snapshot ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -102,12 +102,12 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VMSS proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
enabled = (bool)proxy.enabled;
|
||||
type = proxy.type == null ? (vmss_type) 0 : (vmss_type)Helper.EnumParseDefault(typeof(vmss_type), (string)proxy.type);
|
||||
retained_snapshots = proxy.retained_snapshots == null ? 0 : long.Parse((string)proxy.retained_snapshots);
|
||||
retained_snapshots = proxy.retained_snapshots == null ? 0 : long.Parse(proxy.retained_snapshots);
|
||||
frequency = proxy.frequency == null ? (vmss_frequency) 0 : (vmss_frequency)Helper.EnumParseDefault(typeof(vmss_frequency), (string)proxy.frequency);
|
||||
schedule = proxy.schedule == null ? null : Maps.convert_from_proxy_string_string(proxy.schedule);
|
||||
last_run_time = proxy.last_run_time;
|
||||
@ -126,7 +126,7 @@ namespace XenAPI
|
||||
result_.frequency = vmss_frequency_helper.ToString(frequency);
|
||||
result_.schedule = Maps.convert_to_proxy_string_string(schedule);
|
||||
result_.last_run_time = last_run_time;
|
||||
result_.VMs = (VMs != null) ? Helper.RefListToStringArray(VMs) : new string[] {};
|
||||
result_.VMs = VMs == null ? new string[] {} : Helper.RefListToStringArray(VMs);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -349,7 +349,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmss_get_uuid(session.opaque_ref, _vmss);
|
||||
else
|
||||
return (string)session.proxy.vmss_get_uuid(session.opaque_ref, _vmss ?? "").parse();
|
||||
return session.proxy.vmss_get_uuid(session.opaque_ref, _vmss ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -363,7 +363,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmss_get_name_label(session.opaque_ref, _vmss);
|
||||
else
|
||||
return (string)session.proxy.vmss_get_name_label(session.opaque_ref, _vmss ?? "").parse();
|
||||
return session.proxy.vmss_get_name_label(session.opaque_ref, _vmss ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -377,7 +377,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmss_get_name_description(session.opaque_ref, _vmss);
|
||||
else
|
||||
return (string)session.proxy.vmss_get_name_description(session.opaque_ref, _vmss ?? "").parse();
|
||||
return session.proxy.vmss_get_name_description(session.opaque_ref, _vmss ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -419,7 +419,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmss_get_retained_snapshots(session.opaque_ref, _vmss);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vmss_get_retained_snapshots(session.opaque_ref, _vmss ?? "").parse());
|
||||
return long.Parse(session.proxy.vmss_get_retained_snapshots(session.opaque_ref, _vmss ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -534,7 +534,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vmss_snapshot_now(session.opaque_ref, _vmss);
|
||||
else
|
||||
return (string)session.proxy.vmss_snapshot_now(session.opaque_ref, _vmss ?? "").parse();
|
||||
return session.proxy.vmss_snapshot_now(session.opaque_ref, _vmss ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -90,9 +90,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VM_appliance proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : (string)proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : (string)proxy.name_description;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
name_label = proxy.name_label == null ? null : proxy.name_label;
|
||||
name_description = proxy.name_description == null ? null : proxy.name_description;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<vm_appliance_operation>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_vm_appliance_operation(proxy.current_operations);
|
||||
VMs = proxy.VMs == null ? null : XenRef<VM>.Create(proxy.VMs);
|
||||
@ -104,9 +104,9 @@ namespace XenAPI
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.name_label = name_label ?? "";
|
||||
result_.name_description = name_description ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_vm_appliance_operation(current_operations);
|
||||
result_.VMs = (VMs != null) ? Helper.RefListToStringArray(VMs) : new string[] {};
|
||||
result_.VMs = VMs == null ? new string[] {} : Helper.RefListToStringArray(VMs);
|
||||
return result_;
|
||||
}
|
||||
|
||||
@ -299,7 +299,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_appliance_get_uuid(session.opaque_ref, _vm_appliance);
|
||||
else
|
||||
return (string)session.proxy.vm_appliance_get_uuid(session.opaque_ref, _vm_appliance ?? "").parse();
|
||||
return session.proxy.vm_appliance_get_uuid(session.opaque_ref, _vm_appliance ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -313,7 +313,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_appliance_get_name_label(session.opaque_ref, _vm_appliance);
|
||||
else
|
||||
return (string)session.proxy.vm_appliance_get_name_label(session.opaque_ref, _vm_appliance ?? "").parse();
|
||||
return session.proxy.vm_appliance_get_name_label(session.opaque_ref, _vm_appliance ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -327,7 +327,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_appliance_get_name_description(session.opaque_ref, _vm_appliance);
|
||||
else
|
||||
return (string)session.proxy.vm_appliance_get_name_description(session.opaque_ref, _vm_appliance ?? "").parse();
|
||||
return session.proxy.vm_appliance_get_name_description(session.opaque_ref, _vm_appliance ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -114,7 +114,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VM_guest_metrics proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
os_version = proxy.os_version == null ? null : Maps.convert_from_proxy_string_string(proxy.os_version);
|
||||
PV_drivers_version = proxy.PV_drivers_version == null ? null : Maps.convert_from_proxy_string_string(proxy.PV_drivers_version);
|
||||
PV_drivers_up_to_date = (bool)proxy.PV_drivers_up_to_date;
|
||||
@ -287,7 +287,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_guest_metrics_get_uuid(session.opaque_ref, _vm_guest_metrics);
|
||||
else
|
||||
return (string)session.proxy.vm_guest_metrics_get_uuid(session.opaque_ref, _vm_guest_metrics ?? "").parse();
|
||||
return session.proxy.vm_guest_metrics_get_uuid(session.opaque_ref, _vm_guest_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -120,9 +120,9 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VM_metrics proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
memory_actual = proxy.memory_actual == null ? 0 : long.Parse((string)proxy.memory_actual);
|
||||
VCPUs_number = proxy.VCPUs_number == null ? 0 : long.Parse((string)proxy.VCPUs_number);
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
memory_actual = proxy.memory_actual == null ? 0 : long.Parse(proxy.memory_actual);
|
||||
VCPUs_number = proxy.VCPUs_number == null ? 0 : long.Parse(proxy.VCPUs_number);
|
||||
VCPUs_utilisation = proxy.VCPUs_utilisation == null ? null : Maps.convert_from_proxy_long_double(proxy.VCPUs_utilisation);
|
||||
VCPUs_CPU = proxy.VCPUs_CPU == null ? null : Maps.convert_from_proxy_long_long(proxy.VCPUs_CPU);
|
||||
VCPUs_params = proxy.VCPUs_params == null ? null : Maps.convert_from_proxy_string_string(proxy.VCPUs_params);
|
||||
@ -303,7 +303,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_metrics_get_uuid(session.opaque_ref, _vm_metrics);
|
||||
else
|
||||
return (string)session.proxy.vm_metrics_get_uuid(session.opaque_ref, _vm_metrics ?? "").parse();
|
||||
return session.proxy.vm_metrics_get_uuid(session.opaque_ref, _vm_metrics ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -317,7 +317,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_metrics_get_memory_actual(session.opaque_ref, _vm_metrics);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_metrics_get_memory_actual(session.opaque_ref, _vm_metrics ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_metrics_get_memory_actual(session.opaque_ref, _vm_metrics ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -331,7 +331,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vm_metrics_get_vcpus_number(session.opaque_ref, _vm_metrics);
|
||||
else
|
||||
return long.Parse((string)session.proxy.vm_metrics_get_vcpus_number(session.opaque_ref, _vm_metrics ?? "").parse());
|
||||
return long.Parse(session.proxy.vm_metrics_get_vcpus_number(session.opaque_ref, _vm_metrics ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -504,7 +504,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// Get the current_domain_type field of the given VM_metrics.
|
||||
/// First published in Unreleased.
|
||||
/// First published in XenServer 7.4.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
/// <param name="_vm_metrics">The opaque_ref of the given vm_metrics</param>
|
||||
@ -869,7 +869,7 @@ namespace XenAPI
|
||||
|
||||
/// <summary>
|
||||
/// The current domain type of the VM (for running,suspended, or paused VMs). The last-known domain type for halted VMs.
|
||||
/// First published in Unreleased.
|
||||
/// First published in XenServer 7.4.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(domain_typeConverter))]
|
||||
public virtual domain_type current_domain_type
|
||||
|
@ -81,7 +81,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VTPM proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
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);
|
||||
}
|
||||
@ -250,7 +250,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vtpm_get_uuid(session.opaque_ref, _vtpm);
|
||||
else
|
||||
return (string)session.proxy.vtpm_get_uuid(session.opaque_ref, _vtpm ?? "").parse();
|
||||
return session.proxy.vtpm_get_uuid(session.opaque_ref, _vtpm ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -93,7 +93,7 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_VUSB proxy)
|
||||
{
|
||||
uuid = proxy.uuid == null ? null : (string)proxy.uuid;
|
||||
uuid = proxy.uuid == null ? null : proxy.uuid;
|
||||
allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList<vusb_operations>(proxy.allowed_operations);
|
||||
current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_vusb_operations(proxy.current_operations);
|
||||
VM = proxy.VM == null ? null : XenRef<VM>.Create(proxy.VM);
|
||||
@ -106,7 +106,7 @@ namespace XenAPI
|
||||
{
|
||||
Proxy_VUSB result_ = new Proxy_VUSB();
|
||||
result_.uuid = uuid ?? "";
|
||||
result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
|
||||
result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations);
|
||||
result_.current_operations = Maps.convert_to_proxy_string_vusb_operations(current_operations);
|
||||
result_.VM = VM ?? "";
|
||||
result_.USB_group = USB_group ?? "";
|
||||
@ -233,7 +233,7 @@ namespace XenAPI
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.vusb_get_uuid(session.opaque_ref, _vusb);
|
||||
else
|
||||
return (string)session.proxy.vusb_get_uuid(session.opaque_ref, _vusb ?? "").parse();
|
||||
return session.proxy.vusb_get_uuid(session.opaque_ref, _vusb ?? "").parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -87,11 +87,11 @@ namespace XenAPI
|
||||
|
||||
internal void UpdateFromProxy(Proxy_Vdi_nbd_server_info proxy)
|
||||
{
|
||||
exportname = proxy.exportname == null ? null : (string)proxy.exportname;
|
||||
address = proxy.address == null ? null : (string)proxy.address;
|
||||
port = proxy.port == null ? 0 : long.Parse((string)proxy.port);
|
||||
cert = proxy.cert == null ? null : (string)proxy.cert;
|
||||
subject = proxy.subject == null ? null : (string)proxy.subject;
|
||||
exportname = proxy.exportname == null ? null : proxy.exportname;
|
||||
address = proxy.address == null ? null : proxy.address;
|
||||
port = proxy.port == null ? 0 : long.Parse(proxy.port);
|
||||
cert = proxy.cert == null ? null : proxy.cert;
|
||||
subject = proxy.subject == null ? null : proxy.subject;
|
||||
}
|
||||
|
||||
public Proxy_Vdi_nbd_server_info ToProxy()
|
||||
|
74
XenModel/XenAPI/sr_health.cs
Normal file
74
XenModel/XenAPI/sr_health.cs
Normal file
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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(sr_healthConverter))]
|
||||
public enum sr_health
|
||||
{
|
||||
healthy, recovering, unknown
|
||||
}
|
||||
|
||||
public static class sr_health_helper
|
||||
{
|
||||
public static string ToString(sr_health x)
|
||||
{
|
||||
return x.StringOf();
|
||||
}
|
||||
}
|
||||
|
||||
public static partial class EnumExt
|
||||
{
|
||||
public static string StringOf(this sr_health x)
|
||||
{
|
||||
switch (x)
|
||||
{
|
||||
case sr_health.healthy:
|
||||
return "healthy";
|
||||
case sr_health.recovering:
|
||||
return "recovering";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class sr_healthConverter : XenEnumConverter
|
||||
{
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WriteValue(((sr_health)value).StringOf());
|
||||
}
|
||||
}
|
||||
}
|
@ -86,6 +86,7 @@
|
||||
<Compile Include="Actions\Host\DestroyHostAction.cs" />
|
||||
<Compile Include="Actions\Host\EnableHostAction.cs" />
|
||||
<Compile Include="Actions\Host\EvacuateHostAction.cs" />
|
||||
<Compile Include="Actions\Host\FibreChannelDevice.cs" />
|
||||
<Compile Include="Actions\Host\HostAbstractAction.cs" />
|
||||
<Compile Include="Actions\Host\HostWithStatus.cs" />
|
||||
<Compile Include="Actions\Host\RebootHostAction.cs" />
|
||||
@ -391,6 +392,7 @@
|
||||
<Compile Include="XenAPI\pool_allowed_operations.cs" />
|
||||
<Compile Include="XenAPI\Pool_update.cs" />
|
||||
<Compile Include="XenAPI\primary_address_type.cs" />
|
||||
<Compile Include="XenAPI\Probe_result.cs" />
|
||||
<Compile Include="XenAPI\PUSB.cs" />
|
||||
<Compile Include="XenAPI\PVS_cache_storage.cs" />
|
||||
<Compile Include="XenAPI\PVS_proxy.cs" />
|
||||
@ -400,6 +402,8 @@
|
||||
<Compile Include="XenAPI\SDN_controller.cs" />
|
||||
<Compile Include="XenAPI\sdn_controller_protocol.cs" />
|
||||
<Compile Include="XenAPI\sriov_configuration_mode.cs" />
|
||||
<Compile Include="XenAPI\sr_health.cs" />
|
||||
<Compile Include="XenAPI\Sr_stat.cs" />
|
||||
<Compile Include="XenAPI\tristate_type.cs" />
|
||||
<Compile Include="XenAPI\update_after_apply_guidance.cs" />
|
||||
<Compile Include="XenAPI\USB_group.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user