From nobody Sat Jul 5 16:10:11 2025 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.zohomail.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; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521528604070568.6916534431282; Mon, 19 Mar 2018 23:50:04 -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 7DD7D81DF3; Tue, 20 Mar 2018 06:50:02 +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 4B83E18999; Tue, 20 Mar 2018 06:50:02 +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 D4795181B9FF; Tue, 20 Mar 2018 06:50:01 +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 w2K6nVRo019383 for ; Tue, 20 Mar 2018 02:49:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id E83E64143; Tue, 20 Mar 2018 06:49:31 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DF9BB60BE7 for ; Tue, 20 Mar 2018 06:49:31 +0000 (UTC) Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) (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 17A0D3B594 for ; Tue, 20 Mar 2018 06:49:29 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id z8so458944wrh.7 for ; Mon, 19 Mar 2018 23:49:29 -0700 (PDT) Received: from rst.Home ([2a02:c7d:692a:c500:1ebc:73f3:5f60:b131]) by smtp.gmail.com with ESMTPSA id g38sm1923269wra.77.2018.03.19.23.49.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Mar 2018 23:49:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rMhauTbDpOfUy2OqZRennB/GNUdeq7+qaj9Kd8biu8k=; b=o1sfslyMMLGQF23La6zwrKUH3DSBZg86IKkqHeRAB+4O1lIIYMMj9XZEarOmByNP+u dJBf3UlxD/FM5usdSGdVURQiqAALLEtM5NrE3vS/ZHhnuB/PYLqnMEM/KZRrpQwyozht XRp32JxfrIBBwfUBFr4QJPcSQe8FbnrxSLwEN1of9eaLidEy2vwkSJWiEX5SR8soKUlu rA7VnftNwRbV0HrH802MIRrHOsOeexutiww11yPreBk6mBnuiGQAMAkmDwTT2cGFKiVH 6e+SXNZMFCqk1uSJvKVWEqUD+xv5a/YzFA0NRIM2S8kZIK1/s0oyvf/vLTpFEyg6mXez DLbA== 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=rMhauTbDpOfUy2OqZRennB/GNUdeq7+qaj9Kd8biu8k=; b=iWs76sNhpHXVfGb0beHnfHWI7j/rIgcRDu9Qxb53Ck5uDX2LeMqbIrRrCm+2a/PsoK IdEm2GzQFQ8e59HjfPfjwZ4MbEgEoS7BiRY17YKd+L9r2JrklalWF1Lwedfy/MPlJ7Sr 6zRyPQ8awj1nvptn5xEonBZaPoa1eUydnvSONjny+9DGSpU5T/3B5UULl1f2yK+5Fwys LzxUfDBXfzdbTFTdI/aD1VyQ6d1IYk8PZSqSA3nvgM/rv/shDAUaOW/ceJ8HPUT9p6x2 1hN+X+jszEkqTa8cWLDPGqwFwX0DcdE1IUP3ofaDyyp9X7t+z4k6u6lGvOu1xvxgjA8R sN4Q== X-Gm-Message-State: AElRT7G+fZgDE3JDm5ZA/CByEX/uwEQRB/Uuj96hvjndPGmZDPB95l9i eciTAnhZLZDP5cSZL/XwPq5HrnI4 X-Google-Smtp-Source: AG47ELtkK5XJLmKUebAU5UNIS/YrrZ2WztQm0HGhCBEk1I6CChPl81cf3SUChRx4ZJCsnpaAVAN+QQ== X-Received: by 10.223.188.1 with SMTP id s1mr12328383wrg.243.1521528567091; Mon, 19 Mar 2018 23:49:27 -0700 (PDT) From: Radostin Stoyanov To: libvir-list@redhat.com Date: Tue, 20 Mar 2018 06:48:46 +0000 Message-Id: <20180320064908.17723-4-rstoyanov1@gmail.com> In-Reply-To: <20180320064908.17723-1-rstoyanov1@gmail.com> References: <20180320064908.17723-1-rstoyanov1@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 20 Mar 2018 06:49:29 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 20 Mar 2018 06:49:29 +0000 (UTC) for IP:'209.85.128.194' DOMAIN:'mail-wr0-f194.google.com' HELO:'mail-wr0-f194.google.com' FROM:'rstoyanov1@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.139 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.128.194 mail-wr0-f194.google.com 209.85.128.194 mail-wr0-f194.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Radostin Stoyanov Subject: [libvirt] [PATCHv2 03/25] apibuild: Remove whitespace before ', ' and ':' 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.25]); Tue, 20 Mar 2018 06:50:02 +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" PEP8 recommends removing whitespace immediately before a comma, semicolon, or colon [1]. In addition remove multiple spaces after keyword (PEP8 - E271). 1: https://www.python.org/dev/peps/pep-0008/#whitespace-in-expressions-and-= statements Signed-off-by: Radostin Stoyanov --- docs/apibuild.py | 104 +++++++++++++++++++--------------= ---- docs/index.py | 22 ++++---- src/esx/esx_vi_generator.py | 102 +++++++++++++++++----------------= --- src/hyperv/hyperv_wmi_generator.py | 32 ++++++------ 4 files changed, 128 insertions(+), 132 deletions(-) diff --git a/docs/apibuild.py b/docs/apibuild.py index 7507c1d26..73a7535db 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -590,7 +590,7 @@ class CLexer: # line[i] =3D=3D '>' or line[i] =3D=3D '<' or line[i] = =3D=3D '=3D' or \ # line[i] =3D=3D '/' or line[i] =3D=3D '%' or line[i] = =3D=3D '&' or \ # line[i] =3D=3D '!' or line[i] =3D=3D '|' or line[i] = =3D=3D '.': - if line[i] =3D=3D '.' and i + 2 < l and \ + if line[i] =3D=3D '.' and i + 2 < l and \ line[i+1] =3D=3D '.' and line[i+2] =3D=3D '.': self.tokens.append(('name', '...')) i =3D i + 3 @@ -1401,7 +1401,7 @@ class CParser: while token[0] !=3D "sep" or (token[1] !=3D ',' and token[1] !=3D '}'): # We might be dealing with '1U << 12' here - value =3D value + re.sub("^(\d+)U$","\\1", token[1= ]) + value =3D value + re.sub("^(\d+)U$", "\\1", token[= 1]) token =3D self.token() else: try: @@ -1735,7 +1735,7 @@ class CParser: while token is not None and token[0] =3D=3D "op" and token[1] = =3D=3D '*': self.type =3D self.type + token[1] token =3D self.token() - if token is None or token[0] !=3D "name" : + if token is None or token[0] !=3D "name": self.error("parsing function type, name expected", token) return token self.type =3D self.type + token[1] @@ -1825,41 +1825,42 @@ class CParser: # this dict contains the functions that are allowed to use [unsigned] # long for legacy reasons in their signature and return type. this lis= t is # fixed. new procedures and public APIs have to use [unsigned] long lo= ng - long_legacy_functions =3D \ - { "virGetVersion" : (False, ("libVer", "typeVer")), - "virConnectGetLibVersion" : (False, ("libVer")), - "virConnectGetVersion" : (False, ("hvVer")), - "virDomainGetMaxMemory" : (True, ()), - "virDomainMigrate" : (False, ("flags", "bandwidth")), - "virDomainMigrate2" : (False, ("flags", "bandwidth")), - "virDomainMigrateBegin3" : (False, ("flags", "bandwidth")), - "virDomainMigrateConfirm3" : (False, ("flags", "bandwidth")), - "virDomainMigrateDirect" : (False, ("flags", "bandwidth")), - "virDomainMigrateFinish" : (False, ("flags")), - "virDomainMigrateFinish2" : (False, ("flags")), - "virDomainMigrateFinish3" : (False, ("flags")), - "virDomainMigratePeer2Peer" : (False, ("flags", "bandwidth")), - "virDomainMigratePerform" : (False, ("flags", "bandwidth")), - "virDomainMigratePerform3" : (False, ("flags", "bandwidth")), - "virDomainMigratePrepare" : (False, ("flags", "bandwidth")), - "virDomainMigratePrepare2" : (False, ("flags", "bandwidth")), - "virDomainMigratePrepare3" : (False, ("flags", "bandwidth")), - "virDomainMigratePrepareTunnel" : (False, ("flags", "bandwidth")), - "virDomainMigratePrepareTunnel3" : (False, ("flags", "bandwidth")), - "virDomainMigrateToURI" : (False, ("flags", "bandwidth")), - "virDomainMigrateToURI2" : (False, ("flags", "bandwidth")), - "virDomainMigrateVersion1" : (False, ("flags", "bandwidth")), - "virDomainMigrateVersion2" : (False, ("flags", "bandwidth")), - "virDomainMigrateVersion3" : (False, ("flags", "bandwidth")), - "virDomainMigrateSetMaxSpeed" : (False, ("bandwidth")), - "virDomainSetMaxMemory" : (False, ("memory")), - "virDomainSetMemory" : (False, ("memory")), - "virDomainSetMemoryFlags" : (False, ("memory")), - "virDomainBlockCommit" : (False, ("bandwidth")), - "virDomainBlockJobSetSpeed" : (False, ("bandwidth")), - "virDomainBlockPull" : (False, ("bandwidth")), - "virDomainBlockRebase" : (False, ("bandwidth")), - "virDomainMigrateGetMaxSpeed" : (False, ("bandwidth")) } + long_legacy_functions =3D { + "virGetVersion": (False, ("libVer", "typeVer")), + "virConnectGetLibVersion": (False, ("libVer")), + "virConnectGetVersion": (False, ("hvVer")), + "virDomainGetMaxMemory": (True, ()), + "virDomainMigrate": (False, ("flags", "bandwidth")), + "virDomainMigrate2": (False, ("flags", "bandwidth")), + "virDomainMigrateBegin3": (False, ("flags", "bandwidth")), + "virDomainMigrateConfirm3": (False, ("flags", "bandwidth")), + "virDomainMigrateDirect": (False, ("flags", "bandwidth")), + "virDomainMigrateFinish": (False, ("flags")), + "virDomainMigrateFinish2": (False, ("flags")), + "virDomainMigrateFinish3": (False, ("flags")), + "virDomainMigratePeer2Peer": (False, ("flags", "bandwidth")), + "virDomainMigratePerform": (False, ("flags", "bandwidth")), + "virDomainMigratePerform3": (False, ("flags", "bandwidth")), + "virDomainMigratePrepare": (False, ("flags", "bandwidth")), + "virDomainMigratePrepare2": (False, ("flags", "bandwidth")), + "virDomainMigratePrepare3": (False, ("flags", "bandwidth")), + "virDomainMigratePrepareTunnel": (False, ("flags", "bandwidth")), + "virDomainMigratePrepareTunnel3": (False, ("flags", "bandwidth")), + "virDomainMigrateToURI": (False, ("flags", "bandwidth")), + "virDomainMigrateToURI2": (False, ("flags", "bandwidth")), + "virDomainMigrateVersion1": (False, ("flags", "bandwidth")), + "virDomainMigrateVersion2": (False, ("flags", "bandwidth")), + "virDomainMigrateVersion3": (False, ("flags", "bandwidth")), + "virDomainMigrateSetMaxSpeed": (False, ("bandwidth")), + "virDomainSetMaxMemory": (False, ("memory")), + "virDomainSetMemory": (False, ("memory")), + "virDomainSetMemoryFlags": (False, ("memory")), + "virDomainBlockCommit": (False, ("bandwidth")), + "virDomainBlockJobSetSpeed": (False, ("bandwidth")), + "virDomainBlockPull": (False, ("bandwidth")), + "virDomainBlockRebase": (False, ("bandwidth")), + "virDomainMigrateGetMaxSpeed": (False, ("bandwidth")) + } =20 def checkLongLegacyFunction(self, name, return_type, signature): if "long" in return_type and "long long" not in return_type: @@ -1883,10 +1884,11 @@ class CParser: # this dict contains the structs that are allowed to use [unsigned] # long for legacy reasons. this list is fixed. new structs have to use # [unsigned] long long - long_legacy_struct_fields =3D \ - { "_virDomainInfo" : ("maxMem", "memory"), - "_virNodeInfo" : ("memory"), - "_virDomainBlockJobInfo" : ("bandwidth") } + long_legacy_struct_fields =3D { + "_virDomainInfo": ("maxMem", "memory"), + "_virNodeInfo": ("memory"), + "_virDomainBlockJobInfo": ("bandwidth") + } =20 def checkLongLegacyStruct(self, name, fields): for field in fields: @@ -1934,7 +1936,7 @@ class CParser: elif token[1] =3D=3D 'static': static =3D 1 token =3D self.token() - if token is None or token[0] !=3D 'name': + if token is None or token[0] !=3D 'name': return token =20 if token[1] =3D=3D 'typedef': @@ -2205,7 +2207,7 @@ class docBuilder: output.write(" \n") =20 def serialize_union(self, output, field, desc): - output.write(" = \n" % (field[1] , desc)) + output.write(" = \n" % (field[1], desc)) output.write(" \n") for f in field[3]: desc =3D f[2] @@ -2213,7 +2215,7 @@ class docBuilder: desc =3D '' else: desc =3D escape(desc) - output.write(" \n" % (f[1] , f[0], desc)) + output.write(" \n" % (f[1], f[0], desc)) =20 output.write(" \n") output.write(" \n") @@ -2238,13 +2240,13 @@ class docBuilder: if field[0] =3D=3D "union": self.serialize_union(output, field, desc) else: - output.write(" \n" % (field[1] , field[0], desc)) + output.write(" \n" % (field[1], field[0], desc)) except: self.warning("Failed to serialize struct %s" % (name)) output.write(" \n") else: output.write("/>\n") - else : + else: output.write(" \n" % (type)) ids =3D funcs[type] @@ -2430,7 +2432,7 @@ class docBuilder: typ =3D sorted(funcs.keys()) for type in typ: if type =3D=3D '' or type =3D=3D 'void' or type =3D=3D "int" o= r \ - type =3D=3D "char *" or type =3D=3D "const char *" : + type =3D=3D "char *" or type =3D=3D "const char *": continue output.write(" \n" % (type)) ids =3D sorted(funcs[type]) @@ -2589,7 +2591,7 @@ class app: builddir =3D os.path.abspath((os.environ["builddir"])) if srcdir =3D=3D builddir: builddir =3D None - if glob.glob(srcdir + "/../src/libvirt.c") !=3D [] : + if glob.glob(srcdir + "/../src/libvirt.c") !=3D []: if not quiet: print("Rebuilding API description for %s" % name) dirs =3D [srcdir + "/../src", @@ -2599,7 +2601,7 @@ class app: not os.path.exists(srcdir + "/../include/libvirt/libvirt-c= ommon.h")): dirs.append(builddir + "/../include/libvirt") builder =3D docBuilder(name, srcdir, dirs, []) - elif glob.glob("src/libvirt.c") !=3D [] : + elif glob.glob("src/libvirt.c") !=3D []: if not quiet: print("Rebuilding API description for %s" % name) builder =3D docBuilder(name, srcdir, diff --git a/docs/index.py b/docs/index.py index bedec8ae0..e2f9185c3 100755 --- a/docs/index.py +++ b/docs/index.py @@ -59,21 +59,21 @@ libxml2.registerErrorHandler(callback, None) # to create them # TABLES=3D{ - "symbols" : """CREATE TABLE symbols ( + "symbols": """CREATE TABLE symbols ( name varchar(255) BINARY NOT NULL, module varchar(255) BINARY NOT NULL, type varchar(25) NOT NULL, descr varchar(255), UNIQUE KEY name (name), KEY module (module))""", - "words" : """CREATE TABLE words ( + "words": """CREATE TABLE words ( name varchar(50) BINARY NOT NULL, symbol varchar(255) BINARY NOT NULL, relevance int, KEY name (name), KEY symbol (symbol), UNIQUE KEY ID (name, symbol))""", - "wordsHTML" : """CREATE TABLE wordsHTML ( + "wordsHTML": """CREATE TABLE wordsHTML ( name varchar(50) BINARY NOT NULL, resource varchar(255) BINARY NOT NULL, section varchar(255), @@ -82,30 +82,30 @@ TABLES=3D{ KEY name (name), KEY resource (resource), UNIQUE KEY ref (name, resource))""", - "wordsArchive" : """CREATE TABLE wordsArchive ( + "wordsArchive": """CREATE TABLE wordsArchive ( name varchar(50) BINARY NOT NULL, ID int(11) NOT NULL, relevance int, KEY name (name), UNIQUE KEY ref (name, ID))""", - "pages" : """CREATE TABLE pages ( + "pages": """CREATE TABLE pages ( resource varchar(255) BINARY NOT NULL, title varchar(255) BINARY NOT NULL, UNIQUE KEY name (resource))""", - "archives" : """CREATE TABLE archives ( + "archives": """CREATE TABLE archives ( ID int(11) NOT NULL auto_increment, resource varchar(255) BINARY NOT NULL, title varchar(255) BINARY NOT NULL, UNIQUE KEY id (ID,resource(255)), INDEX (ID), INDEX (resource))""", - "Queries" : """CREATE TABLE Queries ( + "Queries": """CREATE TABLE Queries ( ID int(11) NOT NULL auto_increment, Value varchar(50) NOT NULL, Count int(11) NOT NULL, UNIQUE KEY id (ID,Value(35)), INDEX (ID))""", - "AllQueries" : """CREATE TABLE AllQueries ( + "AllQueries": """CREATE TABLE AllQueries ( ID int(11) NOT NULL auto_increment, Value varchar(50) NOT NULL, Count int(11) NOT NULL, @@ -171,7 +171,7 @@ def checkTables(db, verbose =3D 1): if verbose: print "Table %s contains %d records" % (table, row[0]) except: - print "Troubles with table %s : repairing" % (table) + print "Troubles with table %s: repairing" % (table) ret =3D c.execute("repair table %s" % table) print "repairing returned %d" % (ret) ret =3D c.execute("SELECT count(*) from %s" % table) @@ -1041,7 +1041,7 @@ def analyzeHTMLPages(): doc =3D libxml2.htmlParseFile(html, None) try: res =3D analyzeHTML(doc, html) - print "Parsed %s : %d paragraphs" % (html, res) + print "Parsed %s: %d paragraphs" % (html, res) ret =3D ret + 1 except: print "could not parse %s" % (html) @@ -1230,7 +1230,7 @@ def main(): elif args[i] =3D=3D '--archive-year': i =3D i + 1 year =3D args[i] - months =3D ["January" , "February", "March", "April", "May= ", + months =3D ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] for month in months: diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_vi_generator.py index 545f8bdda..17ac43cb7 100755 --- a/src/esx/esx_vi_generator.py +++ b/src/esx/esx_vi_generator.py @@ -1342,61 +1342,53 @@ predefined_objects =3D ["AnyType", "MethodFault", "ManagedObjectReference"] =20 -additional_enum_features =3D { "ManagedEntityStatus" : Enum.FEATURE__= ANY_TYPE, - "TaskInfoState" : Enum.FEATURE__AN= Y_TYPE, - "VirtualMachinePowerState" : Enum.FEATURE__AN= Y_TYPE } - -additional_object_features =3D { "AutoStartDefaults" : Object.FEA= TURE__ANY_TYPE, - "AutoStartPowerInfo" : Object.FEATU= RE__ANY_TYPE, - "DatastoreHostMount" : Object.FEATU= RE__DEEP_COPY | - Object.FEATU= RE__LIST | - Object.FEATU= RE__ANY_TYPE, - "DatastoreInfo" : Object.FEATU= RE__ANY_TYPE | - Object.FEATU= RE__DYNAMIC_CAST, - "HostConfigManager" : Object.FEATU= RE__ANY_TYPE, - "HostCpuIdInfo" : Object.FEATU= RE__LIST | - Object.FEATU= RE__ANY_TYPE, - "HostDatastoreBrowserSearchResults" : Objec= t.FEATURE__LIST | - Object.FEATU= RE__ANY_TYPE, - "HostHostBusAdapter" : Object.FEATU= RE__LIST | - Object.FEATU= RE__ANY_TYPE, - "HostInternetScsiHba" : Object.FEATU= RE__DYNAMIC_CAST | - Object.FEATU= RE__DEEP_COPY, - "HostInternetScsiTargetTransport" : Object= .FEATURE__DYNAMIC_CAST, - "HostScsiDisk" : Object.FEATU= RE__LIST | - Object.FEATU= RE__ANY_TYPE | - Object.FEATU= RE__DYNAMIC_CAST, - "HostScsiTopologyInterface" : Object.FEATU= RE__LIST | - Object.FEATU= RE__ANY_TYPE, - "HostScsiTopologyLun" : Object.FEATU= RE__ANY_TYPE | - Object.FEATU= RE__LIST | - Object.FEATU= RE__DEEP_COPY, - "HostScsiTopologyTarget" : Object.FEATU= RE__ANY_TYPE | - Object.FEATU= RE__LIST, - "HostPortGroup" : Object.FEATU= RE__LIST | - Object.FEATU= RE__ANY_TYPE, - "HostVirtualSwitch" : Object.FEATU= RE__DEEP_COPY | - Object.FEATU= RE__LIST | - Object.FEATU= RE__ANY_TYPE, - "ManagedObjectReference" : Object.FEATU= RE__ANY_TYPE, - "ObjectContent" : Object.FEATU= RE__DEEP_COPY, - "PhysicalNic" : Object.FEATU= RE__DEEP_COPY | - Object.FEATU= RE__LIST | - Object.FEATU= RE__ANY_TYPE, - "ResourcePoolResourceUsage" : Object.FEATU= RE__ANY_TYPE, - "ScsiLun" : Object.FEATU= RE__LIST | - Object.FEATU= RE__ANY_TYPE | - Object.FEATU= RE__DEEP_COPY, - "ScsiLunDurableName" : Object.FEATU= RE__LIST, - "ServiceContent" : Object.FEATU= RE__DESERIALIZE, - "SharesInfo" : Object.FEATU= RE__ANY_TYPE, - "TaskInfo" : Object.FEATU= RE__LIST | - Object.FEATU= RE__ANY_TYPE, - "UserSession" : Object.FEATU= RE__ANY_TYPE, - "VirtualMachineQuestionInfo" : Object.FEATU= RE__ANY_TYPE, - "VirtualMachineSnapshotTree" : Object.FEATU= RE__DEEP_COPY | - Object.FEATU= RE__ANY_TYPE, - "VmEventArgument" : Object.FEATU= RE__DESERIALIZE } +additional_enum_features =3D { + "ManagedEntityStatus": Enum.FEATURE__ANY_TYPE, + "TaskInfoState": Enum.FEATURE__ANY_TYPE, + "VirtualMachinePowerState": Enum.FEATURE__ANY_TYPE +} + +additional_object_features =3D { + "AutoStartDefaults": Object.FEATURE__ANY_TYPE, + "AutoStartPowerInfo": Object.FEATURE__ANY_TYPE, + "DatastoreHostMount": (Object.FEATURE__DEEP_COPY | Object.FEATURE__LIS= T | + Object.FEATURE__ANY_TYPE), + "DatastoreInfo": Object.FEATURE__ANY_TYPE | Object.FEATURE__DYNAMIC_CA= ST, + "HostConfigManager": Object.FEATURE__ANY_TYPE, + "HostCpuIdInfo": Object.FEATURE__LIST | Object.FEATURE__ANY_TYPE, + "HostDatastoreBrowserSearchResults": (Object.FEATURE__LIST | + Object.FEATURE__ANY_TYPE), + "HostHostBusAdapter": Object.FEATURE__LIST | Object.FEATURE__ANY_TYPE, + "HostInternetScsiHba": (Object.FEATURE__DYNAMIC_CAST | + Object.FEATURE__DEEP_COPY), + "HostInternetScsiTargetTransport": Object.FEATURE__DYNAMIC_CAST, + "HostScsiDisk": (Object.FEATURE__LIST | Object.FEATURE__ANY_TYPE | + Object.FEATURE__DYNAMIC_CAST), + "HostScsiTopologyInterface": (Object.FEATURE__LIST | + Object.FEATURE__ANY_TYPE), + "HostScsiTopologyLun": (Object.FEATURE__ANY_TYPE | Object.FEATURE__LIS= T | + Object.FEATURE__DEEP_COPY), + "HostScsiTopologyTarget": Object.FEATURE__ANY_TYPE | Object.FEATURE__L= IST, + "HostPortGroup": Object.FEATURE__LIST | Object.FEATURE__ANY_TYPE, + "HostVirtualSwitch": (Object.FEATURE__DEEP_COPY | Object.FEATURE__LIST= | + Object.FEATURE__ANY_TYPE), + "ManagedObjectReference": Object.FEATURE__ANY_TYPE, + "ObjectContent": Object.FEATURE__DEEP_COPY, + "PhysicalNic": (Object.FEATURE__DEEP_COPY | Object.FEATURE__LIST | + Object.FEATURE__ANY_TYPE), + "ResourcePoolResourceUsage": Object.FEATURE__ANY_TYPE, + "ScsiLun": (Object.FEATURE__LIST | Object.FEATURE__ANY_TYPE | + Object.FEATURE__DEEP_COPY), + "ScsiLunDurableName": Object.FEATURE__LIST, + "ServiceContent": Object.FEATURE__DESERIALIZE, + "SharesInfo": Object.FEATURE__ANY_TYPE, + "TaskInfo": Object.FEATURE__LIST | Object.FEATURE__ANY_TYPE, + "UserSession": Object.FEATURE__ANY_TYPE, + "VirtualMachineQuestionInfo": Object.FEATURE__ANY_TYPE, + "VirtualMachineSnapshotTree": (Object.FEATURE__DEEP_COPY | + Object.FEATURE__ANY_TYPE), + "VmEventArgument": Object.FEATURE__DESERIALIZE +} =20 removed_object_features =3D {} =20 diff --git a/src/hyperv/hyperv_wmi_generator.py b/src/hyperv/hyperv_wmi_gen= erator.py index 9e7ea4382..6e98f0a89 100755 --- a/src/hyperv/hyperv_wmi_generator.py +++ b/src/hyperv/hyperv_wmi_generator.py @@ -342,21 +342,23 @@ class WmiClassVersion: =20 =20 class Property: - typemap =3D {"boolean" : "BOOL", - "string" : "STR", - "datetime" : "STR", - "int8" : "INT8", - "sint8" : "INT8", - "int16" : "INT16", - "sint16" : "INT16", - "int32" : "INT32", - "sint32" : "INT32", - "int64" : "INT64", - "sint64" : "INT64", - "uint8" : "UINT8", - "uint16" : "UINT16", - "uint32" : "UINT32", - "uint64" : "UINT64"} + typemap =3D { + "boolean": "BOOL", + "string": "STR", + "datetime": "STR", + "int8": "INT8", + "sint8": "INT8", + "int16": "INT16", + "sint16": "INT16", + "int32": "INT32", + "sint32": "INT32", + "int64": "INT64", + "sint64": "INT64", + "uint8": "UINT8", + "uint16": "UINT16", + "uint32": "UINT32", + "uint64": "UINT64" + } =20 =20 def __init__(self, type, name, is_array): --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list