Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@

PROFILE=release

ifndef SDK_VERSION
SDK_VERSION=0.0.0
endif

ifndef PRODUCT_GUID
PRODUCT_GUID=0
endif

build:
dune build --profile=$(PROFILE) \
c/gen_c_binding.exe \
Expand All @@ -55,26 +47,16 @@ reindent:

c:
dune build --profile=$(PROFILE) -f @c/generate
sed -e 's/@SDK_VERSION@/$(SDK_VERSION)/g' c/README.dist > _build/default/c/autogen/README

csharp:
dune build --profile=$(PROFILE) -f @csharp/generate
sed -i -e 's/1\.0\.0\.0/$(SDK_VERSION).0/g' _build/default/csharp/autogen/src/Properties/AssemblyInfo.cs
sed -e 's/@SDK_VERSION@/$(SDK_VERSION)/g' csharp/README.dist > _build/default/csharp/autogen/README.txt
sh windows-line-endings.sh _build/default/csharp/autogen

java:
dune build --profile=$(PROFILE) -f @java/generate
sed -e 's/@SDK_VERSION@/$(SDK_VERSION)/g' java/Makefile.dist > _build/default/java/autogen/Makefile
sed -e 's/@SDK_VERSION@/$(SDK_VERSION)/g' java/README.dist > _build/default/java/autogen/README.txt

powershell:
dune build --profile=$(PROFILE) -f @powershell/generate
sed -i -e 's/1\.0\.0\.0/$(SDK_VERSION)/g' -e 's/1000/$(SDK_VERSION).0/g' _build/default/powershell/autogen/src/Properties/AssemblyInfo.cs
sed -e 's/@SDK_VERSION@/$(SDK_VERSION)/g' -e "s/@PRODUCT_GUID@/$(PRODUCT_GUID)/g" \
powershell/XenServerPSModule.psd1 > _build/default/powershell/autogen/XenServerPSModule.psd1
sed -e 's/@SDK_VERSION@/$(SDK_VERSION)/g' powershell/about_XenServer.help.txt > _build/default/powershell/autogen/about_XenServer.help.txt
sed -e 's/@SDK_VERSION@/$(SDK_VERSION)/g' powershell/README.dist > _build/default/powershell/autogen/README.txt
sh windows-line-endings.sh _build/default/powershell/autogen


Expand Down
36 changes: 20 additions & 16 deletions c/README.dist
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
libxenserver
============

Version @SDK_VERSION@

libxenserver is a complete SDK for Citrix Hypervisor exposing the Citrix
Hypervisor API to C programmers.

It is available in the CitrixHypervisor-SDK-@[email protected], which can be downloaded
from https://www.citrix.com/downloads/citrix-hypervisor/

For Citrix Hypervisor documentation, see https://docs.citrix.com/en-us/citrix-hypervisor/
Hypervisor API to C developers.

libxenserver includes a C function call for each API call, so API
documentation and examples written for for other languages can be easily
mapped to C. In particular, the SDK Guide and the Management API Guide are ideal
for developers wishing to use libxenserver.

For community content, blogs, and downloads, visit
https://www.citrix.com/community/citrix-developer/

To network with other developers using Citrix Hypervisor visit
https://discussions.citrix.com/forum/101-hypervisor-formerly-xenserver/

libxenserver is free software. You can redistribute and modify it under the
terms of the BSD 2-Clause license. See COPYING for details.

Expand All @@ -33,6 +20,24 @@ recommended that you study these examples carefully to understand the approach
to error reporting and memory management taken by this library.


Reference
---------

For Citrix Hypervisor documentation see https://docs.citrix.com/en-us/citrix-hypervisor/

The Citrix Hypervisor Management API Reference is available at
https://developer-docs.citrix.com/projects/citrix-hypervisor-management-api/en/latest/

The Citrix Hypervisor Software Development Kit Guide is available at
https://developer-docs.citrix.com/projects/citrix-hypervisor-sdk/en/latest/

