]> xenbits.xensource.com Git - libvirt.git/commitdiff
hyperv: store WMI version in hypervPrivate.
authorDawid Zamirski <dzamirski@datto.com>
Tue, 4 Apr 2017 22:26:05 +0000 (18:26 -0400)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Sat, 8 Apr 2017 12:14:15 +0000 (14:14 +0200)
Hyper-V 2012+ uses a new "v2" version of Msvm_* WMI classes so we will
store that info in hypervPrivate so that it is easily accessbile in the
driver API callbacks and handled accordingly.

src/hyperv/hyperv_private.h

index 574bb5fe8c19a8a6e232f622e2818c8710913261..4e7069971f6021680e88de0d4673948115d16e7d 100644 (file)
 # include "hyperv_util.h"
 # include "openwsman.h"
 
-typedef struct _hypervPrivate hypervPrivate;
+typedef enum _hypervWmiVersion hypervWmiVersion;
+enum _hypervWmiVersion {
+    HYPERV_WMI_VERSION_V1,
+    HYPERV_WMI_VERSION_V2,
+};
 
+typedef struct _hypervPrivate hypervPrivate;
 struct _hypervPrivate {
     hypervParsedUri *parsedUri;
     WsManClient *client;
+    hypervWmiVersion wmiVersion;
 };
 
 #endif /* __HYPERV_PRIVATE_H__ */