- 11 11月, 2019 2 次提交
-
-
由 Daniel P. Berrangé 提交于
Coding style expects 1 blank line between each method and 2 blank lines before each class. docs/apibuild.py:171:5: E303 too many blank lines (2) def set_header(self, header): ^ docs/apibuild.py:230:1: E302 expected 2 blank lines, found 1 class index: ^ docs/apibuild.py:175:5: E301 expected 1 blank line, found 0 def set_module(self, module): ^ ...more... Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
docs/apibuild.py:2436:65: F821 undefined name 'first_letter' chunks.append(["chunk%s" % (chunk - 1), first_letter, letter]) ^ src/hyperv/hyperv_wmi_generator.py:415:57: F821 undefined name 'number' report_error("line %d: invalid block header" % (number)) ^ Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 09 11月, 2019 1 次提交
-
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 31 1月, 2019 2 次提交
-
-
由 Daniel P. Berrangé 提交于
PEP 8 says: "Comparisons to singletons like None should always be done with 'is' or 'is not', never the equality operators." There are potentially semantics differences, though in the case of this libvirt code its merely a style change: http://jaredgrubb.blogspot.com/2009/04/python-is-none-vs-none.htmlReviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 05 12月, 2018 1 次提交
-
-
由 Yuri Chornoivan 提交于
Signed-off-by: NYuri Chornoivan <yurchor@ukr.net> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 20 3月, 2018 3 次提交
-
-
由 Cole Robinson 提交于
Yet another dependency on dict() hash ordering Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Radostin Stoyanov 提交于
Lists in Python are mutable and when used as a default value of a parameter for class constructor, its value will be shared between all class instances. Example: class Test: def __init__(self, mylist=[]): self.mylist = mylist A = Test() B = Test() A.mylist.append("mylist from instance A") print(B.mylist) # Will print ['mylist from instance A'] Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
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-statementsReviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
- 19 3月, 2018 1 次提交
-
-
由 Andrea Bolognani 提交于
Some of our scripts are known to work both with Python 2 and Python 3, so for them we shouldn't be forcing any specific version of the interpreter when they're called directly; we always use $(PYTHON) explicitly in our build rules anyway. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 16 3月, 2018 4 次提交
-
-
由 Andrea Bolognani 提交于
This deals with cls.version possibly being None. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
We use text operations on the contents after reading them. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
The keys() method no longer returns a list, so converting the return value would be necessary before calling sort() on it; alternatively, we can just call sorted(), which returns a sorted list. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
It has replaced the 'print' statement. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 19 9月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
This is particularly useful on operating systems that don't ship Python as part of the base system (eg. FreeBSD) while still working just as well as it did before on Linux. While at it, make it explicit that our scripts are only going to work with Python 2, and remove the usage of unbuffered I/O, which as far as I can tell has no effect on the output files. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 08 7月, 2017 1 次提交
-
-
由 Sri Ramanujam 提交于
Update the generator to generate basic property type information for each CIM object representation. Right now, it generates arrays of hypervCimType structs: struct _hypervCimType { const char *name; const char *type; bool isArray; };
-
- 19 4月, 2017 1 次提交
-
-
由 Dawid Zamirski 提交于
When hyperv code generator for WMI classes identifies common properties, it needs to take into account array type as a distinct type, i.e string != string[]. This is the case where v1 of the Msvm_VirtualSystemSettingData has Notes property as string whereas v2 uses Notes[], therefore they have to be treated as different fields and cannot be placed in the "common" struct.
-
- 08 4月, 2017 1 次提交
-
-
由 Dawid Zamirski 提交于
This patch reworks the Hyper-V driver structs and the code generator to provide seamless support for both Hyper-V 2008 and 2012 or newer. This does not implement any new libvirt APIs, it just adapts existing 2008-only driver to also handle 2012 and newer by sharing as much driver code as possible (currently it's all of it :-)). This is needed to set the foundation before we can move forward with implementing the rest of the driver APIs. With the 2012 release, Microsoft introduced "v2" version of Msvm_* WMI classes. Those are largely the same as "v1" (used in 2008) but have some new properties as well as need different wsman request URIs. To accomodate those differences, most of work went into the code generator so that it's "aware" of possibility of multiple versions of the same WMI class and produce C code accordingly. To accomplish this the following changes were made: * the abstract hypervObject struct's data member was changed to a union that has "common", "v1" and "v2" members. Those are structs that represent WMI classes that we get back from wsman response. The "common" struct has members that are present in both "v1" and "v2" which the driver API callbacks can use to read the data from in version-independent manner (if version-specific member needs to be accessed the driver can check priv->wmiVersion and read from "v1" or "v2" as needed). Those structs are guaranteed to be memory aligned by the code generator (see the align_property_members implementation that takes care of that) * the generator produces *_WmiInfo for each WMI class "family" that holds an array of hypervWmiClassInfoPtr each providing information as to which request URI to use for each "version" of given WMI class as well as XmlSerializerInfo struct needed to unserilize WS-MAN responsed into the data structs. The driver uses those to make proper WS-MAN request depending on which version it's connected to. * the generator no longer produces "helper" functions such as hypervGetMsvmComputerSystemList as those were originally just simple wrappers around hypervEnumAndPull, instead those were hand-written now (to keep driver changes minimal). The reason is that we'll have more code coming implementing missing libvirt APIs and surely code patterns will emerge that would warrant more useful "utility" functions like that. * a hypervInitConnection was added to the driver which "detects" Hyper-V version by testing simple wsman request using v2 then falling back to v1, obviously if both fail, the we're erroring out. To express how the above translates in code: void hypervImplementSomeLibvirtApi(virConnectPtr conn, ...) { hypervPrivate *priv = conn->privateData; virBuffer query = VIR_BUFFER_INITIALIZER; hypervWqlQuery wqlQuery = HYPERV_WQL_QUERY_INITIALIZER; Msvm_ComputerSystem *list = NULL; /* typed hypervObject instance */ /* the WmiInfo struct has the data needed for wsman request and * response handling for both v1 and v2 */ wqlQuery.info = Msvm_ComputerSystem_WmiInfo; wqlQuery.query = &query; virBufferAddLit(&query, "select * from Msvm_ComputerSystem"); if (hypervEnumAndPull(priv, &wqlQuery, (hypervObject **) &list) < 0) { goto cleanup; } if (list == NULL) { /* none found */ goto cleanup; } /* works with v1 and v2 */ char *vmName = list->data.common->Name; /* access property that is in v2 only */ if (priv->wmiVersion == HYPERV_WMI_VERSION_V2) char *foo = list->data.v2->V2Property; else char *foo = list->data.v1->V1Property; cleanup: hypervFreeObject(priv, (hypervObject *)list); }
-
- 15 9月, 2016 1 次提交
-
-
由 Jason Miesionczek 提交于
-
- 04 12月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The make inserts six spaces instead of four: GEN access/viraccessapichecklxc.h GEN hyperv/hyperv_wmi.generated.h GEN access/viraccessapichecklxc.c GEN hyperv/hyperv_wmi.generated.c GEN hyperv/hyperv_wmi_classes.generated.typedef GEN hyperv/hyperv_wmi_classes.generated.h GEN hyperv/hyperv_wmi_classes.generated.c GEN libvirt_access_qemu.xml GEN libvirt_access.syms GEN libvirt_access_lxc.xml GEN libvirt_access_qemu.syms GEN libvirt_access_lxc.syms GEN libvirt_qemu.def GEN esx/esx_vi_types.generated.typedef GEN esx/esx_vi_types.generated.typeenum GEN esx/esx_vi_types.generated.typetostring GEN esx/esx_vi_types.generated.typefromstring GEN esx/esx_vi_types.generated.h GEN esx/esx_vi_types.generated.c GEN esx/esx_vi_methods.generated.h GEN esx/esx_vi_methods.generated.c GEN esx/esx_vi_methods.generated.macro GEN esx/esx_vi.generated.h GEN esx/esx_vi.generated.c GEN libvirt_lxc.def Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 21 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
https://www.gnu.org/licenses/gpl-howto.html recommends that the 'If not, see <url>.' phrase be a separate sentence. * tests/securityselinuxhelper.c: Remove doubled line. * tests/securityselinuxtest.c: Likewise. * globally: s/; If/. If/
-
- 27 7月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Commit f9ce7dad tried to kill uses of a raw street address, but missed a few instances. Automate things so we don't introduce new problems in the future. * cfg.mk (sc_copyright_address): New rule. (exclude_file_name_regexp--sc_copyright_address): Add exemption. * bootstrap.conf: Adjust offenders. * build-aux/augeas-gentest.pl: Likewise. * examples/systemtap/events.stp: Likewise. * examples/systemtap/qemu-monitor.stp: Likewise. * examples/systemtap/rpc-monitor.stp: Likewise. * src/dtrace2systemtap.pl: Likewise. * src/esx/esx_vi_generator.py: Likewise. * src/hyperv/hyperv_wmi_generator.py: Likewise. * src/remote/qemu_protocol.x: Likewise. * src/remote/remote_protocol.x: Likewise. * src/rpc/gensystemtap.pl: Likewise. * src/rpc/virnetprotocol.x: Likewise. * tests/object-locking.ml: Likewise. * tools/virt-xml-validate.in: Likewise.
-
- 26 8月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
Add a generator script to generate the structs and serialization information for OpenWSMAN. openwsman.h collects workarounds for problems in OpenWSMAN <= 2.2.6. There are also disabled sections that would use ws_serializer_free_mem but can't because it's broken in OpenWSMAN <= 2.2.6. Patches to fix this have been posted upstream.
-