Latest C# SDK (defines stockholm release).

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2020-01-28 11:46:11 +00:00 committed by Mihaela Stoica
parent b16eaaae4e
commit 24605a3459
11 changed files with 91 additions and 21 deletions

View File

@ -61,8 +61,9 @@ namespace XenAPI
API_2_11 = 22, //XenServer 7.6 (lima)
API_2_12 = 23, //Citrix Hypervisor 8.0 (naples)
API_2_13 = 24, //Unreleased (oslo)
API_2_14 = 25, //Unreleased (quebec)
LATEST = 25,
API_2_14 = 25, //Citrix Hypervisor 8.1 (quebec)
API_2_15 = 26, //Unreleased (stockholm)
LATEST = 26,
UNKNOWN = 99
}
@ -122,6 +123,8 @@ namespace XenAPI
return "2.13";
case API_Version.API_2_14:
return "2.14";
case API_Version.API_2_15:
return "2.15";
default:
return "Unknown";
}

View File

@ -354,7 +354,7 @@ namespace XenAPI
/// <summary>
/// Get the auto_update_mac field of the given Bond.
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_bond">The opaque_ref of the given bond</param>
@ -786,7 +786,7 @@ namespace XenAPI
/// <summary>
/// true if the MAC was taken from the primary slave when the bond was created, and false if the client specified the MAC
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
public virtual bool auto_update_mac
{

View File

@ -415,6 +415,20 @@ namespace XenAPI
return DateTime.MinValue;
}
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
if (value is DateTime)
{
var dateTime = (DateTime)value;
dateTime = dateTime.ToUniversalTime();
var text = dateTime.ToString(DateFormatsUniversal[0], CultureInfo.InvariantCulture);
writer.WriteValue(text);
return;
}
base.WriteJson(writer, value, serializer);
}
}

View File

@ -1353,7 +1353,7 @@ Authorized Roles: {1}</value>
<value>Given SMB version is not allowed. Choose either 1.0 or 3.0</value>
</data>
<data name="SR_BACKEND_FAILURE_228" xml:space="preserve">
<value>Require &quot;-o&quot; along with xe-mount-isosr</value>
<value>Require &quot;-o&quot; along with xe-mount-iso-sr</value>
</data>
<data name="SR_BACKEND_FAILURE_24" xml:space="preserve">
<value>The specified VDI is currently in use</value>

View File

@ -1532,7 +1532,7 @@ namespace XenAPI
/// <summary>
/// Get the uefi_certificates field of the given host.
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_host">The opaque_ref of the given host</param>
@ -3370,7 +3370,7 @@ namespace XenAPI
/// <summary>
/// Sets the UEFI certificates on a host
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_host">The opaque_ref of the given host</param>
@ -3385,7 +3385,7 @@ namespace XenAPI
/// <summary>
/// Sets the UEFI certificates on a host
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_host">The opaque_ref of the given host</param>
@ -4530,7 +4530,7 @@ namespace XenAPI
/// <summary>
/// The UEFI certificates allowing Secure Boot
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
public virtual string uefi_certificates
{

View File

@ -13725,6 +13725,13 @@ namespace XenAPI
return Rpc<Dictionary<string, string>>("PUSB.get_other_config", new JArray(session, _pusb ?? ""), serializer);
}
public double pusb_get_speed(string session, string _pusb)
{
var converters = new List<JsonConverter> {};
var serializer = CreateSerializer(converters);
return Rpc<double>("PUSB.get_speed", new JArray(session, _pusb ?? ""), serializer);
}
public void pusb_set_other_config(string session, string _pusb, Dictionary<string, string> _other_config)
{
var converters = new List<JsonConverter> {new StringStringMapConverter()};

View File

@ -63,7 +63,8 @@ namespace XenAPI
string version,
string description,
bool passthrough_enabled,
Dictionary<string, string> other_config)
Dictionary<string, string> other_config,
double speed)
{
this.uuid = uuid;
this.USB_group = USB_group;
@ -78,6 +79,7 @@ namespace XenAPI
this.description = description;
this.passthrough_enabled = passthrough_enabled;
this.other_config = other_config;
this.speed = speed;
}
/// <summary>
@ -122,6 +124,7 @@ namespace XenAPI
description = update.description;
passthrough_enabled = update.passthrough_enabled;
other_config = update.other_config;
speed = update.speed;
}
internal void UpdateFrom(Proxy_PUSB proxy)
@ -139,6 +142,7 @@ namespace XenAPI
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);
speed = Convert.ToDouble(proxy.speed);
}
public Proxy_PUSB ToProxy()
@ -157,6 +161,7 @@ namespace XenAPI
result_.description = description ?? "";
result_.passthrough_enabled = passthrough_enabled;
result_.other_config = Maps.convert_to_proxy_string_string(other_config);
result_.speed = speed;
return result_;
}
@ -194,6 +199,8 @@ namespace XenAPI
passthrough_enabled = Marshalling.ParseBool(table, "passthrough_enabled");
if (table.ContainsKey("other_config"))
other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
if (table.ContainsKey("speed"))
speed = Marshalling.ParseDouble(table, "speed");
}
public bool DeepEquals(PUSB other)
@ -215,7 +222,8 @@ namespace XenAPI
Helper.AreEqual2(this._version, other._version) &&
Helper.AreEqual2(this._description, other._description) &&
Helper.AreEqual2(this._passthrough_enabled, other._passthrough_enabled) &&
Helper.AreEqual2(this._other_config, other._other_config);
Helper.AreEqual2(this._other_config, other._other_config) &&
Helper.AreEqual2(this._speed, other._speed);
}
internal static List<PUSB> ProxyArrayToObjectList(Proxy_PUSB[] input)
@ -454,6 +462,20 @@ namespace XenAPI
return Maps.convert_from_proxy_string_string(session.proxy.pusb_get_other_config(session.opaque_ref, _pusb ?? "").parse());
}
/// <summary>
/// Get the speed field of the given PUSB.
/// First published in Unreleased.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_pusb">The opaque_ref of the given pusb</param>
public static double get_speed(Session session, string _pusb)
{
if (session.JsonRpcClient != null)
return session.JsonRpcClient.pusb_get_speed(session.opaque_ref, _pusb);
else
return Convert.ToDouble(session.proxy.pusb_get_speed(session.opaque_ref, _pusb ?? "").parse());
}
/// <summary>
/// Set the other_config field of the given PUSB.
/// First published in XenServer 7.3.
@ -820,5 +842,24 @@ namespace XenAPI
}
}
private Dictionary<string, string> _other_config = new Dictionary<string, string>() {};
/// <summary>
/// USB device speed
/// First published in Unreleased.
/// </summary>
public virtual double speed
{
get { return _speed; }
set
{
if (!Helper.AreEqual(value, _speed))
{
_speed = value;
Changed = true;
NotifyPropertyChanged("speed");
}
}
}
private double _speed = -1.000;
}
}

