- 20 3月, 2018 3 次提交
-
-
由 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>
-
由 Radostin Stoyanov 提交于
PEP8 recommends imports to be on separate lines. [1] 1: https://www.python.org/dev/peps/pep-0008/#importsReviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
The isinstance() function [1] returns true if an object argument is an instance of a classinfo argument or of a direct, indirect subclass thereof. 1: https://docs.python.org/3/library/functions.html#isinstanceReviewed-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>
-
- 17 3月, 2018 2 次提交
-
-
由 Cole Robinson 提交于
Another usage of deprecated 'string' functions. We are just trying to match ascii letters here, so use a simple regex. And again drop the aggressive exception handling, it doesn't seem to trigger for anything in libvirt code. Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Module 'string' function lower doesn't exist in python3. The canonical way is to call .lower() on a str instance. Do that, and make the exception handling more specific, which would have made this issue obvious. Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 16 3月, 2018 7 次提交
-
-
由 John Ferlan 提交于
Commit id '477502de' altered the entry to add one too many closing parenthesis ')' and that propagated into commit id '9176b42b'. Signed-off-by: NJohn Ferlan <jferlan@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 提交于
For list concatenation to work, the value returned by the keys() method must be converted to a list first. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
All of these have been replaced with methods. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
This replaces uses of the has_key() method. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
This replaces the `` built-in. 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>
-
- 24 7月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
After f4cb85c6 we only have two options for placing enum values descriptions. It's either: typedef enum { /* Some long description. Therefore it's placed before * the value. */ VIR_ENUM_A_VAL = 1, } virEnumA; or: typedef enum { VIR_ENUM_B_VAL = 1, /* Some short description */ } virEnumB; However, our apibuild.py script is not able to deal with the former one. It messes up comments. To fix this couple of things needs to be done: a) DO NOT reset self.comment in parseEnumBlock(). This is a result from our tokenizer. Upon calling token() if it finds a comment block it stores it in self.comment and returns the next token (which is not comment). Therefore, if we reset self.comment we might lose the first comment in the enum block. b) we need a variable to track if the current enum block uses value descriptions before or after values. That is if it's type virEnumA or virEnumB. Depending on that, it we're dealing with virEnumA type and the current token is a comma ',' we can add the value into the list as we already have everything needed: comment, name and value. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 08 11月, 2016 1 次提交
-
-
由 Guido Günther 提交于
Release tarballs ship the include/libvirt/libvirt-common.h. when srcdir != builddir we end up including libvirt-common.h twice: from $top_srcdir/include/libvirt-common.h and from $builddir/include/libvirt-common.h leading to function virTypedParamsGetUInt from /tmp/buildd/libvirt-2.4.0/debian/build/docs/../include/libvirt/libvirt-common.h redeclared in /tmp/buildd/libvirt-2.4.0/docs/../include/libvirt/libvirt-common.h function virTypedParamsAddBoolean from /tmp/buildd/libvirt-2.4.0/debian/build/docs/../include/libvirt/libvirt-common.h redeclared in /tmp/buildd/libvirt-2.4.0/docs/../include/libvirt/libvirt-common.h … Only add the builddir to the search list if there is no pregenerated libvirt-common.h. Reuse the existing check that predates the libvirt.h → libvirt-common.h split and that probably was meant for exactly that. References: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842452
-
- 20 7月, 2016 1 次提交
-
-
由 Ján Tomko 提交于
When generating the hvsupport.html.in file, we parse the -api.xml files generated by apibuild.py to know in which HTML file the API function is. Doing an XPath query for every single 'function' element in the file is inefficient. Since the XML file is generated by another of our build scripts (apibuild.py, using Python's standard 'output.write' XML library), just find the function name->file mapping by a regex upfront. Also add a note about this next to the line that generates it in apibuild.py and do not check if XML::XPath is installed in bootstrap since we no longer use it.
-
- 30 5月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
In 38df47c9 I've tried to prepare our apibuild.py script for change made in 0628f349 (1U << 31). What I've done in the former commit was to replace \d+U in parsed tokens with \d. Problem was, my regular expression there was not quite right as it also translated VIR_123U_VAL into VIR_123_VAL. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 28 5月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
The apibuild script is a terrifying beast that parses some source files of ours and produces an XML representation of them. When it comes to parsing enums we have in some header files, it tries to be clever and detect a value that an enum member has (or if it is an alias for a different member). Whilst doing that it has to deal with values we give to the members in many formats. At some places we just pass the value in decimal: VIR_DOMAIN_BLOCK_JOB_TYPE_PULL = 1, in other places, we use the aliasing: VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE = VIR_CONNECT_LIST_DOMAINS_ACTIVE, and in other places bitwise shifts are used: VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS = 1 << 31, /* enforce requested stats */ The script tries to parse all of these resulting in the following tokens: "1", "VIR_CONNECT_LIST_DOMAINS_ACTIVE", "1<<31"; Then, the script tries to turn these into integers using python's eval() function. This function succeeds on the first and the last tokens. But, if we were to modify the last example so that it's of the following form: VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS = 1U << 31, /* enforce requested stats */ the token representing enum's member value will then be "1U<<31". So our parsing is good. Unfortunately, python is not aware of the difference between signed and unsigned C types, therefore eval() fails over this token and the parser falls back thinking it's an alias to another enum member. Well it's not. The solution is to transform [0-9]U into [0-9] as for our purposes here it's the same thing. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 26 4月, 2016 3 次提交
-
-
由 Andrea Bolognani 提交于
-
由 Andrea Bolognani 提交于
All top-level functions have been moved to this class. On top of that, the app.warning() method has been defined, so that calls to it - already present in rebuild() - can actually succeed.
-
由 Andrea Bolognani 提交于
This method is used in eg. index.merge(), but is not defined anywhere. The implementation has been copied from docBuilder.
-
- 25 4月, 2016 1 次提交
-
-
由 Peter Krempa 提交于
libvirt-common.h is generated into builddir/include/libvirt. apibuild.py only operated on srcdir/inlcude/libvirt. With VPATH build srcdir/docs/libvirt-libvirt-common.html would not get generated and make RPM failed.
-
- 22 4月, 2016 1 次提交
-
-
由 Peter Krempa 提交于
Ancient python didn't like the new list added in 99283874. Convert it to a dict.
-
- 21 4月, 2016 2 次提交
-
-
由 Peter Krempa 提交于
Since commit f5d9c5d0 moved the virTypedParam stuff into libvirt-common we did not generate any docs for them and neither did we populate them into libvirt-api.xml. This broke the sanity check in libvirt python. Fix it by generating docs for libvirt-common.h too.
-
由 Peter Krempa 提交于
Some macros don't make sense to be documented at all. Add infrastructure to the web/api generator and add VIR_DEPRECATED and VIR_EXPORT_VAR as macros we should not document.
-
- 10 7月, 2015 1 次提交
-
-
由 Jiri Denemark 提交于
A helper function for copying error objects. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 16 6月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
No online docs are build from it since it doesn't really fit into our document structure and new page will need to be created for it, but this is at least a heads-up commit for easier parsing in order to build some documentation (or python bindings) later on. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 11 6月, 2015 2 次提交
-
-
由 Jiri Denemark 提交于
If a macro has a string value, the @string attribute will contain the value. Otherwise @string attribute will be missing. For example, the following macro definition from libvirt-domain.h: /** * VIR_MIGRATE_PARAM_URI: * ... */ # define VIR_MIGRATE_PARAM_URI "migrate_uri" will result in <macro name='VIR_MIGRATE_PARAM_URI' file='libvirt-domain' string='migrate_uri'> <info><![CDATA[...]]></info> </macro> https://bugzilla.redhat.com/show_bug.cgi?id=1229199Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 04 12月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
The apibuild.py script did not handle whitespace in preprocessor macros, so it failed to detect constants declared with '# define' instead of '#define'. Since we now correctly indent our public header files, we have silently lost all constants from libvirt-api.xml. This also caused us to not detect formatting errors in constant docs
-
- 13 11月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
The API docs generators were broken by the header file re-organization. Specifically * html/libvirt-libvirt.html was empty (and should be deleted) * Makefile.am didn't install html/libvirt-libvirt-*.html * hvsupport.html was mostly empty * sitemap.html.in didn't list the new html/*.html files
-
- 25 10月, 2014 8 次提交
-
-
由 Daniel P. Berrange 提交于
Create a new libvirt-host.h file to hold the public API definitions for the virConnect type. This header file is not self-contained, so applications will not directly include it. They will continue to #include <libvirt/libvirt.h>
-
由 Daniel P. Berrange 提交于
Create a new libvirt-domain.h file to hold the public API definitions for the virDomain type. This header file is not self-contained, so applications will not directly include it. They will continue to #include <libvirt/libvirt.h>
-
由 Daniel P. Berrange 提交于
Create a new libvirt-event.h file to hold the public API definitions for the virEvent type. This header file is not self-contained, so applications will not directly include it. They will continue to #include <libvirt/libvirt.h>
-
由 Daniel P. Berrange 提交于
Create a new libvirt-storage.h file to hold the public API definitions for the virStorage/Vol type. This header file is not self-contained, so applications will not directly include it. They will continue to #include <libvirt/libvirt.h>
-
由 Daniel P. Berrange 提交于
Create a new libvirt-stream.h file to hold the public API definitions for the virStream type. This header file is not self-contained, so applications will not directly include it. They will continue to #include <libvirt/libvirt.h> Note the definition of virStreamPtr is not moved, since that must be declared early for all other libvirt APIs to be able to reference it.
-
由 Daniel P. Berrange 提交于
Create a new libvirt-secret.h file to hold the public API definitions for the virSecret type. This header file is not self-contained, so applications will not directly include it. They will continue to #include <libvirt/libvirt.h>
-
由 Daniel P. Berrange 提交于
Create a new libvirt-nodedev.h file to hold the public API definitions for the virNodeDevice type. This header file is not self-contained, so applications will not directly include it. They will continue to #include <libvirt/libvirt.h>
-
由 Daniel P. Berrange 提交于
Create a new libvirt-nwfilter.h file to hold the public API definitions for the virNWFilter type. This header file is not self-contained, so applications will not directly include it. They will continue to #include <libvirt/libvirt.h>
-