diff --git a/Makefile b/Makefile
index 442532b..04e5411 100644
--- a/Makefile
+++ b/Makefile
@@ -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 \
@@ -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
diff --git a/c/README.dist b/c/README.dist
index b3dfcc7..d2b2600 100644
--- a/c/README.dist
+++ b/c/README.dist
@@ -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-@SDK_VERSION@.zip, 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.
@@ -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
------------
@@ -54,8 +59,7 @@ on all systems.)
Folder structure
----------------
-The CitrixHypervisor-SDK-@SDK_VERSION@.zip 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.
diff --git a/c/autogen/dune b/c/autogen/dune
index 498ede7..5d1af51 100644
--- a/c/autogen/dune
+++ b/c/autogen/dune
@@ -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 .)
)
)
diff --git a/csharp/README.dist b/csharp/README.dist
index b362e80..76e5e5c 100644
--- a/csharp/README.dist
+++ b/csharp/README.dist
@@ -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-@SDK_VERSION@.zip, 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.
@@ -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
-------------
@@ -55,8 +60,7 @@ XenServer.NET is dependent upon the following libraries:
Downloads
---------
-The CitrixHypervisor-SDK-@SDK_VERSION@.zip 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.
@@ -65,7 +69,7 @@ relevant to .NET programmers:
Getting Started
---------------
-Download and unzip the CitrixHypervisor-SDK-@SDK_VERSION@.zip.
+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
diff --git a/csharp/autogen/dune b/csharp/autogen/dune
index a8e3c00..beb281e 100644
--- a/csharp/autogen/dune
+++ b/csharp/autogen/dune
@@ -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 .)
)
)
diff --git a/csharp/autogen/src/Failure.cs b/csharp/autogen/src/Failure.cs
index bea64de..685aa54 100644
--- a/csharp/autogen/src/Failure.cs
+++ b/csharp/autogen/src/Failure.cs
@@ -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;
diff --git a/csharp/autogen/src/HTTP.cs b/csharp/autogen/src/HTTP.cs
index 8f1412b..57ae14b 100644
--- a/csharp/autogen/src/HTTP.cs
+++ b/csharp/autogen/src/HTTP.cs
@@ -288,12 +288,6 @@ private static bool ValidateServerCertificate(
return true;
}
- [Obsolete]
- public static string MD5Hash(string str)
- {
- return _MD5Hash(str);
- }
-
///
/// Returns a secure MD5 hash of the given input string.
///
@@ -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;
diff --git a/csharp/autogen/src/Properties/AssemblyInfo.cs b/csharp/autogen/src/Properties/AssemblyInfo.cs
index d4720aa..6c33ec4 100644
--- a/csharp/autogen/src/Properties/AssemblyInfo.cs
+++ b/csharp/autogen/src/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/csharp/autogen/src/Session.cs b/csharp/autogen/src/Session.cs
index 82e38af..c8b0f11 100644
--- a/csharp/autogen/src/Session.cs
+++ b/csharp/autogen/src/Session.cs
@@ -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
@@ -321,16 +306,6 @@ public ICredentials Credentials
///
public virtual bool IsLocalSuperuser { get; private set; }
-#pragma warning disable 3005
- [Obsolete("Use SessionSubject instead.")]
- [JsonConverter(typeof(XenRefConverter))]
- public XenRef Subject
- {
- get { return SessionSubject; }
- private set { SessionSubject = value; }
- }
-#pragma warning restore 3005
-
///
/// The OpaqueRef for the Subject under whose authority the current user is logged in;
/// may correspond to either a group or a user.
diff --git a/csharp/autogen/src/XenObject.cs b/csharp/autogen/src/XenObject.cs
index 839af0e..29e22b1 100644
--- a/csharp/autogen/src/XenObject.cs
+++ b/csharp/autogen/src/XenObject.cs
@@ -58,17 +58,6 @@ public abstract partial class XenObject : IXenObject where S : XenObject
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)
diff --git a/java/LICENSE.Apache-2.0.txt b/java/LICENSE.Apache-2.0.txt
deleted file mode 100644
index 29f81d8..0000000
--- a/java/LICENSE.Apache-2.0.txt
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/java/Makefile.dist b/java/Makefile.dist
deleted file mode 100644
index eb18934..0000000
--- a/java/Makefile.dist
+++ /dev/null
@@ -1,73 +0,0 @@
-#
-# Copyright (c) Citrix Systems, Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1) Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2) Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials
-# provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-# OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-# Makefile to compile the Xen Java SDK bindings and tests
-
-BINDINGJAVAFILES := $(wildcard com/xensource/xenapi/*.java)
-BINDINGCLASSFILES := $(BINDINGJAVAFILES:.java=.class)
-BINDINGJAR := xenserver-@SDK_VERSION@.jar
-
-CLASSPATH := :xmlrpc-client-3.1.3.jar:xmlrpc-common-3.1.3.jar:ws-commons-util-1.0.2.jar
-
-.PHONY: all
-all: $(BINDINGJAR) tests
- @ :
-
-# Target to compile the automated tests
-.PHONY: tests
-tests: $(patsubst %.java,%.class,$(wildcard *.java))
- @ :
-
-.PHONY: docs
-docs:
- javadoc -classpath ${CLASSPATH} -d doc -link http://java.sun.com/javase/6/docs/api com/xensource/xenapi/*.java
-
-%.class: %.java
- javac -cp ${CLASSPATH} $^
-
-$(BINDINGJAR): $(BINDINGCLASSFILES)
- jar -cvf $@ com/xensource/xenapi/*.class
-
-.PHONY: cleanclass
-cleanclass:
- rm -f com/xensource/xenapi/*.class
- rm -f *.class
-
-.PHONY: cleanjar
-cleanjar:
- rm -f $(BINDINGJAR)
-
-.PHONY: cleandocs
-cleandocs:
- rm -rf doc
-
-.PHONY: clean
-clean: cleanjar cleanclass cleandocs
- @ :
diff --git a/java/README.dist b/java/README.dist
deleted file mode 100644
index afe3bea..0000000
--- a/java/README.dist
+++ /dev/null
@@ -1,72 +0,0 @@
-XenServerJava
-=============
-
-Version @SDK_VERSION@
-
-XenServerJava is a complete SDK for Citrix Hypervisor, exposing the Citrix
-Hypervisor API as Java classes.
-
-It is available in the CitrixHypervisor-SDK-@SDK_VERSION@.zip, 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/
-
-XenServerJava 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 Java. In particular, the SDK Guide and the Management API Guide
-are ideal for developers wishing to use XenServerJava.
-
-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/
-
-XenServerJava is free software. You can redistribute and modify it under the
-terms of the BSD 2-Clause license. See LICENSE.txt for details.
-
-This library is accompanied a number of test programs that can be used ass
-pedagogical examples. These do not form part of this library, and are licensed for
-redistribution and modification under the BSD 2-Clause license.
-
-
-Dependencies
-------------
-
-XenServerJava is dependent upon Apache XML-RPC and WS-Commons, both by The
-Apache Software Foundation. Both are licensed under the
-Apache Software License 2.0. See LICENSE.Apache-2.0.txt for details.
-
-We test with version 3.1 of Apache XML-RPC and version 1.0.2 of WS-Commons.
-We recommend that you use these versions, though others may work.
-
-Apache XML-RPC is available from http://ws.apache.org/xmlrpc/.
-WS-Commons is available from http://ws.apache.org/commons/.
-All the jars are shipped with this library.
-
-
-Folder structure
-----------------
-
-The CitrixHypervisor-SDK-@SDK_VERSION@.zip contains the following folders that are
-relevant to Java programmers:
-- XenServerJava/bin: contains the compiled binaries
-- XenServerJava/javadoc: contains the documentation
-- XenServerJava/src: contains the source code and tests.
-
-
-Compiling from source
----------------------
-
-Extract XenServerJava from CitrixHypervisor-SDK-@SDK_VERSION@.zip.
-Copy the dependency jars from XenServerJava/bin to XenServerJava/src.
-
-From XenServerJava/src do:
-- "make all" to build the XenServer binary
-- "make docs" to build the documentation.
-
-To build and run the tests, copy them from XenServerJava/samples to
-XenServerJava/src, then from XenServerJava/src "make all" and
-
-$ CLS_PATH=:xmlrpc-client-3.1.3.jar:xmlrpc-common-3.1.3.jar:ws-commons-util-1.0.2.jar
-$ java -cp $CLS_PATH RunTests [nfs server] [nfs path]
diff --git a/java/autogen/dune b/java/autogen/dune
index dc43cb8..fe8d324 100644
--- a/java/autogen/dune
+++ b/java/autogen/dune
@@ -1,20 +1,6 @@
-(rule
- (targets LICENSE.txt)
- (deps ../../LICENSE)
- (action (copy %{deps} %{targets}))
-)
-
-(rule
- (targets LICENSE.Apache-2.0.txt)
- (deps ../LICENSE.Apache-2.0.txt)
- (action (copy %{deps} %{targets}))
-)
-
(alias
(name generate)
(deps
- LICENSE.txt
- LICENSE.Apache-2.0.txt
(source_tree .)
)
)
\ No newline at end of file
diff --git a/java/autogen/samples/DeprecatedMethod.java b/java/autogen/samples/DeprecatedMethod.java
deleted file mode 100644
index bfbebb1..0000000
--- a/java/autogen/samples/DeprecatedMethod.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) Citrix Systems, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1) Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2) Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.util.Map;
-
-import com.xensource.xenapi.HostPatch;
-import com.xensource.xenapi.Types;
-
-/**
- * The HostPatch.apply() method is deprecated. We'll try to use it. The test is that the
- * program will compile, but the compiler will protest.
- */
-public class DeprecatedMethod extends TestBase
-{
- public String getTestName() {
- return "DeprecatedMethod";
- }
-
- @SuppressWarnings("deprecation")
- protected void TestCore() throws Exception
- {
- Map all_recs = HostPatch.getAllRecords(connection);
- if (all_recs.size() > 0)
- {
- log("Found HostPatches. Applying the first one...");
- Map.Entry first = null;
- for (Map.Entry entry : all_recs.entrySet())
- {
- first = entry;
- break;
- }
-
- log(first.getValue().toString());
- try {
- first.getKey().apply(connection);
- throw new Exception("Managed to use deprecated method HostPatch.apply()!");
- } catch (Types.MessageDeprecated e) {
- log("Caught expected MessageDeprecated exception. Do not fail.");
- }
- } else
- {
- log("There aren't any HostPatches to be applied...");
- }
- }
-}
diff --git a/java/autogen/xen-api-samples/pom.xml b/java/autogen/xen-api-samples/pom.xml
new file mode 100644
index 0000000..f3f02c5
--- /dev/null
+++ b/java/autogen/xen-api-samples/pom.xml
@@ -0,0 +1,115 @@
+
+ 4.0.0
+ com.citrix.hypervisor
+ xen-api-samples
+ ${revision}
+ jar
+ Citrix Hypervisor Java SDK Samples
+ Example integrations of Citrix Hypervisor SDK for Java.
+ https://www.citrix.com/community/citrix-developer/citrix-hypervisor-developer
+
+ Citrix Systems, Inc.
+ https://www.citrix.com
+
+
+
+ BSD 2-Clause License
+ http://opensource.org/licenses/BSD-2-Clause
+ repo
+
+
+
+ https://github.com/xapi-project/xen-api-sdk
+ https://github.com/xapi-project/xen-api-sdk
+ https://github.com/xapi-project/xen-api-sdk
+
+
+
+ Xen-API - User and development list for XCP and XAPI
+ xen-api@list.xen.org
+ http://lists.xen.org/archives/html/xen-api/
+
+
+ XenServer General Development List
+ xs-devel@lists.xenserver.org
+ https://lists.xenserver.org/sympa/arc/xs-devel
+
+
+
+
+ Citrix Systems, Inc.
+ xen-api@lists.xenproject.org
+
+
+
+ GitHub
+ https://github.com/xapi-project/xen-api-sdk/issues
+
+
+ 1.0.0-SNAPSHOT
+ UTF-8
+
+
+
+ com.citrix.hypervisor
+ xen-api
+ @SDK_VERSION@
+
+
+
+
+ vcc-releases
+ VCC Release Repository
+ http://oss.sonatype.org/content/repositories/java-net-releases/
+
+
+ vcc-snapshots
+ VCC Snapshot Repository
+ http://oss.sonatype.org/content/repositories/java-net-snapshots/
+
+
+
+
+
+
+ maven-compiler-plugin
+
+ -Xlint:unchecked
+ 1.8
+ 1.8
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.2.1
+
+
+ attach-sources
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.2.0
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+
+
diff --git a/java/autogen/samples/AddNetwork.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/AddNetwork.java
similarity index 98%
rename from java/autogen/samples/AddNetwork.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/AddNetwork.java
index 9cdf6ef..141228d 100644
--- a/java/autogen/samples/AddNetwork.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/AddNetwork.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
import java.util.Date;
import java.util.Random;
diff --git a/java/autogen/samples/AsyncVMCreate.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/AsyncVMCreate.java
similarity index 99%
rename from java/autogen/samples/AsyncVMCreate.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/AsyncVMCreate.java
index 1ef5f93..286f4a8 100644
--- a/java/autogen/samples/AsyncVMCreate.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/AsyncVMCreate.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
diff --git a/java/autogen/samples/CreateVM.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/CreateVM.java
similarity index 99%
rename from java/autogen/samples/CreateVM.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/CreateVM.java
index c9cc564..63b62c8 100644
--- a/java/autogen/samples/CreateVM.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/CreateVM.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
import java.util.Date;
import java.util.Map;
diff --git a/java/autogen/samples/EventMonitor.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/EventMonitor.java
similarity index 98%
rename from java/autogen/samples/EventMonitor.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/EventMonitor.java
index 20ab571..e02e266 100644
--- a/java/autogen/samples/EventMonitor.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/EventMonitor.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
import java.util.HashSet;
import java.util.Set;
diff --git a/java/autogen/samples/FileLogger.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/FileLogger.java
similarity index 98%
rename from java/autogen/samples/FileLogger.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/FileLogger.java
index df4a855..72d3128 100644
--- a/java/autogen/samples/FileLogger.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/FileLogger.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
import java.io.FileWriter;
import java.io.IOException;
diff --git a/java/autogen/samples/FileLoggerText.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/FileLoggerText.java
similarity index 95%
rename from java/autogen/samples/FileLoggerText.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/FileLoggerText.java
index 892ba96..ad5964f 100644
--- a/java/autogen/samples/FileLoggerText.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/FileLoggerText.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
diff --git a/java/autogen/samples/FileLoggerXml.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/FileLoggerXml.java
similarity index 95%
rename from java/autogen/samples/FileLoggerXml.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/FileLoggerXml.java
index be9aeae..ddc391b 100644
--- a/java/autogen/samples/FileLoggerXml.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/FileLoggerXml.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
public class FileLoggerXml extends FileLogger {
protected FileLoggerXml(String path) {
super(path);
diff --git a/java/autogen/samples/Https.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/Https.java
similarity index 94%
rename from java/autogen/samples/Https.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/Https.java
index 5ec1bbb..3dc06d2 100644
--- a/java/autogen/samples/Https.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/Https.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
import java.net.URL;
import javax.net.ssl.HostnameVerifier;
@@ -45,11 +47,11 @@
* 2. Run 'openssl x509 -inform PEM -outform DER -in xapi-ssl.pem -out xapi-ssl.jks'
* This converts the certificate into a form that Java's keytool can understand.
* 3. Run keytool (found in Java's bin directory) as follows:
- * 'keytool -importcert -file xapi-ssl.jks -alias '
+ * 'keytool -importcert -file xapi-ssl.jks -alias <hostname>'
* You can optionally pass the -keystore argument if you want to specify the location of your keystore.
* 4. To tell the JVM the location and password of your keystore, run it with the additional parameters
* (Sun's keytool seems to insist on using private key and keystore passwords):
- * -Djavax.net.ssl.trustStore="" -Djavax.net.ssl.trustStorePassword=
+ * -Djavax.net.ssl.trustStore="<path to keystore>" -Djavax.net.ssl.trustStorePassword=<password>
* For extra debug info, try:
* -Djavax.net.debug=ssl
*/
diff --git a/java/autogen/samples/RunTests.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/RunTests.java
similarity index 99%
rename from java/autogen/samples/RunTests.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/RunTests.java
index b6508ed..03ab176 100644
--- a/java/autogen/samples/RunTests.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/RunTests.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
import java.util.*;
/**
@@ -80,7 +82,6 @@ public static void main(String[] args)
tests.add(new AsyncVMCreate());
tests.add(new VdiAndSrOps());
tests.add(new CreateVM());
- tests.add(new DeprecatedMethod());
tests.add(new GetAllRecordsOfAllTypes());
tests.add(new Https());
tests.add(new SharedStorage(nfsServer, nfsPath));
diff --git a/java/autogen/samples/SessionReuse.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/SessionReuse.java
similarity index 99%
rename from java/autogen/samples/SessionReuse.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/SessionReuse.java
index 1250cc9..0893230 100644
--- a/java/autogen/samples/SessionReuse.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/SessionReuse.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
import java.lang.Thread.State;
import java.net.URL;
import java.util.Date;
diff --git a/java/autogen/samples/SharedStorage.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/SharedStorage.java
similarity index 96%
rename from java/autogen/samples/SharedStorage.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/SharedStorage.java
index b72312d..582aa59 100644
--- a/java/autogen/samples/SharedStorage.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/SharedStorage.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@@ -40,9 +42,9 @@
/**
* Creates a shared NFS SR.
- *
- * java equivalent to the cli command: xe sr-create type=nfs name-label= device-config-server=
- * device-config-serverpath= shared=true
+ *
+ * java equivalent to the cli command: xe sr-create type=nfs name-label=<name> device-config-server=<nfsServer>
+ * device-config-serverpath=<serverPath> shared=true
*/
public class SharedStorage extends TestBase
{
@@ -106,8 +108,6 @@ protected void TestCore() throws Exception
logf("Received expected exception: %s", ex.toString());
}
- /*
- comment this out until CA-182929 is fixed
log("now trying to create one with a bad 'type' field - should throw a different exception");
try {
SR.create(connection, host, new HashMap(), 100000L, "bad_sr_type", "description", "made_up",
@@ -116,6 +116,5 @@ protected void TestCore() throws Exception
catch (XenAPIException ex) {
logf("Received expected exception: %s", ex.toString());
}
- */
}
}
diff --git a/java/autogen/samples/StartAllVMs.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/StartAllVMs.java
similarity index 98%
rename from java/autogen/samples/StartAllVMs.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/StartAllVMs.java
index ef04e30..d8e59e1 100644
--- a/java/autogen/samples/StartAllVMs.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/StartAllVMs.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
import java.util.Map;
import com.xensource.xenapi.Types;
diff --git a/java/autogen/samples/TargetServer.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/TargetServer.java
similarity index 97%
rename from java/autogen/samples/TargetServer.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/TargetServer.java
index aa7d007..a8a9ee0 100644
--- a/java/autogen/samples/TargetServer.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/TargetServer.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
public class TargetServer
{
public final String Hostname;
diff --git a/java/autogen/samples/TestBase.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/TestBase.java
similarity index 99%
rename from java/autogen/samples/TestBase.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/TestBase.java
index 68e4f1c..d21be82 100644
--- a/java/autogen/samples/TestBase.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/TestBase.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
import java.net.URL;
import java.util.Map;
import java.util.Set;
diff --git a/java/autogen/samples/VMlifecycle.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/VMlifecycle.java
similarity index 98%
rename from java/autogen/samples/VMlifecycle.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/VMlifecycle.java
index 34db5ac..0312a12 100644
--- a/java/autogen/samples/VMlifecycle.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/VMlifecycle.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
import java.util.Date;
import java.util.Set;
diff --git a/java/autogen/samples/VdiAndSrOps.java b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/VdiAndSrOps.java
similarity index 99%
rename from java/autogen/samples/VdiAndSrOps.java
rename to java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/VdiAndSrOps.java
index e02ff04..e9d8c0f 100644
--- a/java/autogen/samples/VdiAndSrOps.java
+++ b/java/autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples/VdiAndSrOps.java
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+ package com.xensource.xenapi.samples;
+
import java.util.HashMap;
import java.util.Set;
diff --git a/java/autogen/xen-api-samples/src/main/resources/README.txt b/java/autogen/xen-api-samples/src/main/resources/README.txt
new file mode 100644
index 0000000..3bf0cb2
--- /dev/null
+++ b/java/autogen/xen-api-samples/src/main/resources/README.txt
@@ -0,0 +1,51 @@
+XenServerJava Samples
+=====================
+
+This library consists of a number of test programs that can be used as pedagogical
+examples accompanying XenServerJava (com.citrix.hypervisor.xen-api).
+
+XenServerJava is a complete SDK for Citrix Hypervisor, exposing the Citrix
+Hypervisor API as Java classes.
+
+XenServerJava 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 Java. In particular, the SDK Guide and the Management API Guide
+are ideal for developers wishing to use XenServerJava.
+
+XenServerJava Samples and XenServerJava are free software. You can redistribute
+and modify them under the terms of the BSD 2-Clause license. See LICENSE for
+details.
+
+
+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
+------------
+
+XenServerJava Samples depend on XenServerJava, which in turns depends upon Apache
+XML-RPC by the Apache Software Foundation, licensed under the Apache Software
+License 2.0.
+
+
+To run the tests
+----------------
+
+Once you compile the library run:
+
+RunTests [nfs server] [nfs path]
diff --git a/java/autogen/xen-api/pom.xml b/java/autogen/xen-api/pom.xml
new file mode 100644
index 0000000..1a7e5ea
--- /dev/null
+++ b/java/autogen/xen-api/pom.xml
@@ -0,0 +1,135 @@
+
+ 4.0.0
+ com.citrix.hypervisor
+ xen-api
+ ${revision}
+ jar
+ Citrix Hypervisor Java SDK
+ Mavenized build of the Citrix Hypervisor SDK for Java.
+ https://www.citrix.com/community/citrix-developer/citrix-hypervisor-developer
+
+ Citrix Systems, Inc.
+ https://www.citrix.com
+
+
+
+ BSD 2-Clause License
+ http://opensource.org/licenses/BSD-2-Clause
+ repo
+
+
+
+ https://github.com/xapi-project/xen-api-sdk
+ https://github.com/xapi-project/xen-api-sdk
+ https://github.com/xapi-project/xen-api-sdk
+
+
+
+ Xen-API - User and development list for XCP and XAPI
+ xen-api@list.xen.org
+ http://lists.xen.org/archives/html/xen-api/
+
+
+ XenServer General Development List
+ xs-devel@lists.xenserver.org
+ https://lists.xenserver.org/sympa/arc/xs-devel
+
+
+
+
+ Citrix Systems, Inc.
+ xen-api@lists.xenproject.org
+
+
+
+ GitHub
+ https://github.com/xapi-project/xen-api-sdk/issues
+
+
+ 1.0.0-SNAPSHOT
+ UTF-8
+
+
+
+ org.apache.xmlrpc
+ xmlrpc-client
+ 3.1.3
+
+
+ org.apache.xmlrpc
+ xmlrpc-common
+ 3.1.3
+
+
+ org.apache.ws.commons.util
+ ws-commons-util
+ 1.0.2
+
+
+ junit
+ junit
+
+
+ xml-apis
+ xml-apis
+
+
+
+
+
+
+ vcc-releases
+ VCC Release Repository
+ http://oss.sonatype.org/content/repositories/java-net-releases/
+
+
+ vcc-snapshots
+ VCC Snapshot Repository
+ http://oss.sonatype.org/content/repositories/java-net-snapshots/
+
+
+
+
+
+
+ maven-compiler-plugin
+
+ -Xlint:unchecked
+ 1.8
+ 1.8
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.2.1
+
+
+ attach-sources
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.2.0
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+
+
diff --git a/java/autogen/com/xensource/xenapi/Connection.java b/java/autogen/xen-api/src/main/java/com/xensource/xenapi/Connection.java
similarity index 92%
rename from java/autogen/com/xensource/xenapi/Connection.java
rename to java/autogen/xen-api/src/main/java/com/xensource/xenapi/Connection.java
index 6ebf1e2..1af853a 100644
--- a/java/autogen/com/xensource/xenapi/Connection.java
+++ b/java/autogen/xen-api/src/main/java/com/xensource/xenapi/Connection.java
@@ -49,14 +49,6 @@
*/
public class Connection
{
- /**
- * The version of the bindings that this class belongs to.
- *
- * @deprecated This field is not used any more.
- */
- @Deprecated
- public static final String BINDINGS_VERSION = "";
-
private APIVersion apiVersion;
/**
@@ -69,24 +61,6 @@ public class Connection
*/
protected static final int DEFAULT_CONNECTION_TIMEOUT = 5;
- /**
- * Reply timeout for xml-rpc calls. The default value is 10 minutes.
- *
- * @deprecated This field is not used any more. To set the reply timeout
- * for xml-rpc calls, please use the appropriate Connection constructor.
- */
- @Deprecated
- protected int _replyWait = 600;
-
- /**
- * Connection timeout for xml-rpc calls. The default value is 5 seconds.
- *
- * @deprecated This field is not used any more. To set the connection timeout
- * for xml-rpc calls, please use the appropriate Connection constructor.
- */
- @Deprecated
- protected int _connWait = 5;
-
/**
* Updated when Session.login_with_password() is called.
*/
diff --git a/java/autogen/com/xensource/xenapi/EventBatch.java b/java/autogen/xen-api/src/main/java/com/xensource/xenapi/EventBatch.java
similarity index 100%
rename from java/autogen/com/xensource/xenapi/EventBatch.java
rename to java/autogen/xen-api/src/main/java/com/xensource/xenapi/EventBatch.java
diff --git a/java/autogen/com/xensource/xenapi/Marshalling.java b/java/autogen/xen-api/src/main/java/com/xensource/xenapi/Marshalling.java
similarity index 100%
rename from java/autogen/com/xensource/xenapi/Marshalling.java
rename to java/autogen/xen-api/src/main/java/com/xensource/xenapi/Marshalling.java
diff --git a/java/autogen/com/xensource/xenapi/XenAPIObject.java b/java/autogen/xen-api/src/main/java/com/xensource/xenapi/XenAPIObject.java
similarity index 100%
rename from java/autogen/com/xensource/xenapi/XenAPIObject.java
rename to java/autogen/xen-api/src/main/java/com/xensource/xenapi/XenAPIObject.java
diff --git a/java/autogen/xen-api/src/main/resources/README.txt b/java/autogen/xen-api/src/main/resources/README.txt
new file mode 100644
index 0000000..795db3f
--- /dev/null
+++ b/java/autogen/xen-api/src/main/resources/README.txt
@@ -0,0 +1,43 @@
+XenServerJava
+=============
+
+XenServerJava is a complete SDK for Citrix Hypervisor, exposing the Citrix
+Hypervisor API as Java classes.
+
+XenServerJava 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 Java. In particular, the SDK Guide and the Management API Guide
+are ideal for developers wishing to use XenServerJava.
+
+XenServerJava is free software. You can redistribute and modify it under the
+terms of the BSD 2-Clause license. See LICENSE for details.
+
+This library is accompanied by a number of test programs that can be used as
+pedagogical examples. These are shipped as a separate package
+(com.citrix.hypervisor.xen-api-samples) 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/
+
+
+Dependencies
+------------
+
+XenServerJava is dependent upon Apache XML-RPC by the Apache Software Foundation,
+licensed under the Apache Software License 2.0.
diff --git a/java/dune b/java/dune
index a4eaab3..670b1c7 100644
--- a/java/dune
+++ b/java/dune
@@ -8,9 +8,16 @@
)
)
+(rule
+ (targets LICENSE)
+ (deps ../LICENSE)
+ (action (copy %{deps} %{targets}))
+)
+
(alias
(name generate)
(deps
+ LICENSE
(:x main.exe)
(source_tree templates)
)
diff --git a/java/main.ml b/java/main.ml
index 76ef824..5b6512b 100644
--- a/java/main.ml
+++ b/java/main.ml
@@ -39,9 +39,6 @@ module DT = Datamodel_types
module DU = Datamodel_utils
-let destdir = "autogen"
-let templdir = "templates"
-
(*Filter out all the bits of the data model we don't want to put in the api.
For instance we don't want the things which are marked internal only, or the
ones marked hide_from_docs*)
@@ -967,10 +964,10 @@ public class Types
(* Now run it *)
-let populate_releases class_dir =
+let populate_releases templdir class_dir =
render_file ("APIVersion.mustache", "APIVersion.java") json_releases templdir class_dir
-let gen_get_all_records_test classes =
+let gen_get_all_records_test classes templdir sample_dir =
let class_records =
classes |>
List.filter (fun {obj_lifecycle; _} ->
@@ -981,11 +978,19 @@ let gen_get_all_records_test classes =
List.sort String.compare
in
let json =`O ["api_class_records", `A (List.map (fun x -> `O ["api_class_record", `String x];) class_records); ] in
- render_file ("GetAllRecordsOfAllTypes.mustache", "samples/GetAllRecordsOfAllTypes.java") json templdir destdir
+ render_file ("GetAllRecordsOfAllTypes.mustache", "GetAllRecordsOfAllTypes.java") json templdir sample_dir
let _ =
- let class_dir = Filename.concat destdir "com/xensource/xenapi" in
+ let templdir = "templates" in
+ let class_dir = "autogen/xen-api/src/main/java/com/xensource/xenapi" in
+ let sample_dir = "autogen/xen-api-samples/src/main/java/com/xensource/xenapi/samples" in
List.iter (fun x-> gen_class x class_dir) classes;
gen_types_class class_dir;
- populate_releases class_dir;
- gen_get_all_records_test classes
+ populate_releases templdir class_dir;
+ gen_get_all_records_test classes templdir sample_dir;
+
+ let uncommented_license = string_of_file "LICENSE" in
+ let class_license = open_out "autogen/xen-api/src/main/resources/LICENSE" in
+ let sample_license = open_out "autogen/xen-api-samples/src/main/resources/LICENSE" in
+ output_string class_license uncommented_license;
+ output_string sample_license uncommented_license
diff --git a/java/templates/GetAllRecordsOfAllTypes.mustache b/java/templates/GetAllRecordsOfAllTypes.mustache
index 09dc443..6ec723c 100644
--- a/java/templates/GetAllRecordsOfAllTypes.mustache
+++ b/java/templates/GetAllRecordsOfAllTypes.mustache
@@ -28,6 +28,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+package com.xensource.xenapi.samples;
+
import java.util.Map;
import com.xensource.xenapi.*;
diff --git a/powershell/README.dist b/powershell/README.dist
index 3fea5df..c1c900e 100644
--- a/powershell/README.dist
+++ b/powershell/README.dist
@@ -1,27 +1,14 @@
Citrix Hypervisor PowerShell Module
===================================
-Version @SDK_VERSION@
-
The Citrix Hypervisor PowerShell Module is a complete SDK for Citrix Hypervisor,
exposing the Citrix Hypervisor API as Windows PowerShell cmdlets.
-It is available in the CitrixHypervisor-SDK-@SDK_VERSION@.zip, 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/
-
The Citrix Hypervisor PowerShell Module includes a cmdlet for each API call,
so API documentation and examples written for other languages will apply equally
well to PowerShell. In particular, the SDK Guide and the Management API Guide
are ideal for developers wishing to use this module.
-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/
-
This module is free software. You can redistribute and modify it under the
terms of the BSD 2-Clause license. See LICENSE.txt for details.
@@ -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
-------------
@@ -56,8 +61,7 @@ The Citrix Hypervisor PowerShell Module is dependent upon the following librarie
Folder Structure
----------------
-The CitrixHypervisor-SDK-@SDK_VERSION@.zip contains the following folders that
-are relevant to PowerShell users:
+This archive contains the following folders that are relevant to PowerShell users:
- XenServerPowerShell\XenServerPSModule: this is the Citrix Hypervisor PowerShell
Module
@@ -69,11 +73,12 @@ are relevant to PowerShell users:
Getting Started
---------------
-1. Download and unzip the CitrixHypervisor-SDK-@SDK_VERSION@.zip.
+1. Unzip the contents of this archive.
- Note that, if you use Internet Explorer, it is likely that the zip file will
- be marked as "blocked" during the download, in which case you will need to
- unblock it before unzipping it, in order to import the module successfully.
+ Note that, if you have downloaded this zip file using Internet Explorer, it
+ is likely that it will have been marked as "blocked" during the download. To
+ import the module successfully you will need to unblock this zip file before
+ unzipping it.
To unblock the zip file, right-click on it and launch the Properties dialog.
Click the "Unblock" button, then the Apply or OK button.
diff --git a/powershell/XenServerPSModule.psd1 b/powershell/autogen/XenServerPSModule.psd1
similarity index 95%
rename from powershell/XenServerPSModule.psd1
rename to powershell/autogen/XenServerPSModule.psd1
index dc36291..b3c0bdf 100644
--- a/powershell/XenServerPSModule.psd1
+++ b/powershell/autogen/XenServerPSModule.psd1
@@ -33,7 +33,7 @@
#Module Info
ModuleVersion = '@SDK_VERSION@'
Description = 'XenServer PowerShell Module'
-GUID = '@PRODUCT_GUID@'
+GUID = 'D695A8B9-039A-443C-99A4-0D48D7C6AD76'
#Copyright
Author = ''
diff --git a/powershell/about_XenServer.help.txt b/powershell/autogen/about_XenServer.help.txt
similarity index 96%
rename from powershell/about_XenServer.help.txt
rename to powershell/autogen/about_XenServer.help.txt
index afc17d4..adc8193 100644
--- a/powershell/about_XenServer.help.txt
+++ b/powershell/autogen/about_XenServer.help.txt
@@ -1,6 +1,5 @@
-
-XenServer PowerShell Module v@SDK_VERSION@
-----------------------------------
+XenServer PowerShell Module
+===========================
This document provides a high level walk-through of the XenServer PowerShell Module
and the structure of its cmdlets.
diff --git a/powershell/autogen/dune b/powershell/autogen/dune
index d072e55..4950487 100644
--- a/powershell/autogen/dune
+++ b/powershell/autogen/dune
@@ -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 .)
)
)
\ No newline at end of file
diff --git a/powershell/autogen/src/Properties/AssemblyInfo.cs b/powershell/autogen/src/Properties/AssemblyInfo.cs
index a754c49..12ee475 100644
--- a/powershell/autogen/src/Properties/AssemblyInfo.cs
+++ b/powershell/autogen/src/Properties/AssemblyInfo.cs
@@ -63,4 +63,4 @@
// by using the '*' as shown below:
[assembly: AssemblyInformationalVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1000")]
+[assembly: AssemblyFileVersion("1.0.0.0")]