For community content, blogs, and downloads, visit
https://www.citrix.com/community/citrix-developer/

To network with other developers using Citrix Hypervisor visit
https://discussions.citrix.com/forum/101-hypervisor-formerly-xenserver/


Dependencies
------------

Expand All @@ -54,8 +59,7 @@ on all systems.)
Folder structure
----------------

The CitrixHypervisor-SDK-@[email protected] contains the following folders that
are relevant to C programmers:
This archive contains the following folders that are relevant to C developers:
- libxenserver/bin: contains the compiled binaries
- libxenserver/src: contains the source code and tests.

Expand Down
7 changes: 7 additions & 0 deletions c/autogen/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@
(action (copy %{deps} %{targets}))
)

(rule
(targets README)
(deps ../README.dist)
(action (copy %{deps} %{targets}))
)

(alias
(name generate)
(deps
COPYING
README
(source_tree .)
)
)
36 changes: 20 additions & 16 deletions csharp/README.dist
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
XenServer.NET
=============

Version @SDK_VERSION@

XenServer.NET is a complete SDK for Citrix Hypervisor, exposing the Citrix
Hypervisor API as .NET classes. It is written in C#.

It is available in the CitrixHypervisor-SDK-@[email protected], which can be downloaded
from https://www.citrix.com/downloads/citrix-hypervisor/

For Citrix Hypervisor documentation, see https://docs.citrix.com/en-us/citrix-hypervisor/

XenServer.NET includes a class for every API class, and a method for each API
call, so API documentation and examples written for other languages will apply
equally well to .NET. In particular, the SDK Guide and the Management API Guide
are ideal for developers wishing to use XenServer.NET.

For community content, blogs, and downloads, visit
https://www.citrix.com/community/citrix-developer/

To network with other developers using Citrix Hypervisor visit
https://discussions.citrix.com/forum/101-hypervisor-formerly-xenserver/

XenServer.NET is free software. You can redistribute and modify it under the
terms of the BSD 2-Clause license. See LICENSE.txt for details.

Expand All @@ -30,6 +17,24 @@ part of this library, and are licensed for redistribution and modification
under the BSD 2-Clause license.


Reference
---------

For Citrix Hypervisor documentation see https://docs.citrix.com/en-us/citrix-hypervisor/

The Citrix Hypervisor Management API Reference is available at
https://developer-docs.citrix.com/projects/citrix-hypervisor-management-api/en/latest/

The Citrix Hypervisor Software Development Kit Guide is available at
https://developer-docs.citrix.com/projects/citrix-hypervisor-sdk/en/latest/

For community content, blogs, and downloads, visit
https://www.citrix.com/community/citrix-developer/

To network with other developers using Citrix Hypervisor visit
https://discussions.citrix.com/forum/101-hypervisor-formerly-xenserver/


Prerequisites
-------------

Expand All @@ -55,8 +60,7 @@ XenServer.NET is dependent upon the following libraries:
Downloads
---------

The CitrixHypervisor-SDK-@[email protected] contains the following folders that are
relevant to .NET programmers:
This archive contains the following folders that are relevant to .NET developers:
- XenServer.NET\bin: contains the ready compiled binaries
- XenServer.NET\src: contains the source code shipped as a Visual Studio project.
- XenServer.NET\samples: contains the examples shipped as a Visual studio solution.
Expand All @@ -65,7 +69,7 @@ relevant to .NET programmers:
Getting Started
---------------

Download and unzip the CitrixHypervisor-SDK-@[email protected].
Extract the contents of this archive.

A. To use the compiled binaries in your code:
1. Copy XenServer.dll, CookComputing.XmlRpcV2.dll and Newtonsoft.Json.CH.dll
Expand Down
7 changes: 7 additions & 0 deletions csharp/autogen/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@
(action (copy %{deps} %{targets}))
)

(rule
(targets README.txt)
(deps ../README.dist)
(action (copy %{deps} %{targets}))
)

