Skip to content
Permalink
Browse files

Bumped API version.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
  • Loading branch information...
kc284 committed May 18, 2014
1 parent 9fa9c92 commit 4007d397659a6e43ecc136f0f141977d88d58637
Showing with 20 additions and 7 deletions.
  1. +1 −1 c/OMakefile
  2. +6 −1 c/xen_common.c
  3. +2 −1 c/xen_common.h
  4. +4 −1 csharp/src/Helper.cs
  5. +7 −3 java/lib/com/xensource/xenapi/APIVersion.java
@@ -29,7 +29,7 @@
#

API_MAJOR=2
API_MINOR=2
API_MINOR=3
API_VER=$(API_MAJOR).$(API_MINOR)

C_GEN_FOLDER=$(BINDINGS_TMP)/c_gen
@@ -196,6 +196,8 @@ xen_api_version_to_string(xen_api_version version)
return "2.1";
case xen_api_version_2_2:
return "2.2";
case xen_api_version_2_3:
return "2.3";
default:
return "Unknown";
}
@@ -325,7 +327,10 @@ set_api_version(xen_session *session)

if (major_version == (int64_t)2)
{
if (minor_version == (int64_t)2)
if (minor_version == (int64_t)3)
session->api_version = xen_api_version_2_3;

else if (minor_version == (int64_t)2)
session->api_version = xen_api_version_2_2;

else if (minor_version == (int64_t)1)
@@ -77,7 +77,8 @@ typedef enum xen_api_version
xen_api_version_2_0 = 11,
xen_api_version_2_1 = 12,
xen_api_version_2_2 = 13,
xen_api_latest_version = 13,
xen_api_version_2_3 = 14,
xen_api_latest_version = 14,
xen_api_unknown_version = 99,
/* Also change xen_api_version_to_string() and set_api_version() in xen_common.c */
} xen_api_version;
@@ -50,7 +50,8 @@ public enum API_Version
API_2_0 = 11, // XenServer 6.2 (Clearwater)
API_2_1 = 12, // XenServer 6.2 with vGPU (vGPU)
API_2_2 = 13, // XenServer 6.2 Hotfix XS62ESP1004 (Felton)
LATEST = 13,
API_2_3 = 14, //
LATEST = 14,
// Don't forget to change LATEST above, and APIVersionString below.
UNKNOWN = 99
}
@@ -89,6 +90,8 @@ public static string APIVersionString(API_Version v)
return "2.1";
case API_Version.API_2_2:
return "2.2";
case API_Version.API_2_3:
return "2.3";
default:
return "Unknown";
}
@@ -32,16 +32,18 @@

public enum APIVersion
{
API_1_1, API_1_2, API_1_3, API_1_4, API_1_5, API_1_6, API_1_7, API_1_8, API_1_9, API_1_10, API_2_0, API_2_1, API_2_2, UNKNOWN;
API_1_1, API_1_2, API_1_3, API_1_4, API_1_5, API_1_6, API_1_7, API_1_8, API_1_9, API_1_10, API_2_0, API_2_1, API_2_2, API_2_3, UNKNOWN;

public static APIVersion latest()
{
return API_2_2;
return API_2_3;
}

public static APIVersion fromMajorMinor(long major, long minor)
{
if (major == 2 && minor == 2) {
if (major == 2 && minor == 3) {
return API_2_3;
} else if (major == 2 && minor == 2) {
return API_2_2;
} else if (major == 2 && minor == 1) {
return API_2_1;
@@ -102,6 +104,8 @@ public String toString()
return "2.1";
case API_2_2:
return "2.2";
case API_2_3:
return "2.3";
default:
return "Unknown";
}

0 comments on commit 4007d39

Please sign in to comment.
You can’t perform that action at this time.