From nobody Mon Feb 9 17:04:58 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 1491263574041222.37571909630435; Mon, 3 Apr 2017 16:52:54 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 882A7C03BD6F; Mon, 3 Apr 2017 23:52:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5FC725C6D2; Mon, 3 Apr 2017 23:52:52 +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 1292F5EC66; Mon, 3 Apr 2017 23:52:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v33NqRnr015708 for ; Mon, 3 Apr 2017 19:52:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id 359FB78F19; Mon, 3 Apr 2017 23:52:27 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2F63078F30 for ; Mon, 3 Apr 2017 23:52:24 +0000 (UTC) Received: from mail-qt0-f178.google.com (mail-qt0-f178.google.com [209.85.216.178]) (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 CECA761D03 for ; Mon, 3 Apr 2017 23:52:22 +0000 (UTC) Received: by mail-qt0-f178.google.com with SMTP id r45so126245867qte.3 for ; Mon, 03 Apr 2017 16:52:22 -0700 (PDT) Received: from dawid-fedora.datto.lan ([47.19.105.250]) by smtp.gmail.com with ESMTPSA id f28sm10658242qtf.44.2017.04.03.16.52.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Apr 2017 16:52:21 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 882A7C03BD6F Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=datto.com Authentication-Results: ext-mx07.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 882A7C03BD6F 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="XTmPDqx+" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CECA761D03 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=datto.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dzamirski@datto.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com CECA761D03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datto-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=/G7OXwmhc5KgWIX/Xh9swiuxQ+omBwflsQh1/sLGC7c=; b=XTmPDqx+exXyzmEg6Z/TTezgn1KkgIKQXcN2wWLO85rg+CKlAAqs9HQVRfgqPNdo0S P7dcDMxOBtvLoUoDMAs5JQ5kXZ8uCyYY/QgHbx+9kRbvLA7Qo+9u4F/7XfnfyWyUBGtq rRoItEC/9Afe6SwFHaOermg6uF+yKlQptDA4ZtADUeMiA20k84dZcAiltu96vr8BB3QS vRjQtAXtF/KuliR4JFtvqvh88pFP2De6mMtq98N5KhPkRLUeutkySt/nlRju5KwYxnMb wcAXyvRJyz4Ks/KS3XIwk89nFNNdXJllR0aNetuEAM72mzCHuKNhLDVyzV2f7/rr2S4W /jNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=/G7OXwmhc5KgWIX/Xh9swiuxQ+omBwflsQh1/sLGC7c=; b=PPC1jzRo1Oil+7+9R3p5KXyCt6te/FUie2Eirbi875Emihgj68Jgd+dcgWgEHohzk9 0UonUJREPRttrMbhqsX5KxtHypTxz8bE1GmaZgFIsqOp47Wxq8YWMHSSsofeibwbHlsc C+0uzavZFffaKn6ishWvamXwb0SKm6sSgRhLrTdzEw80MWOkgYZMRb6hb7gveUQfTktD 4Pbk1rRGnPnkL3PNUKAodBxbH0uC/Cu997EOKvFt8a9egn3/RSajmr66RplBZpaNjlMS /uUVRXlSVX9oyfrRNPTEsv3sBuzBCtGa+WUVfp6SJuxnm/MvOUdumwP+rGeUAFOv2iPN Zetw== X-Gm-Message-State: AFeK/H2CHq9Bi0Rv0A8AgdYAP8YQaBiQ5K7GGgOiWFRNeX4yIvdubn0sOxFZ1YzNBosrFBXI X-Received: by 10.200.56.86 with SMTP id r22mr20027783qtb.190.1491263541774; Mon, 03 Apr 2017 16:52:21 -0700 (PDT) From: Dawid Zamirski To: libvir-list@redhat.com Date: Mon, 3 Apr 2017 19:52:09 -0400 Message-Id: <20170403235219.19721-3-dzamirski@datto.com> In-Reply-To: <20170403235219.19721-1-dzamirski@datto.com> References: <20170403235219.19721-1-dzamirski@datto.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 03 Apr 2017 23:52:23 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 03 Apr 2017 23:52:23 +0000 (UTC) for IP:'209.85.216.178' DOMAIN:'mail-qt0-f178.google.com' HELO:'mail-qt0-f178.google.com' FROM:'dzamirski@datto.com' RCPT:'' X-RedHat-Spam-Score: 0.179 (BAYES_50, DCC_REPUT_00_12, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.216.178 mail-qt0-f178.google.com 209.85.216.178 mail-qt0-f178.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 02/12] 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 03 Apr 2017 23:52:53 +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