- 22 3月, 2018 1 次提交
-
-
由 Andrea Bolognani 提交于
We're going to use the same test case to exercise all optional pSeries features, so a more generic name is needed. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 21 3月, 2018 4 次提交
-
-
由 Daniel P. Berrangé 提交于
The https:// protocol is much more reliably usable than git:// when faced with unreasonably strict firewalls. The libvirt.org web server is now setup to support the smart https:// protocol, which is just as fast as git://, so change all the docs to use https:// Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The gitorious.org service went away a long time ago now, and our main download.html page tells people where all the official mirrors are for every component. Meanwhile telling people about CVS is a bad joke in 2018, and the CVS server no longer exists on libvirt.org Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Macros in RPMs are expanded before line continuations, so when we write %systemd_preun foo \ bar What happens is that it expands to if [ $1 -eq 0 ] ; then # Package removal, not upgrade systemctl --no-reload disable --now foo \ > /dev/null 2>&1 || : fi bar which is obviously complete garbage and not what we expected. It is simply not safe to ever use line continuations in combination with macros. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Han Han 提交于
Fix comments for virConnectListAllNodeDevices and virConnectListAllSecrets. Signed-off-by: NHan Han <hhan@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 20 3月, 2018 35 次提交
-
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1556828 When defining a domain that has <interface type='hostdev'/> our parser creates two entries in virDomainDef: one for <interface/> and one for <hostdev/>. However, some info is shared between the two which makes user alias validation fail because alias belongs to the set of shared info. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Cole Robinson 提交于
Yet another dependency on dict() hash ordering Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
While RHEL / CentOS are still using Python 2 for the time being, Fedora has already switched to Python 3 as the default Python interpreter a while ago, so on that OS it doesn't make sense to drag in Python 2 anymore. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
While RHEL / CentOS are still using Python 2 for the time being, Fedora has already switched to Python 3 as the default Python interpreter a while ago, so on that OS it doesn't make sense to drag in Python 2 anymore; the same applies to future RHEL versions. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
Our build process no longer depends on Python 2, so we can finally allow Python 3 to satisfy our requirement for a Python interpreter. Since several distributions have now switched to installing Python 3 by default and Python 2 is on its way out, prefer the former when both are available. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
Although it was never formally specified, it was always expected that the mingw RPM build would happen on Fedora, if anything because RHEL / CentOS don't ship the necessary mingw dependencies. Make this fact explicit by erroring out if that's not the case, the same way we already do in the main spec file. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Radostin Stoyanov 提交于
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
http://pylint-messages.wikidot.com/messages:c0325Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
Improve readability and reduce the complexity of the code that is searching for string tokens (i.e. characters surrounded by a single or double quote). Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
Reduce the number of if-statements used to assign a literals to corresponding class variables. Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
Improve readability and reduce complexity the method parseTypeComment(). Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
The method strip_lead_star() removes a single leading asterisk character from a string by ignoring leading whitespace, otherwise it returns the original string. This could be achieved with a single if-statement followed by replace. Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
PEP8 recommends that the number of spaces used for indentation of Python code to be a multiple of four [1] [2]. 1: https://lintlyci.github.io/Flake8Rules/rules/E111.html 2: https://lintlyci.github.io/Flake8Rules/rules/E114.htmlReviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
Backslash between brackets in Python is redundant. [1] 1: https://lintlyci.github.io/Flake8Rules/rules/E502.htmlReviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
Replace the print statement, that is only available in Py2, with a print function that is available in both Py2 and Py3 and drop the explicit python version in the shebang. Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
The uniq() function returns a sorted list, there is no need to sort this list again. Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
Use a set (unordered collections of unique elements) [1] to remove repeated elements in a list. 1: https://docs.python.org/3/tutorial/datastructures.html#setsReviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.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 not having spaces around = in a keyword argument or a default parameter value. https://www.python.org/dev/peps/pep-0008/#other-recommendationsReviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
Improve readability by reducing the complexity and length of conditional statements. Example: The following condition: if (o >= 97 and o <= 122) or (o >= 65 and o <= 90) or (o >= 48 and o <= 57) or (" \t(){}:;,+-*/%&!|[]=><".find(line[i]) == -1): Will be True for every character that is not in string: " \t(){}:;,+-*/%&!|[]=><" Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
The functions like isalnum(), isalpha(), isdigit(), etc. are also available in Python, however `make syntax-check` do not intend to prohibit them. Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
Generate whitespace using the standard function ljust() that is available in both Py3 [1] and Py2 [2]. 1: https://docs.python.org/3/library/stdtypes.html?highlight=strip#str.ljust 2: https://docs.python.org/2.7/library/string.html#string.ljustReviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
Reduce the number of if-statements and use a single return. Utilise a dictionary to map between occurrences and values. Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
The function generate_helper_header() only returns a formatted string. This could be achieved without performing string concatenation. Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
The generate_helper_source() function returns a formatted string. This could be achieved without the use of a local variable "source" and string concatenation. Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
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>
-
由 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>
-
由 Jiri Denemark 提交于
<memballoon model='none'/> is the only way to disable balloon driver since libvirt will add one automatically if the memballoon element is missing. In other words, there's no balloon device if model is 'none' and generating an alias for it makes no sense. The alias will be ignored when parsing the XML and it will disappear once libvirtd is restarted. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Daniel P. Berrangé 提交于
Some contributors are behind obnoxious firewalls that block everything except http(s) traffic, preventing checkout of modules using the git:// protocol. Since git.savannah.gnu.org is using the modern, fast HTTP transport, there's no real downside to using that by default. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-