Skip to content

Commit c530226

Browse files
committed
Update the SDK to 26.16.0
Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
1 parent ba43130 commit c530226

108 files changed

Lines changed: 17084 additions & 3407 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎XenModel/XenAPI/ApiVersion.cs‎

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
*/
2929

3030
using System;
31-
using System.Collections;
32-
using System.Collections.Generic;
33-
3431

3532
namespace XenAPI
3633
{
@@ -88,12 +85,12 @@ public enum API_Version
8885
API_2_14 = 25,
8986
/// <summary>Citrix Hypervisor 8.2 (stockholm)</summary>
9087
API_2_15 = 26,
91-
/// <summary>XCP-ng 8.2</summary>
92-
API_2_16 = 27,
93-
/// <summary>XCP-ng 8.3</summary>
94-
API_2_20 = 28,
95-
/// <summary>XCP-ng 8.3</summary>
96-
API_2_21 = 29,
88+
/// <summary>XenServer 8 Preview (nile-preview)</summary>
89+
API_2_20 = 27,
90+
/// <summary>XenServer 8 (nile)</summary>
91+
API_2_21 = 28,
92+
/// <summary>XenServer 9 (orinoco)</summary>
93+
API_2_23 = 29,
9794
LATEST = 29,
9895
UNKNOWN = 99
9996
}
@@ -156,12 +153,12 @@ public static string APIVersionString(API_Version v)
156153
return "2.14";
157154
case API_Version.API_2_15:
158155
return "2.15";
159-
case API_Version.API_2_16:
160-
return "2.16";
161156
case API_Version.API_2_20:
162157
return "2.20";
163158
case API_Version.API_2_21:
164159
return "2.21";
160+
case API_Version.API_2_23:
161+
return "2.23";
165162
default:
166163
return "Unknown";
167164
}
@@ -171,8 +168,7 @@ public static API_Version GetAPIVersion(long major, long minor)
171168
{
172169
try
173170
{
174-
return (API_Version)Enum.Parse(typeof(API_Version),
175-
string.Format("API_{0}_{1}", major, minor));
171+
return (API_Version)Enum.Parse(typeof(API_Version), $"API_{major}_{minor}");
176172
}
177173
catch (ArgumentException)
178174
{
@@ -190,30 +186,14 @@ public static API_Version GetAPIVersion(string version)
190186
{
191187
string[] tokens = version.Split('.');
192188
int major, minor;
193-
if (tokens.Length == 2 && int.TryParse(tokens[0], out major) && int.TryParse(tokens[1], out minor))
189+
if (tokens.Length == 2 &&
190+
int.TryParse(tokens[0], out major) &&
191+
int.TryParse(tokens[1], out minor))
194192
{
195193
return GetAPIVersion(major, minor);
196194
}
197195
}
198196
return API_Version.UNKNOWN;
199197
}
200-
201-
/// <summary>
202-
/// Return a positive number if the given session's API version is greater than the given
203-
/// API_version, negative if it is less, and 0 if they are equal.
204-
/// </summary>
205-
internal static int APIVersionCompare(Session session, API_Version v)
206-
{
207-
return (int)session.APIVersion - (int)v;
208-
}
209-
210-
/// <summary>
211-
/// Return true if the given session's API version is greater than or equal to the given
212-
/// API_version.
213-
/// </summary>
214-
internal static bool APIVersionMeets(Session session, API_Version v)
215-
{
216-
return APIVersionCompare(session, v) >= 0;
217-
}
218198
}
219-
}
199+
}

‎XenModel/XenAPI/Auth.cs‎

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,36 +93,30 @@ public bool DeepEquals(Auth other)
9393
return false;
9494
}
9595

96-
public override string SaveChanges(Session session, string opaqueRef, Auth server)
97-
{
98-
if (opaqueRef == null)
99-
{
100-
System.Diagnostics.Debug.Assert(false, "Cannot create instances of this type on the server");
101-
return "";
102-
}
103-
else
104-
{
105-
throw new InvalidOperationException("This type has no read/write properties");
106-
}
107-
}
10896

