From nobody Wed Feb 11 07:34:11 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1491108750386781.9022188226152; Sat, 1 Apr 2017 21:52:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DF1B53B708; Sun, 2 Apr 2017 04:52:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B193F53C30; Sun, 2 Apr 2017 04:52:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 654A118523D2; Sun, 2 Apr 2017 04:52:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v324pTin019129 for ; Sun, 2 Apr 2017 00:51:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 24E3617CCB; Sun, 2 Apr 2017 04:51:29 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D1035DD6A for ; Sun, 2 Apr 2017 04:51:27 +0000 (UTC) Received: from mail-qk0-f180.google.com (mail-qk0-f180.google.com [209.85.220.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 70BB581F01 for ; Sun, 2 Apr 2017 04:50:59 +0000 (UTC) Received: by mail-qk0-f180.google.com with SMTP id d10so93821603qke.1 for ; Sat, 01 Apr 2017 21:50:55 -0700 (PDT) Received: from dawid-fedora.datto.lan ([47.19.105.250]) by smtp.gmail.com with ESMTPSA id c10sm6934829qka.1.2017.04.01.21.50.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Apr 2017 21:50:51 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DF1B53B708 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=datto.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com DF1B53B708 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=datto-com.20150623.gappssmtp.com header.i=@datto-com.20150623.gappssmtp.com header.b="J0WSMSyM" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 70BB581F01 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=datto.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dzamirski@datto.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 70BB581F01 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datto-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/G7OXwmhc5KgWIX/Xh9swiuxQ+omBwflsQh1/sLGC7c=; b=J0WSMSyMfx/RmBnYGa7PM0SNs/deYMgTB7bd5S1oBdj48wdVB28knW/BPK7zE4AnVu pDP/uYNpofhkzftFlSDS03p6Z0O294UKlb7IZss+UnM3eANqrXT+AnG0g70POB+yJXzp 4eqbJ9rWN26y2tITOZGAE1QtcO7pz5W4JOMH6hW8YOgUVDOiqSTTZMPwVxG6es9f+9Gp 2MfbQ0TmD9gfQ/vE9yCM0sAraclLr1J1uV1GfiHc5/A11RAIaCT0RJtHh9uGoWO6GiRo L3iGo90jHEhZfb2RW4cVvtKU6w21XOWKreBamqp2q/+oHGr05Uvz+BXeKXbH2T4T3Fau blwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/G7OXwmhc5KgWIX/Xh9swiuxQ+omBwflsQh1/sLGC7c=; b=jabCj9E5CIC39p0ywRTRADoQSg8RG26F4VuJv5vxGlCiA04C7RQoR9qz2vKsUUcfCy CJ3yPJw33dHHIjQJmyw7p46NUn5OkKvOH1pZSoUFQKOoDvBuWLBxjlR0hTjKXnyeS328 X2Vbj4oqCL/n7GwFnCKkVWRDyfawR1abE+LKLMEC+99IquNEqb0yugpRm4+qxbnwPR3c hbQEbx/M6baQg87jqPkDHdmlXWvvonB/YAUIZDnuMXAwCKQvOJ6xPPtZfdBPWyYYckoh slqo71k/KE9PNZtQgRhEHiwTbOV3imwNOXdKTst6oqZ6gXK8p7kpUgc1Q7ZDWWoC7LeX Ygmg== X-Gm-Message-State: AFeK/H016AfXtKr+hDgwQL9/WxKtFT2zb21QUKwhvKoZ3u+JR8S0ZhRgVXtqQM187CF54Eru X-Received: by 10.55.93.131 with SMTP id r125mr10660407qkb.282.1491108652406; Sat, 01 Apr 2017 21:50:52 -0700 (PDT) From: Dawid Zamirski To: libvir-list@redhat.com Date: Sun, 2 Apr 2017 00:50:41 -0400 Message-Id: <20170402045049.19631-3-dzamirski@datto.com> In-Reply-To: <20170402045049.19631-1-dzamirski@datto.com> References: <20170402045049.19631-1-dzamirski@datto.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sun, 02 Apr 2017 04:51:04 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sun, 02 Apr 2017 04:51:04 +0000 (UTC) for IP:'209.85.220.180' DOMAIN:'mail-qk0-f180.google.com' HELO:'mail-qk0-f180.google.com' FROM:'dzamirski@datto.com' RCPT:'' X-RedHat-Spam-Score: 0.4 (BAYES_50, DCC_REPUT_00_12, DKIM_SIGNED, DKIM_VALID) 209.85.220.180 mail-qk0-f180.google.com 209.85.220.180 mail-qk0-f180.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Sri Ramanujam Subject: [libvirt] [PATCH v2 02/10] hyperv: introduce hypervWmiClassInfo struct. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sun, 02 Apr 2017 04:52:29 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This struct is to be used to carry all the information necessary to issue wsman requests for given WMI class. Those will be defined by the generator code (as lists) so that they are handy for the driver code to "extract" needed info depending on which hyper-v we're connected to. For example: hypervWmiClassInfoListPtr Msvm_ComputerSystem_WmiInfo =3D { .count =3D 2 { { .name =3D "Msvm_ComputerSystem", .version =3D "v1", .rootUri =3D "http://asdf.com", ... }, { .name =3D "Msvm_ComputerSystem", .version =3D "v2", .rootUri =3D "http://asdf.com/v2", ... }, } }; Then the driver code will grab either "v1" or "v2" to pass info wsman API, depending on hypervPrivate->wmiVersion value. --- src/hyperv/hyperv_wmi_classes.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/hyperv/hyperv_wmi_classes.h b/src/hyperv/hyperv_wmi_classe= s.h index ac7a3b8..b0f3e3c 100644 --- a/src/hyperv/hyperv_wmi_classes.h +++ b/src/hyperv/hyperv_wmi_classes.h @@ -87,6 +87,28 @@ enum _Msvm_ConcreteJob_JobState { }; =20 =20 +typedef struct _hypervWmiClassInfo hypervWmiClassInfo; +typedef hypervWmiClassInfo *hypervWmiClassInfoPtr; +struct _hypervWmiClassInfo { + /* The WMI class name */ + const char *name; + /* The version of the WMI class as in "v1" or "v2" */ + const char *version; + /* The URI for wsman enumerate request */ + const char *rootUri; + /* The namespace URI for XML serialization */ + const char *resourceUri; + /* The wsman serializer info - one of the *_TypeInfo structs */ + XmlSerializerInfo *serializerInfo; +}; + + +typedef struct _hypervWmiClassInfoList hypervWmiClassInfoList; +typedef hypervWmiClassInfoList *hypervWmiClassInfoListPtr; +struct _hypervWmiClassInfoList { + size_t count; + hypervWmiClassInfoPtr *objs; +}; =20 # include "hyperv_wmi_classes.generated.h" =20 --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list