(alias
(name generate)
(deps
LICENSE.txt
README.txt
(source_tree .)
)
)
7 changes: 0 additions & 7 deletions csharp/autogen/src/Failure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,6 @@ private void ParseCslgFailures()
}
}

[Obsolete("This method is used internally and should not be called directly from the implementing code. "+
"If you need to modify this instance's fields, construct a new instance instead.")]
public void Setup()
{
ParseExceptionMessage();
}

public override string ToString()
{
return Message;
Expand Down
28 changes: 0 additions & 28 deletions csharp/autogen/src/HTTP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,6 @@ private static bool ValidateServerCertificate(
return true;
}

[Obsolete]
public static string MD5Hash(string str)
{
return _MD5Hash(str);
}

/// <summary>
/// Returns a secure MD5 hash of the given input string.
/// </summary>
Expand Down Expand Up @@ -792,28 +786,6 @@ public static void Get(DataCopiedDelegate dataCopiedDelegate, FuncBool cancellin
}
}


[Obsolete("Use HttpConnectStream(Uri, IWebProxy, String, int) instead.")]
public static Stream CONNECT(Uri uri, IWebProxy proxy, string session, int timeoutMs)
{
return HttpConnectStream(uri,proxy,session, timeoutMs);
}

#pragma warning disable 3005
[Obsolete("Use HttpPutStream(Uri, IWebProxy, long, int) instead.")]
public static Stream PUT(Uri uri, IWebProxy proxy, long contentLength, int timeoutMs)
{
return HttpPutStream(uri, proxy, contentLength, timeoutMs);
}

[Obsolete("Use HttpGetStream(Uri, IWebProxy, int) instead.")]
public static Stream GET(Uri uri, IWebProxy proxy, int timeoutMs)
{
return HttpGetStream(uri, proxy, timeoutMs);
}
#pragma warning restore 3005


private const int FILE_MOVE_MAX_RETRIES = 5;
private const int FILE_MOVE_SLEEP_BETWEEN_RETRIES = 100;

Expand Down
1 change: 1 addition & 0 deletions csharp/autogen/src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyInformationalVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
25 changes: 0 additions & 25 deletions csharp/autogen/src/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,25 +253,10 @@ public override string SaveChanges(Session session, string _serverOpaqueRef, Ses
throw new Exception("The method or operation is not implemented.");
}

#pragma warning disable 3005
[Obsolete("Use XmlRpcProxy instead.")]
public Proxy proxy
{
get { return XmlRpcProxy; }
private set { XmlRpcProxy = value; }
}
#pragma warning restore 3005

public Proxy XmlRpcProxy { get; private set; }

public JsonRpcClient JsonRpcClient { get; private set; }

[Obsolete("Use opaque_ref instead.")]
public string uuid
{
get { return opaque_ref; }
}

public string Url
{
get
Expand Down Expand Up @@ -321,16 +306,6 @@ public ICredentials Credentials
/// </summary>
public virtual bool IsLocalSuperuser { get; private set; }

#pragma warning disable 3005
[Obsolete("Use SessionSubject instead.")]
[JsonConverter(typeof(XenRefConverter<Subject>))]
public XenRef<Subject> Subject
{
get { return SessionSubject; }
private set { SessionSubject = value; }
}
#pragma warning restore 3005

/// <summary>
/// The OpaqueRef for the Subject under whose authority the current user is logged in;
/// may correspond to either a group or a user.
Expand Down
11 changes: 0 additions & 11 deletions csharp/autogen/src/XenObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,6 @@ public abstract partial class XenObject<S> : IXenObject where S : XenObject<S>

public string opaque_ref { get; set; }

[JsonIgnore]
[Obsolete("This property can no longer be used to deduce that a XenObject has changed: " +
"now it always returns true and new values assigned to it are ignored. " +
"To be notified when the XenObject has changed (i.e. its properties have new values)," +
"handle the event PropertyChanged instead.")]
public bool Changed
{
get { return true; }
set { }
}

public event PropertyChangedEventHandler PropertyChanged;

public void NotifyPropertyChanged(String info)
Expand Down
Loading