Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CP-40402: Move C# and Powershell SDK Generation to .NET Standard 2.0 / .NET 6.0 #4782

Merged
merged 21 commits into from
Oct 10, 2022

Conversation

danilo-delbusso
Copy link
Member

@danilo-delbusso danilo-delbusso commented Sep 5, 2022

Best reviewed one commit at a time.

If you want to run this and don't know how, feel free to ping me.

C# SDK(move to  .NET Standard 2.0)

  1. Remove all mentions of using CookComputing.XmlRpc
  2. Remove IXmlRpcProxy and other XmlRpc mentions from Proxy.cs
  3. Remove XmlRpc references in Event.csResponse.cs, and Proxy.cs
    • Event.csXmlRpcMissingMappingXmlRpcMember, calls to session.XmlRpcProxy
    • Response.csXmlRpcMissingMapping
  4. Covert csproj to SDK style
  5. Target netstandard2.0
  6. Remove reference mention to CookComputing.XmlRpcV2 in csproj
  7.  Remove XmlRpc references in gen_csharp_binding.ml:
    • Remove XmlRpc returns
    • Remove XmlRpc references in Maps.cs code generation
    • Remove XmlRpc references in Proxy.cs code generation
  8. Update Session.cs to only use JsonRpc
  9. Update README
  10. Update target framework of XenSdkSample

Powershell SDK (Move to .NET 6.0):

The Powershell SDK must be moved to .NET Core to satisfy requirements. 

.NET Core 6.0 is the latest available LTS.

n.b.: Visual Studio 2022 is required to build to .NET 6.0.

  1. Remove use of WinForms in Wait-XenTask.cs
  2. Make sure ShouldContinue does not run in a separate thread when called in Connect-Xenserver.cs (in .NET Core, the ValidateServerCertificate call runs in a separate thread. This causes an InvalidOperationException when calling ShouldContinue, which must be called within the same thread as ProcessRecord)
  3. Convert csproj to SDK style
  4. Target net6.0
  5. Remove CookComputing.XmlRpcV2 from references in project file
  6. Update README
  7. Update .psd1

@danilo-delbusso danilo-delbusso changed the title Move C# and Powershell SDK Generation to .NET Core CP-40402: Move C# and Powershell SDK Generation to .NET Core Sep 5, 2022
@danilo-delbusso danilo-delbusso changed the title CP-40402: Move C# and Powershell SDK Generation to .NET Core CP-40402: Move C# and Powershell SDK Generation to .NET Standard 2.0 / .NET 6.0 Sep 5, 2022
@lindig lindig requested a review from kc284 September 5, 2022 10:36
Also use Visual Studio IDE whitespace formatting

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Also convert C# `csproj` to SDK style

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Also update `.csproj` to use SDK style

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Also remove mention of XML RPC library

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
In .NET Core, the ValidateServerCertificate call runs in a separate thread.
This causes an InvalidOperationException when calling ShouldContinue, which must be called within the same thread as ProcessRecord.

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
@danilo-delbusso danilo-delbusso requested review from CitrixChris and removed request for kc284 September 12, 2022 12:25
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
ocaml/sdk-gen/csharp/autogen/src/JsonRpc.cs Outdated Show resolved Hide resolved
ocaml/sdk-gen/csharp/autogen/src/Session.cs Outdated Show resolved Hide resolved
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Also remove semicolon incorrectly flagged as code comment, and minor whitespace issues.

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
@danilo-delbusso danilo-delbusso requested review from kc284 and CitrixChris and removed request for CitrixChris and kc284 October 4, 2022 12:43
kc284 and others added 2 commits October 5, 2022 10:43
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
@danilo-delbusso danilo-delbusso requested review from kc284 and CitrixChris and removed request for kc284 October 5, 2022 10:05
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
@danilo-delbusso danilo-delbusso requested review from kc284 and removed request for CitrixChris October 5, 2022 14:25
Copy link
Member

@robhoes robhoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't personally reviewed this, but several people who actually know about this code have approved.

@robhoes robhoes merged commit 162efaa into xapi-project:master Oct 10, 2022
@danilo-delbusso danilo-delbusso deleted the private/danilod/sdk branch October 10, 2022 11:38
@danilo-delbusso danilo-delbusso restored the private/danilod/sdk branch October 10, 2022 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants