From 4c8fcdc3f413c4dcfae9e4c0ff9892f47d5e17fa Mon Sep 17 00:00:00 2001 From: Konstantina Chremmou Date: Tue, 23 Apr 2024 20:35:15 +0100 Subject: [PATCH 1/3] Exposed methods to fetch the methods available in the API. Signed-off-by: Konstantina Chremmou --- ocaml/sdk-gen/csharp/autogen/src/Session.cs | 5 +++++ ocaml/sdk-gen/csharp/templates/JsonRpcClient.mustache | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ocaml/sdk-gen/csharp/autogen/src/Session.cs b/ocaml/sdk-gen/csharp/autogen/src/Session.cs index a2aef1d672e..4a84b5bcd0c 100644 --- a/ocaml/sdk-gen/csharp/autogen/src/Session.cs +++ b/ocaml/sdk-gen/csharp/autogen/src/Session.cs @@ -333,6 +333,11 @@ public Dictionary RequestHeaders #endregion + public string[] GetSystemMethods() + { + return JsonRpcClient.system_list_methods(); + } + public static Session get_record(Session session, string _session) { Session newSession = new Session(session.Url) { opaque_ref = _session }; diff --git a/ocaml/sdk-gen/csharp/templates/JsonRpcClient.mustache b/ocaml/sdk-gen/csharp/templates/JsonRpcClient.mustache index ac3d0ca625c..307e02560f4 100644 --- a/ocaml/sdk-gen/csharp/templates/JsonRpcClient.mustache +++ b/ocaml/sdk-gen/csharp/templates/JsonRpcClient.mustache @@ -38,6 +38,13 @@ namespace XenAPI { public partial class JsonRpcClient { + public string[] system_list_methods() + { + var converters = new List { }; + var serializer = CreateSerializer(converters); + return Rpc("system.listMethods", new JArray(), serializer); + } + public Event event_get_record(string session, string _event) { var converters = new List {}; From e78773ed43b309b28b0f1a5b1a03497015073a11 Mon Sep 17 00:00:00 2001 From: Konstantina Chremmou Date: Tue, 23 Apr 2024 21:08:58 +0100 Subject: [PATCH 2/3] The github workflow artifacts for C contained unnecessary files. Signed-off-by: Konstantina Chremmou --- .github/workflows/generate-and-build-sdks.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-and-build-sdks.yml b/.github/workflows/generate-and-build-sdks.yml index db28438062f..1886c33c368 100644 --- a/.github/workflows/generate-and-build-sdks.yml +++ b/.github/workflows/generate-and-build-sdks.yml @@ -28,7 +28,9 @@ jobs: uses: actions/upload-artifact@v4 with: name: SDK_Source_C - path: _build/install/default/xapi/sdk/c/* + path: | + _build/install/default/xapi/sdk/c/* + !_build/install/default/xapi/sdk/c/dune - name: Store C# SDK source uses: actions/upload-artifact@v4 @@ -67,7 +69,9 @@ jobs: uses: actions/upload-artifact@v4 with: name: SDK_Artifacts_C - path: source/* + path: | + source/* + !source/src/*.o build-csharp-sdk: name: Build C# SDK From 5dad78b12f502a7285afd0a64e87f50ca626eefe Mon Sep 17 00:00:00 2001 From: Konstantina Chremmou Date: Fri, 26 Apr 2024 11:52:31 +0100 Subject: [PATCH 3/3] Removed header because it does not look good on github. Signed-off-by: Konstantina Chremmou --- ocaml/doc/basics.md | 4 ---- ocaml/doc/vm-lifecycle.md | 4 ---- ocaml/doc/wire-protocol.md | 4 ---- ocaml/idl/autogen/api-ref-autogen.md | 4 ---- 4 files changed, 16 deletions(-) diff --git a/ocaml/doc/basics.md b/ocaml/doc/basics.md index b1812da023d..783797051f0 100644 --- a/ocaml/doc/basics.md +++ b/ocaml/doc/basics.md @@ -1,7 +1,3 @@ ---- - layout: doc ---- - # API Basics This document defines the XenServer Management API - an interface for remotely diff --git a/ocaml/doc/vm-lifecycle.md b/ocaml/doc/vm-lifecycle.md index 68664730617..31f31889f36 100644 --- a/ocaml/doc/vm-lifecycle.md +++ b/ocaml/doc/vm-lifecycle.md @@ -1,7 +1,3 @@ ---- - layout: doc ---- - # VM Lifecycle The following diagram shows the states that a VM can be in diff --git a/ocaml/doc/wire-protocol.md b/ocaml/doc/wire-protocol.md index 808d021154d..20e39627cc3 100644 --- a/ocaml/doc/wire-protocol.md +++ b/ocaml/doc/wire-protocol.md @@ -1,7 +1,3 @@ ---- - layout: doc ---- - # Wire Protocol for Remote API Calls API calls are sent over a network to a Xen-enabled host using an RPC protocol. diff --git a/ocaml/idl/autogen/api-ref-autogen.md b/ocaml/idl/autogen/api-ref-autogen.md index 7abf22b6872..1c64c0e8bfb 100644 --- a/ocaml/idl/autogen/api-ref-autogen.md +++ b/ocaml/idl/autogen/api-ref-autogen.md @@ -1,7 +1,3 @@ ---- - layout: doc ---- - # API Reference Version **@xapi-version@**