[libvirt] VMware ESX: Accept VI API version 4.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

This patch extends the VI API version checks to accept version 4.0 too.

Regards,
  Matthias
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index 18e11e7..aa4f840 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -268,17 +268,20 @@ esxVI_Context_Connect(virConnectPtr conn, esxVI_Context *ctx, const char *url,
 
     if (STREQ(ctx->service->about->apiType, "HostAgent")) {
         if (STRNEQ(ctx->service->about->apiVersion, "2.5.0") &&
-            STRNEQ(ctx->service->about->apiVersion, "2.5u2")) {
+            STRNEQ(ctx->service->about->apiVersion, "2.5u2") &&
+            STRNEQ(ctx->service->about->apiVersion, "4.0")) {
             ESX_VI_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
-                         "Expecting VI API version '2.5.0' or '2.5u2' but "
-                         "found '%s'", ctx->service->about->apiVersion);
+                         "Expecting VI API version '2.5.0' or '2.5u2' or "
+                         "'4.0' but found '%s'",
+                         ctx->service->about->apiVersion);
             goto failure;
         }
     } else if (STREQ(ctx->service->about->apiType, "VirtualCenter")) {
-        if (STRNEQ(ctx->service->about->apiVersion, "2.5u2")) {
+        if (STRNEQ(ctx->service->about->apiVersion, "2.5u2") &&
+            STRNEQ(ctx->service->about->apiVersion, "4.0")) {
             ESX_VI_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
-                         "Expecting VI API version '2.5u2' but found '%s'",
-                         ctx->service->about->apiVersion);
+                         "Expecting VI API version '2.5u2' or '4.0' but "
+                         "found '%s'", ctx->service->about->apiVersion);
             goto failure;
         }
     } else {
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]