From nobody Mon Feb 9 17:37:27 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 1491344807076223.13514320123545; Tue, 4 Apr 2017 15:26:47 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 773747E9DE; Tue, 4 Apr 2017 22:26:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 436AD7FCFA; Tue, 4 Apr 2017 22:26:45 +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 CB41B4EBDD; Tue, 4 Apr 2017 22:26:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v34MQM2s020641 for ; Tue, 4 Apr 2017 18:26:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id D581C784D7; Tue, 4 Apr 2017 22:26:22 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CDD64784DE for ; Tue, 4 Apr 2017 22:26:21 +0000 (UTC) Received: from mail-qk0-f173.google.com (mail-qk0-f173.google.com [209.85.220.173]) (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 05A8FC054C5A for ; Tue, 4 Apr 2017 22:26:20 +0000 (UTC) Received: by mail-qk0-f173.google.com with SMTP id g195so82731122qke.2 for ; Tue, 04 Apr 2017 15:26:19 -0700 (PDT) Received: from dawid-fedora.datto.lan ([47.19.105.250]) by smtp.gmail.com with ESMTPSA id d142sm9590549qkc.32.2017.04.04.15.26.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Apr 2017 15:26:18 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 773747E9DE Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=datto.com Authentication-Results: ext-mx02.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 773747E9DE 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="XeC45XGI" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 05A8FC054C5A Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=datto.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dzamirski@datto.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 05A8FC054C5A 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=XeC45XGIturZtggHw9YJsv6iwxe1naQK+G1G3Vg3qxzxtF+9n1KMi77i/6DxMnscA6 wP+CarT2waXiJzfW9rW4tuTVFinWcMQvV5V/qOFIkQFxhINXSmVoGyaKceaeCXAEHvd0 18Mib0rhE6lhGj3ZCfx6ZgICPm22HpausraxXL6t6dmQsOGlcFQhyVNrlfiuV//i8KpG BAk43jmzWQaSYaQhWZoPvUXI1UyN2iuqFR8UgibmwzvaOFwxk7DmW3yRbUBfZNQUm9/f apVHn82LbAkFi/IU+Iic95eDX6eFgG/yt8IUmZZezwM7UvqUhg7axlAVhNy6JOFQRMGn hvTw== 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=A5xAaM8UFkFEtWQuKqyNpeoFgjblBvVr5JpdS+G72KAOYhqliF8kiV7oeIU2ZhFyr+ ZlioHwpfN5tjObdxQiZgvItX7ght6WX55uVwTPgvbtqID0C4Xetr4q/CQV8HbpLnm1e8 ONwLi1AdxwffTSpUMxLWVxUB6gqa3bmott3IkuoDTXJnwt22+ggLAM0rO2CzAB+BXrFP kfOZfoEnGmRZMhF/vS/W4RO96AWmY1lFQmfetxLDv7/AeutvcU+/uX69VcqeHg7Uf3tA g31DyHwGR2oBNMynWqfSsXhsiRZWnGBdeiJPrdVcq3mHzcNcqRTYhG5kBLX3x1NZxtna DVcg== X-Gm-Message-State: AFeK/H1La42/U1At21WRBalNH5jS6hX+GY0CargCBGDJOGdlZXOUlF0NmsgD3+4YBzIcGHVQ X-Received: by 10.55.73.131 with SMTP id w125mr24255602qka.16.1491344779013; Tue, 04 Apr 2017 15:26:19 -0700 (PDT) From: Dawid Zamirski To: libvir-list@redhat.com Date: Tue, 4 Apr 2017 18:26:06 -0400 Message-Id: <20170404222616.15382-3-dzamirski@datto.com> In-Reply-To: <20170404222616.15382-1-dzamirski@datto.com> References: <20170404222616.15382-1-dzamirski@datto.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 04 Apr 2017 22:26:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 04 Apr 2017 22:26:20 +0000 (UTC) for IP:'209.85.220.173' DOMAIN:'mail-qk0-f173.google.com' HELO:'mail-qk0-f173.google.com' FROM:'dzamirski@datto.com' RCPT:'' X-RedHat-Spam-Score: 0.869 (BAYES_50, DCC_REPUT_00_12, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.220.173 mail-qk0-f173.google.com 209.85.220.173 mail-qk0-f173.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v4 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 04 Apr 2017 22:26:46 +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