View File

@ -1030,7 +1030,7 @@ namespace XenAPI
/// <summary>
/// Get the uefi_certificates field of the given pool.
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_pool">The opaque_ref of the given pool</param>
@ -1377,7 +1377,7 @@ namespace XenAPI
/// <summary>
/// Set the uefi_certificates field of the given pool.
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_pool">The opaque_ref of the given pool</param>
@ -3426,7 +3426,7 @@ namespace XenAPI
/// <summary>
/// The UEFI certificates allowing Secure Boot
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
public virtual string uefi_certificates
{

View File

@ -7863,6 +7863,10 @@ namespace XenAPI
Response<Object>
pusb_get_other_config(string session, string _pusb);
[XmlRpcMethod("PUSB.get_speed")]
Response<double>
pusb_get_speed(string session, string _pusb);
[XmlRpcMethod("PUSB.set_other_config")]
Response<string>
pusb_set_other_config(string session, string _pusb, Object _other_config);
@ -9321,6 +9325,7 @@ namespace XenAPI
public string description;
public bool passthrough_enabled;
public Object other_config;
public double speed;
}
[XmlRpcMissingMapping(MappingAction.Ignore)]

View File

@ -410,7 +410,7 @@ namespace XenAPI
/// <summary>
/// Get the extra_args field of the given VGPU.
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_vgpu">The opaque_ref of the given vgpu</param>
@ -424,7 +424,7 @@ namespace XenAPI
/// <summary>
/// Get the PCI field of the given VGPU.
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_vgpu">The opaque_ref of the given vgpu</param>
@ -484,7 +484,7 @@ namespace XenAPI
/// <summary>
/// Set the extra_args field of the given VGPU.
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_vgpu">The opaque_ref of the given vgpu</param>
@ -814,7 +814,7 @@ namespace XenAPI
/// <summary>
/// Extra arguments for vGPU and passed to demu
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
public virtual string extra_args
{
@ -833,7 +833,7 @@ namespace XenAPI
/// <summary>
/// Device passed trough to VM, either as full device or SR-IOV virtual function
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
[JsonConverter(typeof(XenRefConverter<PCI>))]
public virtual XenRef<PCI> PCI

View File

@ -503,7 +503,7 @@ namespace XenAPI
/// <summary>
/// Get the compatible_types_in_vm field of the given VGPU_type.
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
/// <param name="session">The session</param>
/// <param name="_vgpu_type">The opaque_ref of the given vgpu_type</param>
@ -826,7 +826,7 @@ namespace XenAPI
/// <summary>
/// List of VGPU types which are compatible in one VM
/// First published in Unreleased.
/// First published in Citrix Hypervisor 8.1.
/// </summary>
[JsonConverter(typeof(XenRefListConverter<VGPU_type>))]
public virtual List<XenRef<VGPU_type>> compatible_types_in_vm