10997
/// <summary>
11098
/// This call queries the external directory service to obtain the subject_identifier as a string from the human-readable subject_name
11199
/// First published in XenServer 5.5.
112100
/// </summary>
113101
/// <param name="session">The session</param>
114102
/// <param name="_subject_name">The human-readable subject_name, such as a username or a groupname</param>
103+
/// <remarks>
104+
/// Minimum allowed role: read-only
105+
/// </remarks>
115106
public static string get_subject_identifier(Session session, string _subject_name)
116107
{
117108
return session.JsonRpcClient.auth_get_subject_identifier(session.opaque_ref, _subject_name);
118109
}
119110

120111
/// <summary>
121-
/// This call queries the external directory service to obtain the user information (e.g. username, organization etc) from the specified subject_identifier
112+
/// This call queries the external directory service to obtain the user information (for example, username, organization etc.) from the specified subject_identifier
122113
/// First published in XenServer 5.5.
123114
/// </summary>
124115
/// <param name="session">The session</param>
125116
/// <param name="_subject_identifier">A string containing the subject_identifier, unique in the external directory service</param>
117+
/// <remarks>
118+
/// Minimum allowed role: read-only
119+
/// </remarks>
126120
public static Dictionary<string, string> get_subject_information_from_identifier(Session session, string _subject_identifier)
127121
{
128122
return session.JsonRpcClient.auth_get_subject_information_from_identifier(session.opaque_ref, _subject_identifier);
@@ -134,6 +128,9 @@ public static Dictionary<string, string> get_subject_information_from_identifier
134128
/// </summary>
135129
/// <param name="session">The session</param>
136130
/// <param name="_subject_identifier">A string containing the subject_identifier, unique in the external directory service</param>
131+
/// <remarks>
132+
/// Minimum allowed role: read-only
133+
/// </remarks>
137134
public static string[] get_group_membership(Session session, string _subject_identifier)
138135
{
139136
return session.JsonRpcClient.auth_get_group_membership(session.opaque_ref, _subject_identifier);

‎XenModel/XenAPI/Blob.cs‎

Lines changed: 55 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -137,34 +137,16 @@ public bool DeepEquals(Blob other)
137137
Helper.AreEqual2(_mime_type, other._mime_type);
138138
}
139139

140-
public override string SaveChanges(Session session, string opaqueRef, Blob server)
141-
{
142-
if (opaqueRef == null)
143-
{
144-
System.Diagnostics.Debug.Assert(false, "Cannot create instances of this type on the server");
145-
return "";
146-
}
147-
else
148-
{
149-
if (!Helper.AreEqual2(_name_label, server._name_label))
150-
{
151-
Blob.set_name_label(session, opaqueRef, _name_label);
152-
}
153-
if (!Helper.AreEqual2(_name_description, server._name_description))
154-
{
155-
Blob.set_name_description(session, opaqueRef, _name_description);
156-
}
157-
158-
return null;
159-
}
160-
}
161140

162141
/// <summary>
163142
/// Get a record containing the current state of the given blob.
164143
/// First published in XenServer 5.0.
165144
/// </summary>
166145
/// <param name="session">The session</param>
167146
/// <param name="_blob">The opaque_ref of the given blob</param>
147+
/// <remarks>
148+
/// Minimum allowed role: read-only
149+
/// </remarks>
168150
public static Blob get_record(Session session, string _blob)
169151
{
170152
return session.JsonRpcClient.blob_get_record(session.opaque_ref, _blob);
@@ -176,6 +158,9 @@ public static Blob get_record(Session session, string _blob)
176158
/// </summary>
177159
/// <param name="session">The session</param>
178160
/// <param name="_uuid">UUID of object to return</param>
161+
/// <remarks>
162+
/// Minimum allowed role: read-only
163+
/// </remarks>
179164
public static XenRef<Blob> get_by_uuid(Session session, string _uuid)
180165
{
181166
return session.JsonRpcClient.blob_get_by_uuid(session.opaque_ref, _uuid);
@@ -187,6 +172,9 @@ public static XenRef<Blob> get_by_uuid(Session session, string _uuid)
187172
/// </summary>
188173
/// <param name="session">The session</param>
189174
/// <param name="_label">label of object to return</param>
175+
/// <remarks>
176+
/// Minimum allowed role: read-only
177+
/// </remarks>
190178
public static List<XenRef<Blob>> get_by_name_label(Session session, string _label)
191179
{
192180
return session.JsonRpcClient.blob_get_by_name_label(session.opaque_ref, _label);
@@ -198,6 +186,9 @@ public static List<XenRef<Blob>> get_by_name_label(Session session, string _labe
198186
/// </summary>
199187
/// <param name="session">The session</param>
200188
/// <param name="_blob">The opaque_ref of the given blob</param>
189+
/// <remarks>
190+
/// Minimum allowed role: read-only
191+
/// </remarks>
201192
public static string get_uuid(Session session, string _blob)
202193
{
203194
return session.JsonRpcClient.blob_get_uuid(session.opaque_ref, _blob);
@@ -209,6 +200,9 @@ public static string get_uuid(Session session, string _blob)
209200
/// </summary>
210201
/// <param name="session">The session</param>
211202
/// <param name="_blob">The opaque_ref of the given blob</param>
203+
/// <remarks>
204+
/// Minimum allowed role: read-only
205+
/// </remarks>
212206
public static string get_name_label(Session session, string _blob)
213207
{
214208
return session.JsonRpcClient.blob_get_name_label(session.opaque_ref, _blob);
@@ -220,6 +214,9 @@ public static string get_name_label(Session session, string _blob)
220214
/// </summary>
221215
/// <param name="session">The session</param>
222216
/// <param name="_blob">The opaque_ref of the given blob</param>
217+
/// <remarks>
218+
/// Minimum allowed role: read-only
219+
/// </remarks>
223220
public static string get_name_description(Session session, string _blob)
224221
{
225222
return session.JsonRpcClient.blob_get_name_description(session.opaque_ref, _blob);
@@ -231,6 +228,9 @@ public static string get_name_description(Session session, string _blob)
231228
/// </summary>
232229
/// <param name="session">The session</param>
233230
/// <param name="_blob">The opaque_ref of the given blob</param>
231+
/// <remarks>
232+
/// Minimum allowed role: read-only
233+
/// </remarks>
234234
public static long get_size(Session session, string _blob)
235235
{
236236
return session.JsonRpcClient.blob_get_size(session.opaque_ref, _blob);
@@ -242,6 +242,9 @@ public static long get_size(Session session, string _blob)
242242
/// </summary>
243243
/// <param name="session">The session</param>
244244
/// <param name="_blob">The opaque_ref of the given blob</param>
245+
/// <remarks>
246+
/// Minimum allowed role: read-only
247+
/// </remarks>
245248
public static bool get_public(Session session, string _blob)
246249
{
247250
return session.JsonRpcClient.blob_get_public(session.opaque_ref, _blob);
@@ -253,6 +256,9 @@ public static bool get_public(Session session, string _blob)
253256
/// </summary>
254257
/// <param name="session">The session</param>
255258
/// <param name="_blob">The opaque_ref of the given blob</param>
259+
/// <remarks>
260+
/// Minimum allowed role: read-only
261+
/// </remarks>
256262
public static DateTime get_last_updated(Session session, string _blob)
257263
{
258264
return session.JsonRpcClient.blob_get_last_updated(session.opaque_ref, _blob);
@@ -264,6 +270,9 @@ public static DateTime get_last_updated(Session session, string _blob)
264270
/// </summary>
265271
/// <param name="session">The session</param>
266272
/// <param name="_blob">The opaque_ref of the given blob</param>
273+
/// <remarks>
274+
/// Minimum allowed role: read-only
275+
/// </remarks>
267276
public static string get_mime_type(Session session, string _blob)
268277
{
269278
return session.JsonRpcClient.blob_get_mime_type(session.opaque_ref, _blob);
@@ -276,6 +285,9 @@ public static string get_mime_type(Session session, string _blob)
276285
/// <param name="session">The session</param>
277286
/// <param name="_blob">The opaque_ref of the given blob</param>
278287
/// <param name="_label">New value to set</param>
288+
/// <remarks>
289+
/// Minimum allowed role: pool-operator
290+
/// </remarks>
279291
public static void set_name_label(Session session, string _blob, string _label)
280292
{
281293
session.JsonRpcClient.blob_set_name_label(session.opaque_ref, _blob, _label);
@@ -288,6 +300,9 @@ public static void set_name_label(Session session, string _blob, string _label)
288300
/// <param name="session">The session</param>
289301
/// <param name="_blob">The opaque_ref of the given blob</param>
290302
/// <param name="_description">New value to set</param>
303+
/// <remarks>
304+
/// Minimum allowed role: pool-operator
305+
/// </remarks>
291306
public static void set_name_description(Session session, string _blob, string _description)
292307
{
293308
session.JsonRpcClient.blob_set_name_description(session.opaque_ref, _blob, _description);
@@ -300,6 +315,9 @@ public static void set_name_description(Session session, string _blob, string _d
300315
/// <param name="session">The session</param>
301316
/// <param name="_blob">The opaque_ref of the given blob</param>
302317
/// <param name="_public">New value to set</param>
318+
/// <remarks>
319+
/// Minimum allowed role: pool-operator
320+
/// </remarks>
303321
public static void set_public(Session session, string _blob, bool _public)
304322
{
305323
session.JsonRpcClient.blob_set_public(session.opaque_ref, _blob, _public);
@@ -311,6 +329,9 @@ public static void set_public(Session session, string _blob, bool _public)
311329
/// </summary>
312330
/// <param name="session">The session</param>
313331
/// <param name="_mime_type">The mime-type of the blob. Defaults to 'application/octet-stream' if the empty string is supplied</param>
332+
/// <remarks>
333+
/// Minimum allowed role: pool-operator
334+
/// </remarks>
314335
public static XenRef<Blob> create(Session session, string _mime_type)
315336
{
316337
return session.JsonRpcClient.blob_create(session.opaque_ref, _mime_type);
@@ -323,6 +344,9 @@ public static XenRef<Blob> create(Session session, string _mime_type)
323344
/// <param name="session">The session</param>
324345
/// <param name="_mime_type">The mime-type of the blob. Defaults to 'application/octet-stream' if the empty string is supplied</param>
325346
/// <param name="_public">True if the blob should be publicly available First published in XenServer 6.1.</param>
347+
/// <remarks>
348+
/// Minimum allowed role: pool-operator
349+
/// </remarks>
326350
public static XenRef<Blob> create(Session session, string _mime_type, bool _public)
327351
{
328352
return session.JsonRpcClient.blob_create(session.opaque_ref, _mime_type, _public);
@@ -334,6 +358,9 @@ public static XenRef<Blob> create(Session session, string _mime_type, bool _publ
334358
/// </summary>
335359
/// <param name="session">The session</param>
336360
/// <param name="_blob">The opaque_ref of the given blob</param>
361+
/// <remarks>
362+
/// Minimum allowed role: pool-operator
363+
/// </remarks>
337364
public static void destroy(Session session, string _blob)
338365
{
339366
session.JsonRpcClient.blob_destroy(session.opaque_ref, _blob);
@@ -344,16 +371,22 @@ public static void destroy(Session session, string _blob)
344371
/// First published in XenServer 5.0.
345372
/// </summary>
346373
/// <param name="session">The session</param>
374+
/// <remarks>
375+
/// Minimum allowed role: read-only
376+
/// </remarks>
347377
public static List<XenRef<Blob>> get_all(Session session)
348378
{
349379
return session.JsonRpcClient.blob_get_all(session.opaque_ref);
350380
}
351381

352382
/// <summary>
353-
/// Get all the blob Records at once, in a single XML RPC call
383+
/// Return a map of blob references to blob records for all blobs known to the system.
354384
/// First published in XenServer 5.0.
355385
/// </summary>
356386
/// <param name="session">The session</param>
387+
/// <remarks>
388+
/// Minimum allowed role: read-only
389+
/// </remarks>
357390
public static Dictionary<XenRef<Blob>, Blob> get_all_records(Session session)
358391
{
359392
return session.JsonRpcClient.blob_get_all_records(session.opaque_ref);

0 commit comments

Comments
 (0)