Debian Codegraph @

ChangeLog

raw
1 2026- 7- 28 Daniel P. Berrangé <[email protected]>
2
3 Use lowercase types for collection types
4 The uppercase aliases were deprecated since Py 3.9
5
6 https://docs.python.org/3/library/typing.html#deprecated-aliases
7
8
9
10 2026- 7- 28 Daniel P. Berrangé <[email protected]>
11
12 ci: refresh with lcitool manifest
13 This replaces OpenSUSE 15 with 16, since 15.6 is now end of life
14
15
16
17 2026- 7- 28 Daniel P. Berrangé <[email protected]>
18
19 Remove redundant return type annotation
20 The _timer() method does not return any value, so declaring its
21 return type is incorrect.
22
23
24
25 2026- 7- 28 Daniel P. Berrangé <[email protected]>
26
27 Use qualified classname for types in libvirt_qemu/libvirt_lxc
28 We must use "libvirt.virDomain" in the type annotation, not a plain
29 "virDomain".
30
31
32
33 2026- 7- 28 Daniel P. Berrangé <[email protected]>
34
35 Check for stream 'cb' attribute existance
36 Instead of accessing self.cb and catching the exception when it does not
37 exist, check for it upfront, which makes mypy happier.
38
39
40
41 2026- 7- 28 Daniel P. Berrangé <[email protected]>
42
43 Fix type for multi-valued return
44
45
46 2026- 7- 28 Daniel P. Berrangé <[email protected]>
47
48 Stop scoping the domain event callback type
49 This leads to incompatible types between the register and deregister
50 methods:
51
52 "Callable[[virConnect, virDomain, int, int, _T@domainEventDeregister], int | None]"
53 "Callable[[virConnect, virDomain, int, int, _T@domainEventRegister], int | None]"
54
55
56
57 2026- 7- 28 Daniel P. Berrangé <[email protected]>
58
59 Use Optiona[..] type annotation for all params with default values
60 If a parameter has a default value assigned then by definition it is
61 an optional parameter, and the type must reflect that.
62
63
64
65 2026- 7- 28 Daniel P. Berrangé <[email protected]>
66
67 Use 'bytes' not 'str' for 'unsigned char *' parameters
68 Such parameters are all byte arrays, not NUL terminated C strings.
69
70
71
72 2026- 7- 28 Daniel P. Berrangé <[email protected]>
73
74 Fix override type for virNodeListDevices 'caps' parameter
75 The 'caps' parameter is a string capability name, not a set of
76 bytes.
77
78
79
80 2026- 7- 20 Radoslaw Smigielski <[email protected]>
81
82 tests: add comprehensive domain configuration tests
83 Add few new tests in test_domain_config.py covering domain attributes,
84 autostart, scheduler parameters, memory, vCPUs, block/network stats,
85 CPU stats, suspend/resume, metadata, blkio and NUMA parameters.
86
87
88
89 2026- 7- 10 Radoslaw Smigielski <[email protected]>
90
91 tests: add few new tests for domain lifecycle operations
92 Add new test file test_domain_lifecycle.py with 30 functional tests
93 covering domain lifecycle operations. This significantly expands test
94 coverage beyond the existing 2 basic tests in test_domain.py.
95
96 All new tests use the test:///default driver.
97
98 These tests verify that Python bindings work correctly with various
99 parameters and edge cases, not only that the bindings exist.
100
101
102
103 2026- 7- 9 Radoslaw Smigielski <[email protected]>
104
105 tests: run tox tests in parallel
106 Use `tox run-parallel` instead of `tox` in the test target so all
107 Python versions are exercised concurrently.
108 And significantly reduces tox execution time.
109
110
111
112 2026- 7- 8 Radoslaw Smigielski <[email protected]>
113
114 docs: add explicit install instructions for pytest and tox in README
115 Add dnf and pip install commands for both pytest and tox to the testing
116 section of the README, making it clear how to obtain the required tools
117 before running the test suite.
118
119
120
121 2026- 7- 8 Jiri Denemark <[email protected]>
122
123 Post-release version bump to 12.6.0
124
125
126 2026- 7- 8 Radoslaw Smigielski <[email protected]>
127
128 python: Add support for free-threaded no-GIL CPython
129 This is an initial commit to add support for:
130 - Python 3.13 (python3.13t)
131 - Python 3.14 (python3.14t)
132
133 Both python3.13t and python3.14t do not support the Stable C API,
134 so the only way to get libvirt-python working with no-GIL Python
135 is to fall back to the Python Unstable C API. This is the approach
136 taken in this change.
137
138 As the Python community plans to add Stable C API support in Python
139 3.15+, we can switch back to it from 3.15 onwards. However, for
140 3.13 and 3.14, we must use the Unstable C API.
141 (Ref: https://docs.python.org/3/c-api/unstable.html)
142
143 Following PEP 703 (https://peps.python.org/pep-0703/):
144
145 1. Add dedicated tox envs: py313t, py314t.
146 2. Create dedicated env configurations for new environments.
147 This forces no-GIL execution in case any dependency tries to
148 silently turn the GIL back on.
149
150 [testenv:py313t] with basepython = python3.13t
151 [testenv:py314t] with basepython = python3.14t
152
153 3. Explicitly use the free-threaded interpreters and only set
154 PYTHON_GIL=0 inside the virtualenv.
155 4. Add documentation warning against exporting PYTHON_GIL=0 in the
156 shell before running tox. Doing so affects the Python instance
157 that launches tox itself, not just the test venv.
158
159 Fixes: https://gitlab.com/libvirt/libvirt-python/-/work_items/22
160
161
162 2026- 7- 3 Radoslaw Smigielski <[email protected]>
163
164 tests: add Python 3.14 to tox test environments
165 Add py314 to the envlist to support testing with Python 3.14.
166
167
168
169 2026- 7- 2 Radoslaw Smigielski <[email protected]>
170
171 docs: clarify build and test dependencies in README
172 Add missing installation instructions for required dependencies:
173
174 - Document that the Python 'build' module must be installed before
175 running 'python3 -m build', with examples using both dnf and pip
176 - Add instruction to install test dependencies from requirements-test.txt
177 before running pytest or tox
178
179 These additions help new contributors avoid common setup errors when
180 building and testing the libvirt Python bindings.
181
182
183
184 2026- 6- 9 Michal Privoznik <[email protected]>
185
186 Add support for virDomainAnnounceInterface() API
187
188
189 2026- 6- 1 Jiri Denemark <[email protected]>
190
191 Post-release version bump to 12.5.0
192
193
194 2026- 5- 25 Michal Privoznik <[email protected]>
195
196 Add support for domain channel lifecycle event
197
198
199 2026- 5- 14 Michal Privoznik <[email protected]>
200
201 Add support for domain vCPU removed event
202
203
204 2026- 5- 11 Takashi Kajinami <[email protected]>
205
206 ci: regenerate with 'lcitool manifest'
207 - Drop Fedora 42, add Fedora 44
208 - Drop Ubuntu 22.04, add Ubuntu 26.04
209 - Add Debian 13
210
211
212
213 2026- 5- 1 Jiri Denemark <[email protected]>
214
215 Post-release version bump to 12.4.0
216
217
218 2026- 4- 1 Jiri Denemark <[email protected]>
219
220 Post-release version bump to 12.3.0
221
222
223 2026- 3- 25 Ben "535" Blank <[email protected]>
224
225 Emit type hints for function parameters and return values in most places.
226
227
228 2026- 3- 18 Takashi Kajinami <[email protected]>
229
230 Add CentOS Stream 10 job
231 CentOS Stream 10 was released some time ago. Let's add test coverage
232 with it.
233
234 The new jobs still allow failures but may be required in the future.
235
236
237
238 2026- 3- 5 Takashi Kajinami <[email protected]>
239
240 Fix outedated requirements-test.txt
241 nose was replaced by pytest long ago.
242
243 Update tox.ini to use the file to maintain test requirements in
244 a single place.
245
246
247
248 2026- 3- 3 Daniel P. Berrangé <[email protected]>
249
250 ensure Python.h is the first include file
251 Builds with -Werror fail with glibc 2.44 dev snapshots:
252
253 In file included from /usr/include/python3.14/pyconfig.h:6,
254 from /usr/include/python3.14/Python.h:14,
255 from d.c:2:
256 /usr/include/python3.14/pyconfig-64.h:2007:9: warning: ‘_POSIX_C_SOURCE’ redefined
257 2007 | #define _POSIX_C_SOURCE 200809L
258 | ^~~~~~~~~~~~~~~
259 In file included from /usr/include/bits/libc-header-start.h:33,
260 from /usr/include/stdlib.h:26,
261 from d.c:1:
262 /usr/include/features.h:319:10: note: this is the location of the previous definition
263 319 | # define _POSIX_C_SOURCE 202405L
264 | ^~~~~~~~~~~~~~~
265
266 The required solution is to include Python.h first, so that it owns
267 the definition of _POSIX_C_SOURCE, and thus glibc won't try to set
268 a default value
269
270 See also: https://bugzilla.redhat.com/show_bug.cgi?id=2416110
271
272
273 2026- 3- 2 Jiri Denemark <[email protected]>
274
275 Post-release version bump to 12.2.0
276
277
278 2026- 1- 29 Daniel P. Berrangé <[email protected]>
279
280 rpm: remove extraneous license tag
281 When converting to SPDX expressions, we failed to notice the second
282 License tag in the spec file. Since this was identical to the primary
283 tag, it was redundant and should just be removed.
284
285 Reported-by: Miroslav Suchý <[email protected]>
286
287
288 2026- 1- 19 Peter Krempa <[email protected]>
289
290 virDomainSaveParams: Add missing typed parameter conversion hints
291 Add the missing hints for:
292 - VIR_DOMAIN_SAVE_PARAM_IMAGE_FORMAT
293 - VIR_DOMAIN_SAVE_PARAM_PARALLEL_CHANNELS
294
295 The latter of the above is important as the default conversion of
296 numbers is to 'ulong' if a hint is missing but the parallel channel
297 counts is accepted as 'int' by libvirt.
298
299
300
301 2026- 1- 15 Jiri Denemark <[email protected]>
302
303 Post-release version bump to 12.1.0
304
305
306 2025- 12- 1 Jiri Denemark <[email protected]>
307
308 Post-release version bump to 12.0.0
309
310
311 2025- 11- 21 Michal Privoznik <[email protected]>
312
313 ci: refresh with 'lcitool manifest'
314 This drops Fedora 41 and introduces Fedora 43.
315
316
317
318 2025- 11- 3 Jiri Denemark <[email protected]>
319
320 Post-release version bump to 11.10.0
321
322
323 2025- 10- 6 Michal Privoznik <[email protected]>
324
325 ci: refresh with 'lcitool manifest'
326 This drops Fedora 40 and introduces Fedora 42 and drops
327 deprecated setting of env vars in dockerfiles.
328
329
330
331 2025- 10- 2 Marc Hartmayer <[email protected]>
332
333 examples/consolecallback.py: Use hex-encoding for `^]`
334 Use hex encoding for ^] to prevent potential rendering issues in web browsers
335 when viewing the file on GitLab.
336
337 While at it, make the file an executable as a Shebang line is present.
338
339 Suggested-by: Dawson Rosell <[email protected]>
340 Reviewed-by: Boris Fiuczynski <[email protected]>
341
342
343 2025- 10- 1 Jiri Denemark <[email protected]>
344
345 Post-release version bump to 11.9.0
346
347
348 2025- 9- 11 Jiri Denemark <[email protected]>
349
350 spec: Set dist_name when creating a distribution tarball
351 When a distribution tarball is created (python3 -m build -n -s) the
352 dist_name in the spec file included in that tarball must match the
353 actual tarball name. The tarball name depends on the setuptools version
354 used to create it rather than on the version of setuptools installed on
355 the system RPMs are built.
356
357 Fixes: ed8ab5075d9190fdcd2894412d2127ac2a1d9535
358 Reported-by: Daniel P. Berrangé <[email protected]>
359
360
361 2025- 9- 11 Jiri Denemark <[email protected]>
362
363 setup.py: Add support for multiple replacements in *.in
364
365
366 2025- 9- 10 Jiri Denemark <[email protected]>
367
368 build: Adapt to PEP 625 distribution file naming
369 The version of setuptools shipped by Fedora 42 is PEP 625 compliant,
370 which requires distribution files to contain a normalized package name.
371 Thus the generated tarball is called libvirt_python-$VER.tar.gz rather
372 than libvirt-python-$VER.tar.gz created by older setuptools. The source
373 directory inside the tarball follows the same naming.
374
375 Reviewed-by: Pavel Hrdina <[email protected]>
376
377
378 2025- 9- 1 Jiri Denemark <[email protected]>
379
380 Post-release version bump to 11.8.0
381
382
383 2025- 8- 1 Jiri Denemark <[email protected]>
384
385 Post-release version bump to 11.7.0
386
387
388 2025- 7- 1 Jiri Denemark <[email protected]>
389
390 Post-release version bump to 11.6.0
391
392
393 2025- 6- 2 Jiri Denemark <[email protected]>
394
395 Post-release version bump to 11.5.0
396
397
398 2025- 5- 27 Ariel Otilibili <[email protected]>
399
400 examples/topology: define socketIds and siblingsIds as sets
401 socketIds and siblingsIds are declared as empty lists, filled by
402 list comprehensions, and later on re-used as sets.
403
404 They could be directly obtained from set comprehensions.
405
406 Fixes: 34aa32b ("Move python example programs into python/examples/ subdirectory")
407 Fixes: 3f4e32c ("examples: Invoke print("...") instead of print "..."")
408 Link: https://docs.python.org/3/tutorial/datastructures.html#sets
409 Reviewed-by: Michal Privoznik <[email protected]>
410
411
412 2025- 5- 21 Lukas Billy <[email protected]>
413
414 generator.py: Fix hardcoded build directory
415 This patch changes the hard-coded directory, so it is now possible to have custom name directory.
416
417
418 2025- 5- 5 Michal Privoznik <[email protected]>
419
420 setup.cfg: Remove Licence classifier
421 Per latest setuptools recommendation [1], it's not recommended to
422 specify license in `classifiers`. Move it to `license`.
423
424 1: https://github.com/pypa/setuptools/commit/346bf17e0cc8fc6e8b0ea3e6dafa3af91009da6d
425
426
427 2025- 5- 2 Jiri Denemark <[email protected]>
428
429 Post-release version bump to 11.4.0
430
431
432 2025- 4- 1 Jiri Denemark <[email protected]>
433
434 Post-release version bump to 11.3.0
435
436
437 2025- 3- 26 SuhailAhmedVelorum <[email protected]>
438
439 Fixed minor typo in libvirt-override.py::openAuth TODO item
440
441
442 2025- 3- 25 Michal Privoznik <[email protected]>
443
444 Add support for domain NIC MAC address change event
445
446
447 2025- 3- 21 Michal Privoznik <[email protected]>
448
449 override: domain: Implement override for virDomainSetThrottleGroup()
450 The bindings generator can't generate proper bindings for
451 virDomainSetThrottleGroup() (because of typed parameters in the
452 arguments) so implement it manually.
453
454
455
456 2025- 3- 21 Michal Privoznik <[email protected]>
457
458 override: domain: Implement override for virDomainGetAutostartOnce()
459 The bindings generator can't generate proper bindings for
460 virDomainGetAutostartOnce() (because of int* in the arguments) so
461 implement it manually.
462
463
464
465 2025- 3- 21 Michal Privoznik <[email protected]>
466
467 Modernize typed parameter fetching in libvirt_virDomainSetBlockIoTune()
468 Instead of fetching supported tunables and passing only those to
469 the API (effectively ignoring unsupported ones), pass all
470 tunables or error out on unsupported ones.
471
472
473
474 2025- 3- 3 Jiri Denemark <[email protected]>
475
476 Post-release version bump to 11.2.0
477
478
479 2025- 2- 17 Pavel Hrdina <[email protected]>
480
481 ci: refresh with 'lcitool manifest'
482
483
484 2025- 1- 15 Jiri Denemark <[email protected]>
485
486 Post-release version bump to 11.1.0
487
488
489 2024- 12- 2 Jiri Denemark <[email protected]>
490
491 Post-release version bump to 11.0.0
492
493
494 2024- 11- 18 Daniel P. Berrangé <[email protected]>
495
496 ci: refresh with 'lcitool manifest'
497 Notable changes
498
499 * openSUSE Leap updated to 15.6
500 * Switch to URLs for referencing projects in manifest
501
502
503
504 2024- 11- 1 Jiri Denemark <[email protected]>
505
506 Post-release version bump to 10.10.0
507
508
509 2024- 10- 22 Ariel Otilibili <[email protected]>
510
511 tox.ini: bumped Python
512 Removed 3.8, added 3.13 [1].
513
514 [1] https://devguide.python.org/versions/
515
516
517
518 2024- 10- 1 Jiri Denemark <[email protected]>
519
520 Post-release version bump to 10.9.0
521
522
523 2024- 9- 2 Jiri Denemark <[email protected]>
524
525 Post-release version bump to 10.8.0
526
527
528 2024- 8- 8 Ariel Otilibili <[email protected]>
529
530 example/domstart.py: Removed useless brackets for tuple unpacking
531
532
533 2024- 8- 8 Ariel Otilibili <[email protected]>
534
535 tox.ini: Bumped environment list for Python
536 * aligned list with supported Python versions [1]
537 * as of today, supported versions are 3.8 to 3.12
538
539 https://devguide.python.org/versions/
540
541
542
543 2024- 8- 8 Ariel Otilibili <[email protected]>
544
545 Makefile: `make check` now computes env variable on the fly
546 * env variable used to be Python3.6
547 * Python3.6 is end of life since December 2021 [1].
548
549 [1] https://devguide.python.org/versions/
550
551
552
553 2024- 8- 5 Jiri Denemark <[email protected]>
554
555 Post-release version bump to 10.7.0
556
557
558 2024- 7- 1 Jiri Denemark <[email protected]>
559
560 Post-release version bump to 10.6.0
561
562
563 2024- 6- 11 Konstantin Khorenko <[email protected]>
564
565 examples/nodestat: Show memory pinning information again
566 Resurrect the logic after it has been occasionally broken during fixing
567 the syntax complains from python.
568
569 Fixes: c588ba9 ("examples/nodestat: Fix None comparison")
570
571
572
573 2024- 6- 3 Jiri Denemark <[email protected]>
574
575 Post-release version bump to 10.5.0
576
577
578 2024- 5- 2 Michal Privoznik <[email protected]>
579
580 ci: Drop CentOS 8 Stream and switch F38 to 40, Ubuntu 20.04 to 22.04
581 There a lot happening here, but that's because otherwise lcitool
582 fails to regenerate files. Firstly, CentOS 8 is dropped as it's
583 unsupported now. Secondly, Fedora 40 is introduced and Fedora 38
584 is dropped. And lastly, Ubuntu 24.04 is introduced and Ubuntu
585 20.04 is dropped.
586
587
588
589 2024- 5- 2 Michal Privoznik <[email protected]>
590
591 test_aio.py: Fix skip message
592 There are two unit tests in test_aio.py that are skipped if
593 Python is too new (3.10 or newer). But the message printed when
594 they are skipped mentions just 3.10 which is confusing. Change it
595 to "3.10+".
596
597
598
599 2024- 5- 2 Michal Privoznik <[email protected]>
600
601 Switch to PyMODINIT_FUNC annotation
602 Instead of doing some 'extern ...' declaration magic to force
603 proper PyInit_libvirtmod*() symbol exposure in resulting .so we
604 can use what Python already offers - PyMODINIT_FUNC macro and
605 call it a day.
606
607
608
609 2024- 5- 2 Michal Privoznik <[email protected]>
610
611 generator.py: Drop build/ prefix from #include
612 When -Ibuild flag is passed to compiler then build/ can be dropped
613 from includes. This is safe to do, because the prefix is only on
614 local includes (#include "") not system ones (#include <>).
615
616
617
618 2024- 5- 2 Michal Privoznik <[email protected]>
619
620 generator.py: Switch from ${module}-export.c to ${module}-export.c.inc
621 The generator.py generates a (per module) table of functions it
622 generated code for and stores it in ${module}-export.c file. The
623 file is then #include-d in corresponding override.c in the table
624 of all methods implemented in the module.
625
626 Now, problem is with naming of the file because the ".c" suffix
627 might suggest the file needs to be compiled. Well, it doesn't.
628 It's way closer to being a header file, so change the suffix to
629 ".c.inc".
630
631
632
633 2024- 5- 2 Michal Privoznik <[email protected]>
634
635 generator.py: Allow source and build dirs override
636 Soon generator.py is going to be ran from a build directory which
637 is different than the source directory. Allow specifying these
638 directories on the cmd line.
639
640 And while at it, introduce new "c+py" output mode in which both C
641 and Python files are generated. While this is a fallback mode if
642 no output mode is selected, we need this new mode so that
643 aforementioned directories can be specified.
644
645
646
647 2024- 5- 2 Michal Privoznik <[email protected]>
648
649 setup.py: s/PY_VERSION/VERSION/
650 When generating spec file, @PY_VERSION@ is replaced with the
651 current version of libvirt-python. Well, it's not as obvious as
652 it could be: usually it's just @VERSION@. Worse, the PY_ prefix
653 may mislead readers into thinking it refers to python version.
654
655 Just drop the PY_ prefix.
656
657
658
659 2024- 5- 2 Jiri Denemark <[email protected]>
660
661 Post-release version bump to 10.4.0
662
663
664 2024- 5- 1 Jelle van der Waa <[email protected]>
665
666 examples: replace logging.warn with logging.warning
667 logging.warn is an alias to logging.warning since Python 3.3 and will be
668 removed in Python 3.13.
669
670
671
672 2024- 4- 30 Daniel P. Berrangé <[email protected]>
673
674 gitlab: stop using a venv when creating source/binary dist
675 The change to use 'python -m build' in
676
677 commit 333c8bef2bcca5ca7dbcdb5861a385d626e0feb9
678 Author: Erik Skultety <[email protected]>
679 Date: Tue Jun 20 12:19:40 2023 +0200
680
681 ci: Drop direct 'setup.py' usage
682
683 resulted in the CI jobs all downloading latest setuptools and
684 deps from pypi and running builds with them in a venv. IOW we
685 ceased testing against the setuptools/wheel packages provided
686 by the distro, which is the whole point of the CI.
687
688 Passing the '-n -x' flags to 'python -m build' tells it to stop
689 using a venv and not to check dependancies, thus letting it
690 use what we pre-installed in the container.
691
692 This doesn't work on CentOS Stream 8, however, so we revert to
693 using the old setup.py approach. This is a short term issue,
694 since Stream 8 is EOL at the end of May, so we'll be deleting
695 all the Stream 8 jobs across libvirt CI very soon.
696
697
698
699 2024- 4- 25 Daniel P. Berrangé <[email protected]>
700
701 ci: refresh with lcitool manifest
702 This pulls in the new wheel packages.
703
704
705
706 2024- 4- 25 Daniel P. Berrangé <[email protected]>
707
708 ci: add 'python3-wheel' as a dep
709 The 'python -m build' command creates a source dist and a binary
710 wheel. To be able run this command without creating a new venv
711 and downloading from pypi, we need to pre-install the 'wheel'
712 package.
713
714
715
716 2024- 4- 25 Daniel P. Berrangé <[email protected]>
717
718 ci: refresh with latest lcitool manifest
719 Fixes logic that caused some jobs to mistakenly not be run
720 when expected.
721
722
723
724 2024- 4- 2 Jiri Denemark <[email protected]>
725
726 Post-release version bump to 10.3.0
727
728
729 2024- 3- 1 Jiri Denemark <[email protected]>
730
731 Post-release version bump to 10.2.0
732
733
734 2024- 2- 27 Michal Privoznik <[email protected]>
735
736 ci: Switch native_git_build_job to c9s and resume api_coverage_job
737 Currently, there's just one native_git_build_job -
738 x86_64-centos-stream-8-git and this is a problem because that's
739 the job that api_coverage_job then uses. But CentOS Stream 8 has
740 too old lxml which then makes tests/test_api_coverage.py skip its
741 run. By switching to CentOS Stream 9 the test can run happily
742 again.
743
744
745
746 2024- 2- 27 Michal Privoznik <[email protected]>
747
748 test_api_coverage: Reflect different naming in python for virDomainFDAssociate() and virDomainRestoreParams()
749 While virDomainRestoreParams() has 'virDomain' prefix (and thus
750 is put into Domain class), it is really in the same family as
751 virDomainRestore() or virDomainRestoreFlags() -> it acts upon
752 virConnect object and thus belongs into Connect class.
753
754 Then, virDomainFDAssociate is exposed as Domain.FDAssociate() but
755 because of the way we would generate the method's name
756 (fDAssociate) the test thinks it's not implemented.
757
758
759
760 2024- 2- 20 Vincent Vanlaer <[email protected]>
761
762 Fix memory leak in virStreamRecvFlags
763 virStreamRecvFlags allocates a temporary buffer to store the received
764 stream data in. This buffer was not freed on returns other than the
765 normal return with data.
766
767
768
769 2024- 1- 19 Daniel P. Berrangé <[email protected]>
770
771 ci: refresh with latest 'lcitool manifest'
772 This refresh gets rid of the split jobs for prebuilt and local
773 container environments.
774
775
776
777 2024- 1- 15 Jiri Denemark <[email protected]>
778
779 Post-release version bump to 10.1.0
780
781
782 2024- 1- 8 Peter Krempa <[email protected]>
783
784 ci: Install built module for testing insde an venv
785 Distros recently started to object to using 'pip' to install system-wide
786 packages to prevent breakage. We were hacking-around that by using
787 'pip install --break-system-packages', but it's straightforward to
788 simply create a venv with '--system-site-packages' and install it there.
789
790
791
792 2024- 1- 8 Peter Krempa <[email protected]>
793
794 ci: Update Fedora and Debian versions and regenerate
795 Update:
796 Debian-10 -> Debian-12
797 Fedora-37 -> Fedora-38
798 Fedora-38 -> Fedora-39
799
800 Also the artifacts from the Fedora 39 job are needed for the integration
801 test suite in the main libvirt project.
802
803 For Debian 12 we need to start using
804 'pip install --break-system-packages' as a hack to work around
805 installation of the built package for testing.
806
807
808
809 2023- 12- 1 Jiri Denemark <[email protected]>
810
811 Post-release version bump to 10.0.0
812
813
814 2023- 11- 1 Jiri Denemark <[email protected]>
815
816 Post-release version bump to 9.10.0
817
818
819 2023- 10- 2 Jiri Denemark <[email protected]>
820
821 Post-release version bump to 9.9.0
822
823
824 2023- 9- 25 Daniel P. Berrangé <[email protected]>
825
826 Request the Python stable API when building
827 We have Python 3.6 as a minimum version. If we set Py_LIMITED_API
828 to 0x03060000, we'll get the stable python API associated with
829 versions >= 3.6. This lets users compile once and have the libvirt
830 binary module be loadable by any Python version >= 3.6, as described
831 in:
832
833 https://docs.python.org/3/c-api/stable.html
834
835
836
837 2023- 9- 25 Daniel P. Berrangé <[email protected]>
838
839 Use PySequence_GetItem preferentially
840 Although marginally faster, PySequence_ITEM is not part
841 of the stable API and also omits some safety checks. It
842 is better for us to be using PySequence_GetItem instead.
843
844
845
846 2023- 9- 25 Daniel P. Berrangé <[email protected]>
847
848 add missing includes for C library functions
849 We use various C library functions like printf, strcmp, free
850 but don't have the corresponding #includes, getting them
851 indirectly via Python.h. This is a bad idea as Python.h is
852 not guaranteed to provided these, and indeed will omit them
853 when Py_LIMITED_API is greater then 0x030a0000.
854
855
856
857 2023- 9- 25 Pino Toscano <[email protected]>
858
859 setup: simplify authors list generation
860 Use a set to collect the authors from the git output with no duplicates,
861 then sort the resulting set, and apply the wanted indentation.
862
863 This method is more Pythonic, using a set to avoid duplicates; applying
864 the indentation after the sorting makes the sorting slightly faster.
865
866
867
868 2023- 9- 25 Pino Toscano <[email protected]>
869
870 setup: switch away fron subprocess.Popen()
871 Adopt subprocess.check_output() as more modern and higher-level way to
872 invoke processes, checking that they succeed, and getting their output.
873
874
875
876 2023- 9- 25 Pino Toscano <[email protected]>
877
878 setup: remove unnecessary f-string
879 The whole content of this f-string is a variable, so use that variable
880 directly.
881
882
883
884 2023- 9- 25 Pino Toscano <[email protected]>
885
886 setup: invoke git commands properly
887 Storing the git commands as single string, to split it by space later
888 on, works only in case there are no spaces in the arguments, which is
889 exactly what is in those commands.
890
891 Instead, specify them directly as lists, with the options & arguments
892 split in the right way. This fixes the generation of the AUTHORS and
893 ChangeLog files.
894
895
896
897 2023- 9- 21 Daniel P. Berrangé <[email protected]>
898
899 gitlab: unset CFLAGS for rpm build
900 Setting CFLAGS before invoking rpm-build causes replacement of the
901 CFLAGS that RPM wants to set for python. This causes the loss of
902 certain flags needed to turn on debug output and optimization.
903 Previously this wasn't a problem as something in setuptools appears
904 to have been adding -g anyway, but with the update to python 3.12
905 this now fully breaks. We should never have been setting CFLAGS
906 during the RPM build so we drop it unconditionally for all distros.
907
908
909
910 2023- 9- 21 Daniel P. Berrangé <[email protected]>
911
912 Add binding for network metadata events
913
914
915 2023- 9- 1 Jiri Denemark <[email protected]>
916
917 Post-release version bump to 9.8.0
918
919
920 2023- 8- 21 Erik Skultety <[email protected]>
921
922 ci: lcitool: Maintain project package deps lists here
923 Each respective project that lcitool knows about and currently
924 maintains its list of package dependencies knows best what packages
925 they actually depend on. If a new dependency is currently needed,
926 first a change in lcitool is necessary before GitLab jobs and
927 containers can be updated. Provided a mapping already exists in
928 lcitool (which can quickly be added as an override via mappings.yml
929 temporarily) we speed up the whole CI update process by
930 one step.
931
932 Note that starting this commit lcitool must be invoked as
933 '$ lcitool -d/--data-dir ci/lcitool ...'
934 to pick up the project dependency list correctly.
935
936
937
938 2023- 8- 1 Jiri Denemark <[email protected]>
939
940 Post-release version bump to 9.7.0
941
942
943 2023- 7- 3 Jiri Denemark <[email protected]>
944
945 Post-release version bump to 9.6.0
946
947
948 2023- 6- 22 Erik Skultety <[email protected]>
949
950 README: Drop direct 'setup.py' usage
951 With all the bits in place we can now replace the direct 'setup.py'
952 invocation examples with alternatives.
953
954
955
956 2023- 6- 22 Erik Skultety <[email protected]>
957
958 ci: Drop direct 'setup.py' usage
959 With all the bits in place we can now drop the 'setup.py' invocations
960 with preferred alternatives.
961 This patch does a few things:
962 - we don't run plain install because that always spins up a new build
963 process regardless of whether there are build artifacts literally from
964 the previous command, so instead we install the built wheel directly
965
966 - when building, we build both the .whl binary and an sdist because
967 we'll need the sdist for rpmbuild later in the CI job
968
969 - we don't capture the 'build' path as a job artifact anymore, because
970 that now only contains egg metadata, all the build artifacts are
971 created by Python's build module under 'dist' so we capture that one
972 instead
973
974 - we always limit pytest to the 'tests' directory which was something
975 'setup.py test' used to do as a precaution measure, but setup.py no
976 longer has the logic (which is fine)
977
978
979
980 2023- 6- 22 Erik Skultety <[email protected]>
981
982 spec: Invoke pytest properly
983 With all the bits in place we can now drop the 'setup.py' invocations
984 with preferred alternatives. The way to do this in a SPEC file is to
985 use either of the following macros: %tox or %pytest - both of which
986 automatically set paths for the test suite correctly which is
987 something we used to do ourselves in our implementation of the
988 setup.py's test command originally.
989 That is wrong and with the migration to PEP-517 compliant builds it
990 also won't work anymore properly, because there'd be no libs to import
991 by mangling PYTHONPATH, we'd only get an sdist or a wheel, or in case
992 of rpmbuild a preset buildroot environment.
993
994
995
996 2023- 6- 22 Erik Skultety <[email protected]>
997
998 setup: Drop the my_test command
999 Direct setup.py invocations are being discouraged in favour of
1000 using Python's 'build' module. Therefore, we can't really make use of this command
1001 anymore since only wheels and tarballs are built with the 'build' module
1002 compared to the previous state of the art of dumping the freshly built
1003 modules and libraries directly inside the build directory.
1004
1005 We'll have to encourage usage of tox which will install the package
1006 inside a virtualenvironment for the tests. Future patch will update the
1007 Makefile targets to make this easier for the end users.
1008
1009
1010
1011 2023- 6- 22 Erik Skultety <[email protected]>
1012
1013 setup: Drop the clean command
1014 Direct setup.py invocations are discouraged anyway, use git clean
1015 or 'make clean' instead.
1016
1017
1018
1019 2023- 6- 22 Erik Skultety <[email protected]>
1020
1021 Add pyproject.toml
1022 Given the missing setuptools keywords issue and hence having moved all
1023 the declarative stuff to setup.cfg this one is only a very basic one
1024 just to comply PEP-517 and foolproof this project for the future
1025 PyPa/pip changes.
1026
1027
1028
1029 2023- 6- 22 Erik Skultety <[email protected]>
1030
1031 Makefile: Add a 'test' rule to run the full tox execution
1032 This one should be used for the "full" test experience including any
1033 additional environments, test suites and linters we may introduce
1034 further down the road.
1035
1036
1037
1038 2023- 6- 22 Erik Skultety <[email protected]>
1039
1040 Makefile: Update targets according to the new way of building
1041 - drop direct setup.py invocations
1042 - clean the artifacts directly with 'rm'
1043 - use tox instead of invoking pytest otherwise we don't have a
1044 mechanism to test against the freshly built libvirt modules other
1045 than unpacking the built wheel and mangling the PYTHONPATH again
1046 - use direct rpmbuild invocation to build RPM (the rpm target in its
1047 current form didn't really work anyway)
1048
1049
1050
1051 2023- 6- 22 Erik Skultety <[email protected]>
1052
1053 setup: Query library version out of a file
1054 This makes it possible to programatically query the version in any
1055 stage of the build process, including Makefile etc.
1056
1057
1058
1059 2023- 6- 22 Erik Skultety <[email protected]>
1060
1061 Move declarative stuff out of setup.py to setup.cfg
1062 So, why using setup.cfg if pyproject.toml is the new best thing
1063 recommended everywhere? Well, quite a few of the fields we use with
1064 setuptools are setuptools-specific and haven't been introduced as
1065 keywords to pyproject.toml yet. There is a chance that these fields
1066 could be added via a dedicated 'tool.setuptools' TOML section, but none
1067 of it is officially documented and so it would be BETA at best anyway.
1068 Let's not try our luck and use a declarative config file tailored
1069 specifically to setuptools - setup.cfg. It's also unlikely we'd switch
1070 from setuptools to something else in the near future given the nature
1071 of building this project (i.e. building with C modules) and if so, it
1072 would likely not be a PyPa recommended PEP-517 compliant build
1073 system anyway, e.g. meson, so we're totally fine doing this.
1074
1075
1076
1077 2023- 6- 22 Erik Skultety <[email protected]>
1078
1079 README: Move the long_description from setup.py in here
1080
1081
1082 2023- 6- 22 Erik Skultety <[email protected]>
1083
1084 MANIFEST.in: Cleanup
1085 When migrated to the PEP-517 compliant builds, some errors occurred due
1086 to missing or non-existent files mentioned in the MANIFEST. Notable
1087 changes:
1088
1089 - README and MANIFEST files are automatically added to sdist per
1090 MANIFEST documentation
1091 - we want all tests/examples to be included, so use the 'graft' keyword
1092 instead of enumerating individual files
1093 - we want all *.[ch] files as those are needed for the build, so use
1094 'include *.[ch]' instead of enumerating individual files
1095 - we want all *.xml files, so use 'include *.xml'
1096 - we want all *.py files - in case this is no longer the case in the
1097 future, we'll need to tweak that 'include'
1098 - we don't want any __pycache__ nor *.pyc build artifacts, so exclude
1099 them globally
1100
1101
1102
1103 2023- 6- 21 Erik Skultety <[email protected]>
1104
1105 ci: Refresh with latest lcitool changes
1106 - bump OpenSUSE Leap 15.4 -> 15.5
1107 - add python3-build dependency (PEP-517)
1108 - add python3-venv dependency (PEP-517)
1109
1110
1111
1112 2023- 6- 9 Erik Skultety <[email protected]>
1113
1114 setup: styling: Fix last occurrence of os.path in favour of pathlib
1115 Commit e749b4cf forgot to update a couple more occurrences.
1116
1117 Fixes: e749b4cf111bcfc9ceeb88be57dc1d810fc631d9
1118
1119
1120 2023- 6- 9 Erik Skultety <[email protected]>
1121
1122 setup: Drop explicit creation of the build dir in sdist
1123 No need to do that since we'll create it in the top-level code as a
1124 first thing anyway.
1125
1126
1127
1128 2023- 6- 9 Erik Skultety <[email protected]>
1129
1130 setup: Use a simple helper to generate dist files from .in templates
1131 The code is almost identical in the impacted cases, so factor it out.
1132
1133
1134
1135 2023- 6- 9 Erik Skultety <[email protected]>
1136
1137 setup: styling: Use context managers more
1138 Some of the operations, namely file operations and spawning processes
1139 can utilize the power of context managers. Use them more, use them
1140 together.
1141
1142
1143
1144 2023- 6- 9 Erik Skultety <[email protected]>
1145
1146 setup: Move over from os.popen to subprocess.Popen
1147 subprocess is the high-level Pythonic interface providing more
1148 flexibility over the low-level os.popen stuff. It is recommended to
1149 always use subprocess over the direct 'os' interface.
1150
1151
1152
1153 2023- 6- 9 Erik Skultety <[email protected]>
1154
1155 setup: styling: More f-string conversions
1156 Fix a few more occurrences.
1157
1158 Fixes: 745e5a8ca46feb1acf3382c38eb45c74c1c42489
1159
1160
1161 2023- 6- 8 Erik Skultety <[email protected]>
1162
1163 MANIFEST.in: Add Makefile
1164
1165
1166 2023- 6- 8 Erik Skultety <[email protected]>
1167
1168 tox.ini: Drop sanitytest execution
1169 Commit 60044515 renamed sanitytest to test_coverage_api but forgot to
1170 update the tox.ini file.
1171
1172 Fixes: 60044515a256c36afad0fc5efcb7ea946eb93783
1173
1174
1175 2023- 6- 8 Erik Skultety <[email protected]>
1176
1177 COPYING: Only ship a single license file COPYING
1178 The correct license we've used for a while is LGPLv2+, so drop the
1179 original.
1180
1181
1182
1183 2023- 6- 8 Erik Skultety <[email protected]>
1184
1185 setup: Simplify get_pkgconfig_data
1186 We don't need to do both None/non-None checks on the returned string.
1187
1188
1189
1190 2023- 6- 8 Erik Skultety <[email protected]>
1191
1192 setup: Move away from os.path to pathlib.Path
1193 Drops usage of the glob module along the way as pathlib integrates glob
1194 as well.
1195
1196
1197
1198 2023- 6- 7 Erik Skultety <[email protected]>
1199
1200 setup: styling: Don't mix top-level code with function/class definition
1201 It hinders readability so much when the top-level code that gets
1202 executed right away when setup.py is loaded is mixed in between type
1203 definitions.
1204
1205
1206
1207 2023- 6- 7 Erik Skultety <[email protected]>
1208
1209 setup: styling: Format multi-line arguments properly
1210
1211
1212 2023- 6- 7 Erik Skultety <[email protected]>
1213
1214 setup: styling: Adopt f-strings in favour of old-style string formatting
1215
1216
1217 2023- 6- 7 Erik Skultety <[email protected]>
1218
1219 setup: styling: Drop unexpected spaces when providing kwargs arguments
1220
1221
1222 2023- 6- 7 Erik Skultety <[email protected]>
1223
1224 setup: styling: Replace apostrophes with quotes
1225 Let's standardize on usage of one and be consistent with it.
1226
1227
1228
1229 2023- 6- 7 Erik Skultety <[email protected]>
1230
1231 setup: styling: Fix method/function/class spacing
1232 2 newlines in between classes/functions, 1 newline in between methods.
1233
1234
1235
1236 2023- 6- 7 Erik Skultety <[email protected]>
1237
1238 setup: Re-order the imports
1239 First go general, whole module imports, then specific symbol imports.
1240
1241
1242
1243 2023- 6- 7 Erik Skultety <[email protected]>
1244
1245 setup: Bump the minimum version of Python to 3.6
1246 3.6 is already EOL, but many platforms still default to Python 3.6 when
1247 it comes to the default platform Python package. Since we don't rely
1248 on any 3.7+ features in the bindings at the moment, let's keep
1249 everyone's life simpler and stay with 3.6 for now, we can bump it again
1250 in the future.
1251
1252
1253
1254 2023- 6- 7 Erik Skultety <[email protected]>
1255
1256 setup: Reduce the Python classifiers to "Python :: 3" only
1257 We're not good at tracking all the released Python 3 versions (+ we
1258 don't support Python 2 anymore).
1259 Additionally, future patches will take care of reporting the minimum
1260 required version of Python anyway through the 'python_requires' field
1261 which shows up correctly in PyPI.
1262
1263
1264
1265 2023- 6- 1 Jiri Denemark <[email protected]>
1266
1267 Post-release version bump to 9.5.0
1268
1269
1270 2023- 5- 31 Han Han <[email protected]>
1271
1272 virDomainMigrate3Params: Add missing params
1273 Add these missing migrate params:
1274 - VIR_MIGRATE_PARAM_DISKS_URI, since libvirt v6.8.0(49186372db)
1275 - VIR_MIGRATE_PARAM_TLS_DESTINATION, since libvirt v6.0.0(1b8af37213e)
1276 - VIR_MIGRATE_PARAM_COMPRESSION_ZLIB_LEVEL and VIR_MIGRATE_PARAM_COMPRESSION_ZSTD_LEVEL,
1277 since libvirt v9.4.0(150ae3e62b9)
1278
1279
1280
1281 2023- 5- 3 Erik Skultety <[email protected]>
1282
1283 ci: Drop Fedora 36 target
1284
1285
1286 2023- 5- 3 Erik Skultety <[email protected]>
1287
1288 ci: Add Fedora 38 target
1289
1290
1291 2023- 5- 3 Erik Skultety <[email protected]>
1292
1293 ci: Replace OpenSUSE Leap 15.4 target with Leap 15 name
1294 We now refer to the latest Leap 15.X simply as Leap 15 in lcitool.
1295
1296
1297
1298 2023- 5- 2 Jiri Denemark <[email protected]>
1299
1300 Post-release version bump to 9.4.0
1301
1302
1303 2023- 4- 26 Daniel P. Berrangé <[email protected]>
1304
1305 rpm: convert license to SPDX format
1306
1307
1308 2023- 4- 19 Jiri Denemark <[email protected]>
1309
1310 Post-release version bump to 9.3.0
1311
1312
1313 2023- 4- 19 Daniel P. Berrangé <[email protected]>
1314
1315 setup: limit pytest to 'tests' subdir
1316 The libvirt git repo contains test data that represents the
1317 layout of files in sysfs, which has two subdirs that mutually
1318 reference each other with symlinks.
1319
1320 When pytest does test discovery it will traverse every
1321 directory it finds underneath the libvirt-python checkout.
1322
1323 Since we checkout libvirt as a sub-dir, pytest traverses
1324 everything in libvirt git and gets stuck in an infinite
1325 loop following symlinks in the libvirt test data.
1326
1327 Telling pytest to only look at the 'tests' subdir avoids
1328 this extra traversal.
1329
1330
1331
1332 2023- 4- 19 Daniel P. Berrangé <[email protected]>
1333
1334 ci: pass --break-system-packages on Debian Sid
1335 Debian Sid python packages block users from installing packages using
1336 pip unless using a venv. A venv has no benefit when we are running in
1337 a throwaway container which has no need for software upgrades.
1338
1339
1340
1341 2023- 4- 19 Daniel P. Berrangé <[email protected]>
1342
1343 ci: mark bleeding edge distros as non-gating
1344 Fedora Rawhide, Debian Sid and OpenSUSE Tumbleweed are all liable to
1345 have sporadic failures due to being bleeding edge distros. Thus they
1346 should not gate contributor changes that are otherwise correct.
1347
1348
1349
1350 2023- 4- 19 Daniel P. Berrangé <[email protected]>
1351
1352 ci: regenerated with lcitool manifest
1353 This replaces OpenSUSE Leap 15.3 with 15.4
1354
1355
1356
1357 2023- 3- 1 Jiri Denemark <[email protected]>
1358
1359 Post-release version bump to 9.2.0
1360
1361
1362 2023- 2- 13 Michal Privoznik <[email protected]>
1363
1364 Fix sign compare offenders
1365 In a few places we compare signed and unsigned integers. In
1366 majority of cases it's because the iteration variable is declared
1367 as ssize_t but then in the for() loop it's compared against an
1368 unsigned int. But there is one case where the opposite happens
1369 (libvirt_virDomainSendKey()), or where an UINT_MAX (which is
1370 inherently unsigned) is compared against signed long.
1371
1372 Also, use this opportunity to decrease scope of 'j' variable
1373 inside of libvirt_virDomainInterfaceAddresses().
1374
1375
1376
1377 2023- 2- 13 Michal Privoznik <[email protected]>
1378
1379 Stop typecasting libvirt_intWrap() arguments
1380 There's no need to explicitly typecast arguments passed to
1381 libvirt_intWrap() as they are int or long already.
1382
1383
1384
1385 2023- 2- 13 Michal Privoznik <[email protected]>
1386
1387 libvirt-override: Don't typecast strlen() in debug printings
1388 After some data was read from an incoming stream, we debug print
1389 their length using strlen() (assuming its text stream, not binary
1390 stream). Anyway, the debug format uses %d which then requires
1391 strlen() to be typecasted. Well, we can use %zu and drop the
1392 typecast.
1393
1394
1395
1396 2023- 2- 13 Michal Privoznik <[email protected]>
1397
1398 libvirt_virConnectOpenAuth: Avoid plain PyLong_AsLong() call
1399 When constructing the list of credentials to pass to
1400 virConnectOpenAuth(), the virConnectAuth.credtype member is set
1401 via plain PyLong_AsLong() without any error checking. Well, the
1402 code relies on virConnectOpenAuth() to do sanity check of passed
1403 arguments.
1404
1405 Switch to libvirt_intUnwrap() which does check for errors and
1406 avoid needless trip to libvirt's public API upon error.
1407
1408
1409
1410 2023- 2- 13 Michal Privoznik <[email protected]>
1411
1412 libvirt_virNodeGetInfo fix
1413
1414
1415 2023- 2- 13 Michal Privoznik <[email protected]>
1416
1417 typewrappers: Drop typecast in libvirt_intWrap()
1418 The libvirt_intWrap() accepts an integer and passes it to
1419 PyLong_FromLong() which accepts a long. It's perfectly okay to
1420 let compiler do that implicitly.
1421
1422
1423
1424 2023- 2- 13 Michal Privoznik <[email protected]>
1425
1426 typewrappers: Rework libvirt_uintWrap()
1427 Python C API offers PyLong_FromUnsignedLong() which allows us to
1428 drop typecast.
1429
1430
1431
1432 2023- 2- 13 Michal Privoznik <[email protected]>
1433
1434 typewrappers: Rework libvirt_uintUnwrap()
1435 Python C API offers PyLong_AsUnsignedLong() which already raises
1436 an exception on negative values. Rewrite our libvirt_uintUnwrap()
1437 to use that and drop check for negative values.
1438
1439
1440
1441 2023- 1- 16 Jiri Denemark <[email protected]>
1442
1443 Post-release version bump to 9.1.0
1444
1445
1446 2023- 1- 12 Peter Krempa <[email protected]>
1447
1448 override: domain: Implement override for virDomainFDAssociate
1449 The bindings generator can't generate proper bindings for FD passing so
1450 the bindings need to be implemented manually both the python wrapper and
1451 the C backend.
1452
1453
1454
1455 2023- 1- 6 Erik Skultety <[email protected]>
1456
1457 ci: manifest: Define RPM artifacts for regular CentOS Stream 8 build
1458 Commit 7360326 missed the fact that artifacts were only defined for the
1459 libvirt Git type of libvirt-python build (git is cloned, libvirt is
1460 built and then libvirt-python) based on the
1461 'native_git_build_job_prebuilt_env' job template whereas libvirt CI
1462 expects the RPM artifacts to come from a job based on the
1463 'native_build_job' template instead.
1464
1465 Note that this patch is a hotfix to something which requires a proper
1466 cleanup to stay consistent with the way we're handling the same thing
1467 in libvirt-perl.
1468
1469
1470
1471 2023- 1- 6 Erik Skultety <[email protected]>
1472
1473 .gitignore: Ignore more common Python build artifacts
1474
1475
1476 2023- 1- 5 Erik Skultety <[email protected]>
1477
1478 ci: manifest: Define artifacts cache
1479 After commit 6e0d4d53 we lost RPM artifacts cache breaking the whole
1480 integration CI. The reason for that is that we manually defined the
1481 artifacts cache in gitlab.yml instead of manifest.yml. Naturally with
1482 the next lcitool update, gitlab.yml got overwritten according to
1483 manifest.yml which didn't define any artifacts cache.
1484
1485 Fixes: 6e0d4d53d51e8aa9d537e404a886eab131e311cc
1486
1487
1488
1489 2023- 1- 5 Erik Skultety <[email protected]>
1490
1491 ci: manifest: Replace 'expiry' with 'expire_in'
1492 'expiry' isn't a keyword in lcitool anymore, the only reason why
1493 everything has kept working despite lcitool updates is that lcitool
1494 sets 'expire_in' to 2 days by default.
1495
1496
1497
1498 2023- 1- 4 Erik Skultety <[email protected]>
1499
1500 ci: Refresh and add Fedora 37 target
1501
1502
1503 2022- 12- 1 Jiri Denemark <[email protected]>
1504
1505 Post-release version bump to 9.0.0
1506
1507
1508 2022- 11- 23 Daniel P. Berrangé <[email protected]>
1509
1510 rpm: add explicit build dep on python3-setuptools
1511 We previously got this implicitly via a dep from python3-pytest
1512 so never noticed that it was missing. The implicit dep is going
1513 away in rawhide real soon.
1514
1515
1516
1517 2022- 11- 1 Jiri Denemark <[email protected]>
1518
1519 Post-release version bump to 8.10.0
1520
1521
1522 2022- 10- 13 Peter Krempa <[email protected]>
1523
1524 ci: Expose built RPMs as artifacts
1525 Expose the artifacts from the centos-stream-8/9 and fedora 35/36 jobs so
1526 that the main libvirt integration testing project can consume them.
1527
1528 The new libvirt sub-rpm containing a python helper to access QMP
1529 directly requires python environment which we didn't yet install in the
1530 integration job.
1531
1532
1533
1534 2022- 10- 10 Chris Gunn <[email protected]>
1535
1536 Fix memory leak in libvirt_virStreamRecv.
1537 The libvirt_virStreamRecv function uses a temporary allocated buffer to
1538 receive data before copying the data into a Python byte array. But
1539 there are some error paths where this buffer is not freed. This change
1540 fixes that memory leak.
1541
1542
1543
1544 2022- 10- 3 Erik Skultety <[email protected]>
1545
1546 ci: Fix the stage of the api-coverage job
1547 The 'extends' stanza supports a list, however there's a merge algorithm
1548 in place where a subsequent list entry overwrites all conflicting
1549 settings from the previous one - which is exactly what happened here as
1550 the gitlab-build-{local,prebuilt}-env job template overwrote
1551 api-coverage's stage to 'builds' whereas the original was
1552 'sanity_checks'.
1553
1554 Fixes: 4733e2a2d13cb9a85127ba17c04cc29278b31e89
1555
1556
1557
1558 2022- 10- 3 Jiri Denemark <[email protected]>
1559
1560 Post-release version bump to 8.9.0
1561
1562
1563 2022- 9- 30 Daniel P. Berrangé <[email protected]>
1564
1565 ci: refresh with latest lcitool manifest
1566 This refresh switches the CI for contributors to be triggered by merge
1567 requests. Pushing to a branch in a fork will no longer run CI pipelines,
1568 in order to avoid consuming CI minutes. To regain the original behaviour
1569 contributors can opt-in to a pipeline on push
1570
1571 git push <remote> -o ci.variable=RUN_PIPELINE=1
1572
1573 This variable can also be set globally on the repository, though this is
1574 not recommended. Upstream repo pushes to branches will run CI.
1575
1576 The use of containers has changed in this update, with only the upstream
1577 repo creating containers, in order to avoid consuming contributors'
1578 limited storage quotas. A fork with existing container images may delete
1579 them. Containers will be rebuilt upstream when pushing commits with CI
1580 changes to the default branch. Any other scenario with CI changes will
1581 simply install build pre-requisite packages in a throaway environment,
1582 using the ci/buildenv/ scripts. These scripts may also be used on a
1583 contributor's local machines.
1584
1585 With pipelines triggered by merge requests, it is also now possible to
1586 workaround the inability of contributors to run pipelines if they have
1587 run out of CI quota. A project member can trigger a pipeline from the
1588 merge request, which will run in context of upstream, however, note
1589 this should only be done after reviewing the code for any malicious
1590 CI changes.
1591
1592
1593
1594 2022- 9- 9 Bastian Germann <[email protected]>
1595
1596 Link libvirtmod_* modules also with libvirt
1597 The -lvirt linker flag has to be added to the libvirtmod_qemu and
1598 libvirtmod_lxc modules as well.
1599
1600
1601
1602 2022- 9- 9 Bastian Germann <[email protected]>
1603
1604 Replace uint with unsigned int
1605 Mingw-w64 target does not support uint definition.
1606
1607
1608
1609 2022- 9- 1 Jiri Denemark <[email protected]>
1610
1611 Post-release version bump to 8.8.0
1612
1613
1614 2022- 8- 1 Jiri Denemark <[email protected]>
1615
1616 Post-release version bump to 8.7.0
1617
1618
1619 2022- 7- 8 Michal Privoznik <[email protected]>
1620
1621 libvirt-utils: Clear error when guessing typed param type
1622 Our APIs which accept typed parameters are usually exposed in
1623 python as accepting dictionary, for instance:
1624
1625 virDomainSetIOThreadParams(..., virTypedParameterPtr params, ...) ->
1626 virDomain.setIOThreadParams(..., {}, ...)
1627
1628 Now, before calling the C API, the dictionary is processed by
1629 virPyDictToTypedParams() which accepts an additional argument:
1630 array that hints types for each typed parameter. However, if a
1631 key is not in the array we guess what the correct type might be.
1632 This is done by attempting conversion from python into string, if
1633 that fails then into boolean, then into long, only to fall back
1634 to double. Now, for the long type we can have two cases: the
1635 value is non-negative (ULL) or it is negative (LL). Therefore, we
1636 firstly attempt ULL case and if that fails we stick with the
1637 latter.
1638
1639 However, after we attempted the ULL conversion, python records an
1640 error internally (which is then queried via PyErr_Occurred()),
1641 but the error is never cleared out. This leads to spurious paths
1642 taken afterwards: e.g. when libvirt_longlongUnwrap() is trying to
1643 convert -1, it fails. But not rightfully - the PyErr_Occurred()
1644 check it performs has nothing to do with any of its actions,
1645 rather than our guessing work done before.
1646
1647 Therefore, clear the error after we've guessed the type.
1648
1649
1650
1651 2022- 7- 8 Michal Privoznik <[email protected]>
1652
1653 Add VIR_DOMAIN_IOTHREAD_THREAD_POOL_{MIN,MAX} macros
1654 The python version of virDomainSetIOThreadParams
1655 (setIOThreadParams()), expects two arguments on input: the thread
1656 ID and a dictionary which is then translated into our typed
1657 parameters. During this translation we use a helper array which
1658 holds type for each typed parameter supported
1659 (virPyDomainSetIOThreadParams[]). Otherwise we guess what the
1660 correct type is. Now, when introducing
1661 VIR_DOMAIN_IOTHREAD_THREAD_POOL_{MIN,MAX} typed params into
1662 libvirt I forgot to update the array. Do that now.
1663
1664
1665
1666 2022- 7- 1 Jiri Denemark <[email protected]>
1667
1668 Post-release version bump to 8.6.0
1669
1670
1671 2022- 6- 25 Pino Toscano <[email protected]>
1672
1673 setup: make 'clean' command compatible again with distutils
1674 After the switch of 'my_clean' to a simple Command, the 'clean' command
1675 has no more bits for options, resulting in distutils (either external
1676 or embedded in setuptools) complaining about it:
1677
1678 distutils.errors.DistutilsClassError: command class <class '__main__.my_clean'> must provide 'user_options' attribute (a list of tuples)
1679
1680 To overcome that, provide all the standard bits from options, i.e. the
1681 'user_options' list, and the 'initialize_options' & 'finalize_options'
1682 methods. In addition, add a dummy 'all' option, as distutils wants it:
1683
1684 error: error in [...]/.pydistutils.cfg: command 'my_clean' has no such option 'all'
1685
1686 Fixes commit a965c91c6fa1275613edbbef75c0422574eb9ff2
1687
1688
1689
1690 2022- 6- 8 Daniel P. Berrangé <[email protected]>
1691
1692 setup: advertize Python 3.9 and 3.10 support
1693 Add classifiers that indicate we intend to support python versions
1694 3.9 and 3.10.
1695
1696
1697
1698 2022- 6- 8 Daniel P. Berrangé <[email protected]>
1699
1700 examples: remove use of deprecated setDaemon method
1701 In Python 3.10 the setDaemon method was deprecated. It is redundant
1702 since the 'daemon' parameter can be given when creating the thread,
1703 or the 'daemon' attribute can be set after it was created.
1704
1705
1706
1707 2022- 6- 8 Daniel P. Berrangé <[email protected]>
1708
1709 tests: expand AIO tests and add more comments
1710 Add a test for one more usage scenario that was possible in the past,
1711 whereby libvirt events are registered before starting the asyncio
1712 loop, but we let libvirt find the loop associated with the current
1713 thread.
1714
1715 Skip the test relies on auto-creating an event loop with Python >= 3.10
1716 since it now triggers a deprecation warning which will soon turn into a
1717 RuntimeError.
1718
1719
1720
1721 2022- 6- 8 Daniel P. Berrangé <[email protected]>
1722
1723 tests: use mocks to allow calling virEventRegisterImpl many times
1724 We currently have to run each of the test_aio.py test cases in a
1725 separate process, because libvirt.virEventRegisterImpl can only be
1726 called once per process. This leads to quite unpleasant console
1727 output when running tests.
1728
1729 By introducing a mock for libvirt.virEventRegisterImpl we can
1730 regain the ability to run everything in a single process. The only
1731 caveat is that it relies on tests to fully cleanup, but in practice
1732 this is ok for our current tests.
1733
1734
1735
1736 2022- 6- 8 Chris Gunn <[email protected]>
1737
1738 tests: add libvirtaio test coverage
1739
1740
1741 2022- 6- 8 Daniel P. Berrangé <[email protected]>
1742
1743 libvirtaio: add better docs on best practice usage pattern
1744
1745
1746 2022- 6- 8 Daniel P. Berrangé <[email protected]>
1747
1748 libvirtio: lazy create the Event object in drain()
1749 The drain method uses an asyncio.Event object to be notified when other
1750 coroutines have removed all registered callbacks. The Event object needs
1751 to be associated with the coroutine that the event loop is running with
1752 and currently this is achieved by passing in the 'loop' parameter.
1753
1754 Unfortunately Python 3.10 has removed the 'loop' parameter and now the
1755 object is associated implicitly with the current thread's event loop.
1756 At the time the virEventAsyncIOImpl constructor is called, however,
1757 there is no guarantee that an event loop has been set for the thread.
1758 The explicitly passed in 'loop' parameter would handle this scenario.
1759
1760 For portability with Python >= 3.10 we need to delay creation of the
1761 Event object until we have a guarantee that there is a loop associated
1762 with the current thread. This is achieved by lazily creating the Event
1763 object inside the 'drain' method, which is expected to be invoked from
1764 coroutine context and thus ensure a loop is associated.
1765
1766
1767
1768 2022- 6- 8 Chris Gunn <[email protected]>
1769
1770 libvirtaio: convert to using 'async' / 'await' syntax
1771 The 'async' keyword is new in Python 3.5, as a way to declare that a
1772 method is a coroutine. This replaces the '@asyncio.coroutine' decorator
1773 that is deprecated since 3.8 and scheduled to be removed in 3.11
1774
1775 The 'await' keyword has to be used instead of 'yield' from any
1776 coroutines declared with 'async'.
1777
1778 [DB: Split off from a larger patch mixing multiple changes]
1779
1780
1781 2022- 6- 8 Chris Gunn <[email protected]>
1782
1783 libvirtaio: drop back compat for python < 3.4.4
1784 setup.py ensures we have python >= 3.5, so there is no need to do
1785 back compat with the 'asyncio.ensure_future' method, which was new
1786 in 3.4.4
1787
1788 [DB: Split off from a larger patch mixing multiple changes]
1789
1790
1791 2022- 6- 1 Jiri Denemark <[email protected]>
1792
1793 Post-release version bump to 8.5.0
1794
1795
1796 2022- 5- 13 Michal Privoznik <[email protected]>
1797
1798 Add an override impl for virDomainRestoreParams and virDomainSaveParams
1799
1800
1801 2022- 5- 2 Jiri Denemark <[email protected]>
1802
1803 Post-release version bump to 8.4.0
1804
1805
1806 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1807
1808 setup: switch to running API coverage test using pytest
1809 The API coverage test is no longer a special case.
1810
1811
1812
1813 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1814
1815 sanitytest: skip tests when seeing broken lxml implementation
1816 The python lxml registers some global callbacks with libxml2. As a
1817 result when another user of libxml2 calls APIs, it can trigger the
1818 python callbacks that lxml previously registered. Execution of the
1819 python callbacks in this case is often unsafe and leads to SEGVs.
1820
1821 This hasn't been a problem since the sanitytest.py test has been
1822 a standalone program we execute. When it gets turned into a real
1823 python unit test, it will run in the same process as all the other
1824 tests and trigger the crash.
1825
1826 A mitigation was added in lxml 4.5.2 which is good enough to let
1827 us continuing using lxml.
1828
1829
1830
1831 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1832
1833 sanitytest: turn into a normal python unittest
1834 The sanitytest.py file is now using the normal python unittest
1835 pattern, though we invoke the one test explicitly for now.
1836
1837
1838
1839 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1840
1841 sanitytest: move function/enum identification into a helper method
1842 This is a step towards turning the sanitytest.py file into a normal
1843 python unittest.
1844
1845 Best viewed with the '-b' flag to diff.
1846
1847
1848
1849 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1850
1851 sanitytest: move class identification into a helper method
1852 This is a step towards turning the sanitytest.py file into a normal
1853 python unittest.
1854
1855 Best viewed with the '-b' flag to diff.
1856
1857
1858
1859 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1860
1861 sanitytest: move initial class method mapping into a helper method
1862 This is a step towards turning the sanitytest.py file into a normal
1863 python unittest.
1864
1865 Best viewed with the '-b' flag to diff.
1866
1867
1868
1869 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1870
1871 sanitytest: move class method mapping fixup into a helper method
1872 This is a step towards turning the sanitytest.py file into a normal
1873 python unittest.
1874
1875 Best viewed with the '-b' flag to diff.
1876
1877
1878
1879 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1880
1881 sanitytest: move C to python API mapping check into a helper method
1882 This is a step towards turning the sanitytest.py file into a normal
1883 python unittest.
1884
1885 Best viewed with the '-b' flag to diff.
1886
1887
1888
1889 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1890
1891 sanitytest: move python to C API mapping check into a helper method
1892 This is a step towards turning the sanitytest.py file into a normal
1893 python unittest.
1894
1895 Best viewed with the '-b' flag to diff.
1896
1897
1898
1899 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1900
1901 sanitytest: move C API binding check into a helper method
1902 This is a step towards turning the sanitytest.py file into a normal
1903 python unittest.
1904
1905 Best viewed with the '-b' flag to diff.
1906
1907
1908
1909 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1910
1911 sanitytest: stop passing python module path into sanity test
1912 We want to move over to make sanitytest.py operate like a more normal
1913 test script, which means making it self contained.
1914
1915 The setup.py already sets the PYTHONPATH thanks to changes introduced
1916 in:
1917
1918 commit eaded7bdadf3ccdc4b208ec0ed65a1b23b8b5f69
1919 Author: Daniel P. Berrange <[email protected]>
1920 Date: Tue Mar 18 11:11:48 2014 +0000
1921
1922 Add support for running unit tests with nose
1923
1924 so passing the python module path into sanitytest.py is redundant.
1925
1926
1927
1928 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1929
1930 sanitytest: stop passing API XML path into sanity test
1931 We want to move over to make sanitytest.py operate like a more normal
1932 test script, which means making it self contained.
1933
1934 The test already knows how to find the libvirt API XML path using
1935 pkg-config and if an override location is required, this can be done
1936 by pointing $PKG_CONFIG_PATH to a suitable place.
1937
1938
1939
1940 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1941
1942 setup: switch from distutils to setuptools
1943 The distutils package is deprecated and targetted for deletion in Python
1944 3.12, so we need to switch to setuptools. Thanks to all the preceeding
1945 changes this is no more difficult than changing the import statements.
1946
1947 Closes https://gitlab.com/libvirt/libvirt-python/-/issues/1
1948
1949
1950 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1951
1952 setup: remove use of distutils.util.get_platform
1953 The 'get_platform' function is used to determine the platform specific
1954 component of the build output directory containing the loadable
1955 modules and python code. There is no nice replacement for this
1956 function, but we can achieve our goal by simply scaning for the desired
1957 subdirectory, which should exist by the time 'test' runs.
1958
1959
1960
1961 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1962
1963 setup: override 'build_ext' / 'build_py' commands rather than 'build'
1964 We override the 'build' command to invoke the code generator before the
1965 extensions are compiled. The 'build' command, however, is merely a
1966 wrapper around several other commands. It is possible for the user to
1967 directly invoke those commands, in which case our code generator won't
1968 get a chance to run:
1969
1970 $ python setup.py build_ext
1971 running build_ext
1972 building 'libvirtmod' extension
1973 creating build/temp.linux-x86_64-3.10
1974 creating build/temp.linux-x86_64-3.10/build
1975 gcc ..snip... -c build/libvirt.c -o build/temp.linux-x86_64-3.10/build/libvirt.o
1976 cc1: fatal error: build/libvirt.c: No such file or directory
1977 compilation terminated.
1978 error: command '/usr/lib64/ccache/gcc' failed with exit code 1
1979
1980 To solve this we instead override 'build_ext' and 'build_py'. This in
1981 turn means we call the generator to emit C code separately from Python
1982 code.
1983
1984
1985
1986 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1987
1988 setup: replace distutils.dir_util.remove_tree with shutils
1989 The distutils.dir_util.remove_tree method has no compelling benefit
1990 over using the standard python shutils module.
1991
1992
1993
1994 2022- 4- 21 Daniel P. Berrangé <[email protected]>
1995
1996 setup: replace distutils.spawn with subprocess
1997 The distutils.spawn method has no compelling benefit over using the
1998 standard python subprocess module.
1999
2000
2001
2002 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2003
2004 setup: replace distutils.spawn.find_executable with shutils
2005 The distutils.spawn.find_executable method has no compelling benefit
2006 over using the standard python shutils module.
2007
2008
2009
2010 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2011
2012 setup: introduce an explicit check for pkg-config operation
2013 Instead of searching for the pkg-config binary manually, just try to run
2014 it and catch the exception raised if it isn't found. Use the --version
2015 flag as a way to validate that it is at least somewhat functional.
2016
2017
2018
2019 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2020
2021 setup: stop inheriting from 'clean' command
2022 The default 'clean' command impl deletes only intermediate files from
2023 the 'build' directory. We've overridden it to delete everything. There
2024 is no benefit in inheriting from the default impl, given our subclass
2025 will delete everything.
2026
2027
2028
2029 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2030
2031 setup: drop the 'rpm' command
2032 This duplicates funtionality already provided by the 'bdist_rpm'
2033 command.
2034
2035
2036
2037 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2038
2039 generator: introduce ability to selectively generate code
2040 Currently we always generate both the C code and Python code at the same
2041 time. To cope with following changes to the build process, we want to be
2042 able to generate C and Python separately.
2043
2044
2045
2046 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2047
2048 generator: rename methods for code generation
2049 The names make it clearer exactly what is being generated by each.
2050
2051
2052
2053 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2054
2055 generator: split function skip logic out of C generator
2056 The python generator needs to know whether certain functions were
2057 skipped in the C generator. This is achieved by the C generator
2058 deleting skipped functions as it runs. This is an unhelpful side
2059 effect as it makes it impossible to run the python generator
2060 without first running the C generator.
2061
2062 This refactors buildStubs to get rid of the global side effects
2063 it has, by providing some helper functions for buildWrappers
2064 to use.
2065
2066
2067
2068 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2069
2070 generator: split function type validation out of C generator
2071 As a side effect of generating the C code, the buildStubs methods
2072 checks for various unsupported types and reports errors. This is
2073 an undesirable side effect, if we want to skip C code generation.
2074
2075 Splitting function type validation out into a separate method
2076 allows better reuse.
2077
2078
2079
2080 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2081
2082 generator: split loading of APIs out from writing stubs
2083 The buildStubs method has a side effect of loading and parsing the API
2084 XML files, which the buildWrappers method then relies on.
2085
2086 Splitting API loading into a separate method will facilitate running
2087 only the buildWrappers method in future.
2088
2089
2090
2091 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2092
2093 generator: merge python wrapper generator methods
2094 Instead of having three separate methods for generating python
2095 wrappers, merge them all together.
2096
2097
2098
2099 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2100
2101 generator: refactor buildWrappers to make it more generic
2102 Prepare for using buildWrappers to generate code for the QEMU / LXC
2103 APIs too.
2104
2105
2106
2107 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2108
2109 generator: simplify some repeated code patterns
2110 Now that we're using common data structures for all the main libvirt,
2111 QEMU and LXC APIs, several of the functions have code duplication
2112 that can be eliminated.
2113
2114
2115
2116 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2117
2118 generator: use single function for registering all enums
2119 Now that we only use a single dict for tracking all enums, we
2120 only need a single function for registering them.
2121
2122
2123
2124 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2125
2126 generator: use single dict for tracking all enums
2127 A single invokation of the generator only handles processing of one
2128 libvirt API module, so there is no need to use separate dicts for
2129 tracking enums.
2130
2131
2132
2133 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2134
2135 generator: use single function for registering all functions
2136 Now that we only use a single dict for tracking all functions, we
2137 only need a single function for registering them.
2138
2139
2140
2141 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2142
2143 generator: use single dict for tracking all skipped functions
2144 A single invokation of the generator only handles processing of one
2145 libvirt API module, so there is no need to use separate dicts for
2146 tracking skipped functions.
2147
2148
2149
2150 2022- 4- 21 Daniel P. Berrangé <[email protected]>
2151
2152 generator: use single dict for tracking all functions
2153 A single invokation of the generator only handles processing of one
2154 libvirt API module, so there is no need to use separate dicts for
2155 tracking functions.
2156
2157
2158
2159 2022- 4- 1 Jiri Denemark <[email protected]>
2160
2161 Post-release version bump to 8.3.0
2162
2163
2164 2022- 3- 28 Daniel P. Berrangé <[email protected]>
2165
2166 gitlab: switch to using 'pip' for package installation
2167 The distutils/setuptools 'install' command is deprecated in favour of
2168 'pip', and with recent versiosn, using it will create a bad install
2169 that triggers a traceback on all future use of setuptools:
2170
2171 Traceback (most recent call last):
2172 File "/builds/berrange/libvirt-python/setup.py", line 328, in <module>
2173 setup(name = 'libvirt-python',
2174 File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 154, in setup
2175 _install_setup_requires(attrs)
2176 File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 143, in _install_setup_requires
2177 dist = MinimalDistribution(attrs)
2178 File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 135, in __init__
2179 super().__init__(filtered)
2180 File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 456, in __init__
2181 for ep in metadata.entry_points(group='distutils.setup_keywords'):
2182 File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 1009, in entry_points
2183 return SelectableGroups.load(eps).select(**params)
2184 File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 459, in load
2185 ordered = sorted(eps, key=by_group)
2186 File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 1006, in <genexpr>
2187 eps = itertools.chain.from_iterable(
2188 File "/usr/lib64/python3.10/importlib/metadata/_itertools.py", line 16, in unique_everseen
2189 k = key(element)
2190 File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 941, in _normalized_name
2191 return self._name_from_stem(stem) or super()._normalized_name
2192 File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 622, in _normalized_name
2193 return Prepared.normalize(self.name)
2194 File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 871, in normalize
2195 return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
2196 File "/usr/lib64/python3.10/re.py", line 209, in sub
2197 return _compile(pattern, flags).sub(repl, string, count)
2198
2199 This is certainly a bug in distutils/setuptools, but given the
2200 'install' command is deprecated, instead of waiting for a fix,
2201 just switch to the recommend 'pip install .' command.
2202
2203
2204
2205 2022- 3- 28 Daniel P. Berrangé <[email protected]>
2206
2207 ci: refresh from lcitool manifest
2208 This drops the CentOS 8 job and replaces Fedora 33 with 35.
2209
2210
2211
2212 2022- 3- 10 Michal Privoznik <[email protected]>
2213
2214 Implement virDomainQemuMonitorCommandWithFiles() override
2215 With libvirt-8.2.0 there's a new API:
2216 virDomainQemuMonitorCommandWithFiles(). Since the API has both
2217 input and output arguments we need to provide an alternative
2218 implementation. Moreover, since FD passing works only on
2219 UNIX-like systems we can query the returned FDs for their flags
2220 and construct mode for python File object.
2221
2222
2223
2224 2022- 3- 1 Jiri Denemark <[email protected]>
2225
2226 Post-release version bump to 8.2.0
2227
2228
2229 2022- 2- 11 Daniel P. Berrangé <[email protected]>
2230
2231 add missing files to MANIFEST.in
2232
2233
2234 2022- 1- 14 Jiri Denemark <[email protected]>
2235
2236 Post-release version bump to 8.1.0
2237
2238
2239 2022- 1- 5 Daniel P. Berrangé <[email protected]>
2240
2241 Add an override impl for virDomainSetLaunchSecurityState
2242
2243
2244 2021- 12- 1 Jiri Denemark <[email protected]>
2245
2246 Post-release version bump to 8.0.0
2247
2248
2249 2021- 12- 1 Daniel P. Berrangé <[email protected]>
2250
2251 Switch to new GitHub repo-lockdown configuration
2252 The repo-lockdown service used to run as a bot outside GitHub, but has
2253 now switched to using the GitHub Actions workflow framework. This
2254 requires use of a new configuration file.
2255
2256
2257
2258 2021- 11- 1 Jiri Denemark <[email protected]>
2259
2260 Post-release version bump to 7.10.0
2261
2262
2263 2021- 10- 8 Daniel P. Berrangé <[email protected]>
2264
2265 Add support for domain event for memory device size change
2266
2267
2268 2021- 10- 1 Jiri Denemark <[email protected]>
2269
2270 Post-release version bump to 7.9.0
2271
2272
2273 2021- 9- 24 Michal Privoznik <[email protected]>
2274
2275 sanitytest: Add virNetworkCreateXMLFlags() to list of name fixups
2276 When checking whether each C API is exported to Python and vice
2277 versa the sanitytest script is doing some name fixing. For
2278 instance virNetworkCreateXML() is translated into
2279 virConnect.networkCreateXML(). However, we have new C API on the
2280 way: virNetworkCreateXMLFlags() which is not on the list for
2281 these name fixups. Add it there.
2282
2283 Mind you, the python code generator works just fine because
2284 generator.py:1082 compares just the prefix.
2285
2286
2287
2288 2021- 9- 21 Jonathon Jongsma <[email protected]>
2289
2290 Don't mention email patch submission in README
2291 Since patches are now submitted via gitlab merge requests, don't mention
2292 mailing list patch submission in the README. Point to the CONTRIBUTING
2293 file instead.
2294
2295
2296
2297 2021- 9- 21 Jonathon Jongsma <[email protected]>
2298
2299 Update readme to mention pytest instead of nose
2300 Commit a376a2ab switch from python-nose to python-pytest for tests, but
2301 the README was not updated.
2302
2303
2304
2305 2021- 9- 21 Jonathon Jongsma <[email protected]>
2306
2307 Add new autostart API for node devices
2308 Provide a manual override for the virNodeDeviceGetAutostart() API
2309 modeled on what's done for the network and storage APIs.
2310
2311
2312
2313 2021- 9- 2 Daniel P. Berrangé <[email protected]>
2314
2315 ci: remove obsolete refresh script and documentation
2316 We now use lcitool's manifest feature to generate files.
2317
2318
2319
2320 2021- 9- 2 Daniel P. Berrangé <[email protected]>
2321
2322 ci: re-generate containers/gitlab config from manifest
2323 This uses the command "lcitool manifest ci/manifest.yml" to re-generate
2324 all existing dockerfiles and gitlab CI config.
2325
2326
2327
2328 2021- 9- 2 Daniel P. Berrangé <[email protected]>
2329
2330 ci: define a CI manifest file
2331 This is to be used with the command "lcitool manifest ci/manifest.yml"
2332 to re-generate all existing dockerfiles and gitlab CI config.
2333
2334
2335
2336 2021- 9- 1 Daniel P. Berrangé <[email protected]>
2337
2338 rpm: drop support for RHEL-7
2339 We no longer support libvirt on this distro
2340
2341
2342
2343 2021- 9- 1 Jiri Denemark <[email protected]>
2344
2345 Post-release version bump to 7.8.0
2346
2347
2348 2021- 8- 2 Jiri Denemark <[email protected]>
2349
2350 Post-release version bump to 7.7.0
2351
2352
2353 2021- 7- 27 Daniel P. Berrangé <[email protected]>
2354
2355 gitlab: use custom docker:dind image
2356 The current docker:dind container has broken default seccomp filter that
2357 results in clone3 being blocked, which in turn breaks Fedora 35 rawhide.
2358
2359 This custom image has a workaround that causes the seccomp filter to
2360 return ENOSYS for clone3 instad of EPERM, thus triggering glibc to
2361 fallback to clone correctly.
2362
2363
2364
2365 2021- 7- 1 Jiri Denemark <[email protected]>
2366
2367 Post-release version bump to 7.6.0
2368
2369
2370 2021- 6- 25 Peter Krempa <[email protected]>
2371
2372 Fix BlockThreshold Callback argument conversion once more
2373 The conversion was changed from "OssiiO" to "OssLLO". Unfortunately the
2374 arguments are unsigned long long, where the proper coversion character
2375 is 'K'.
2376
2377 Fixes: https://gitlab.com/libvirt/libvirt-python/-/merge_requests/40
2378 Fixes: fd069ac85c8cf1593587dc9287a3d5eb6bd4bdb9
2379 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1976109
2380
2381
2382 2021- 6- 1 Jiri Denemark <[email protected]>
2383
2384 Post-release version bump to 7.5.0
2385
2386
2387 2021- 5- 27 w00506750 <[email protected]>
2388
2389 iothread: fix memory access out of bounds
2390 When the 'pcpu' is larger then the last 'iothr->cpumap' bits,
2391 set the list element to False to avoid out of bounds access
2392 'iothr->cpumap'.
2393
2394 Reviewed-by: Hogan Wang <[email protected]>
2395
2396
2397 2021- 5- 27 Jiri Denemark <[email protected]>
2398
2399 Post-release version bump to 7.4.0
2400
2401
2402 2021- 5- 25 Daniel P. Berrangé <[email protected]>
2403
2404 containers: refresh containers with latest libvirt-ci
2405
2406
2407 2021- 5- 25 Daniel P. Berrangé <[email protected]>
2408
2409 gitlab: don't set RPM variable on container job
2410
2411
2412 2021- 5- 25 Daniel P. Berrangé <[email protected]>
2413
2414 gitlab: add OpenSUSE Tumbleweed container and build
2415
2416
2417 2021- 5- 25 Daniel P. Berrangé <[email protected]>
2418
2419 gitlab: introduce Fedora 34 container and build
2420
2421
2422 2021- 5- 25 Daniel P. Berrangé <[email protected]>
2423
2424 gitlab: rename opensuse-152 to opensuse-leap-152
2425
2426
2427 2021- 5- 25 Daniel P. Berrangé <[email protected]>
2428
2429 gitlab: rename centos-stream to centos-stream-8
2430
2431
2432 2021- 5- 25 Daniel P. Berrangé <[email protected]>
2433
2434 gitlab: drop Fedora 32 container and build
2435
2436
2437 2021- 5- 25 Daniel P. Berrangé <[email protected]>
2438
2439 gitlab: drop centos-7 container and build
2440
2441
2442 2021- 4- 15 Michal Privoznik <[email protected]>
2443
2444 generator.py: Untangle virNodeDevice name fixup
2445 The way that virNodeDevice method name fixup is written makes it
2446 hard to find via grep (matching the virNodeDevice prefix and then
2447 matching only the operation like "Get", "Lookup", ...). Expand
2448 the string matching to match the pattern of other cases.
2449
2450
2451
2452 2021- 4- 15 Michal Privoznik <[email protected]>
2453
2454 generator.py: Fix method names for new virNodeDevice*() APIs
2455 In the 7.3.0 release we are going to have three new public APIs:
2456
2457 virNodeDeviceDefineXML()
2458 virNodeDeviceUndefine()
2459 virNodeDeviceCreate()
2460
2461 The first one is slightly problematic, because it takes
2462 virConnectPtr argument and thus our generator wants to put its
2463 wrapper under virConnect python class, which is correct, but
2464 what's incorrect is the name it chooses for the method:
2465 defineXML(). Such method already exists and wraps
2466 virDomainDefineXML() around. Also, the name is rather confusing
2467 anyway - it's missing the 'nodeDevice' prefix.
2468
2469 Fortunately, the fix is easy - add another case into nameFixup().
2470
2471 The story with virNodeDeviceCreate() is similar. Except, this time
2472 the class in which the method was put is correct. But the name is
2473 still wrong, because our generator matched 'virNodeDeviceCreate'
2474 thinking it's the good old virNodeDeviceCreateXML() API and
2475 "fixed" the name of the method to nodeDeviceCreate().
2476
2477 Luckily, virNodeDeviceUndefine() is just fine.
2478
2479
2480
2481 2021- 4- 12 Ján Tomko <[email protected]>
2482
2483 spec: use pytest instead of nose
2484
2485
2486 2021- 4- 12 Daniel P. Berrangé <[email protected]>
2487
2488 rpm: use HTTPS for URLs
2489
2490
2491 2021- 4- 9 Daniel P. Berrangé <[email protected]>
2492
2493 Don't run sanity checks by default
2494 The sanity check scripts verify that the binding covers all APIs in the
2495 libvirt library/headers being built against. This is primarily there for
2496 libvirt maintainers to identify when there are gaps in API coverage.
2497
2498 This is not something downstream consumers of libvirt-python should be
2499 running themselves, so we shouldn't added it to tests by default.
2500
2501 In addition if people are working on branches or submitting merge
2502 requests for python changes, we shouldn't block their work for failed
2503 API coverage sanity tests, if the python binding otherwise builds fine
2504 and passes regular unit tests.
2505
2506 Thus, we introduce a new gitlab job "api-coverage" with some conditions:
2507
2508 - If pushing to a branch, the job is treated as non-fatal
2509 - For regular scheduled builds, it is mandatory
2510 - Don't run in any other scenarios
2511
2512 This job uses the artifacts from the centos-8-git-build job and re-runs
2513 the test suite, requesting the sanity tests to be run too.
2514
2515 This will achieve the result of letting us see missing API coverage
2516 in nightly builds, without blocking other contributions.
2517
2518
2519
2520 2021- 4- 7 Ján Tomko <[email protected]>
2521
2522 tests: use assertEqual instead of assertEquals
2523 tests/test_conn.py:17: DeprecationWarning: Please use assertEqual instead.
2524
2525
2526
2527 2021- 4- 7 Ján Tomko <[email protected]>
2528
2529 ci: refresh containers for nose->pytest switch
2530 Matches libvirt-ci commit facd5d855c97bf5b127ff9bf245c8fdf514dd916
2531
2532
2533
2534 2021- 4- 7 Ján Tomko <[email protected]>
2535
2536 setup: use pytest instead of nose to run the test suite
2537 The software we use for running tests - nose - has been
2538 deprecated in favor of nose2.
2539
2540 We don't use anything nose-specific, just unittest.TestCase,
2541 which pytest can handle just fine.
2542
2543 Switch to using pytest, which we already use for libvirt-dbus.
2544
2545
2546
2547 2021- 4- 7 Ján Tomko <[email protected]>
2548
2549 setup: drop have_libvirtaio
2550 This function says we have libvirtaio on Python >= 3.3,
2551 however we already mandate Python >= 3.5 at the start of the file.
2552
2553
2554
2555 2021- 4- 7 Andrea Bolognani <[email protected]>
2556
2557 ci: Move dco job to sanity_checks stage
2558 If the DCO check fails we still want the pipeline to fail, but
2559 that doesn't mean there's no value in running the other jobs to
2560 get a better picture.
2561
2562
2563
2564 2021- 4- 7 Andrea Bolognani <[email protected]>
2565
2566 ci: Use 'extends' GitLab CI feature
2567 This is the recommended way to use templates in job
2568 definitions.
2569
2570
2571
2572 2021- 4- 6 Ján Tomko <[email protected]>
2573
2574 ci: drop openSUSE leap 15.1 in favor of 15.2
2575
2576
2577 2021- 4- 6 Ján Tomko <[email protected]>
2578
2579 ci: refresh dockerfiles
2580 Refresh to match libvirt-ci commit 94c25bde639eb31ff2071fb6abfd3d5c777f4ab2
2581
2582
2583
2584 2021- 4- 1 Jiri Denemark <[email protected]>
2585
2586 Post-release version bump to 7.3.0
2587
2588
2589 2021- 3- 1 Jiri Denemark <[email protected]>
2590
2591 Post-release version bump to 7.2.0
2592
2593
2594 2021- 3- 1 renlei4 <[email protected]>
2595
2596 Fix wrong type for BlockThreshold Callback
2597 type of threshold and excess are unsigned long long,
2598 but PyObject_CallMethod incorrectly set it to int.
2599
2600 if threshold or excess greater than 0x7FFFFFFF(max int),
2601 those variables will overflow.
2602
2603
2604
2605 2021- 2- 15 Daniel P. Berrangé <[email protected]>
2606
2607 Add impl override for virDomainGetMessages
2608
2609
2610 2021- 2- 9 Beraldo Leal <[email protected]>
2611
2612 improving readme with requirements
2613 When installing this library in a fresh system, some basic packages are
2614 necessary to compile and run. This patch will add basic instructions
2615 with some requirements to help new contributors and users.
2616
2617
2618
2619 2021- 1- 15 Jiri Denemark <[email protected]>
2620
2621 Post-release version bump to 7.1.0
2622
2623
2624 2020- 12- 15 Daniel P. Berrangé <[email protected]>
2625
2626 ci: refresh containers for CentOS-8 PowerTools repo rename
2627 A recent CentOS-8 update renamed the "PowerTools" repo to "powertools"
2628 and since dnf is case sensitive wrt repo names, this broke ability to
2629 build new containers.
2630
2631 The refresh fixes the repo name and pulls in other misc improvements
2632 to containers.
2633
2634
2635
2636 2020- 12- 3 Daniel P. Berrangé <[email protected]>
2637
2638 Avoid signed/unsigned warnings in loop over SSH keys
2639 libvirt-override.c: In function ‘libvirt_virDomainAuthorizedSSHKeysGet’:
2640 libvirt-override.c:10455:19: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
2641 10455 | for (i = 0; i < nkeys; i++)
2642 | ^
2643
2644
2645
2646 2020- 12- 1 Daniel P. Berrangé <[email protected]>
2647
2648 gitlab: replace "libvirt-" prefix with "ci-" in dockerfiles
2649 This makes the dockerfile name match the output container name
2650
2651
2652
2653 2020- 12- 1 Daniel P. Berrangé <[email protected]>
2654
2655 gitlab: refresh containers with lcitool for fully minimized base
2656
2657
2658 2020- 12- 1 Daniel P. Berrangé <[email protected]>
2659
2660 gitlab: re-generate container images from lcitool
2661 This introduces Fedora 33 and removes some redundant packages.
2662
2663
2664
2665 2020- 12- 1 Daniel P. Berrangé <[email protected]>
2666
2667 gitlab: move dockerfiles into ci/containers sub-directory
2668 This brings the repo into alignment with the main libvirt.git practice.
2669
2670
2671
2672 2020- 12- 1 Jiri Denemark <[email protected]>
2673
2674 Post-release version bump to 7.0.0
2675
2676
2677 2020- 11- 27 Erik Skultety <[email protected]>
2678
2679 MANIFEST.in: Distribute MANIFEST.in in the source tarball
2680 Follow the same procedure as we do with specfiles in the main library
2681 where we distribute libvirt.spec.in along with the generated
2682 libvirt.spec inside the tarball.
2683
2684 Fixes: https://gitlab.com/libvirt/libvirt-python/-/issues/5
2685
2686
2687
2688 2020- 11- 19 Michal Privoznik <[email protected]>
2689
2690 Implement virDomainAuthorizedSSHKeys{Get,Set}
2691 Both APIs work with string lists (the getter returns it, the
2692 setter gets keys to set from it) -> represent that as a python
2693 list. The rest is kept as is in C.
2694
2695
2696
2697 2020- 11- 12 Daniel P. Berrangé <[email protected]>
2698
2699 Add support for memory failure event callbacks
2700
2701
2702 2020- 11- 12 Daniel P. Berrangé <[email protected]>
2703
2704 Replace deprecated PyEval_CallObject with PyObject_Call
2705 The former is deprecated since Python 3.9, and the latter has existed
2706 for all 3.x and probably before.
2707
2708
2709
2710 2020- 11- 12 Daniel P. Berrangé <[email protected]>
2711
2712 Pass -Werror when building extension
2713 This ensures we pick up warnings from new python headers or other
2714 problems.
2715
2716
2717
2718 2020- 11- 12 Daniel P. Berrangé <[email protected]>
2719
2720 Avoid truncating python version number when running sanity test
2721 The current code assumes the version number string will be only three
2722 characters long, which fails with "3.10".
2723
2724
2725
2726 2020- 11- 12 Daniel P. Berrangé <[email protected]>
2727
2728 Avoid use of thread function deprecated in 3.9
2729 PyEval_ThreadsInitialized was deprecated in 3.9, with deletion targetted
2730 for 3.11. Furthermore since 3.7 it is guaranteed that threads are always
2731 initialized by Py_Initialize(), so checking it is redundant.
2732
2733
2734
2735 2020- 11- 6 Daniel P. Berrangé <[email protected]>
2736
2737 Add unit tests for openAuth method
2738 Validate that the type hinting is working as expected
2739
2740
2741
2742 2020- 11- 2 Jiri Denemark <[email protected]>
2743
2744 Post-release version bump to 6.10.0
2745
2746
2747 2020- 10- 6 Daniel P. Berrangé <[email protected]>
2748
2749 gitlab: optimize CI job dependencies
2750 Allow more parallelization by giving explicit dependencies between jobs.
2751
2752
2753
2754 2020- 10- 6 Daniel P. Berrangé <[email protected]>
2755
2756 tests: start basic unit tests for more APIs
2757 To prevent regressions, especially with generated code, we need to have
2758 test coverage of more APIs. This starts off with coverage for object
2759 creation for all object types supported by the test driver
2760 currently. This exercises constructors which have been broken several
2761 times in the past.
2762
2763 Related https://gitlab.com/libvirt/libvirt-python/-/issues/4
2764
2765
2766 2020- 10- 6 Daniel P. Berrangé <[email protected]>
2767
2768 fix constructor param name for virDomainSnapshot / virDomainCheckpoint
2769 Fixes 7f021c21d6a091ca33615852d6061e75b2500f3f
2770 Resolves https://gitlab.com/libvirt/libvirt-python/-/issues/4
2771
2772
2773
2774 2020- 10- 1 Jiri Denemark <[email protected]>
2775
2776 Post-release version bump to 6.9.0
2777
2778
2779 2020- 9- 1 Philipp Hahn <[email protected]>
2780
2781 generator: Work around type change
2782 a variable should not change its type.
2783
2784 Reviewed-by: Ján Tomko <[email protected]>
2785
2786
2787 2020- 9- 1 Philipp Hahn <[email protected]>
2788
2789 generator: Add PEP 484 type annotations
2790
2791
2792 2020- 9- 1 Philipp Hahn <[email protected]>
2793
2794 generator: Merge common code of print_function_wrapper
2795
2796
2797 2020- 9- 1 Philipp Hahn <[email protected]>
2798
2799 generator: Merge code for __init__ genration
2800
2801
2802 2020- 9- 1 Philipp Hahn <[email protected]>
2803
2804 generator: Expand tuple to names in for loop
2805 Assign tuple to multiple loop variables for better readability
2806
2807
2808
2809 2020- 9- 1 Philipp Hahn <[email protected]>
2810
2811 generator: break lines in generated code
2812 to be closes to pep8 which makes reading the generated code easier and
2813 reduces the number of issues found by flake8.
2814
2815
2816
2817 2020- 9- 1 Philipp Hahn <[email protected]>
2818
2819 generator: Use empty string instead of None
2820 for better type checking: both are bool()==False, but None is not str.
2821
2822
2823
2824 2020- 9- 1 Philipp Hahn <[email protected]>
2825
2826 generator: Convert to defaultdict()
2827 for nested dictionaries allows to remove the case distinction for
2828 "first" from "all other" cases.
2829
2830 Reviewed-by: Ján Tomko <[email protected]>
2831
2832
2833 2020- 9- 1 Philipp Hahn <[email protected]>
2834
2835 generator: Move funcs_failed into buildStubs()
2836 The variables are local to that funcion
2837
2838
2839
2840 2020- 9- 1 Philipp Hahn <[email protected]>
2841
2842 generator: Convert list() to set()
2843 tuple() and list() are sequences, while dict() and set() are hash-based,
2844 which is more efficient for contains().
2845
2846
2847
2848 2020- 9- 1 Philipp Hahn <[email protected]>
2849
2850 generator: Convert dict() to set()
2851 Python has a native type for set()s.
2852
2853
2854
2855 2020- 9- 1 Philipp Hahn <[email protected]>
2856
2857 generator: Simplify boolean condition
2858 no need to compare with None or empty string.
2859
2860
2861
2862 2020- 9- 1 Philipp Hahn <[email protected]>
2863
2864 generator: Simplify loop break
2865
2866
2867 2020- 9- 1 Philipp Hahn <[email protected]>
2868
2869 generator: Simplify sorting
2870 Use sorted(..., key=...) instead of using explicit list.sort()
2871
2872
2873
2874 2020- 9- 1 Philipp Hahn <[email protected]>
2875
2876 generator: Fixed writing cached=None
2877
2878
2879 2020- 9- 1 Philipp Hahn <[email protected]>
2880
2881 generator: Store arguments and return as tuple
2882 instead of list.
2883
2884
2885
2886 2020- 9- 1 Philipp Hahn <[email protected]>
2887
2888 generator: Expand tuple to names in for loop
2889 Assign tuple to multiple loop variables for better readability
2890
2891
2892
2893 2020- 9- 1 Philipp Hahn <[email protected]>
2894
2895 generator: Initialize with empty strings
2896 instead of using None as this has a different type.
2897
2898
2899
2900 2020- 9- 1 Philipp Hahn <[email protected]>
2901
2902 generator: Simplify XML attribute fetching
2903 Use attr.get(key, default) instead.
2904
2905 Also use the empty sting "" as the default value instead of "None": Both
2906 are "False" when used as a bool()ean, but "None" would require an
2907 explicit check for "not None" in many places as str() and None have
2908 different types.
2909
2910 Reviewed-by: Ján Tomko <[email protected]>
2911
2912
2913 2020- 9- 1 Philipp Hahn <[email protected]>
2914
2915 generator: Convert in_function to bool
2916
2917
2918 2020- 9- 1 Philipp Hahn <[email protected]>
2919
2920 generator: Use string formatting
2921 instead of sting concatenating.
2922
2923
2924
2925 2020- 9- 1 Philipp Hahn <[email protected]>
2926
2927 generator: Use SAX method names
2928 directly instead of using legacy method names from xmllib.
2929
2930 Depends: 3740a5e4c701281ac76a55e3f02b1d4221f1f9f0
2931
2932
2933 2020- 9- 1 Philipp Hahn <[email protected]>
2934
2935 generator: Remove unused SAX content handler methods
2936 getmethodname()
2937 close()
2938 cdata()
2939
2940
2941
2942 2020- 9- 1 Philipp Hahn <[email protected]>
2943
2944 generator: Refactor parser creation
2945 to use closing context manager.
2946
2947
2948
2949 2020- 9- 1 Philipp Hahn <[email protected]>
2950
2951 generator: Open file with context manager
2952
2953
2954 2020- 9- 1 Philipp Hahn <[email protected]>
2955
2956 generator: Use splitlines()
2957 instead of hand-coded implementation.
2958
2959
2960
2961 2020- 9- 1 Philipp Hahn <[email protected]>
2962
2963 generator: Just walk the dict
2964 instead of generating a list first.
2965
2966
2967
2968 2020- 9- 1 Philipp Hahn <[email protected]>
2969
2970 generator: Directly get dict length
2971 instead of generating a list and then counting the elements.
2972
2973
2974
2975 2020- 9- 1 Philipp Hahn <[email protected]>
2976
2977 generator: Walk only the values
2978 instead of the keys and then doing a lookup.
2979
2980
2981
2982 2020- 9- 1 Philipp Hahn <[email protected]>
2983
2984 generator: Use dict.item() to walk keys and values
2985 which saves a lookup of each key.
2986
2987
2988
2989 2020- 9- 1 Philipp Hahn <[email protected]>
2990
2991 generator: Check contained in hash
2992 directly instead of explicitly requesting only the keys as a list and
2993 converting that list to another list.
2994 Checking directly for an element to be contained in a hash is much more
2995 efficient as this is done using hashing O(1) instead of walking the list
2996 in half on average O(n).
2997
2998 Reviewed-by: Ján Tomko <[email protected]>
2999
3000
3001 2020- 9- 1 Philipp Hahn <[email protected]>
3002
3003 generator: Initialize function_classes directly
3004
3005
3006 2020- 9- 1 Philipp Hahn <[email protected]>
3007
3008 generator: Remove global declarations
3009 for variables with are not assigned.
3010
3011
3012
3013 2020- 9- 1 Philipp Hahn <[email protected]>
3014
3015 generator: Use string concatenation
3016 :%s,\(\w\+\)\s*=\s*\1\s*+,\1 +=,
3017
3018
3019
3020 2020- 9- 1 Philipp Hahn <[email protected]>
3021
3022 generator: Use increment assignment
3023 :%s,\(\w\+\)\s*=\s*\1\s*+,\1 +=,
3024
3025
3026
3027 2020- 9- 1 Philipp Hahn <[email protected]>
3028
3029 generator: Use enumerate()
3030 instead of manual iteration counting.
3031
3032
3033
3034 2020- 9- 1 Philipp Hahn <[email protected]>
3035
3036 generator: Simplify string concatentaion
3037 by using ''.join() instead of concatenating string fragments in a loop,
3038 which is slower as it required re-hashing the string multiple times.
3039
3040
3041
3042 2020- 9- 1 Philipp Hahn <[email protected]>
3043
3044 generator: Use more string formatting
3045
3046
3047 2020- 9- 1 Philipp Hahn <[email protected]>
3048
3049 generator: Merge now identical if-elif-else cases
3050 Commit ca394b9f "generator: Fix parent type" fixed the case for creating
3051 `virStorage*` instances, which require a reference to `virConnect`, so
3052 the special handling for `._conn` is no longer needed.
3053
3054 Commit ee5c856a "Remove legacy libvirtError arguments" removed the
3055 different arguments, so all cases are the same now.
3056
3057 Reviewed-by: Ján Tomko <[email protected]>
3058
3059
3060 2020- 9- 1 Philipp Hahn <[email protected]>
3061
3062 generator: Fix return type on failure
3063 to return a negative value instead of None for consistency.
3064
3065
3066
3067 2020- 9- 1 Philipp Hahn <[email protected]>
3068
3069 generator: Remove useless sort key
3070 tuples are sorted by first component anyway.
3071
3072
3073
3074 2020- 9- 1 Philipp Hahn <[email protected]>
3075
3076 generator: Remove skipped_modules
3077 Unused.
3078
3079
3080
3081 2020- 9- 1 Philipp Hahn <[email protected]>
3082
3083 generator: Remove dead variable assignments
3084
3085
3086 2020- 9- 1 Philipp Hahn <[email protected]>
3087
3088 generator: Use raw-string for regular expression
3089 "\(" is not a valid escape sequence for a Python string, but currently
3090 is passed on unmodified. This might breaks in the future when new escape
3091 sequences are introduced.
3092
3093 > generator.py:1001:7: W605 invalid escape sequence '\('
3094 > generator.py:1001:18: W605 invalid escape sequence '\)'
3095
3096 Use raw python string instead.
3097
3098
3099
3100 2020- 9- 1 Philipp Hahn <[email protected]>
3101
3102 generator: Convert to 'not in' and 'is not'
3103 as recommended by pep8
3104
3105
3106
3107 2020- 9- 1 Philipp Hahn <[email protected]>
3108
3109 generator: Change type of quiet to bool
3110 Use `bool` instead of `int`.
3111
3112
3113
3114 2020- 9- 1 Philipp Hahn <[email protected]>
3115
3116 generator: Simplify exception handling
3117 sys.exc_info() returns a 3-tuple (type, value, traceback), where `value`
3118 is the instance captured by `except type as value`.
3119
3120
3121
3122 2020- 9- 1 Philipp Hahn <[email protected]>
3123
3124 generator: Cleanup imports
3125 Move imports to top
3126 Remove unused import string
3127 Remove duplicate import os
3128
3129
3130
3131 2020- 9- 1 Philipp Hahn <[email protected]>
3132
3133 generator: Do not use bare except
3134 as it also catches SystemExit, InterruptedError, SyntaxError and such.
3135
3136
3137
3138 2020- 9- 1 Jiri Denemark <[email protected]>
3139
3140 Post-release version bump to 6.8.0
3141
3142
3143 2020- 8- 28 Philipp Hahn <[email protected]>
3144
3145 Revert "libvirtaio: Drop object(*args, **kwargs)"
3146 This reverts commit f4be03b330125ab1e5a2bb10b4f12674aeff4691.
3147
3148 While object.__init__() does not expect any additional arguments, this
3149 construct is required for Pythons multiple inheritance implementation.
3150 The original author Wojtek Porczyk <[email protected]>
3151 explained is this way:
3152
3153 > I'm sorry I didn't notice this earlier, but the commit f4be03b3 dated
3154 > 2020-04-20 [0] is wrong. The super().__init__(*args, **kwargs) in
3155 > Callback.__init__ was there on purpose, because of how Python's inheritance in
3156 > new-style classes works.
3157 >
3158 > Let me explain this a bit, because it is not obvious.
3159 >
3160 > Suppose you had diamond inheritance like this:
3161 >
3162 > class A(object): pass
3163 > class B(A): pass
3164 > class C(A): pass
3165 > class D(B,C): pass
3166 >
3167 > And those classes needed a common function with varying arguments:
3168 >
3169 > class A(object):
3170 > def spam(self, a): print(f'A: {a}')
3171 > class B(A):
3172 > def spam(self, b): print(f'B: {b}')
3173 > class C(A):
3174 > def spam(self, c): print(f'C: {c}')
3175 > class D(B,C):
3176 > def spam(self, d): print(f'D: {d}')
3177 >
3178 > The way to call all parent's functions exactly once (as per MRO) and accept
3179 > all arguments and also forbid unknown arguments is to accept **kwargs
3180 > everywhere and pass them to super().spam():
3181 >
3182 > class A:
3183 > def spam(self, a):
3184 > print(f'A: {a}')
3185 > class B(A):
3186 > def spam(self, b, **kwargs):
3187 > print(f'B: {b}')
3188 > super().spam(**kwargs)
3189 > class C(A):
3190 > def spam(self, c, **kwargs):
3191 > print(f'C: {c}')
3192 > super().spam(**kwargs)
3193 > class D(B, C):
3194 > def spam(self, d, **kwargs):
3195 > print(f'D: {d}')
3196 > super().spam(**kwargs)
3197 >
3198 > Let's run this:
3199 >
3200 > >>> B().spam(a=1, b=2)
3201 > B: 2
3202 > A: 1
3203 > >>> D().spam(a=1, b=2, c=3, d=4)
3204 > D: 4
3205 > B: 2
3206 > C: 3
3207 > A: 1
3208 >
3209 > You may notice that super() in B.spam refers to two different classes, either
3210 > A or C, depending on inheritance order in yet undefined classes (as of B's
3211 > definition).
3212 >
3213 > That's why the conclusion that super() in Callback.__init__ refers to object
3214 > is wrong. In this example, spam=__init__, A=object, B=Callback and C and D are
3215 > not yet written, but theoretically possible classes that could be written by
3216 > someone else. Why would they be needed, I don't know, but if someone writes
3217 > them, s/he would be out of options to invent new arguments to C.__init__.
3218 >
3219 > Note that super().__init__(*args, **kwargs) when super() refers to object
3220 > isn't harmful, and just ensures that args and kwargs are empty (i.e. no
3221 > unknown arguments were passed). In fact, this is exactly why object.__init__()
3222 > takes no arguments since Python 2.6 [1][2], as you correctly point out in the
3223 > commit message.
3224 >
3225 > I don't think this breaks anything (I very much doubt anyone would need to
3226 > write code that would trigger this), nevertheless, as the commit is both
3227 > pointless and wrong, and as the original author of libvirtaio I'd like to ask
3228 > for this commit to be reverted. If this breaks some static analysis tool,
3229 > could you just suppress it for this particular line?
3230 >
3231 >
3232 > [0] https://gitlab.com/libvirt/libvirt-python/-/commit/f4be03b330125ab1e5a2bb10b4f12674aeff4691
3233 > [1] https://bugs.python.org/issue1683368
3234 > [2] https://docs.python.org/3/whatsnew/2.6.html#porting-to-python-2-6
3235 > (fourth point)
3236 >
3237
3238
3239
3240 2020- 8- 18 Philipp Hahn <[email protected]>
3241
3242 connect: Just clear all event handlers
3243
3244
3245 2020- 8- 18 Philipp Hahn <[email protected]>
3246
3247 domain: Fix None comparison
3248 None should be compared with "is None" instead of "== None", as the
3249 later would invoke a "__cmp__()" method.
3250
3251
3252
3253 2020- 8- 18 Philipp Hahn <[email protected]>
3254
3255 stream: Return None from callback
3256 nobody evaluates the return value.
3257
3258
3259
3260 2020- 8- 18 Philipp Hahn <[email protected]>
3261
3262 stream: Convert type() to isinstance()
3263
3264
3265 2020- 8- 18 Philipp Hahn <[email protected]>
3266
3267 stream: no type change
3268 static typing forbids re-declaring a variable with different types.
3269 Rename the variable.
3270
3271
3272
3273 2020- 8- 18 Philipp Hahn <[email protected]>
3274
3275 stream: Simplify boolean condition
3276
3277
3278 2020- 8- 18 Philipp Hahn <[email protected]>
3279
3280 stream: Fix exception traceback handling
3281 sys.exc_info() returns a 3-tuple (type, value, traceback). Raising just
3282 `value` again looses the traceback information as this creates a new
3283 exception.
3284
3285 Just use `raise` which re-raises the previous exception including the
3286 original traceback.
3287
3288 FYI: There is a subtile difference between Python 2 and Python 3:
3289
3290 > try:
3291 > raise ValueError()
3292 > except ValueError:
3293 > try:
3294 > raise TypeError()
3295 > except TypeError:
3296 > pass
3297 > raise
3298
3299 With Python 3 the exception environment is dropped after the exception
3300 has been handled - as such Python 3 re-raises the outer ValueError.
3301
3302 With Python 2 the last (inner) exception is raised: TypeError
3303
3304
3305
3306 2020- 8- 18 Philipp Hahn <[email protected]>
3307
3308 stream: Do not use bare except
3309 as it also catches SystemExit, InterruptedError, SyntaxError and such.
3310
3311
3312
3313 2020- 8- 18 Philipp Hahn <[email protected]>
3314
3315 override: Convert to list comprehension
3316 :%s/retlist = list()\n\s*\(for \w\+ in ret\):\n\s*retlist.append(\(.*\))\n\n\s*return retlist/return [\2 \1]/
3317
3318
3319
3320 2020- 8- 18 Philipp Hahn <[email protected]>
3321
3322 override: Catch type error
3323 handler() should either return bytes or -2 or -3.
3324 Explicitly raise ValueError or TypeError to silence mypy.
3325
3326
3327
3328 2020- 8- 18 Philipp Hahn <[email protected]>
3329
3330 override: no type change
3331 static typing forbids re-declaring a variable with different types.
3332 Rename the variable.
3333
3334
3335
3336 2020- 8- 18 Philipp Hahn <[email protected]>
3337
3338 override: Add manual PEP 484 type annotations
3339
3340
3341 2020- 8- 18 Philipp Hahn <[email protected]>
3342
3343 override: Simplify exception handling
3344 sys.exc_info() returns a 3-tuple (type, value, traceback), where `value`
3345 is the instance captured by `except type as value`.
3346
3347
3348
3349 2020- 8- 17 Vincent Vanlaer <[email protected]>
3350
3351 Include libvirt-qemu-override.py in sdist
3352 libvirt-qemu-override.py was introduced in e3da8f17 but never added to
3353 MANIFEST.in. It was therefore not contained in the official releases on
3354 libvirt.org.
3355
3356
3357
3358 2020- 8- 7 Philipp Hahn <[email protected]>
3359
3360 libvirtaio: Add manual PEP 484 type annotations
3361
3362
3363 2020- 8- 6 Philipp Hahn <[email protected]>
3364
3365 libvirtaio: assert callback type
3366 self.callbacks contains a mix of FDCallback and TimeoutCallback, while
3367 the update code does not explicitly check for.
3368
3369
3370
3371 2020- 8- 6 Philipp Hahn <[email protected]>
3372
3373 libvirtaio: Fix return type
3374 libvirtaio.py:364: error: "virEventInvokeFreeCallback" does not return a value
3375
3376
3377
3378 2020- 8- 6 Philipp Hahn <[email protected]>
3379
3380 libvirtaio: Drop object(*args, **kwargs)
3381 object.__init__() does not expect those parameters.
3382
3383
3384
3385 2020- 8- 6 Philipp Hahn <[email protected]>
3386
3387 libvirtaio: Cleanup imports
3388 Move imports to top
3389
3390
3391
3392 2020- 8- 6 Philipp Hahn <[email protected]>
3393
3394 sanitytest: no type change
3395 static typing forbids re-declaring a variable with different types.
3396 Rename the variable.
3397
3398
3399
3400 2020- 8- 6 Philipp Hahn <[email protected]>
3401
3402 sanitytest: Use str.startswith() instead of str[0]
3403
3404
3405 2020- 8- 6 Philipp Hahn <[email protected]>
3406
3407 sanitytest: Use set for tracking used functions
3408
3409
3410 2020- 8- 6 Philipp Hahn <[email protected]>
3411
3412 sanitytest: Use 3-tuple for finalklassmap
3413
3414
3415 2020- 8- 6 Philipp Hahn <[email protected]>
3416
3417 sanitytest: Use 3-tuple for basicklassmap
3418
3419
3420 2020- 8- 6 Philipp Hahn <[email protected]>
3421
3422 sanitytest: Add PEP 484 type annotations
3423
3424
3425 2020- 8- 6 Philipp Hahn <[email protected]>
3426
3427 sanitytest: Drop Python 2 compatibility
3428 Python 3 only has int, remove the Python 2 long type
3429
3430
3431
3432 2020- 8- 6 Philipp Hahn <[email protected]>
3433
3434 sanitytest: Drop else:pass
3435 useless
3436
3437
3438
3439 2020- 8- 6 Philipp Hahn <[email protected]>
3440
3441 sanitytest: Do not re-declare set
3442 is a built-in python type
3443
3444
3445
3446 2020- 8- 6 Philipp Hahn <[email protected]>
3447
3448 sanitytest: Convert type() to isinstance()
3449
3450
3451 2020- 8- 6 Philipp Hahn <[email protected]>
3452
3453 sanitytest: Skip type annotations
3454 Teach sanitytest to ignore typing imports
3455
3456
3457
3458 2020- 8- 6 Philipp Hahn <[email protected]>
3459
3460 sanitytest: Remove unused import
3461
3462
3463 2020- 8- 6 Philipp Hahn <[email protected]>
3464
3465 Remove legacy libvirtError arguments
3466 The fields have been deprecated in C with
3467 git:f60dc0bc09f09c6817d6706a9edb1579a3e2b2b8
3468
3469 They are only passed to the libvirtError constructor, but not stored for
3470 later or used anywhere else.
3471
3472 sed -ri '/raise libvirtError/s/, \w+=self(\._dom)?//' *.py
3473
3474
3475
3476 2020- 8- 6 Philipp Hahn <[email protected]>
3477
3478 Normalize white space
3479 indent by 4 spaces
3480 one spaces around assignments
3481
3482
3483
3484 2020- 8- 6 Philipp Hahn <[email protected]>
3485
3486 examples/event-test: Fix remove return type
3487 The remove function are supposed to return 0 on success and -1 on failure.
3488 <https://libvirt.org/html/libvirt-libvirt-event.html#virEventRemoveTimeoutFunc>
3489
3490
3491
3492 2020- 8- 5 Philipp Hahn <[email protected]>
3493
3494 examples: Fix white space
3495 indent by 4 spaces
3496 one spaces around assignments
3497
3498
3499
3500 2020- 8- 5 Philipp Hahn <[email protected]>
3501
3502 examples: Replace sys.exit() with exit()
3503 No need to import sys.
3504
3505
3506
3507 2020- 8- 5 Philipp Hahn <[email protected]>
3508
3509 examples: Cleanup imports
3510 Break import into multiple lines as recommended by PEP-8
3511
3512 Move imports to top
3513
3514 Remove unused imports
3515
3516
3517
3518 2020- 8- 5 Philipp Hahn <[email protected]>
3519
3520 examples: Do not use bare except
3521 as it also catches SystemExit, InterruptedError, SyntaxError and such.
3522
3523
3524
3525 2020- 8- 5 Philipp Hahn <[email protected]>
3526
3527 examples: Convert to ArgumentParser
3528 Replace getopt() and hand-rolled-parser with argparse.ArgumentParser.
3529
3530 Fix wrong header comments copy-pasted from domstart.py
3531
3532
3533
3534 2020- 8- 5 Philipp Hahn <[email protected]>
3535
3536 examples: Add/fix PEP 484 type annotation
3537
3538
3539 2020- 8- 5 Philipp Hahn <[email protected]>
3540
3541 examples: Add missing return values
3542 examples/dhcpleases.py:45: error: Missing return statement
3543
3544
3545
3546 2020- 8- 5 Philipp Hahn <[email protected]>
3547
3548 examples/nodestat: Fix None comparison
3549 "is" compares for "points to the same object", which for strings is the
3550 same as comparing the byte sequence itself as Python hashes each strings
3551 to only stores a unique copy of each string.
3552
3553 > examples/nodestats.py:86:43: F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple)
3554 > examples/nodestats.py:91:12: F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple)
3555 > examples/nodestats.py:94:40: F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple)
3556
3557 Use "==" and "!=" for string comparsion.
3558
3559
3560
3561 2020- 8- 5 Philipp Hahn <[email protected]>
3562
3563 examples/consolecallback: Fix assorted errors
3564 Assert stream is opened before receiving bytes.
3565
3566 Need to check for bytes() instead of [unicode]str().
3567
3568
3569
3570 2020- 8- 5 Philipp Hahn <[email protected]>
3571
3572 examples/consolecallback: Add var to save callback
3573 > examples/consolecallback.py:98: error: "Console" has no attribute "stdin_watch"
3574
3575
3576
3577 2020- 8- 5 Philipp Hahn <[email protected]>
3578
3579 examples/esxlist: Fix Python 2 raw_input()
3580 which was renamed to input() for Python 3.
3581
3582
3583
3584 2020- 8- 5 Philipp Hahn <[email protected]>
3585
3586 examples/event-test: Use atexit for Python 3
3587 Assigning sys.exitfunc no longer works with Python 3.
3588
3589 Use atexit.register() instead.
3590
3591
3592
3593 2020- 8- 5 Philipp Hahn <[email protected]>
3594
3595 examples/event-test: Remove unneeded global statement
3596 It only needed when a value is assigned.
3597
3598
3599
3600 2020- 8- 5 Philipp Hahn <[email protected]>
3601
3602 examples/dhcp*: Fix None comparison
3603 None should be compared with "is None" instead of "== None", as the
3604 later would invoke a "__cmp__()" method.
3605
3606
3607
3608 2020- 8- 5 Philipp Hahn <[email protected]>
3609
3610 examples/*: Remove stray semicolon
3611 This is Python, not C
3612
3613
3614
3615 2020- 8- 4 Daniel P. Berrangé <[email protected]>
3616
3617 ci: refresh dockerfiles for changed libvirt build system
3618 Libvirt changed from autotools to meson. All the containers need
3619 refreshing and the CI recipes updated.
3620
3621
3622
3623 2020- 8- 2 Jiri Denemark <[email protected]>
3624
3625 Post-release version bump to 6.7.0
3626
3627
3628 2020- 7- 27 Philipp Hahn <[email protected]>
3629
3630 generator: Fix parent type
3631 The constructors for virDomain, virStoragePool, virDomainCheckpoint,
3632 virDomainSnapshot expect virConnect as their first argument. The current
3633 code always uses `self`, which is okay when such an instance is created
3634 from a method of virConnect itself, but there are several cases where
3635 this is not the case:
3636
3637 virDomain.migrate() -> virDomain
3638 virDomain.migrate2() -> virDomain
3639 virDomain.migrate3() -> virDomain
3640 virDomainCheckpoint.getParent() -> virDomainCheckpoint
3641 virDomainSnapshot.getParent() -> virDomainSnapshot
3642 virStorageVol.storagePoolLookupByVolume() -> virStoragePool
3643
3644 > libvirt.py:1850: error: Argument 1 to "virDomain" has incompatible type "virDomain"; expected "virConnect"
3645 > libvirt.py:1871: error: Argument 1 to "virDomain" has incompatible type "virDomain"; expected "virConnect"
3646 > libvirt.py:1888: error: Argument 1 to "virDomain" has incompatible type "virDomain"; expected "virConnect"
3647 > libvirt.py:3422: error: Argument 1 to "virStorageVol" has incompatible type "virStoragePool"; expected "virConnect"
3648 > libvirt.py:6835: error: Argument 1 to "virDomainCheckpoint" has incompatible type "virDomainCheckpoint"; expected "virDomain"
3649 > libvirt.py:6943: error: Argument 1 to "virDomainSnapshot" has incompatible type "virDomainSnapshot"; expected "virDomain"
3650
3651 >>> import libvirt
3652 >>> con = libvirt.open('test:///default')
3653 >>> dom = con.lookupByName("test")
3654 >>> first = dom.checkpointCreateXML("""<domaincheckpoint><name>First</name></domaincheckpoint>""")
3655 >>> first.domain()
3656 <libvirt.virDomain object at 0x7f728c3b6b80>
3657 ^^^^^^
3658 >>> second = dom.checkpointCreateXML("""<domaincheckpoint><name>Second</name></domaincheckpoint>""")
3659 >>> parent = second.getParent()
3660 >>> parent.domain()
3661 <libvirt.virDomainCheckpoint object at 0x7f728c424d30>
3662 ^^^^^^^^^^^^^^^^
3663
3664
3665
3666 2020- 7- 27 Philipp Hahn <[email protected]>
3667
3668 debug: Fix bit-rot in debug output
3669 Let the compiler optimize out the printf() call instead of doing it with the
3670 pre-processor as the later does not catch format string errors or the following
3671 case, where NULLSTR() is used but not defined:
3672
3673 > libvirt-qemu-override.c: In function ‘libvirt_qemu_virConnectDomainQemuMonitorEventRegister’:
3674 > libvirt-qemu-override.c:271:34: warning: implicit declaration of function ‘NULLSTR’; did you mean ‘NULL’? [-Wimplicit-function-declaration]
3675 > 271 | pyobj_conn, pyobj_dom, NULLSTR(event), pyobj_cbData, flags);
3676 > | ^~~~~~~
3677 > libvirt-qemu-override.c:39:28: note: in definition of macro ‘DEBUG’
3678 > 39 | while (0) {printf(fmt, __VA_ARGS__);}
3679 > | ^~~~~~~~~~~
3680 > libvirt-qemu-override.c:270:11: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘int’ [-Wformat=]
3681 > 270 | DEBUG("libvirt_qemu_virConnectDomainQemuMonitorEventRegister(%p %p %s %p %x) called\n",
3682 > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3683 > 271 | pyobj_conn, pyobj_dom, NULLSTR(event), pyobj_cbData, flags);
3684 > | ~~~~~~~~~~~~~~
3685 > | |
3686 > | int
3687 > libvirt-qemu-override.c:39:23: note: in definition of macro ‘DEBUG’
3688 > 39 | while (0) {printf(fmt, __VA_ARGS__);}
3689 > | ^~~
3690 > libvirt-qemu-override.c:270:73: note: format string is defined here
3691 > 270 | DEBUG("libvirt_qemu_virConnectDomainQemuMonitorEventRegister(%p %p %s %p %x) called\n",
3692 > | ~^
3693 > | |
3694 > | char *
3695 > | %d
3696
3697 Copy the definition of NULLSTR from libvirt/src/internal.h to typewrappers.h
3698
3699
3700
3701 2020- 7- 27 Philipp Hahn <[email protected]>
3702
3703 libvirtaio: Fix return types of callback
3704 libvirt defines the signature for the callback functions, e.g. the
3705 functions for remove() must return -1 on error and 0 on success. Raising
3706 an exception violates that contract.
3707
3708 _remove_timeout() did not explicitly handle a double-remove and
3709 implicitly passed on the exception.
3710
3711 update() expects no return value, so remove the pointless return to pass
3712 on None.
3713
3714
3715
3716 2020- 7- 27 Philipp Hahn <[email protected]>
3717
3718 qemu-api: Fix return type
3719 The API XML description uses "C types": "str *" is not valid.
3720
3721
3722
3723 2020- 7- 27 Philipp Hahn <[email protected]>
3724
3725 generator: Fix domainCheckpoint.listAllChildren()
3726 virDomainCheckpoint(dom, _obj)
3727 expects a reference to the virDomain as its first argument, but
3728 virDomainCheckpoint.listAllChildren()
3729 passes `self` instead:
3730
3731 libvirt.py:7056: error: Argument 1 to "virDomainCheckpoint" has incompatible type "virDomainCheckpoint"; expected "virDomain"
3732
3733 >>> import libvirt
3734 >>> con = libvirt.open('test:///default')
3735 >>> dom = con.lookupByName("test")
3736 >>> first = dom.checkpointCreateXML("""<domaincheckpoint><name>First</name></domaincheckpoint>""")
3737 >>> second = dom.checkpointCreateXML("""<domaincheckpoint><name>Second</name></domaincheckpoint>""")
3738 >>> child, = first.listAllChildren()
3739 >>> second.domain()
3740 <libvirt.virDomain object at 0x7f828d777b80>
3741 ^^^^^^^^^
3742 >>> child.domain()
3743 <libvirt.virDomainCheckpoint object at 0x7f828d8160a0>
3744 ^^^^^^^^^^^^^^^^^^^
3745
3746
3747
3748 2020- 7- 27 Philipp Hahn <[email protected]>
3749
3750 generator: Fix domainSnapshot.listAllChildren()
3751 virDomainSnapshot(dom, _obj)
3752 expects a reference to the virDomain as its first argument, but
3753 virDomainSnapshot.listAllChildren()
3754 passes `self` instead:
3755
3756 libvirt.py:6459: error: Argument 1 to "virDomainSnapshot" has incompatible type "virDomainSnapshot"; expected "virDomain"
3757
3758 >>> import libvirt
3759 >>> con = libvirt.open('test:///default')
3760 >>> dom = con.lookupByName("test")
3761 >>> first = dom.snapshotCreateXML("""<domainsnapshot><name>First</name></domainsnapshot>""")
3762 >>> second = dom.snapshotCreateXML("""<domainsnapshot><name>Second</name></domainsnapshot>""")
3763 >>> child, = first.listAllChildren()
3764 >>> second.domain()
3765 <libvirt.virDomain object at 0x7fb32be3cfd0>
3766 ^^^^^^^^^
3767 >>> child.domain()
3768 <libvirt.virDomainSnapshot object at 0x7fb32bdb9080>
3769 ^^^^^^^^^^^^^^^^^
3770
3771
3772
3773 2020- 7- 27 Philipp Hahn <[email protected]>
3774
3775 generator: Fix string formatting
3776 remove excessive arguments.
3777
3778
3779
3780 2020- 7- 27 Philipp Hahn <[email protected]>
3781
3782 generator: Fix undefined variables file
3783 generator.py:931:15: F821 undefined name 'file'
3784 generator.py:951:15: F821 undefined name 'file'
3785
3786
3787
3788 2020- 7- 22 Jiri Denemark <[email protected]>
3789
3790 Post-release version bump to 6.6.0
3791
3792
3793 2020- 7- 17 Radostin Stoyanov <[email protected]>
3794
3795 generator: Fix typos
3796
3797
3798 2020- 7- 15 Radostin Stoyanov <[email protected]>
3799
3800 examples: Refactor domipaddrs
3801 This patch makes domipaddrs example compatible with Python3.
3802
3803
3804
3805 2020- 7- 6 Cole Robinson <[email protected]>
3806
3807 Fix PY_SSIZE_T_CLEAN deprecation warning
3808 Seen running on fedora 32:
3809
3810 DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
3811 ret = libvirtmod.virDomainLookupByUUID(self._o, uuid)
3812
3813 This comes from here: https://bugs.python.org/issue36381
3814 See the section about PY_SSIZE_T_CLEAN here:
3815 https://docs.python.org/3/c-api/arg.html#strings-and-buffers
3816
3817 Solution is to use Py_ssize_t instead of int for unpacked '#' values,
3818 combined with defined PY_SSIZE_T_CLEAN before importing Python.h. The
3819 latter turns these deprecation warnings into runtime segfaults though
3820 if we missed an instance.
3821
3822 I verified the virt-manager's test suite works fine after this change
3823
3824
3825
3826 2020- 7- 5 Cole Robinson <[email protected]>
3827
3828 generator: Fix SyntaxWarning
3829 $ ./setup.py build
3830 running build
3831 /usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
3832 /usr/bin/python3 generator.py libvirt /usr/share/libvirt/api/libvirt-api.xml
3833 generator.py:1562: SyntaxWarning: "is" with a literal. Did you mean "=="?
3834 if classname is "virStorageVol":
3835 ...
3836
3837
3838
3839 2020- 7- 3 Michal Privoznik <[email protected]>
3840
3841 virStream: Use larger buffer for sendAll/recvAll methods
3842 There are four methods which receive/send entire stream
3843 (sendAll(), recvAll(), sparseSendAll() and sparseRecvAll()). All
3844 these have an intermediary buffer which is either filled by
3845 incoming stream and passed to a user provided callback to handle
3846 the data, or the other way round - user fills it with data they
3847 want to send and the buffer is handed over to virStream.
3848
3849 But the buffer is incredibly small which leads to smaller packets
3850 being sent and thus increased overhead. What we can do is to use
3851 the same buffer as their C counterparts do (e.g.
3852 virStreamSendAll()) - they all use VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX
3853 long buffer (which is the maximum size of a stream packet we
3854 send) - this is almost exactly 256KiB (it's 256KiB - 24B for the
3855 header).
3856
3857 Reviewed-by: Pavel Hrdina <[email protected]>
3858
3859
3860 2020- 7- 3 Michal Privoznik <[email protected]>
3861
3862 MANIFEST: Distribute sparsestream.py example
3863 Reviewed-by: Pavel Hrdina <[email protected]>
3864
3865
3866 2020- 6- 8 Daniel P. Berrangé <[email protected]>
3867
3868 setup: post-release version bump to 6.5.0
3869
3870
3871 2020- 5- 22 Andrea Bolognani <[email protected]>
3872
3873 ci: Test installation
3874
3875
3876 2020- 5- 22 Andrea Bolognani <[email protected]>
3877
3878 ci: Make job skips more flexible
3879 Instead of hardcoding the names of the targets for which certain
3880 steps should be skipped, use a separate variable to store that
3881 information.
3882
3883
3884
3885 2020- 5- 14 Daniel P. Berrangé <[email protected]>
3886
3887 examples: remove docs about non-existent XML files
3888 The docs refers to XML files that don't exist in the python binding
3889 since it was split off from the main libvirt.git repo.
3890
3891 Fixes #3
3892
3893
3894 2020- 5- 14 Daniel P. Berrangé <[email protected]>
3895
3896 Drop largely empty and unused NEWS file
3897 We bundle a git generated ChangeLog file in the dist, and never add
3898 any entries to the NEWS file.
3899
3900 Fixes #2
3901
3902
3903 2020- 5- 14 Daniel P. Berrangé <[email protected]>
3904
3905 gitlab: add testing of the rpmbuild process
3906
3907
3908 2020- 5- 5 Daniel P. Berrangé <[email protected]>
3909
3910 gitlab: add CONTRIBUTING.rst file to indicate use of merge requests
3911 With the introduction of automated CI pipelines, we are now ready to switch
3912 to using merge requests for the project. With this switch we longer wish
3913 to have patches sent to the mailing list, and thus the git-publish
3914 config is removed.
3915
3916
3917
3918 2020- 5- 5 Daniel P. Berrangé <[email protected]>
3919
3920 setup: post-release version bump to 6.4.0
3921
3922
3923 2020- 5- 5 Daniel Veillard <[email protected]>
3924
3925 Release of libvirt-python 6.3.0
3926 * setup.py: updated for the release
3927
3928
3929
3930 2020- 5- 1 Daniel P. Berrangé <[email protected]>
3931
3932 gitlab: fix typo s/perl/python/ in docker cached image name
3933 Reported-by: Pavel Hrdina <[email protected]>
3934
3935
3936 2020- 5- 1 Daniel P. Berrangé <[email protected]>
3937
3938 travis: delete redundant configuration
3939 Now that we're standardizing on GitLab CI for both official gating CI
3940 and developer CI, there's no compelling reason to continue to support
3941 Travis CI.
3942
3943 Reviewed-by: Andrea Bolognani <[email protected]>
3944
3945
3946 2020- 5- 1 Daniel P. Berrangé <[email protected]>
3947
3948 gitlab: introduce CI jobs testing git master & distro libvirt
3949 The python build needs to validate two axis
3950
3951 - A variety of libvirt versions
3952 - A variety of python versions
3953
3954 We get coverage for both these axis by running a build against the
3955 distro provided libvirt packages. All that is then missing is a build
3956 against the latest libvirt git master, which only needs to be run on
3957 a single distro, for which CentOS 8 is picked as a stable long life
3958 base.
3959
3960 Reviewed-by: Andrea Bolognani <[email protected]>
3961
3962
3963 2020- 5- 1 Daniel P. Berrangé <[email protected]>
3964
3965 test: workaround missing VIR_TYPED_PARAM enums in API definition
3966 On Ubuntu 18.04 with libvirt 4.0.0 libvirt-python build fails
3967
3968 running test
3969 /usr/bin/python3 sanitytest.py build/lib.linux-x86_64-3.6 /usr/share/libvirt/api/libvirt-api.xml
3970 Cannot get a value of enum VIR_TYPED_PARAM_BOOLEAN (originally VIR_DOMAIN_BLKIO_PARAM_BOOLEAN)
3971 Cannot get a value of enum VIR_TYPED_PARAM_DOUBLE (originally VIR_DOMAIN_BLKIO_PARAM_DOUBLE)
3972 Cannot get a value of enum VIR_TYPED_PARAM_INT (originally VIR_DOMAIN_BLKIO_PARAM_INT)
3973 ...snip...
3974
3975 The code generated for the binding is still correct and so we can just
3976 whitelist this error scenario.
3977
3978
3979
3980 2020- 4- 30 Daniel P. Berrangé <[email protected]>
3981
3982 gitlab: add CI job for validating DCO signoff
3983 This job uses the shared "check-dco" image to validate that all
3984 commits on a branch in a developer's repo fork have a suitable
3985
3986
3987
3988 2020- 4- 27 Philipp Hahn <[email protected]>
3989
3990 examples: Fix connection error handling 2
3991 Fix two more cases in examples as
3992 libvirt.open*() does not return None but raises an exception
3993
3994 Fixes: 283e2bc693746164b22226e14d6fe3ccd38a07bf
3995 Reviewed-by: Michal Privoznik <[email protected]>
3996
3997
3998 2020- 4- 22 Daniel P. Berrangé <[email protected]>
3999
4000 setup: require python >= 3.5 to build
4001 Python 3.5 is the oldest Python version available across our supported
4002 build platforms.
4003
4004 Reviewed-by: Philipp Hahn <[email protected]>
4005
4006
4007 2020- 4- 20 Philipp Hahn <[email protected]>
4008
4009 examples: Fix connection error handling
4010 libvirt.open*() does not return None but raises an exception
4011
4012
4013
4014 2020- 4- 7 Daniel P. Berrangé <[email protected]>
4015
4016 github: enable lockdown of issues and merge requests
4017 Libvirt uses GitHub as an automated read-only mirror. The goals were to
4018 have a disaster recovery backup for libvirt.org, a way to make it easy
4019 for people to clone their own private copy of libvirt Git, and finally
4020 as a way to interact with apps like Travis.
4021
4022 The project description was set to a message telling people that we
4023 don't respond to pull requests. This was quite a negative message to
4024 potential contributors, and also did not give them any guidance about
4025 the right way to submit to libvirt. Many also missed the description and
4026 submitted issues or pull requests regardless.
4027
4028 It is possible to disable the issue tracker in GitHub, but there is no
4029 way to disable merge requests. Disabling the issue tracker would also
4030 leave the problem of users not being given any positive information
4031 about where they should be reporting instead.
4032
4033 There is a fairly new 3rd party application built for GitHub that
4034 provides a bot which auto-responds to both issues and merge requests,
4035 closing and locking them, with a arbitrary comment:
4036
4037 https://github.com/apps/repo-lockdown
4038
4039 This commit adds a suitable configuration file for libvirt, which
4040 tries to give a positive response to user's issue/pullreq and guide
4041 them to the desired contribution path on GitLab.
4042
4043 Reviewed-by: Andrea Bolognani <[email protected]>
4044 Reviewed-by: Pavel Hrdina <[email protected]>
4045 Reviewed-by: Eric Blake <[email protected]>
4046
4047
4048 2020- 4- 2 Daniel Veillard <[email protected]>
4049
4050 Release of libvirt-python 6.2.0
4051 * setup.py: bumped version to 6.2.0
4052
4053
4054
4055 2020- 3- 30 Radostin Stoyanov <[email protected]>
4056
4057 tox: Test with Python 3.6, 3.7 and 3.8
4058 Support for Python 2.X has been dropped with commit b22e4f2.
4059
4060 Reviewed-by: Michal Privoznik <[email protected]>
4061
4062
4063 2020- 3- 3 Daniel Veillard <[email protected]>
4064
4065 Release of libvirt-python 6.1.0
4066 * setup.py : updated for release
4067
4068
4069
4070 2020- 1- 16 Daniel P. Berrangé <[email protected]>
4071
4072 gitpublish: add 'libvirt-' to subject prefix
4073 Reviewed-by: Ján Tomko <[email protected]>
4074
4075
4076 2020- 1- 15 Daniel Veillard <[email protected]>
4077
4078 Release of libvirt-python-6.0.0
4079 * setup.py: updated for the release
4080
4081
4082
4083 2020- 1- 3 Daniel P. Berrangé <[email protected]>
4084
4085 Add overrides for network port UUID getter/lookup methods
4086 The generator creates broken code for all these methods.
4087
4088 Reviewed-by: Fabiano Fidêncio <[email protected]>
4089
4090
4091 2020- 1- 3 Daniel P. Berrangé <[email protected]>
4092
4093 fix class type instantiated when listing network ports
4094 Reviewed-by: Erik Skultety <[email protected]>
4095
4096
4097 2019- 12- 9 Andrea Bolognani <[email protected]>
4098
4099 setup: Accept 'nosetests3' as nosetests binary
4100 This is the name used on Ubuntu.
4101
4102 Reviewed-by: Daniel P. Berrangé <[email protected]>
4103
4104
4105 2019- 12- 6 Daniel P. Berrangé <[email protected]>
4106
4107 Fix RPM deps for centos 7
4108 Reviewed-by: Andrea Bolognani <[email protected]>
4109
4110
4111 2019- 12- 4 Daniel P. Berrangé <[email protected]>
4112
4113 Drop support for python 2
4114 python2 will be end of life by the time of the next
4115 libvirt release. All our supported build targets, including
4116 CentOS7, have a python3 build available.
4117
4118 Reviewed-by: Michal Privoznik <[email protected]>
4119
4120
4121 2019- 12- 2 Daniel Veillard <[email protected]>
4122
4123 Release of libvirt-python 5.10.0
4124 * setup.py: update for release
4125
4126
4127
4128 2019- 11- 28 Pavel Hrdina <[email protected]>
4129
4130 generator.py: add mapping for VIR_DOMAIN_QEMU_AGENT_COMMAND_*
4131 Libvirt commit <95f5ac9ae52455e9da47afc95fa31c9456ac27ae> changed the
4132 VIR_DOMAIN_QEMU_AGENT_COMMAND_* enum values to use different enum values
4133 instead of direct numbers. We need to translate it back.
4134
4135 Traceback (most recent call last):
4136 File "generator.py", line 2143, in <module>
4137 qemuBuildWrappers(sys.argv[1])
4138 File "generator.py", line 2008, in qemuBuildWrappers
4139 items.sort(key=lambda i: (int(i[1]), i[0]))
4140 File "generator.py", line 2008, in <lambda>
4141 items.sort(key=lambda i: (int(i[1]), i[0]))
4142 ValueError: invalid literal for int() with base 10: 'VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK'
4143
4144 Reviewed-by: Peter Krempa <[email protected]>
4145
4146
4147 2019- 11- 6 Daniel Veillard <[email protected]>
4148
4149 Release of libvirt-python 5.9.0
4150 * setup.py: update for release
4151
4152
4153
4154 2019- 10- 5 Daniel Veillard <[email protected]>
4155
4156 Release of libvirt-python 5.8.0
4157 * setup.py: updated version
4158
4159
4160
4161 2019- 9- 23 Pavel Hrdina <[email protected]>
4162
4163 virDomainMigrate3Params: add missing parallel connections param
4164 Introduced in libvirt 5.2.0 by commit <d3ea986af24>.
4165
4166 Reported-by: Liping Cheng <[email protected]>
4167 Reviewed-by: Daniel P. Berrangé <[email protected]>
4168
4169
4170 2019- 9- 23 Pavel Hrdina <[email protected]>
4171
4172 virDomainMigrate3Params: add missing bandwidth postcopy param
4173 Introduced in libvirt 5.1.0 by commit <c830187a015>.
4174
4175 Reviewed-by: Daniel P. Berrangé <[email protected]>
4176
4177
4178 2019- 9- 20 Daniel P. Berrangé <[email protected]>
4179
4180 Custom impl for virConnectSetIdentity which can't be generated
4181 Reviewed-by: Pavel Hrdina <[email protected]>
4182
4183
4184 2019- 9- 20 Pavel Hrdina <[email protected]>
4185
4186 virDomainMemoryStats: include hugetlb pgalloc and pgfail
4187 Introduced in libvirt 5.4.0 by commit <a699b19f6c3>.
4188
4189 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1683516
4190
4191 Reviewed-by: Daniel P. Berrangé <[email protected]>
4192
4193
4194 2019- 9- 20 Pavel Hrdina <[email protected]>
4195
4196 virDomainMemoryStats: include disk caches
4197 Introduced in libvirt 4.6.0 by commit <aee04655089>.
4198
4199 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1683516
4200
4201 Reviewed-by: Daniel P. Berrangé <[email protected]>
4202
4203
4204 2019- 9- 12 Daniel P. Berrangé <[email protected]>
4205
4206 sanitytest: whitelist 'network' method as having no C impl
4207
4208
4209 2019- 9- 12 Daniel P. Berrangé <[email protected]>
4210
4211 generator: fix constructor for virNetworkPort
4212 The virNetworkPort class is passed both the virNetwork parent
4213 python class and the virNetworkPort C object. This needs special
4214 handling in the generator, similar to how virDomainSnapshots are
4215 dealt with.
4216
4217 Reviewed-by: Michal Privoznik <[email protected]>
4218
4219
4220 2019- 9- 5 Cole Robinson <[email protected]>
4221
4222 Fix -Wsign-compare warnings
4223 libvirt-override.c: In function ‘libvirt_virConnectBaselineHypervisorCPU’:
4224 libvirt-override.c:9946:23: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
4225 libvirt-override.c:9961:19: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
4226
4227 Use ssize_t as was similarly done in 75ec2acb6163b
4228
4229 Reviewed-by: Ján Tomko <[email protected]>
4230 Reviewed-by: Pavel Hrdina <[email protected]>
4231
4232
4233 2019- 9- 3 Daniel Veillard <[email protected]>
4234
4235 Release of libvirt-python 5.7.0
4236
4237
4238 2019- 9- 3 Nir Soffer <[email protected]>
4239
4240 spec: Build python2 package in fedora < 31
4241 Since commit ee0cfbe65c5d (spec: Unconditionally build python2 on
4242 Fedora) python2-libvirt is not built on any Fedora version.
4243
4244 Fix the spec to drop python2-libvirt on Fedora 31.
4245
4246 Reviewed-by: Cole Robinson <[email protected]>
4247
4248
4249 2019- 8- 29 Michal Privoznik <[email protected]>
4250
4251 Implement virDomainGetGuestInfo
4252 Reviewed-by: Daniel P. Berrangé <[email protected]>
4253
4254
4255 2019- 8- 5 Daniel Veillard <[email protected]>
4256
4257 Release of libvirt-python-5.6.0
4258 * setup.py: updated for new release
4259
4260
4261
4262 2019- 7- 29 Eric Blake <[email protected]>
4263
4264 Define virDomainCheckpointPtr typedef on old libvirt
4265 Needed prior to 5.6.0
4266
4267
4268
4269 2019- 7- 29 Eric Blake <[email protected]>
4270
4271 Add virDomainCheckpoint APIs
4272 Copies heavily from existing virDomainSnapshot handling, regarding
4273 what special cases the generator has to be taught and what overrides
4274 need to be written.
4275
4276 Reviewed-by: Daniel P. Berrangé <[email protected]>
4277
4278
4279 2019- 7- 9 Cole Robinson <[email protected]>
4280
4281 spec: Bump minimum supported Fedora version to 29
4282 Reviewed-by: Fabiano Fidêncio <[email protected]>
4283
4284
4285 2019- 7- 9 Cole Robinson <[email protected]>
4286
4287 spec: Unconditionally build python2 on Fedora
4288 In Fedora we are currently shipping python2 bindings for all builds,
4289 so this conditional is out of date. Fedora 31 may be the time that
4290 python2 bindings are dropped:
4291
4292 https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal
4293
4294 But I think it's better to wait for that to actually happen before
4295 we change this again
4296
4297 Reviewed-by: Fabiano Fidêncio <[email protected]>
4298
4299
4300 2019- 7- 2 Daniel Veillard <[email protected]>
4301
4302 Release of libvirt-python 5.5.0
4303 * setup.py: update for release
4304
4305
4306
4307 2019- 6- 26 Sergei Turchanov <[email protected]>
4308
4309 Fix regression in lxcOpenNamespace
4310 This fixes regression caused by the 1d39dbaf637db03f6e597ed56b96aa065710b4a1
4311
4312 fdlist[i] erroneously was replaced by fdlist[1] which caused
4313 lxcOpenNamespace to return a list with identical elements.
4314
4315 Reviewed-by: Ján Tomko <[email protected]>
4316
4317
4318 2019- 6- 20 Daniel P. Berrangé <[email protected]>
4319
4320 Add new override file to dist
4321
4322
4323 2019- 6- 20 Daniel P. Berrangé <[email protected]>
4324
4325 Add missing impl of virNetworkListAllPorts
4326 This API needs manual impl as the generator cannot cope
4327
4328
4329
4330 2019- 6- 20 Daniel P. Berrangé <[email protected]>
4331
4332 sanitytest: add some special cases for virNetworkPort APIs
4333
4334
4335 2019- 6- 20 Daniel P. Berrangé <[email protected]>
4336
4337 generator: fix naming of getter APIs for virNetworkPort
4338
4339
4340 2019- 6- 20 Daniel P. Berrangé <[email protected]>
4341
4342 Define virNetworkPortPtr typedef on old libvirt
4343
4344
4345 2019- 6- 20 Daniel P. Berrangé <[email protected]>
4346
4347 Fix syntax error with missing ; and too many )
4348
4349
4350 2019- 6- 20 Daniel P. Berrangé <[email protected]>
4351
4352 Add support for virNetworkPort object & APIs
4353 Define the various rules in the generator to wire up methods into the
4354 virNetwork class and create the new virNetworkPort class.
4355
4356 Reviewed-by: Pavel Hrdina <[email protected]>
4357 Reviewed-by: Ján Tomko <[email protected]>
4358
4359
4360 2019- 6- 3 Daniel Veillard <[email protected]>
4361
4362 Release of Libvirt-python 5.4.0
4363
4364
4365 2019- 5- 4 Daniel Veillard <[email protected]>
4366
4367 Release of libvirt-python 5.3.0
4368 * setup.py: bumped release version
4369
4370
4371
4372 2019- 4- 29 Michal Privoznik <[email protected]>
4373
4374 Allow virConnect.getDomainCapabilities() to have no arguments
4375 Our C API allows no values to be passed (well, it accepts all
4376 NULLs). There's no reason that python binding should require all
4377 arguments.
4378
4379 Reviewed-by: Kashyap Chamarthy <[email protected]>
4380
4381
4382 2019- 4- 4 Daniel P. Berrangé <[email protected]>
4383
4384 rpm: use new python macros for build/install rules
4385 The new %py{2,3}_{build,install} macros ensure that the right compiler
4386 and linker flags are used when building python modules.
4387
4388 Reviewed-by: Andrea Bolognani <[email protected]>
4389
4390
4391 2019- 4- 3 Daniel Veillard <[email protected]>
4392
4393 Release of libvirt-python 5.2.0
4394 * setup.py: bumped release version up
4395
4396
4397
4398 2019- 3- 12 Nir Soffer <[email protected]>
4399
4400 Fix handling of optional params in blockCopy()
4401 Commit 2b4bd07e0a22 (Add check for params, nparams being a dictionary)
4402 changed the way the optional params argument is treated. If
4403 libvirt.virDomain.blockCopy() is called without specifying params,
4404 params is None, and the call will fail with:
4405
4406 TypeError: block params must be a dictionary
4407
4408 This is wrong as params is defined as kwarg, breaking existing libvirt
4409 users like oVirt. Add a check for Py_None, so we accept either a dict or
4410 None and fail with TypeError with anything else.
4411
4412 Resolves: https://bugzilla.redhat.com/1687114
4413
4414
4415
4416 2019- 3- 4 Daniel Veillard <[email protected]>
4417
4418 Release of libvirt-python 5.1.0
4419 * setup.py: updated for release
4420
4421
4422
4423 2019- 2- 25 Pavel Hrdina <[email protected]>
4424
4425 Fix virDomainPinIOThread typed params check
4426 The VIR_DOMAIN_IOTHREAD_POLL_SHRINK is unsigned int.
4427
4428 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1680546
4429
4430
4431
4432 2019- 2- 7 Eric Blake <[email protected]>
4433
4434 generator.py: typo fix
4435
4436
4437 2019- 1- 24 Daniel P. Berrangé <[email protected]>
4438
4439 travis: add testing of 5.0.0 release
4440 Update to test against very latest release. Since we dropped two
4441 python versions, we can afford to add new libvirt version without
4442 dropping a previous one.
4443
4444 Reviewed-by: Cole Robinson <[email protected]>
4445
4446
4447 2019- 1- 24 Daniel P. Berrangé <[email protected]>
4448
4449 travis: switch from trusty to xenial dist
4450 The trusty gnutls version is too old to support modern libvirt
4451
4452 Reviewed-by: Cole Robinson <[email protected]>
4453
4454
4455 2019- 1- 24 Daniel P. Berrangé <[email protected]>
4456
4457 travis: remove python 2.6 and 3.6 from build matrix
4458 The lxml package that we download with pip no longer supports either
4459 of these versions of python.
4460
4461 Reviewed-by: Cole Robinson <[email protected]>
4462
4463
4464 2019- 1- 22 Daniel P. Berrangé <[email protected]>
4465
4466 rpm spec: remove %{extra_release} from spec
4467 The %{extra_release} field was previously populated by data from the old
4468 autobuild.sh file but is no longer used.
4469
4470
4471
4472 2019- 1- 15 Daniel Veillard <[email protected]>
4473
4474 Release of libvirt-python 5.0.0
4475 * setup.py: updated for release
4476
4477
4478
4479 2018- 12- 3 Daniel Veillard <[email protected]>
4480
4481 Release of libvirt-python-4.10.0
4482 * setup.py: update to bump release number
4483
4484
4485
4486 2018- 11- 26 Philipp Hahn <[email protected]>
4487
4488 Add daemon to list of shutdown reasons
4489 Add the support to work with libvirt commit 66a85cb13.
4490
4491
4492
4493 2018- 11- 20 John Ferlan <[email protected]>
4494
4495 Fix copy paste error on the version check value
4496
4497
4498 2018- 11- 20 John Ferlan <[email protected]>
4499
4500 Implement API binding for virDomainSetIOThreadParams
4501 Similar to libvirt_virDomainBlockCopy (and migration API's). Create
4502 the code for the new API.
4503
4504 Reviewed-by: Pavel Hrdina <[email protected]>
4505
4506
4507 2018- 11- 20 John Ferlan <[email protected]>
4508
4509 Add check for params, nparams being a dictionary
4510 If PyDict_Check fails, we should force an error rather than
4511 blindly continuing on.
4512
4513 Reviewed-by: Pavel Hrdina <[email protected]>
4514
4515
4516 2018- 11- 20 John Ferlan <[email protected]>
4517
4518 Add missing virPyDictToTypedParams for libvirt_virDomainBlockCopy
4519 Need to free params like similar API's such as libvirt_virDomainMigrate3
4520 and libvirt_virDomainMigrateToURI3.
4521
4522 Reviewed-by: Pavel Hrdina <[email protected]>
4523
4524
4525 2018- 11- 20 John Ferlan <[email protected]>
4526
4527 Fix typos in virDomainSetSchedulerParameters name
4528 Reviewed-by: Pavel Hrdina <[email protected]>
4529
4530
4531 2018- 11- 4 Daniel Veillard <[email protected]>
4532
4533 Release of libvirt-python 4.9.0
4534 * setup.py: update for new release
4535
4536
4537
4538 2018- 11- 1 Philipp Hahn <[email protected]>
4539
4540 event-test.py: Report ERROR events
4541 VIR_DOMAIN_EVENT_ID_IO_ERROR and VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
4542 callbacks receive the same 'action' parameter, so also translate that
4543 numeric action to a descriptive text for the first callback.
4544
4545
4546
4547 2018- 11- 1 Philipp Hahn <[email protected]>
4548
4549 event-test.py: Fix ERROR event
4550 ERROR_EVENTS translates the numeric 'action' argument to a description,
4551 not the 'reason' argument which already contains a descriptive string
4552 like 'enospc'.
4553
4554 > Traceback (most recent call last):
4555 > File "/usr/lib/python2.7/dist-packages/libvirt.py", line 4661, in _dispatchDomainEventIOErrorReasonCallback
4556 > reason, opaque)
4557 > File "libvirt-python/examples/event-test.py", line 536, in myDomainEventIOErrorReasonCallback
4558 > dom.name(), dom.ID(), srcpath, devalias, action, ERROR_EVENTS[reason]))
4559 > File "libvirt-python/examples/event-test.py", line 474, in __getitem__
4560 > data = self.args[item]
4561 > TypeError: tuple indices must be integers, not str
4562
4563 Fixes: f5928c6711654f1496707ca77f626b3192843d57
4564
4565
4566 2018- 10- 1 Daniel Veillard <[email protected]>
4567
4568 Release of libvirt-python 4.8.0
4569
4570 - setup.py : updated for release
4571
4572
4573 2018- 9- 24 Philipp Hahn <[email protected]>
4574
4575 event-test.py: Fix blanks
4576 Closer to pep8
4577
4578
4579
4580 2018- 9- 24 Philipp Hahn <[email protected]>
4581
4582 event-test.py: Convert CONNECTION events
4583 to use new Description class
4584
4585
4586
4587 2018- 9- 24 Philipp Hahn <[email protected]>
4588
4589 event-test.py: Convert SECRET events
4590 to use new Description class
4591
4592
4593
4594 2018- 9- 24 Philipp Hahn <[email protected]>
4595
4596 event-test.py: Convert DEVICE events
4597 to use new Description class
4598
4599
4600
4601 2018- 9- 24 Philipp Hahn <[email protected]>
4602
4603 event-test.py: Convert STORAGE events
4604 to use new Description class
4605
4606
4607
4608 2018- 9- 24 Philipp Hahn <[email protected]>
4609
4610 event-test.py: Convert NETWORK events
4611 to use new Description class
4612
4613
4614
4615 2018- 9- 24 Philipp Hahn <[email protected]>
4616
4617 event-test.py: Convert TRAY events
4618 to use new Description class
4619
4620
4621
4622 2018- 9- 24 Philipp Hahn <[email protected]>
4623
4624 event-test.py: Convert DISK events
4625 to use new Description class
4626
4627
4628
4629 2018- 9- 24 Philipp Hahn <[email protected]>
4630
4631 event-test.py: Convert GRAPHICS events
4632 to use new Description class
4633
4634
4635
4636 2018- 9- 24 Philipp Hahn <[email protected]>
4637
4638 event-test.py: Convert AGENT events
4639 to use new Description class
4640
4641
4642
4643 2018- 9- 24 Philipp Hahn <[email protected]>
4644
4645 event-test.py: Convert ERROR events
4646 to use new Description class
4647
4648
4649
4650 2018- 9- 24 Philipp Hahn <[email protected]>
4651
4652 event-test.py: Convert WATCHDOG events
4653 to use new Description class
4654
4655
4656
4657 2018- 9- 24 Philipp Hahn <[email protected]>
4658
4659 event-test.py: Convert BLOCKJOB events
4660 to use new Description class
4661
4662
4663
4664 2018- 9- 24 Philipp Hahn <[email protected]>
4665
4666 event-test.py: Convert LIVECYCLE events
4667 to use new Description class
4668
4669
4670
4671 2018- 9- 24 Philipp Hahn <[email protected]>
4672
4673 event-test.py: Add class for event descriptions
4674
4675
4676 2018- 9- 24 Philipp Hahn <[email protected]>
4677
4678 event-test.py: Simplify event ID lists
4679 by directly building the list with the IDs instead of appending them
4680 explicitly.
4681
4682
4683
4684 2018- 9- 24 Philipp Hahn <[email protected]>
4685
4686 event-test.py: Merge livecycle callbacks
4687 Registering the same function twice using the old domainEventRegister()
4688 interface would not work, as the function reference is used for
4689 un-registering.
4690
4691 But it is not a problem with the new interface domainEventRegisterAny(),
4692 as that returns a unique ID.
4693
4694 While at it also demonstrate the 'opaque' mechanism.
4695
4696
4697
4698 2018- 9- 24 Philipp Hahn <[email protected]>
4699
4700 event-test.py: Use __file__
4701 instead of sys.argv[0]
4702
4703
4704
4705 2018- 9- 24 Philipp Hahn <[email protected]>
4706
4707 event-test.py: Add missing globale statement
4708 to fix loop termination on exit.
4709
4710
4711
4712 2018- 9- 24 Philipp Hahn <[email protected]>
4713
4714 event-test.py: Remove dead assignment
4715 variable is unused
4716
4717
4718
4719 2018- 9- 24 Philipp Hahn <[email protected]>
4720
4721 event-test.py: Remove extra parenthesis
4722
4723
4724 2018- 9- 24 Philipp Hahn <[email protected]>
4725
4726 event-test.py: Handle closed connection
4727 If libvirtd terminates while event-test.py has an open connection to it,
4728 it will crash with the following traceback:
4729
4730 > myConnectionCloseCallback: qemu:///session: Error
4731 > Exception in thread libvirtEventLoop:
4732 > Traceback (most recent call last):
4733 > File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
4734 > self.run()
4735 > File "/usr/lib/python2.7/threading.py", line 754, in run
4736 > self.__target(*self.__args, **self.__kwargs)
4737 > File "examples/event-test.py", line 424, in virEventLoopPollRun
4738 > eventLoop.run_loop()
4739 > File "examples/event-test.py", line 242, in run_loop
4740 > self.run_once()
4741 > File "examples/event-test.py", line 187, in run_once
4742 > libvirt.virEventInvokeFreeCallback(opaque)
4743 > AttributeError: 'module' object has no attribute 'virEventInvokeFreeCallback'
4744 >
4745 > libvirt: XML-RPC error : internal error: client socket is closed
4746 > Traceback (most recent call last):
4747 > File "examples/event-test.py", line 872, in <module>
4748 > main()
4749 > File "examples/event-test.py", line 854, in main
4750 > vc.secretEventDeregisterAny(id)
4751 > File "/usr/lib/python2.7/dist-packages/libvirt.py", line 4987, in secretEventDeregisterAny
4752 > if ret == -1: raise libvirtError ('virConnectSecretEventDeregisterAny() failed', conn=self)
4753 > libvirt.libvirtError: internal error: client socket is closed
4754 > Closing qemu:///session
4755
4756 Skip unregistering the event callbacks and closing the connection if the
4757 connection is already broken / closed.
4758
4759
4760
4761 2018- 9- 24 Philipp Hahn <[email protected]>
4762
4763 event-test.py: Sync list of domain lifecycle events
4764 Add new events to prevent crash:
4765 > Traceback (most recent call last):
4766 > File "/usr/lib/python2.7/dist-packages/libvirt.py", line 4601, in _dispatchDomainEventCallbacks
4767 > cb(self, virDomain(self, _obj=dom), event, detail, opaque)
4768 > File "libvirt-python/examples/event-test.py", line 505, in myDomainEventCallback1
4769 > domDetailToString(event, detail)))
4770 > File "libvirt-python/examples/event-test.py", line 484, in domDetailToString
4771 > return domEventStrings[event][detail]
4772 > IndexError: tuple index out of range
4773
4774
4775
4776 2018- 9- 3 Daniel Veillard <[email protected]>
4777
4778 Release of libvirt-python=4.7.0
4779 * setup.py: updated for release
4780
4781
4782
4783 2018- 8- 6 Daniel Veillard <[email protected]>
4784
4785 Release of libvirt-python-4.6.0
4786 * setup.py: updated for release
4787
4788
4789
4790 2018- 7- 23 Daniel P. Berrangé <[email protected]>
4791
4792 rpm: update min required rhel/fedora
4793 Reviewed-by: Andrea Bolognani <[email protected]>
4794
4795
4796 2018- 7- 23 Daniel P. Berrangé <[email protected]>
4797
4798 rpm: add BuildRequires on gcc
4799 The gcc RPM is no longer part of the default build root.
4800
4801 Reviewed-by: Andrea Bolognani <[email protected]>
4802
4803
4804 2018- 7- 23 Daniel P. Berrangé <[email protected]>
4805
4806 rpm: use the versioned python2 macro names
4807 The use of non-versioned python2 macro names is deprecated in Fedora
4808
4809 Reviewed-by: Andrea Bolognani <[email protected]>
4810
4811
4812 2018- 7- 16 Daniel P. Berrangé <[email protected]>
4813
4814 travis: add libvirt 4.5.0 version to build matrix
4815
4816
4817 2018- 7- 16 Daniel P. Berrangé <[email protected]>
4818
4819 fix build with older libvirt missing virNWFilterBindingPtr
4820 While we correctly disable all public API bindings that rely on
4821 virNWFilterBindingPtr, the generator is still creating a helper function
4822 that needs it - libvirt_virNWFilterBinding_pointer. Making this helper
4823 conditional is a little hairy, so just provide a trivial typedef to keep
4824 it happy.
4825
4826
4827
4828 2018- 7- 10 Cole Robinson <[email protected]>
4829
4830 spec: Remove Group: and %defattr
4831 These are only needed for RHEL5 builds, which are no longer supported
4832
4833 https://lists.fedoraproject.org/archives/list/[email protected]/message/CMCUBB4SWS3URHTRRS3OPFM4HF5CGKBW/
4834 https://fedoraproject.org/wiki/RPMGroups
4835
4836
4837
4838 2018- 7- 2 Daniel Veillard <[email protected]>
4839
4840 Release of libvirt-python-4.5.0
4841 * setup.py: updated for release
4842
4843
4844
4845 2018- 6- 28 Daniel P. Berrangé <[email protected]>
4846
4847 Fix bugs in nwfilter binding APIs
4848 We did not correctly mangle the API names in two cases, and we also
4849 forgot to specialize the lookup method name in the sanity test.
4850
4851
4852
4853 2018- 6- 28 Daniel P. Berrangé <[email protected]>
4854
4855 Add support for nwfilter binding objects / apis
4856
4857
4858 2018- 6- 27 Cole Robinson <[email protected]>
4859
4860 libvirtaio: Fix compat with python 3.7
4861 In python 3.7, async is now a keyword, so this throws a syntax error:
4862
4863 File "/usr/lib64/python3.7/site-packages/libvirtaio.py", line 49
4864 from asyncio import async as ensure_future
4865 ^
4866 SyntaxError: invalid syntax
4867
4868 Switch to getattr trickery to accomplish the same goal
4869
4870 Reviewed-by: Pavel Hrdina <[email protected]>
4871 Reviewed-by: Andrea Bolognani <[email protected]>
4872
4873
4874 2018- 6- 14 Erik Skultety <[email protected]>
4875
4876 Add support for virNodeGetSEVInfo
4877 This binding allows to query the AMD's SEV firmware for various platform
4878 specific things, like a PDH certificate and a certificate chain to
4879 establish a trusted connection with the firmware. Because the API uses
4880 typed params, it's exempted from generation.
4881
4882 Reviewed-by: Ján Tomko <[email protected]>
4883
4884
4885 2018- 6- 14 Erik Skultety <[email protected]>
4886
4887 Add support for virDomainGetLaunchSecurityInfo
4888 Libvirt recently introduced support for getting launch security
4889 parameters, most notably AMD SEV VM memory measurement. This API can't
4890 be generated as it's using typed parameters which we need to allocate.
4891
4892 Reviewed-by: Ján Tomko <[email protected]>
4893
4894
4895 2018- 6- 12 Pavel Hrdina <[email protected]>
4896
4897 libvirt_charPtrUnwrap: remove unnecessary check of returned string
4898 Function libvirt_charPtrUnwrap() either fails or always sets the
4899 unwrapped string so there is no need to check it explicitly.
4900
4901 Reviewed-by: Ján Tomko <[email protected]>
4902
4903
4904 2018- 6- 12 Pavel Hrdina <[email protected]>
4905
4906 libvirt-override: Reset exception if the error is ignored
4907 In virConnectCredCallbackWrapper() we ignore the error case of
4908 libvirt_charPtrUnwrap() function so we should also reset the exception.
4909
4910 Reviewed-by: Ján Tomko <[email protected]>
4911
4912
4913 2018- 6- 12 Pavel Hrdina <[email protected]>
4914
4915 typewrappers: Fix libvirt_charPtrUnwrap to set an exception if it fails
4916 If the function fails it should always set an exception.
4917
4918 Reviewed-by: Ján Tomko <[email protected]>
4919
4920
4921 2018- 6- 12 Pavel Hrdina <[email protected]>
4922
4923 libvirt-utils: remove unused py_str function
4924 Commit <57a160b5248ba47d4e1c9d22d95847dad8e0524f> removed last usage
4925 but did not remove the function itself.
4926
4927 Reviewed-by: Ján Tomko <[email protected]>
4928
4929
4930 2018- 6- 6 Daniel P. Berrangé <[email protected]>
4931
4932 Blacklist virGetLastError{Code,Domain}
4933 These methods will not be exposed to apps, since we auto raise
4934 all errors.
4935
4936
4937
4938 2018- 6- 4 Daniel Veillard <[email protected]>
4939
4940 Release of libvirt-python-4.4.0
4941 * setup.py: update for release
4942
4943
4944
4945 2018- 6- 1 Jiri Denemark <[email protected]>
4946
4947 Add support for virConnectBaselineHypervisorCPU
4948 The python bindings for this API cannot be generated because are
4949 generator is not capable of handling string arrays (char **) parameters.
4950
4951 https://bugzilla.redhat.com/show_bug.cgi?id=1584676
4952
4953 Reviewed-by: Ján Tomko <[email protected]>
4954
4955
4956 2018- 5- 22 Michal Privoznik <[email protected]>
4957
4958 event-test.py: Sync list of storage lifecycle events
4959 https://bugzilla.redhat.com/show_bug.cgi?id=1578337
4960
4961 Since libvirt 3.8.0 we have 6 events: defined, undefined,
4962 started, stopped, created, deleted. However, the last two were
4963 missing in a string list that translates libvirt events (int)
4964 into human readable strings.
4965
4966 Reviewed-by: Pavel Hrdina <[email protected]>
4967
4968
4969 2018- 5- 16 Marc Hartmayer <[email protected]>
4970
4971 Allow virConnect to be used as a context manager
4972 The libvirt python bindings are now more 'pythonic' as virConnect can
4973 now be used as a context manager.
4974
4975 For example, it's possible to write the following code:
4976
4977 with libvirt.open() as conn:
4978 # do something with the connection...
4979 print(conn.listAllDomains())
4980
4981 At the end of this with-block the connection will be closed
4982 automatically.
4983
4984 Reviewed-by: Bjoern Walk <[email protected]>
4985 Reviewed-by: Boris Fiuczynski <[email protected]>
4986
4987
4988 2018- 5- 16 Marc Hartmayer <[email protected]>
4989
4990 libvirt-override.py: remove unused import
4991 Reviewed-by: Boris Fiuczynski <[email protected]>
4992 Reviewed-by: Bjoern Walk <[email protected]>
4993
4994
4995 2018- 5- 16 Boris Fiuczynski <[email protected]>
4996
4997 libvirt-override.py: fix sparseSendAll
4998 Variable ret is used before assignment.
4999
5000
5001
5002 2018- 5- 16 Marc Hartmayer <[email protected]>
5003
5004 libvirt_qemu/lxc: fix a namespace issue
5005 Reviewed-by: Bjoern Walk <[email protected]>
5006 Reviewed-by: Boris Fiuczynski <[email protected]>
5007
5008
5009 2018- 5- 16 Marc Hartmayer <[email protected]>
5010
5011 libvirt_qemu/lxc: import 'sys' package
5012 This fixes the pylint [1] warning "E: 25,16: Undefined variable
5013 'sys' (undefined-variable)".
5014
5015 [1] https://www.pylint.org/
5016
5017 Reviewed-by: Boris Fiuczynski <[email protected]>
5018 Reviewed-by: Bjoern Walk <[email protected]>
5019
5020
5021 2018- 5- 3 Andrea Bolognani <[email protected]>
5022
5023 maint: Drop autobuild.sh
5024 The Test-AutoBuild project, that this script is supposed
5025 to be used with, hasn't seen any activity in ~7 years;
5026 these days, libvirt-python CI builds are happening on the
5027 Jenkins-based CentOS CI environment under the libvirt
5028 umbrella[1], and in that context the script is not used
5029 at all.
5030
5031 [1] https://ci.centos.org/view/libvirt/
5032
5033 Reviewed-by: Daniel P. Berrangé <[email protected]>
5034
5035
5036 2018- 4- 24 Daniel P. Berrangé <[email protected]>
5037
5038 git: add config file telling git-publish how to send patches
5039 The "git-publish" tool is a useful git extension for sending patch
5040 series for code review. It automatically creates versioned tags
5041 each time code on a branch is sent, so that there is a record of
5042 each version. It also remembers the cover letter so it does not
5043 need re-entering each time the series is reposted.
5044
5045 With this config file present it is now sufficient[1] to run
5046
5047 $ git publish
5048
5049 to send all patches in a branch to the list for review, with the
5050 correct subject prefix added for this non-core libvirt module.
5051
5052 [1] Assuming your $HOME/.gitconfig has an SMTP server listed
5053 at least e.g.
5054
5055 [sendemail]
5056 smtpserver = smtp.example.com
5057
5058
5059
5060 2018- 4- 19 Daniel P. Berrangé <[email protected]>
5061
5062 Fix build with older libvirt versions
5063 The libvirt python module is supposed to build with historical versions
5064 of the API back to 0.9.1, which means all constants / methods must be
5065 wrapped in conditionals. This was accidentally forgotten in:
5066
5067 commit 314b2346df2d8e2d7d705b003c693b4fa0189bdf
5068 Author: Edgar Kaziakhmedov <[email protected]>
5069 Date: Wed Feb 7 17:49:30 2018 +0300
5070
5071 Set hints for virPyDictToTypedParams
5072
5073 Predefine hints for all parameters possible to avoid wrong type
5074 convert.
5075
5076 This broke the build against any libvirt < 2.0.0
5077
5078 Reviewed-by: Ján Tomko <[email protected]>
5079
5080
5081 2018- 4- 3 Daniel P. Berrangé <[email protected]>
5082
5083 Post-release version bump to 4.3.0
5084
5085
5086 2018- 3- 23 Daniel P. Berrangé <[email protected]>
5087
5088 Disable Python 2 on future RHEL and Fedora > 29
5089 The end of Python 2 is nearing, so declare when it will be removed
5090 from libvirt Python binding RPMs.
5091
5092 NB, this doesn't imply we'll be removing py2 support from upstream
5093 libvirt-python on the same timeframe - we'll consider what todo
5094 wrt that when upstream Python 2 finally goes EOL.
5095
5096 Reviewed-by: Jiri Denemark <[email protected]>
5097
5098
5099 2018- 3- 5 Daniel P. Berrangé <[email protected]>
5100
5101 Post-release version bump to 4.2.0
5102
5103
5104 2018- 3- 5 Daniel Veillard <[email protected]>
5105
5106 Release of libvirt-python 4.1.0
5107
5108
5109 2018- 2- 19 Pavel Hrdina <[email protected]>
5110
5111 Fix virPyDictToTypedParams type hint for block copy params
5112 Reviewed-by: Daniel P. Berrangé <[email protected]>
5113
5114
5115 2018- 2- 19 Pavel Hrdina <[email protected]>
5116
5117 Add missing virPyDictToTypedParams hint for migration params
5118 Reviewed-by: Daniel P. Berrangé <[email protected]>
5119
5120
5121 2018- 2- 19 Pavel Hrdina <[email protected]>
5122
5123 Fix order of virPyDictToTypedParams hints
5124 This corresponds to the order in libvirt-domain.h header file.
5125
5126 Reviewed-by: Daniel P. Berrangé <[email protected]>
5127
5128
5129 2018- 2- 19 Pavel Hrdina <[email protected]>
5130
5131 Use static variables to store virPyDictToTypedParams hints
5132 There is no need to have dynamic allocation every time the API
5133 is called. Rewrites commit <314b2346df>.
5134
5135 Reviewed-by: Daniel P. Berrangé <[email protected]>
5136
5137
5138 2018- 2- 19 Edgar Kaziakhmedov <[email protected]>
5139
5140 Set hints for virPyDictToTypedParams
5141 Predefine hints for all parameters possible to avoid wrong type
5142 convert.
5143
5144
5145
5146 2018- 2- 9 Daniel P. Berrangé <[email protected]>
5147
5148 tests: add special case for virStoragePoolLookupByTargetPath
5149 This new API trips up the sanity test for checking mapping of
5150 all C APIs into Python.
5151
5152
5153
5154 2018- 2- 6 Jiri Denemark <[email protected]>
5155
5156 event-test.py: Remove extra ( in --help output
5157
5158
5159 2018- 1- 19 Daniel Veillard <[email protected]>
5160
5161 Release of libvirt-python-4.0.0
5162
5163
5164 2018- 1- 12 Daniel P. Berrange <[email protected]>
5165
5166 Use python*_sitearch macros instead of manually defining the dir
5167 Note we use python_sitearch not python2_sitearch, since the former
5168 is more portable.
5169
5170 Reviewed-by: Pavel Hrdina <[email protected]>
5171
5172
5173 2018- 1- 12 Daniel P. Berrange <[email protected]>
5174
5175 Fix filtering of RPM provides for .so files
5176 Reviewed-by: Pavel Hrdina <[email protected]>
5177
5178
5179 2018- 1- 12 Daniel P. Berrange <[email protected]>
5180
5181 Require libvirt native version matching py version by default
5182 Although we're capable of building against any libvirt >= 0.9.11, 99% of the
5183 time we want RPM builds to be done against matching libvirt version, otherwise
5184 we might silently build against an unexpected/wrong version.
5185
5186 We don't support building against a native libvirt that's newer than the
5187 python binding, since the generator may incorrectly handle new APIs. So use
5188 == instead of >= too.
5189
5190 Reviewed-by: Pavel Hrdina <[email protected]>
5191
5192
5193 2018- 1- 12 Daniel P. Berrange <[email protected]>
5194
5195 Turn on python3 sub-RPMs for RHEL > 7
5196 It is expected that future RHEL-8 will have python3 by default, so enable that.
5197 It is unclear whether python2 will still be available, so leave that enabled
5198 for now.
5199
5200 Reviewed-by: Pavel Hrdina <[email protected]>
5201
5202
5203 2018- 1- 12 Daniel P. Berrange <[email protected]>
5204
5205 Adapt to rename of py2 RPMs from python- to python2- prefix
5206 Reviewed-by: Pavel Hrdina <[email protected]>
5207
5208
5209 2018- 1- 12 Daniel P. Berrange <[email protected]>
5210
5211 Add emacs mode marker to activate rpm-spec highlighting
5212 Reviewed-by: Pavel Hrdina <[email protected]>
5213
5214
5215 2018- 1- 12 Daniel P. Berrange <[email protected]>
5216
5217 Add checks for min supported distros
5218 Be clear about which distros we aim to support with the specfile, so we know
5219 what we can cleanup in the spec later.
5220
5221 Reviewed-by: Pavel Hrdina <[email protected]>
5222
5223
5224 2018- 1- 12 Daniel P. Berrange <[email protected]>
5225
5226 Allow override of which sub-RPMs to build
5227 Allow using
5228
5229 rpmbuild --define "with_python2 0"
5230
5231 to override the default logic about which python sub-RPMs to build
5232
5233 Reviewed-by: Pavel Hrdina <[email protected]>
5234
5235
5236 2018- 1- 12 Daniel P. Berrange <[email protected]>
5237
5238 Allow disabling of python2 RPM build
5239 With Fedora modularity, it is possible to have add-on repos for multiple
5240 versions of python3. It is thus desirable to be able to build libvirt-python
5241 in these repos, with only the python3 sub-RPMs enabled.
5242
5243 Thus also helps if future RHEL/Fedora drop python2 entirely from their default
5244 repos.
5245
5246 Reviewed-by: Pavel Hrdina <[email protected]>
5247
5248
5249 2017- 12- 11 Peng Hao <[email protected]>
5250
5251 libvirt-python : PyObject memory leak
5252 libvirt_virConnectDomainEventTunableCallback leak a PyObject.
5253
5254
5255
5256 2017- 12- 4 Daniel Veillard <[email protected]>
5257
5258 Release of libvirt-python 3.10.0
5259
5260
5261 2017- 11- 30 Cédric Bosdonnat <[email protected]>
5262
5263 Don't hardcode interpreter path
5264 This is particularly useful on operating systems that don't ship
5265 Python as part of the base system (eg. FreeBSD) while still working
5266 just as well as it did before on Linux.
5267
5268 Reviewed-by: Daniel P. Berrange <[email protected]>
5269
5270
5271 2017- 11- 2 Daniel Veillard <[email protected]>
5272
5273 Release of libvirt-python-3.9.0
5274
5275
5276 2017- 9- 29 Nir Soffer <[email protected]>
5277
5278 Unify whitespace around *_ALLOW_THREADS macros
5279 Most of the code treats libvirt API calls as separate block, keeping one
5280 blank line before the LIBVIRT_BEGIN_ALLOW_THREAD, and one blank line
5281 after LIBVIRT_END_ALLOW_THREADS. Unify the whitespace so all calls
5282 wrapped with these macros are treated as a separate block.
5283
5284
5285 2017- 9- 27 Nir Soffer <[email protected]>
5286
5287 Release the GIL during virDomainGetMemoryStats & virDomainGetDiskErrors
5288 We discovered that the entire python process get stuck for about 30
5289 seconds when calling virDomain.getMemoryStats() if libvirt is stuck in
5290 virConnect.getAllDomainStats() on inaccessible storage. This blocking
5291 cause a horrible mess in oVirt.
5292
5293 This patches adds the standard *_ALLOW_THREADS around the call to avoid
5294 this unwanted blocking.
5295
5296
5297
5298 2017- 9- 26 Daniel P. Berrange <[email protected]>
5299
5300 Avoid implicit treatment of an arithmetic result as a boolean
5301 Latest GCC versions are unhappy with us treating an integer
5302 arithmetic result as a boolean:
5303
5304 libvirt-utils.c: In function ‘virReallocN’:
5305 libvirt-utils.c:111:23: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context]
5306 if (!tmp && (size * count)) {
5307 ~~~~~~^~~~~~~~
5308
5309 Add an explicit comparison '!= 0' to keep it happy, since its
5310 suggestion to use '&&' is nonsense.
5311
5312
5313
5314 2017- 9- 26 Daniel P. Berrange <[email protected]>
5315
5316 Fix comparisons between signed & unsigned integers
5317 When python3 builds C modules, it adds the -Wsign-compare flag to GCC.
5318 This creates lots of warnings where we compare a 'size_t' value against
5319 an 'int' value due to signed/unsigned difference. Change all the size_t
5320 types to ssize_t to address this.
5321
5322
5323
5324 2017- 9- 26 Wojtek Porczyk <[email protected]>
5325
5326 libvirtaio: add .drain() coroutine
5327 The intended use is to ensure that the implementation is empty, which is
5328 one way to ensure that all connections were properly closed and file
5329 descriptors reclaimed.
5330
5331
5332
5333 2017- 9- 26 Wojtek Porczyk <[email protected]>
5334
5335 libvirtaio: keep track of the current implementation
5336 Since 7534c19 it is not possible to register event implementation twice.
5337 Instead, allow for retrieving the current one, should it be needed
5338 afterwards.
5339
5340
5341
5342 2017- 9- 26 Wojtek Porczyk <[email protected]>
5343
5344 libvirtaio: fix closing of the objects
5345 - Descriptor.close() was a dead code, never used.
5346 - TimeoutCallback.close(), as a cleanup function, should have called
5347 super() as last statement, not first
5348
5349
5350
5351 2017- 9- 26 Wojtek Porczyk <[email protected]>
5352
5353 libvirtaio: do not double-add callbacks
5354 This was a harmless bug, without any impact, but it is wrong to manage
5355 the collection of callbacks from it's members.
5356
5357
5358
5359 2017- 9- 26 Wojtek Porczyk <[email protected]>
5360
5361 libvirtaio: cache the list of callbacks when calling
5362 When the callback causes something that results in changes wrt
5363 registered handles, python aborts iteration.
5364
5365 Relevant error message:
5366
5367 Exception in callback None()
5368 handle: <Handle cancelled>
5369 Traceback (most recent call last):
5370 File "/usr/lib64/python3.5/asyncio/events.py", line 126, in _run
5371 self._callback(*self._args)
5372 File "/usr/lib64/python3.5/site-packages/libvirtaio.py", line 99, in _handle
5373 for callback in self.callbacks.values():
5374 RuntimeError: dictionary changed size during iteration
5375
5376 QubesOS/qubes-issues#2805
5377
5378
5379 2017- 9- 26 Wojtek Porczyk <[email protected]>
5380
5381 libvirtaio: add more debug logging
5382 This logging is helpful for tracing problems with unclosed connections
5383 and leaking file descriptors.
5384
5385
5386
5387 2017- 9- 19 Daniel P. Berrange <[email protected]>
5388
5389 Add travis build config
5390 Enable builds on several python versions, and against several versions
5391 of libvirt. Ideally we would build all the way back to 0.9.11, since
5392 that is the min supported libvirt for python binding. It is not possible
5393 to build this old libvirt version on modern distros though, so using
5394 1.2.0 as the oldest for now.
5395
5396 Reviewed-by: Martin Kletzander <[email protected]>
5397
5398
5399 2017- 9- 18 Daniel P. Berrange <[email protected]>
5400
5401 Skip sparseRecvAll / sparseSendAll in sanity test
5402 The sanity test check aims to ensure that every function listed in
5403 the Python code maps to a corresponding C function. The Sparse
5404 send/recv methods are special though - we're never calling the
5405 corresponding C APIs, instead we have a pure python impl.
5406
5407
5408
5409 2017- 9- 6 Daniel P. Berrange <[email protected]>
5410
5411 Post-release version bump to 3.8.0
5412
5413
5414 2017- 9- 6 Daniel P. Berrange <[email protected]>
5415
5416 Report an error if registering an event loop twice
5417 The C library will now ignore an attempt to register an event
5418 loop twice. It is unable to report an error in this case though
5419 due to the C API returning 'void'. To improve this we must
5420 manually report an error at the python level.
5421
5422
5423
5424 2017- 9- 6 Daniel P. Berrange <[email protected]>
5425
5426 Remove unused variables for event callbacks
5427
5428
5429 2017- 9- 4 Daniel P. Berrange <[email protected]>
5430
5431 Change Obsoletes to an explicit version
5432 We only want to obsolete versions which actually had the
5433 original name, not all future versions.
5434
5435
5436
5437 2017- 9- 4 Daniel Veillard <[email protected]>
5438
5439 Release of libvirt-python 3.7.0
5440 * setup.py: updated for release
5441
5442
5443 2017- 8- 26 John Ferlan <[email protected]>
5444
5445 Implement virDomainMigrateGetMaxDowntime
5446 Add override code for virDomainMigrateGetMaxDowntime
5447
5448
5449 2017- 8- 26 John Ferlan <[email protected]>
5450
5451 Introduce virDomainMigrateGetMaxDowntime API
5452 Introduce wrapper for virDomainMigrateGetMaxDowntime
5453
5454
5455 2017- 8- 10 Daniel P. Berrange <[email protected]>
5456
5457 Fix package name in description of sub-RPMs
5458
5459
5460 2017- 8- 10 Daniel P. Berrange <[email protected]>
5461
5462 Revert "rpm: assume python3 is always available"
5463 This reverts commit b302b6d884ad4c6c917203a463f3377f3615b030.
5464
5465 Only drop the Fedora 18 test - RHEL must still build without
5466 python 3
5467
5468
5469 2017- 8- 10 Daniel P. Berrange <[email protected]>
5470
5471 rpm: rename packages to python2-libvirt / python3-libvirt
5472 This complies with Fedora naming policy for python packages
5473
5474 Reviewed-by: Martin Kletzander <[email protected]>
5475
5476
5477 2017- 8- 10 Daniel P. Berrange <[email protected]>
5478
5479 rpm: assume python3 is always available
5480 Reviewed-by: Martin Kletzander <[email protected]>
5481
5482
5483 2017- 8- 2 Tomáš Golembiovský <[email protected]>
5484
5485 virDomainMemoryStats: include usable memory and last update
5486 We've forgot to include VIR_DOMAIN_MEMORY_STAT_USABLE and
5487 VIR_DOMAIN_MEMORY_STAT_LAST_UPDATE constants.
5488
5489
5490
5491 2017- 8- 2 Daniel Veillard <[email protected]>
5492
5493 Release of libvirt-python-3.6.0
5494 virtually identical to 3.5.0 except for the bump of version in setup.py
5495
5496
5497 2017- 7- 4 Daniel Veillard <[email protected]>
5498
5499 Release of libvirt-python-3.5.0
5500 * setup.py: bump version number
5501
5502
5503 2017- 6- 20 Martin Kletzander <[email protected]>
5504
5505 Add details for shutdown event
5506 In commit a8eba5036cb4b0e2ec827e9e6e019ce70e451377, libvirt added
5507 support for two more details. In python bindings it all worked fine
5508 automagically except an example that was not updated.
5509
5510 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1463188
5511
5512
5513
5514 2017- 6- 2 Daniel Veillard <[email protected]>
5515
5516 Release of libvirt-python-3.4.0
5517
5518
5519 2017- 5- 24 Daniel P. Berrange <[email protected]>
5520
5521 Fix error check for virDomainGetTime method
5522 The virDomainGetTime returns either a dict or None, but the python
5523 glue layer for checking for '-1'. Thus it failed to raise an
5524 exception on error.
5525
5526
5527
5528 2017- 5- 24 Michal Privoznik <[email protected]>
5529
5530 examples: Introduce sparsestream.py
5531 Sparse streams are not that straight forward to use for the very
5532 first time. Especially the sparseRecvAll() and sparseSendAll()
5533 methods which expects callbacks. What we can do to make it easier
5534 for developers is to have an example where they can take an
5535 inspiration from.
5536
5537
5538
5539 2017- 5- 24 Michal Privoznik <[email protected]>
5540
5541 virStream: Introduce virStreamSparse{Recv,Send}All
5542 Yet again, our parser is not capable of generating proper
5543 wrapper. To be fair, this one wold be really tough anyway.
5544
5545
5546
5547 2017- 5- 23 Michal Privoznik <[email protected]>
5548
5549 virStream: Introduce virStreamRecvFlags
5550 Yet again, we need a custom wrapper over virStreamRecvFlags
5551 because our generator is not capable of generating it.
5552
5553
5554
5555 2017- 5- 23 Michal Privoznik <[email protected]>
5556
5557 Implement virStreamSendHole/virStreamRecvHole
5558 The return value for virStreamRecvHole is slightly different to
5559 its C counterpart. In python, either it returns the hole size or
5560 None if C API fails.
5561
5562
5563
5564 2017- 5- 17 Xavier Fernandez <[email protected]>
5565
5566 Use better comparison in virStream.sendAll for Python 3
5567 In Python 3, if the file is open in binary mode, @got will end up
5568 being equal to b"" and b"" != "" in Python 3.
5569
5570
5571 2017- 5- 15 Martin Kletzander <[email protected]>
5572
5573 spec: Install egg-info with rpm package
5574 This was being done due to now deprecated policy and that file should
5575 be installed so that pip can recognize that the packages is already
5576 installed in the system.
5577
5578
5579
5580 2017- 5- 5 Daniel Veillard <[email protected]>
5581
5582 Release of libvirt-python-3.3.0
5583
5584
5585 2017- 4- 4 Daniel P. Berrange <[email protected]>
5586
5587 event-test: add ability to run the asyncio event loop
5588 The event test program '--loop' arg is modified to take the name
5589 of an event loop impl to run. eg 'event-test.py --loop asyncio'
5590
5591
5592
5593 2017- 4- 4 Daniel P. Berrange <[email protected]>
5594
5595 event-test: rename example event loop impl
5596 Use the name 'Poll' instead of 'Pure' for the event loop demo,
5597 since there's now a second pure python loop impl available.
5598
5599
5600
5601 2017- 4- 4 Daniel P. Berrange <[email protected]>
5602
5603 event-test: unregister callbacks & close conn on exit
5604 In order to test cleanup code paths we must unregister all callbacks
5605 and close the connection on shutdown. Since cleanup happens in the
5606 background, we do a short sleep to allow the main loop to run its
5607 cleanup too.
5608
5609
5610
5611 2017- 4- 4 Daniel P. Berrange <[email protected]>
5612
5613 event-test: add timeout to exit event loop
5614
5615
5616 2017- 4- 4 Daniel P. Berrange <[email protected]>
5617
5618 event-test: free opaque data when removing callbacks
5619 The pure python event loop impl has to call
5620
5621 libvirt.virEventInvokeFreeCallback
5622
5623 to free the event opaque data from a clean stack context
5624
5625
5626
5627 2017- 4- 4 Wojtek Porczyk <[email protected]>
5628
5629 Add asyncio event loop implementation
5630 This is usable only on python >= 3.4 (or 3.3 with out-of-tree asyncio),
5631 however it should be harmless for anyone with older python versions.
5632
5633 In simplest case, to have the callbacks queued on the default loop:
5634
5635 >>> import libvirtaio
5636 >>> libvirtaio.virEventRegisterAsyncIOImpl()
5637
5638 The function is not present on non-compatible platforms.
5639
5640
5641
5642 2017- 4- 4 Wojtek Porczyk <[email protected]>
5643
5644 Allow for ff callbacks to be called by custom event implementations
5645 The documentation says:
5646 > If the opaque user data requires free'ing when the handle is
5647 > unregistered, then a 2nd callback can be supplied for this purpose.
5648 > This callback needs to be invoked from a clean stack. If 'ff'
5649 > callbacks are invoked directly from the virEventRemoveHandleFunc they
5650 > will likely deadlock in libvirt.
5651
5652 And they did deadlock. In removeTimeout too. Now we supply a custom
5653 function to pick it from the opaque blob and fire.
5654
5655
5656
5657 2017- 4- 2 Daniel Veillard <[email protected]>
5658
5659 Release of libvirt-python-3.2.0
5660 * setup.py: bumped version
5661
5662
5663 2017- 3- 29 Peter Krempa <[email protected]>
5664
5665 event: Add handler for block threshold event
5666 Unfortunately python doesn't generate those.
5667
5668
5669 2017- 3- 29 Peter Krempa <[email protected]>
5670
5671 event: fix comment for _dispatchDomainEventMetadataChangeCallback
5672 The comment was copied from the device removal failed event.
5673
5674
5675 2017- 1- 27 Daniel P. Berrange <[email protected]>
5676
5677 Removed unused 'functions_list_exception_test' code from generator
5678 The 'functions_list_exception_test' data structure and associated code
5679 in the generator is inherited from libxml. This has never
5680 been used in libvirt, so delete it to simplify the generator.
5681
5682
5683
5684 2017- 1- 27 Daniel P. Berrange <[email protected]>
5685
5686 Removed unused 'converter_type' code from generator
5687 The 'converter_type' data structure and associated code
5688 in the generator is inherited from libxml. This has never
5689 been used in libvirt, so delete it to simplify the generator.
5690
5691
5692
5693 2017- 1- 27 Daniel P. Berrange <[email protected]>
5694
5695 Removed unused 'classes_ancestor' code from generator
5696 The 'classes_ancestor' data structure and associated code
5697 in the generator is inherited from libxml. This has never
5698 been used in libvirt, so delete it to simplify the generator.
5699
5700
5701
5702 2017- 1- 27 Daniel P. Berrange <[email protected]>
5703
5704 Removed unused 'py_return_types' code from generator
5705 The 'py_return_types' data structure and associated code
5706 in the generator is inherited from libxml. This has never
5707 been used in libvirt, so delete it to simplify the generator.
5708
5709
5710
5711 2017- 1- 27 Daniel P. Berrange <[email protected]>
5712
5713 Removed unused 'foreign_encoding_args' code from generator
5714 The 'foreign_encoding_args' data structure and associated code
5715 in the generator is inherited from libxml. This has never
5716 been used in libvirt, so delete it to simplify the generator.
5717
5718
5719
5720 2017- 1- 27 Daniel P. Berrange <[email protected]>
5721
5722 Removed unused 'function_post' code from generator
5723 The 'function_post' data structure and associated code
5724 in the generator is inherited from libxml. This has never
5725 been used in libvirt, so delete it to simplify the generator.
5726
5727
5728
5729 2017- 1- 27 Daniel P. Berrange <[email protected]>
5730
5731 Removed unused 'reference_keepers' code from generator
5732 The 'reference_keepers' data structure and associated code
5733 in the generator is inherited from libxml. This has never
5734 been used in libvirt, so delete it to simplify the generator.
5735
5736
5737
5738 2017- 1- 27 Daniel P. Berrange <[email protected]>
5739
5740 Protect against user accidentally calling constructors directly
5741 When using libvirt python you must never call the object
5742 constructors directly, as these are expecting to be passed
5743 a wrapped C object. For example
5744
5745 import libvirt
5746 c = libvirt.virConnect("qemu:///system")
5747 c.listAllDomains()
5748
5749 will mysteriously segfault. With this change the user now
5750 gets an slightly more helpful error
5751
5752 Traceback (most recent call last):
5753 File "<stdin>", line 1, in <module>
5754 File "/home/berrange/src/virt/libvirt-python/build/libvirt.py", line 3409, in __init__
5755 raise Exception("Expected a wrapped C Object but got %s" % type(_obj))
5756 Exception: Expected a wrapped C Object but got <type 'str'>
5757
5758
5759
5760 2017- 1- 18 Wu Zongyong <[email protected]>
5761
5762 Fix the incorrect memory freeing which will result in crash
5763 Commit id '71fd95409' neglected to adjust a couple of API's do that now.
5764
5765 The number of elements in new_params is equal to the length of info,
5766 instead of nparams, so it's wrong to free new_params using nparams.
5767
5768
5769
5770 2017- 1- 18 John Ferlan <[email protected]>
5771
5772 Post-release version bump to 3.1.0
5773
5774
5775 2017- 1- 17 Daniel Veillard <[email protected]>
5776
5777 Release of libvirt-python-3.0.0
5778
5779
5780 2017- 1- 10 Michal Privoznik <[email protected]>
5781
5782 examples: Update event-test.py
5783 With recent changes there are new events known to libvirt.
5784 Reflect those changes in our event-test.py example script.
5785
5786
5787
5788 2017- 1- 10 Daniel P. Berrange <[email protected]>
5789
5790 Fix typos in previous secrets event patch
5791
5792
5793 2017- 1- 9 Daniel P. Berrange <[email protected]>
5794
5795 Add support for domain metadata change event
5796
5797
5798 2017- 1- 9 Daniel P. Berrange <[email protected]>
5799
5800 Add support for secret event APIs
5801
5802
5803 2016- 12- 21 Daniel P. Berrange <[email protected]>
5804
5805 Add override impl for virStorageVolGetInfoFlags
5806
5807
5808 2016- 12- 21 Daniel P. Berrange <[email protected]>
5809
5810 Remove bogus \o escape in regex
5811 One of the regexes has a bogus \o instead of plain 'o'. Somehow
5812 this magically worked on all versions of python, until 3.6 came
5813 along and complained
5814
5815
5816
5817 2016- 12- 14 Daniel P. Berrange <[email protected]>
5818
5819 Fix running of nosetests on python 3
5820 Previously the way Fedora installed /usr/bin/nosetests allowed it
5821 to be invoked with either python 2 or 3. Since Fedora 25 though,
5822 it contains a module name that only exists on python 2. So we need
5823 to be more intelligent and pick a different nosetests binary per
5824 version.
5825
5826
5827
5828 2016- 12- 13 Prabodh Agarwal <[email protected]>
5829
5830 HACKING: fix grammar
5831
5832
5833 2016- 12- 5 Daniel P. Berrange <[email protected]>
5834
5835 Fill out more fields for PKG-INFO file
5836 Ensure the description and license are set in PKG-INFO,
5837 and clarify the summary field.
5838
5839
5840
5841 2016- 11- 11 Konstantin Neumoin <[email protected]>
5842
5843 don't overrun buffer when converting cpumap
5844 If we pass large(more than cpunum) cpu mask to any libvirt_virDomainPin*
5845 function, it could leads to crash. So we have to check tuple size in
5846 virPyCpumapConvert and ignore extra tuple members.
5847
5848 Since we allocate a zeroed buffer, we don't need to bother with setting
5849 the bits to zero.
5850
5851
5852
5853 2016- 11- 11 Konstantin Neumoin <[email protected]>
5854
5855 move cpumap conversion code to a common helper
5856 All libvirt_virDomainPin* functions do the same thing for convert
5857 pycpumap to cpumap, so this patch moves all common logic to new
5858 helper - virPyCpumapConvert.
5859
5860
5861
5862 2016- 11- 2 Pavel Hrdina <[email protected]>
5863
5864 Post-release version bump to 2.5.0
5865
5866
5867 2016- 11- 1 Daniel Veillard <[email protected]>
5868
5869 Release of libvirt-2.4.0
5870 * setup.py: just bumped up the release number
5871
5872
5873 2016- 9- 19 Peter Krempa <[email protected]>
5874
5875 override: Properly override wrapper for virDomainGetGuestVcpus
5876 Without the change to libvirt-override-api.xml generator.py would
5877 generate the following function header:
5878
5879 def guestVcpus(self, params, nparams, flags=0):
5880
5881 Since @params and @nparams are output-only in C and the python C
5882 implementation actualy creates a dict from them we should not need to
5883 pass them. Add the API definition to drop the two unnecessary args:
5884
5885 def guestVcpus(self, flags=0):
5886
5887 The code did not work at all until this change as the C impl expects
5888 only two arguments but the python required use of four.
5889
5890 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1377071
5891
5892
5893 2016- 9- 19 Peter Krempa <[email protected]>
5894
5895 Post-release version bump to 2.3.0
5896
5897
5898 2016- 8- 24 Michal Privoznik <[email protected]>
5899
5900 PyArg_ParseTuple: Provide correct function names
5901 At the end of the format string we put :virFunctionName where ':'
5902 says "this is the end of argument list", and virFunctionName is
5903 the prefix for error messages then. However, in some cases we
5904 have had wrong names there. Some of them are actually quite
5905 funny: xmlRegisterErrorHandler.
5906
5907
5908
5909 2016- 8- 17 Jovanka Gulicoska <[email protected]>
5910
5911 event-test: support node device update callback
5912
5913
5914 2016- 8- 17 Jovanka Gulicoska <[email protected]>
5915
5916 Add support for node device update callback
5917
5918
5919 2016- 8- 2 Jovanka Gulicoska <[email protected]>
5920
5921 event-test: Add node device lifecycle event tests
5922
5923
5924 2016- 8- 2 Jovanka Gulicoska <[email protected]>
5925
5926 Python binding for node poll lifecycle events API
5927
5928
5929 2016- 8- 2 Cole Robinson <[email protected]>
5930
5931 Post-release version bump to 2.2.0
5932
5933
5934 2016- 7- 28 Markus Rothe <[email protected]>
5935
5936 allow pkg-config binary to be set by env
5937 https://bugzilla.redhat.com/show_bug.cgi?id=1350523
5938
5939
5940 2016- 7- 25 Pavel Hrdina <[email protected]>
5941
5942 Post-release version bump to 2.1.0
5943
5944
5945 2016- 7- 23 Pavel Hrdina <[email protected]>
5946
5947 Fix crash in storage pool refresh callback
5948 Fixes copy-paste typo introduced by commit cb84e36c.
5949
5950 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1354271
5951
5952
5953
5954 2016- 6- 24 Daniel P. Berrange <[email protected]>
5955
5956 Add support for storage pool refesh callback
5957
5958
5959 2016- 6- 24 Daniel P. Berrange <[email protected]>
5960
5961 Fix signedness of arg to virDomainGetGuestVcpus
5962
5963
5964 2016- 6- 23 Michal Privoznik <[email protected]>
5965
5966 Add support for virDomainGetGuestVcpus
5967 This function has virTypedParameterPtr as one of the args and our
5968 generator is unable to deal with that. Therefore we must provide
5969 implementation.
5970
5971
5972
5973 2016- 6- 16 Jovanka Gulicoska <[email protected]>
5974
5975 event-test: Add storage pool lifecycle event tests
5976
5977
5978 2016- 6- 16 Jovanka Gulicoska <[email protected]>
5979
5980 Python binding for storage pool lifecycle events API
5981 Code matches the network event API implementation
5982
5983
5984 2016- 6- 14 Daniel P. Berrange <[email protected]>
5985
5986 Post-release version bump to 2.0.0
5987
5988
5989 2016- 6- 4 Daniel Veillard <[email protected]>
5990
5991 Release of libvirt-python-1.3.5
5992 * setup.py: bumped to 1.3.5, the release is virtually identical to 1.3.4
5993
5994
5995 2016- 4- 21 Peter Krempa <[email protected]>
5996
5997 generator.py: Consider symbols from libvirt-common
5998 Some of the libvirt public API was moved into the libvirt-common.h file.
5999 We should consider it while building python too.
6000
6001
6002 2016- 4- 20 Cole Robinson <[email protected]>
6003
6004 spec: Don't pull in dependencies for example scripts
6005 If the scripts are marked as executable, RPM magic will scan them
6006 for dependencies, which can pull in python2 for the python3 package
6007
6008
6009 2016- 4- 18 Pavel Hrdina <[email protected]>
6010
6011 fix crash in getAllDomainStats
6012 Commits 1d39dbaf and 827ed9b4 broke the libvirt-python API by removing
6013 virDomainRef() and virDomainFree(). virDomainStatsRecordListFree() will
6014 free that domain pointer and later when virDomain (python object) call
6015 its destructor and tries to free that same pointer again.
6016
6017 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1326839
6018
6019
6020
6021 2016- 4- 18 Peter Krempa <[email protected]>
6022
6023 event: Add support VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED
6024
6025
6026 2016- 4- 18 Peter Krempa <[email protected]>
6027
6028 Post-release version bump to 1.3.4
6029
6030
6031 2016- 4- 6 Daniel Veillard <[email protected]>
6032
6033 Release of libvirt-python-1.3.3
6034
6035
6036 2016- 3- 31 Qiaowei Ren <[email protected]>
6037
6038 python: add python binding for Perf API
6039 This patch adds the python binding for virDomainSetPerfEvents and
6040 virDomainSetPerfEvents API.
6041
6042
6043
6044 2016- 3- 8 Jiri Denemark <[email protected]>
6045
6046 Add support for JOB_COMPLETED event
6047
6048
6049 2016- 2- 23 Pavel Hrdina <[email protected]>
6050
6051 libvirt-override: fix PyArg_ParseTuple for size_t
6052 Format string uses 'n' for Py_ssize_t but size_t is unsigned long, we
6053 need to use 'k'.
6054
6055
6056
6057 2016- 2- 23 Pavel Hrdina <[email protected]>
6058
6059 libvirt-override: fix PyArg_ParseTuple for unsigned long long
6060 Format string uses 'L' for long long type and 'K' for unsigned long long
6061 type.
6062
6063 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1260356
6064
6065
6066
6067 2016- 2- 23 Pavel Hrdina <[email protected]>
6068
6069 libvirt-override: fix PyArg_ParseTuple for unsigned int
6070 Format string uses 'i' for int type and 'I' for unsigned int type.
6071
6072
6073
6074 2016- 2- 23 Pavel Hrdina <[email protected]>
6075
6076 libvirt-override: all flags should be defined as unsigned int
6077
6078
6079 2016- 1- 18 Jiri Denemark <[email protected]>
6080
6081 Add support for MIGRATION_ITERATION event
6082
6083
6084 2016- 1- 18 Jiri Denemark <[email protected]>
6085
6086 setup: Use cflags and ldflags properly
6087 The setup.py script reads cflags and ldflags from pkg-config and uses
6088 them when compiling/linking C modules. Since both cflags and ldflags may
6089 include multiple compiler arguments we need to split them rather than
6090 concatenating them into a single argument.
6091
6092
6093
6094 2016- 1- 18 Jiri Denemark <[email protected]>
6095
6096 Post-release version bump to 1.3.2
6097
6098
6099 2016- 1- 17 Daniel Veillard <[email protected]>
6100
6101 Version bump to 1.3.1
6102 For release but no change from 1.3.0
6103
6104
6105 2015- 11- 24 Pavel Hrdina <[email protected]>
6106
6107 Post-release version bump to 1.3.0
6108
6109
6110 2015- 10- 31 Pavel Hrdina <[email protected]>
6111
6112 fix crash introduced by commit 1d39dbaf
6113 Some of the libvirt_*Wrap functions steals the reference and we need to
6114 set the item in array to NULL no not free it on success. Those three
6115 places was accidentally removed by commit 1d39dbaf.
6116
6117 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1270977
6118
6119
6120
6121 2015- 10- 15 Martin Kletzander <[email protected]>
6122
6123 Post-release version bump to 1.2.21
6124
6125
6126 2015- 10- 5 Pavel Hrdina <[email protected]>
6127
6128 use VIR_PY_DICT_SET_GOTO
6129
6130
6131 2015- 10- 5 Pavel Hrdina <[email protected]>
6132
6133 use VYR_PY_LIST_SET_GOTO and VIR_PY_LIST_APPEND_GOTO
6134
6135
6136 2015- 10- 5 Pavel Hrdina <[email protected]>
6137
6138 use VIR_PY_TUPLE_GOTO
6139
6140
6141 2015- 10- 5 Pavel Hrdina <[email protected]>
6142
6143 utils: introduce new macro helpers for tuple, list and dict objects
6144
6145
6146 2015- 10- 5 Pavel Hrdina <[email protected]>
6147
6148 improve usage of cleanup paths
6149 This removes several code duplicates and also some unusual code structures.
6150
6151
6152
6153 2015- 10- 5 Pavel Hrdina <[email protected]>
6154
6155 drop unnecessary py_retval variable
6156
6157
6158 2015- 10- 5 Pavel Hrdina <[email protected]>
6159
6160 change the order of some statements
6161 This change makes it easier to free allocated object especially for
6162 python objects. We can benefit from the fact, that if you call
6163 Py_DECREF on any python object it will also remove reference for all
6164 assigned object to the root object. For example, calling Py_DECREF on
6165 dict will also remove reference recursively on all elements in that
6166 dictionary. Our job is then just call Py_DECREF on the root element and
6167 don't care about anything else.
6168
6169
6170
6171 2015- 10- 5 Pavel Hrdina <[email protected]>
6172
6173 Must check return value for all Py*_New functions
6174 If the function fails, we need to cleanup memory and return NULL.
6175
6176
6177
6178 2015- 10- 5 Pavel Hrdina <[email protected]>
6179
6180 use Py_CLEAR instead of Py_XDECREF followed by NULL assignment
6181
6182
6183 2015- 10- 5 Pavel Hrdina <[email protected]>
6184
6185 Use VIR_PY_NONE instead of increment and Py_None
6186 To insert Py_None into some other python object like dict or tuple, you
6187 need to increase reference to the Py_None. We have a macro to do that.
6188
6189
6190
6191 2015- 10- 5 Pavel Hrdina <[email protected]>
6192
6193 Return NULL and set an exception if allocation fails
6194 This is a recommended work-flow for allocation failures and we should
6195 follow it.
6196
6197
6198
6199 2015- 10- 5 Pavel Hrdina <[email protected]>
6200
6201 Return correct python object
6202 In case of error without setting an python exception we need to return
6203 a correct python object. For functions that returns anything else than
6204 a number the return value is 'None', otherwise it's '-1'.
6205
6206
6207
6208 2015- 10- 5 Pavel Hrdina <[email protected]>
6209
6210 Return NULL if python exception is set
6211 There is a rule, python API fails, it also in those cases sets an
6212 exception. We should follow those rules and in those cases return NULL.
6213
6214
6215
6216 2015- 10- 5 Pavel Hrdina <[email protected]>
6217
6218 wrap lines to 80 columns
6219
6220
6221 2015- 10- 5 Pavel Hrdina <[email protected]>
6222
6223 fix indentation
6224
6225
6226 2015- 10- 5 Pavel Hrdina <[email protected]>
6227
6228 indent labels by one space
6229
6230
6231 2015- 10- 5 Pavel Hrdina <[email protected]>
6232
6233 cleanup functions definition
6234 Follow the libvirt hacking guide and make the code consistent.
6235
6236
6237
6238 2015- 10- 5 Pavel Hrdina <[email protected]>
6239
6240 Move utils and shared code into libvirt-utils
6241
6242
6243 2015- 10- 5 Pavel Hrdina <[email protected]>
6244
6245 drop unnecessary goto
6246
6247
6248 2015- 10- 5 Pavel Hrdina <[email protected]>
6249
6250 remove useless check for NULL before Py_XDECREF
6251
6252
6253 2015- 10- 5 Pavel Hrdina <[email protected]>
6254
6255 refactor the function to not override python exceptions
6256
6257
6258 2015- 10- 5 Pavel Hrdina <[email protected]>
6259
6260 update virDomainGetVcpus xml API description
6261 Python api returns a tuple with the vcpus information.
6262
6263
6264
6265 2015- 10- 2 Daniel Veillard <[email protected]>
6266
6267 Release of libvirt-python-1.2.20
6268
6269
6270 2015- 9- 21 Luyao Huang <[email protected]>
6271
6272 generator: fix build fail with old xml lib
6273 https://bugzilla.redhat.com/show_bug.cgi?id=1222795#c6
6274
6275 if build libvirt-python with some old xml lib (python-pyxml),
6276 build will fail and error like this:
6277
6278 File "generator.py", line 139, in start
6279 if "string" in attrs:
6280 File "/usr/local/lib/python2.7/site-packages/_xmlplus/sax/xmlreader.py" \
6281 , line 316, in __getitem__
6282 return self._attrs[name]
6283 KeyError: 0
6284
6285 This is an old issue and have been mentioned in commit 3ae0a76d.
6286 There is no __contains__ in class AttributesImpl, python will use
6287 __getitem__ in this place, so we will get error.
6288 Let's use 'YYY in XXX.keys()' to avoid this issue.
6289
6290
6291
6292 2015- 8- 26 Luyao Huang <[email protected]>
6293
6294 examples: small fix for nodestats.py example
6295 Add nodestats.py in MANIFEST.in and add a
6296 small description for nodestats.py in README
6297
6298
6299
6300 2015- 8- 3 Jiri Denemark <[email protected]>
6301
6302 Check return value of PyList_Append
6303 libvirt_virDomainGetSecurityLabelList called PyList_Append without
6304 checking its return value. While looking at it I noticed the function
6305 did not properly check several other return values either so I fixed
6306 them all.
6307
6308 https://bugzilla.redhat.com/show_bug.cgi?id=1249511
6309
6310
6311
6312 2015- 8- 3 Jiri Denemark <[email protected]>
6313
6314 Post-release version bump to 1.2.19
6315
6316
6317 2015- 8- 3 Daniel Veillard <[email protected]>
6318
6319 Forgot to bump version to 1.2.18
6320
6321
6322 2015- 7- 30 Peter Krempa <[email protected]>
6323
6324 iothread: Fix crash if virDomainGetIOThreadInfo returns error
6325 The cleanup portion of libvirt_virDomainGetIOThreadInfo would try to
6326 clean the returned structures but the count of iothreads was set to -1.
6327
6328 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1248295
6329
6330
6331 2015- 7- 17 Michal Privoznik <[email protected]>
6332
6333 examples: Introduce nodestats example
6334 So, this is an exercise to show libvirt capabilities. Firstly, for
6335 each host NUMA nodes some statistics are printed out, i.e. total
6336 memory and free memory. Then, for each running domain, that has memory
6337 strictly bound to certain host nodes, a small statistics of how much
6338 memory it takes is printed out too. For instance:
6339
6340 # ./examples/nodestats.py
6341 NUMA stats
6342 NUMA nodes: 0 1 2 3
6343 MemTotal: 3950 3967 3937 3943
6344 MemFree: 66 56 42 41
6345 Domain 'fedora':
6346 Overall memory: 1536 MiB
6347 Domain 'fedora22':
6348 Overall memory: 2048 MiB
6349 Domain 'fedora21':
6350 Overall memory: 1024 MiB nodes 0-1
6351 Node 0: 1024 MiB nodes 0-1
6352 Domain 'gentoo':
6353 Overall memory: 4096 MiB nodes 0-3
6354 Node 0: 1024 MiB nodes 0
6355 Node 1: 1024 MiB nodes 1
6356 Node 2: 1024 MiB nodes 2
6357 Node 3: 1024 MiB nodes 3
6358
6359 We can see 4 host NUMA nodes, all of them having roughly 4GB of RAM.
6360 Yeah, all of them has nearly all the memory consumed. Then, there are
6361 four domains running. For instance, domain 'fedora' has 1.5GB memory
6362 which is not pinned onto any specific host NUMA node. Domain 'gentoo' on
6363 the other hand has 4GB memory and has 4 NUMA nodes which are pinned 1:1
6364 to host nodes.
6365
6366
6367
6368 2015- 6- 29 Pavel Boldin <[email protected]>
6369
6370 virPyDictToTypedParams: packing lists of values
6371 Pack a list or a tuple of values passed to a Python method to the
6372 multi-value parameter.
6373
6374
6375 2015- 6- 28 Martin Kletzander <[email protected]>
6376
6377 Revert "Change livbirt version to 1.3.0 for the next release"
6378 This reverts commit 751e016f09a6a0dd372667bdd2b322731718e359.
6379
6380 Since Admin API was deferred for a release and the minor version bump
6381 didn't happen, it must not happen in libvirt-python either, for
6382 compatibility reasons.
6383
6384
6385 2015- 6- 16 Martin Kletzander <[email protected]>
6386
6387 Change livbirt version to 1.3.0 for the next release
6388 Since the background for Admin API is merged upstream, we are bumping
6389 the minor release version as discussed previously
6390
6391
6392
6393 2015- 6- 8 Jiri Denemark <[email protected]>
6394
6395 Provide symbolic names for typed parameters
6396 https://bugzilla.redhat.com/show_bug.cgi?id=1222795
6397
6398
6399
6400 2015- 6- 5 Jiri Denemark <[email protected]>
6401
6402 Post-release version bump to 1.2.17
6403
6404
6405 2015- 6- 1 Daniel P. Berrange <[email protected]>
6406
6407 Include tests in MANIFEST
6408 The unit tests were missing from the tar.gz archives due to not
6409 being listed in the MANIFEST.in file
6410
6411
6412
6413 2015- 5- 28 Jim Fehlig <[email protected]>
6414
6415 Fix duplicate entries in AUTHORS
6416 The generated AUTHORS file contains many duplicates. If an author
6417 has N commits, there will be N entries for the author in AUTHORS.
6418 Check if an author already exists in the list before appending.
6419 While at it, add a .mailmap (derived from libivrt's .mailmap) to
6420 futher tidy the generated AUTHORS list.
6421
6422
6423 2015- 5- 20 Guido Günther <[email protected]>
6424
6425 Sort tuples on both items
6426 In order to achieve reproducible builds[0] we want the items within
6427 enums always generated in the same order so sort on both items in the
6428 tuple.
6429
6430 [0] https://wiki.debian.org/ReproducibleBuilds/About
6431
6432
6433 2015- 5- 20 Guido Günther <[email protected]>
6434
6435 Simplify sorting
6436 funcs.keys() can't be None, only the empty array
6437
6438
6439 2015- 5- 20 Guido Günther <[email protected]>
6440
6441 Sort dictionary keys
6442 In order to achive reproducible builds[0] we want functions and enums
6443 always generated in the same order.
6444
6445 [0] https://wiki.debian.org/ReproducibleBuilds/About
6446
6447
6448 2015- 5- 11 Peter Krempa <[email protected]>
6449
6450 examples: Add example to make guest agent lifecycle event useful
6451 This example allows to use the guest agent event and metadata to track
6452 vCPU count set via the guest agent (agent-based onlining/offlining) and
6453 keep it persistent accross domain restarts.
6454
6455 The daemon listens for the agent lifecycle event, and if it's received
6456 it looks into doman's metadata to see whether a desired count was set
6457 and issues the guest agent command.
6458
6459
6460 2015- 5- 11 Peter Krempa <[email protected]>
6461
6462 Post-release version bump to 1.2.16
6463
6464
6465 2015- 4- 22 Victor Stinner <[email protected]>
6466
6467 libvirt-python: add classifiers to setup.py
6468 Add the Python 3 classifier, needed by the caniusepython3 tool to check
6469 if dependencies of a projects are Python 3 compatible:
6470
6471 https://caniusepython3.com/
6472
6473
6474 2015- 4- 22 Victor Stinner <[email protected]>
6475
6476 Add tox.ini to run tests on Python 2.6, 2.7 & 3.4
6477
6478
6479 2015- 4- 22 Victor Stinner <[email protected]>
6480
6481 sanitytest.py parameters are now optional
6482 When called without parameters, sanitytest.py doesn't touch sys.path and
6483 locates itself the patch to the libvirt-api.xml file using pkg-config.
6484
6485 This change makes possible to run sanitytest.py from tox.
6486
6487
6488 2015- 4- 15 Ján Tomko <[email protected]>
6489
6490 Implement the DEVICE_ADDED event
6491
6492
6493 2015- 4- 2 Jiri Denemark <[email protected]>
6494
6495 Post-release version bump to 1.2.15
6496
6497
6498 2015- 3- 28 Pavel Hrdina <[email protected]>
6499
6500 Expose virDomainInterfacesAddresses to python binding
6501 examples/Makefile.am:
6502 * Add new file domipaddrs.py
6503
6504 examples/README:
6505 * Add documentation for the python example
6506
6507 libvirt-override-api.xml:
6508 * Add new symbol for virDomainInterfacesAddresses
6509
6510 libvirt-override.c:
6511 * Hand written python api
6512
6513 Example:
6514 $ python examples/domipaddrs.py qemu:///system f18
6515 Interface MAC address Protocol Address
6516 vnet0 52:54:00:20:70:3d ipv4 192.168.105.240/16
6517
6518
6519
6520 2015- 3- 26 Ján Tomko <[email protected]>
6521
6522 Rename virDomainGetIOThreadsInfo to virDomainGetIOThreadInfo
6523
6524
6525 2015- 3- 26 Ján Tomko <[email protected]>
6526
6527 Rename virDomainIOThreadsInfoFree to virDomainIOThreadInfoFree
6528
6529
6530 2015- 3- 19 Pavel Hrdina <[email protected]>
6531
6532 Post-release version bump to 1.2.14
6533
6534
6535 2015- 3- 11 John Ferlan <[email protected]>
6536
6537 Support virDomainPinIOThread
6538 Support the libvirt_virDomainSetIOThreads method using code that mimics
6539 the existing libvirt_virDomainPinVcpuFlags method
6540
6541 The following is a sample session assuming guest 'iothr-gst' has IOThreads
6542 configured (it's currently running, too)
6543
6544 >>> import libvirt
6545 >>> con=libvirt.open("qemu:///system")
6546 >>> dom=con.lookupByName('iothr-gst')
6547 >>> dom.ioThreadsInfo()
6548 [(1, [False, False, True, False]), (2, [False, False, False, True]), (3, [True, True, True, True])]
6549 >>> cpumap=(True,True,True,False)
6550 >>> dom.pinIOThread(3,cpumap)
6551 0
6552 >>> print dom.ioThreadsInfo()
6553 [(1, [False, False, True, False]), (2, [False, False, False, True]), (3, [True, True, True, False])]
6554 >>>
6555
6556 merge
6557
6558
6559 2015- 3- 11 John Ferlan <[email protected]>
6560
6561 Support virDomainGetIOThreadsInfo and virDomainIOThreadsInfoFree
6562 Add support for the libvirt_virDomainGetIOThreadsInfo method. This
6563 code mostly follows the libvirt_virDomainGetVcpuPinInfo method, but
6564 also takes some from the libvirt_virNodeGetCPUMap method with respect
6565 to building the cpumap into the returned tuple rather than two separate
6566 tuples which vcpu pinning generates
6567
6568 Assuming two domains, one with IOThreads defined (eg, 'iothr-gst') and
6569 one without ('noiothr-gst'), execute the following in an 'iothr.py' file:
6570
6571 import libvirt
6572 con=libvirt.open("qemu:///system")
6573 dom=con.lookupByName('iothr-gst')
6574 print dom.ioThreadsInfo()
6575 dom2=con.lookupByName('noiothr-gst')
6576 print dom2.ioThreadsInfo()
6577
6578 $ python iothr.py
6579 [(1, [False, False, True, False]), (2, [False, False, False, True]), (3, [True, True, True, True])]
6580 []
6581 $
6582
6583
6584 2015- 3- 5 Ján Tomko <[email protected]>
6585
6586 Clarify description for virNodeGetSecurityModel
6587 s/host/hypervisor/ to match the wording used by the C binding.
6588
6589 https://bugzilla.redhat.com/show_bug.cgi?id=1198518
6590
6591
6592 2015- 1- 27 Daniel P. Berrange <[email protected]>
6593
6594 Post-release version bump to 1.2.13
6595
6596
6597 2015- 1- 19 Pavel Hrdina <[email protected]>
6598
6599 sanitytest: fix mapping test for virDomainDefineXMLFlags
6600 The libvirt API has in the name "virDomain" but it's correctly mapped
6601 into "virConnect" class. Create an exception in the sanity test.
6602
6603
6604
6605 2015- 1- 15 Eric Blake <[email protected]>
6606
6607 build: make it easier to backport event ids
6608 In some cases, it is very easy for downstream distros to backport
6609 enum values without requiring a .so bump. Keying the conditional
6610 code off of the upstream version where the enum value was added
6611 is not ideal, because downstream then has to patch that the feature
6612 is available in their build that still reports an earlier version
6613 number. For example, if RHEL 7 backports events from 1.2.11 into
6614 a build based on 1.2.8, building the python bindings would warn:
6615
6616 libvirt-override.c: In function ‘libvirt_virConnectDomainEventRegisterAny’:
6617 libvirt-override.c:6653:5: warning: enumeration value ‘VIR_DOMAIN_EVENT_ID_TUNABLE’ not handled in switch [-Wswitch]
6618 switch ((virDomainEventID) eventID) {
6619 ^
6620 libvirt-override.c:6653:5: warning: enumeration value ‘VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLE’ not handled in switch [-Wswitch]
6621
6622 The solution is simple - use feature-based probes instead of
6623 version probes. Since we already scrape the XML API document of
6624 whatever libvirt build we are binding, and that XML already
6625 documents any downstream enum additions, we can use those as the
6626 features for gating conditional compilation.
6627
6628 * generator.py (enum): Track event id names.
6629 (buildStubs): Output define wrappers for events.
6630 * libvirt-override.c
6631 (libvirt_virConnectDomainEventBalloonChangeCallback)
6632 (libvirt_virConnectDomainEventPMSuspendDiskCallback)
6633 (libvirt_virConnectDomainEventDeviceRemovedCallback)
6634 (libvirt_virConnectDomainEventTunableCallback)
6635 (libvirt_virConnectDomainEventAgentLifecycleCallback)
6636 (libvirt_virConnectDomainEventRegisterAny): Use them.
6637
6638
6639
6640 2014- 12- 16 Michal Privoznik <[email protected]>
6641
6642 Bump version to 1.2.12 for new dev cycle
6643
6644
6645 2014- 12- 11 Richard W.M. Jones <[email protected]>
6646
6647 Add c_pointer method to classes.
6648 This returns the raw C pointer to the underlying object, eg:
6649
6650 conn = libvirt.open(None)
6651 print "0x%x" % conn.c_pointer() # returns virConnectPtr of the connection
6652 dom = conn.lookupByName("test")
6653 print "0x%x" % dom.c_pointer() # returns virDomainPtr of the domain
6654
6655 The reason behind this is to allow us to transparently pass Python dom
6656 objects through the libguestfs Python API.
6657
6658 https://bugzilla.redhat.com/show_bug.cgi?id=1075164
6659
6660
6661 2014- 12- 2 Tomoki Sekiyama <[email protected]>
6662
6663 override: iterate virDomainFSInfo.devAliases using ndevAliases
6664 Currently devAliases in virDomainFSInfo struct are iterated as a
6665 NULL-terminated list, but that is not guaranteed. It should use
6666 ndevAliases which stores the number of the items in devAliases.
6667
6668
6669
6670 2014- 12- 1 Pavel Hrdina <[email protected]>
6671
6672 fix examples
6673 The dhcpleases example had an old usage of print function. The formating
6674 of leases record was also wrong.
6675
6676 The event-test example had an old usage of exceptions.
6677
6678 It's mainly to make examples compatible with python3.
6679
6680
6681
6682 2014- 11- 24 Peter Krempa <[email protected]>
6683
6684 event: Add bindings for agent lifecycle event
6685 Also add the example.
6686
6687
6688 2014- 11- 24 Tomoki Sekiyama <[email protected]>
6689
6690 override: Implement bindings for virDomainGetFSInfo as domain.fsInfo
6691 Implement the function which returns a list of tuples, that contains members
6692 of virDomainFSInfo struct.
6693
6694
6695
6696 2014- 11- 11 Luyao Huang <[email protected]>
6697
6698 Add dict check for setTime and allow pass 'seconds' parameter
6699 When pass None or a empty dictionary to time, it will report
6700 error. This commit allows a one-element dictionary which contains
6701 just 'seconds' field, which results in the same as passing 0 for
6702 'nseconds' field. Moreover, dict is checked for unknown fields.
6703
6704
6705
6706 2014- 11- 6 Jiri Denemark <[email protected]>
6707
6708 Check return value of libvirt_uintUnwrap
6709 libvirt_virDomainSendKey didn't check whether libvirt_uintUnwrap
6710 succeeded or not.
6711
6712 https://bugzilla.redhat.com/show_bug.cgi?id=1161039
6713
6714
6715 2014- 11- 3 John Ferlan <[email protected]>
6716
6717 Bump version to 1.2.11 for new dev cycle
6718
6719
6720 2014- 10- 28 Dmitry Guryanov <[email protected]>
6721
6722 fix libvirt headers list
6723 Since libvirt.h has been split out, generator.py
6724 should be fixed accordingly. So add full list of header
6725 files.
6726
6727
6728
6729 2014- 10- 22 Pavel Hrdina <[email protected]>
6730
6731 virDomainBlockCopy: initialize flags to 0
6732 An optional argument if not passed isn't modified by the
6733 PyArg_ParseTuple function.
6734
6735
6736
6737 2014- 10- 22 Pavel Hrdina <[email protected]>
6738
6739 flags cannot get right value for blockCopy function
6740 When use blockCopy, flags cannot get a right value, because
6741 PyArg_ParseTuple want to get 6 parameters and blockCopy only
6742 pass 5. Flags will get a unpredictable value, this will make
6743 the function fail with error:
6744
6745 unsupported flags (0x7f6c) in function qemuDomainBlockCopy
6746
6747
6748
6749 2014- 10- 22 Peter Krempa <[email protected]>
6750
6751 Fix rest of unsigned integer handling
6752 As in the previous patch, fix all places where 'flags' is converted as a
6753 signed argument to unsigned including the python code generator.
6754
6755
6756 2014- 10- 22 Luyao Huang <[email protected]>
6757
6758 Fix parsing of 'flags' argument for bulk stats functions
6759 When 'flags' is set to
6760 'libvirt.VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS,
6761 python will report a error:
6762
6763 OverflowError: signed integer is greater than maximum
6764
6765 as VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS is defined as 1<<31.
6766 This happens as PyArg_ParseTuple's formatting string containing 'i' as a
6767 modifier expects a signed integer.
6768
6769 With python >= 2.3, 'I' means unsigned int and 'i' means int so we
6770 should use 'I' in the formatting string.
6771
6772 See: https://docs.python.org/2/c-api/arg.html
6773
6774
6775
6776 2014- 10- 22 Peter Krempa <[email protected]>
6777
6778 Fix function name when parsing arguments in libvirt_virNodeAllocPages
6779 The override function was copied&pasted from virConnectGetAllDomainStats
6780 and the function name after the colon was not changed. Fix the issue as
6781 an invalid name would appear in the error message.
6782
6783
6784 2014- 10- 20 Luyao Huang <[email protected]>
6785
6786 Improve error output when use getTime with a nonzero flags.
6787 When give a nonzero flags to getTime, c_retval will get -1 and goto
6788 cleanup. But py_retval still is NULL, so set py_retval = VIR_PY_NONE.
6789 This will make the output message more correct.
6790
6791
6792
6793 2014- 10- 16 Pradipta Kr. Banerjee <[email protected]>
6794
6795 Change the comment in getPyNodeCPUCount method reflecting correct called methods
6796 Comment mentions virGetNodeCPUMap whereas the actual method is
6797 virNodeGetCPUMap. Similarly comment mentions virGetNodeInfo whereas the actual
6798 method is virNodeGetInfo
6799
6800
6801
6802 2014- 10- 7 Pavel Hrdina <[email protected]>
6803
6804 setup.py: fix rpm build to return 1 on error
6805
6806
6807 2014- 10- 7 Martin Kletzander <[email protected]>
6808
6809 sanitytest: define long for python version >= 3
6810 Commit c58c7f362aab37e4961407c2efc8a74925ed9c37 fixed 32-bit python
6811 build but broke build with python3 due to the lack of 'long' in the
6812 newer version of python. This patch aims to fix it with a simple
6813 string comparison of sys.version and '3'.
6814
6815
6816
6817 2014- 10- 7 Martin Kletzander <[email protected]>
6818
6819 sanitytest: count with the fact that large enums can be long
6820 On 32-bit systems, one new flag that has the value of 1 << 31, namely
6821 VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS, fails to fit into an
6822 'int' on python and is therefore of type 'long'. Fix sanitytest to
6823 count with such fact in order to avoid build failures on 32-bit systems.
6824
6825
6826
6827 2014- 10- 6 Martin Kletzander <[email protected]>
6828
6829 sanitytest: check for exported enums
6830 We are already collecting list of enums exported and list of enums we
6831 want to have available. Event though there was an issue with one enum
6832 fixed with 014d9bbaf368b33a881f1d6b2fd8a5dd285a4f71, there was no test
6833 for it and this commit tries to fix that.
6834
6835
6836
6837 2014- 10- 2 Pavel Hrdina <[email protected]>
6838
6839 Post-release version bump for new dev cycle
6840
6841
6842 2014- 9- 30 Pavel Hrdina <[email protected]>
6843
6844 implement new tunable event
6845 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1147639
6846
6847
6848
6849 2014- 9- 26 Michal Privoznik <[email protected]>
6850
6851 Implement new virNodeAllocPages API
6852
6853
6854 2014- 9- 12 Michal Privoznik <[email protected]>
6855
6856 generator: Free strings after libvirt_charPtrWrap
6857 https://bugzilla.redhat.com/show_bug.cgi?id=1140998
6858
6859 Up till bb3301ba the wrapper was freeing the passed strings for us.
6860 However that changed after the commit. So now we don't free any
6861 strings which results in memory leaks as reported upstream [1]:
6862
6863 ==14265== 2,407 bytes in 1 blocks are definitely lost in loss record 1,457 of 1,550
6864 ==14265== at 0x4C2845D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
6865 ==14265== by 0x5C46624: xdr_string (in /usr/lib64/libc-2.17.so)
6866 ==14265== by 0xCFD9FCD: xdr_remote_nonnull_string (remote_protocol.c:31)
6867 ==14265== by 0xCFDC2C8: xdr_remote_domain_get_xml_desc_ret (remote_protocol.c:1617)
6868 ==14265== by 0xCFF0811: virNetMessageDecodePayload (virnetmessage.c:407)
6869 ==14265== by 0xCFE68FB: virNetClientProgramCall (virnetclientprogram.c:379)
6870 ==14265== by 0xCFBE8B1: callFull.isra.2 (remote_driver.c:6578)
6871 ==14265== by 0xCFC7F04: remoteDomainGetXMLDesc (remote_driver.c:6600)
6872 ==14265== by 0xCF8167C: virDomainGetXMLDesc (libvirt.c:4380)
6873 ==14265== by 0xCC2C4DF: libvirt_virDomainGetXMLDesc (libvirt.c:1141)
6874 ==14265== by 0x4F12B93: PyEval_EvalFrameEx (in /usr/lib64/libpython2.7.so.1.0)
6875 ==14265== by 0x4F141AC: PyEval_EvalCodeEx (in /usr/lib64/libpython2.7.so.1.0)
6876
6877 The python documentation clearly advise us to call free() [2]. From
6878 an example in their docs:
6879
6880 PyObject *res;
6881 char *buf = (char *) malloc(BUFSIZ); /* for I/O */
6882
6883 if (buf == NULL)
6884 return PyErr_NoMemory();
6885 ...Do some I/O operation involving buf...
6886 res = PyString_FromString(buf);
6887 free(buf); /* malloc'ed */
6888 return res;
6889
6890 Moreover, instead of using VIR_FREE() (which we are not exporting),
6891 I'll just go with bare free().
6892
6893 1: https://www.redhat.com/archives/libvir-list/2014-September/msg00736.html
6894 2: https://docs.python.org/2/c-api/memory.html
6895
6896
6897
6898 2014- 9- 2 Peter Krempa <[email protected]>
6899
6900 override: Fix two uninitialized variables in convertDomainStatsRecord
6901 py_record_domain and py_record_stats would be accessed uninitialized if
6902 an out-of-memory condition would happen in the first loop. Unlikely, but
6903 coverity complained.
6904
6905 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1136354
6906
6907
6908 2014- 9- 2 Pavel Hrdina <[email protected]>
6909
6910 libvirt-override: fix some build warnings
6911 Remove unused label 'cleanup' in 'libvirt_virConnectGetAllDomainStats'
6912 function and remove unused variable 'conn' in function
6913 'libvirt_virDomainListGetStats'.
6914
6915
6916
6917 2014- 9- 2 Michal Privoznik <[email protected]>
6918
6919 Post-release version bump for new dev cycle
6920
6921
6922 2014- 9- 1 Pavel Hrdina <[email protected]>
6923
6924 Implement API bindings for virDomainBlockCopy
6925
6926
6927 2014- 9- 1 Pavel Hrdina <[email protected]>
6928
6929 API: Implement bindings for virDomainListGetStats
6930 Implement the function by returning a list of tuples instead the array
6931 of virDomainStatsRecords and store the typed parameters as dict.
6932
6933
6934
6935 2014- 9- 1 Peter Krempa <[email protected]>
6936
6937 API: Implement bindings for virConnectGetAllDomainStats
6938 Implement the function by returning a list of tuples instead the array
6939 of virDomainStatsRecords and store the typed parameters as dict.
6940
6941
6942
6943 2014- 9- 1 Peter Krempa <[email protected]>
6944
6945 API: Skip 'virDomainStatsRecordListFree'
6946 The new API function doesn't make sense to be exported in python. The
6947 bindings will return native types instead of the struct array.
6948
6949
6950
6951 2014- 9- 1 Pavel Hrdina <[email protected]>
6952
6953 generator: resolve one level of enum reference
6954 In the libvirt.h we have one enum defined by references from another
6955 enum and it leads in wrong order of definitons in python code. To
6956 prevent this we should resolve that references before we generate the
6957 python code.
6958
6959 For now we have only one level of references so we will count with that
6960 in the generator but we should update it in the future to be more
6961 flexible.
6962
6963
6964
6965 2014- 8- 19 Mo Yuxiang <[email protected]>
6966
6967 build: Fix build warning on libvirt-python
6968 On compiling libvirt-python, we get such a warning:
6969
6970 libvirt-qemu-override.c: In function ‘libvirt_qemu_virConnectDomainQemuMonitorEventRegister’:
6971 libvirt-qemu-override.c:304: warning: suggest explicit braces to avoid ambiguous ‘else’
6972
6973 Py_DECREF is a macro using if/else on older Python releases.
6974 The solution is to add braces.
6975 Python 2.7 and newer has the macro wrapped in a do { } while(0) block.
6976
6977
6978
6979 2014- 8- 11 Zhou Yimin <[email protected]>
6980
6981 Fix libvirt_longlongWrap returning a very large value
6982 If hypervisor is not Xen, the errs in struct _virDomainBlockStats will be -1.
6983 But in KVM when we call domain.blockStats(), errs is 18446744073709551615.
6984
6985 To fix that, this patch has two changes:
6986 1. Replace use of the PyLong_FromUnsignedLongLong with PyLong_FromLongLong
6987 in function libvirt_longlongWrap
6988 2. If the paramemter of libvirt_longlongWrap is unsigned long long,
6989 use libvirt_ulonglongWrap instead because of above change.
6990
6991 After this patch, errs is -1 which is consistent with virDomainBlockStats api.
6992
6993
6994
6995 2014- 8- 4 Eric Blake <[email protected]>
6996
6997 maint: document use of libvirt's run script
6998 Ever since libvirt commit 78c09530, it's easier to just use the
6999 run script.
7000
7001 * README: Mention run script.
7002
7003
7004
7005 2014- 8- 4 Eric Blake <[email protected]>
7006
7007 Bump version to 1.2.8 for new dev cycle
7008
7009
7010 2014- 7- 29 Jiri Denemark <[email protected]>
7011
7012 spec: Reorganize to satisfy buggy spectool
7013 spectool parses a specfile and strips everything but a preamble.
7014 However, if the first section is preceded by %if clause, it keeps it
7015 there which then makes rpmbuild complain about unmatched %if. Let's make
7016 the buggy tool happy by moving sections around so that the first one is
7017 not in any conditional.
7018
7019
7020 2014- 7- 22 Martin Kletzander <[email protected]>
7021
7022 Bump version to 1.2.7 for new dev cycle
7023
7024
7025 2014- 6- 27 Nehal J Wani <[email protected]>
7026
7027 Implement new virNetworkGetDHCPLeases API
7028 This API returns a list of DHCP leases for all network interfaces
7029 connected to the given virtual network or limited output just for one
7030 interface if mac is specified.
7031
7032 Example Output:
7033 [{'iface': 'virbr3', 'ipaddr': '192.168.150.181', 'hostname': 'ubuntu14',
7034 'expirytime': 1403737495L, 'prefix': 24, 'clientid': None,
7035 'mac': '52:54:00:e8:73:eb', 'iaid': None, 'type': 0},
7036 {'iface': 'virbr3', 'ipaddr': '2001:db8:ca2:2:1::bd', 'hostname': 'fedora20-test',
7037 'expirytime': 1403738587L, 'prefix': 64, 'clientid': '00:04:b1:d8:86:42:e1:6a:aa:cf:d5:86:94:23:6f:94:04:cd',
7038 'mac': '52:54:00:5b:40:98', 'iaid': '5980312', 'type': 1}]
7039
7040
7041
7042 2014- 6- 25 Eric Blake <[email protected]>
7043
7044 maint: document development against uninstalled libvirt
7045 Thanks to Dan's recent work in libvirt.git, it is much easier to
7046 develop against uninstalled libvirt. Mention how.
7047
7048 * README: More details.
7049
7050
7051
7052 2014- 6- 25 Nehal J Wani <[email protected]>
7053
7054 build: use correct int conversion in NodeGetFreePages
7055 Commit c8ba859bc7 introduced a compiler warning while un-wrapping
7056 a python object to uint in libvirt_virNodeGetFreePages.
7057
7058 On compiling libvirt-python against libvirt 1.2.6, we get:
7059
7060 libvirt-override.c: In function ‘libvirt_virNodeGetFreePages’:
7061 libvirt-override.c:7811:9: warning: pointer targets in passing argument 2 of ‘libvirt_intUnwrap’ differ in signedness [-Wpointer-sign]
7062 if (libvirt_intUnwrap(tmp, &pages[i]) < 0)
7063 ^
7064 In file included from libvirt-override.c:24:0:
7065 typewrappers.h:169:5: note: expected ‘int *’ but argument is of type ‘unsigned int *’
7066 int libvirt_intUnwrap(PyObject *obj, int *val);
7067 ^
7068
7069
7070
7071 2014- 6- 20 Michal Privoznik <[email protected]>
7072
7073 Implement new virNodeGetFreePages API
7074 The API expose information on host's free pages counts. For easier
7075 access, in python this API returns a dictionary such as:
7076
7077 In [4]: conn.getFreePages([2048,1*1024*1024], -1, 5)
7078 Out[4]:
7079 {-1: {2048: 114, 1048576: 4},
7080 0: {2048: 3, 1048576: 1},
7081 1: {2048: 100, 1048576: 1},
7082 2: {2048: 10, 1048576: 1},
7083 3: {2048: 1, 1048576: 1}}
7084
7085 At the top level of the returned dictionary there's a pair of <NUMA
7086 node> and another dictionary that contains detailed information on
7087 each supported page size. The information then consists of fairs of
7088 <page size> and <count of free pages>.
7089
7090
7091
7092 2014- 6- 19 Jason Andryuk <[email protected]>
7093
7094 Correct virDomainMigrateToURI3 definition
7095 dconnuri is a string, so update the definition to match. Without this,
7096 the generated python would fail when passed a string.
7097
7098
7099 2014- 6- 18 Eric Blake <[email protected]>
7100
7101 build: provide wrapper makefile
7102 After years of finger training, I'm so used to 'make check' just
7103 working, that I lose quite a bit of time re-learning that in this
7104 project, it is spelled 'python setup.py build check'. A shim
7105 makefile bridges the gap.
7106
7107 * Makefile: New file.
7108
7109
7110
7111 2014- 6- 18 Eric Blake <[email protected]>
7112
7113 event-test: add missing events
7114 Update the example to be able to trace all events.
7115
7116 * examples/event-test.py (main): Match full list of domain events.
7117 (myDomainEventIOErrorReasonCallback)
7118 (myDomainEventControlErrorCallback)
7119 (myDomainEventBlockJobCallback, myDomainEventBlockJob2Callback)
7120 (blockJobTypeToString, blockJobStatusToString): New functions.
7121
7122
7123
7124 2014- 6- 18 Eric Blake <[email protected]>
7125
7126 blockjob: support new BLOCK_JOB_2 event
7127 Libvirt 1.2.6 is introducing a new block job event that passes disk
7128 information by target device rather than host file name. At the
7129 python level, we are just a passthrough, so we can reuse all the
7130 existing code and just wire up the new enum value.
7131
7132 * libvirt-override-virConnect.py
7133 (_dispatchDomainEventBlockPullCallback): Rename...
7134 (_dispatchDomainEventBlockJobCallback): ...to this, and make
7135 generic to both events.
7136 * libvirt-override.c
7137 (libvirt_virConnectDomainEventBlockJobCallback): Match naming.
7138 (libvirt_virConnectDomainEventRegisterAny): Allow new registration.
7139
7140
7141
7142 2014- 6- 2 Martin Kletzander <[email protected]>
7143
7144 Bump version to 1.2.6 for new dev cycle
7145
7146
7147 2014- 5- 27 Martin Kletzander <[email protected]>
7148
7149 fix leak in memoryStats with older python
7150 libvirt_virDomainMemoryStats() function creates a dictionary without
7151 any checks whether the additions were successful, whether the python
7152 objects were created and, most importantly, without decrementing the
7153 reference count on the objects added to the dictionary. This is
7154 somehow not an issue with current upstream versions, however with
7155 python 2.6 this exposes a leak in our bindings. The following patch
7156 works on both old and new CPython versions and is already used in
7157 other parts of the code, so it's also most straightforward.
7158
7159 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1099860
7160
7161
7162
7163 2014- 5- 20 Michal Privoznik <[email protected]>
7164
7165 Implement virDomain{Get,Set}Time APIs
7166 While the setter can be generated automatically, the getter is not.
7167 However, it would be a lot easier if they both share the same logic:
7168 a python dictionary to represent the time: dict['seconds'] to
7169 represent seconds, and dict['nseconds'] to represent nanoseconds.
7170
7171
7172
7173 2014- 5- 16 Tomoki Sekiyama <[email protected]>
7174
7175 override: add virDomainFSFreeze and virDomainFSThaw API
7176 Add binding for the new virDomainFSFreeze and virDomainFSThaw functions
7177 added in libvirt 1.2.5. These require override since these take a list
7178 of mountpoints path string. The methods are named 'fsFreeze' and
7179 'fsThaw'.
7180
7181
7182
7183 2014- 5- 5 Martin Kletzander <[email protected]>
7184
7185 Bump version to 1.2.5 for new dev cycle
7186
7187
7188 2014- 4- 7 Laine Stump <[email protected]>
7189
7190 build: add BuildRequires for python-lxml and python3-lxml
7191 python-lxml is likely always already present anyway (due to so many
7192 packages being dependent on it), but at least on my F20 system,
7193 python3-lxml wasn't installed, leading to a failure of "python
7194 setup.py rpm" without an informative error message.
7195
7196
7197 2014- 4- 7 Laine Stump <[email protected]>
7198
7199 increment version post-release
7200 As is now done with libvirt. git head will always have the version
7201 number of the expected *next* release.
7202
7203
7204 2014- 4- 2 Daniel P. Berrange <[email protected]>
7205
7206 Fix nosetests usage with python3
7207 Add RPM deps on python/python3-nose, make RPM build run the
7208 test suite and invoke nosetests using correct python binary
7209
7210
7211
7212 2014- 3- 31 Brian Rak <[email protected]>
7213
7214 Fix potential crash when setting partial cpu/memory/numa/interface limits on domains
7215 The number of parameters in new_params is not guaranteed to be the
7216 same as the number of parameters in params. Use the correct count
7217 when freeing new_params to avoid crashes.
7218
7219
7220 2014- 3- 25 Cole Robinson <[email protected]>
7221
7222 setup.py: Allow running --help or clean without pkg-config
7223 If pkg-config isn't installed, or a too old libvirt, we can't even
7224 do 'python setup.py --help' without throwing an exception.
7225
7226 Have the pkg-config checks and validation only throw an exception if
7227 being called from the 'build' step.
7228
7229 https://bugzilla.redhat.com/show_bug.cgi?id=1074170
7230
7231
7232 2014- 3- 25 Cole Robinson <[email protected]>
7233
7234 setup.py: Make have_libvirt_lxc a function
7235 This means we call it twice for a build operation, but I don't think
7236 that's a big deal.
7237
7238
7239 2014- 3- 25 Cole Robinson <[email protected]>
7240
7241 setup.py: Move module list building to its own function
7242 Makes it a bit more clear what all that code is used for, rather than
7243 intermixing it with function definitions.
7244
7245 Besides the comment additions, this is a no-op and just reindents the
7246 block, into a function.
7247
7248
7249 2014- 3- 25 Cole Robinson <[email protected]>
7250
7251 setup.py: Remove unused import
7252
7253
7254 2014- 3- 25 Eric Blake <[email protected]>
7255
7256 qemu: support arbitrary monitor events
7257 Wrap the new virConnectDomainQemuMonitorEventRegister function
7258 added in libvirt 1.2.3. This patch copies heavily from
7259 network events (commit 6ea5be0) and from event loop callbacks
7260 in libvirt-override.c, since in the libvirt_qemu module, we
7261 must expose top-level functions rather than class members.
7262
7263 * generator.py (qemu_skip_function): Don't generate event code.
7264 (qemuBuildWrappers): Delay manual portion until after imports.
7265 * libvirt-qemu-override.py (qemuMonitorEventRegister)
7266 (qemuMonitorEventDeregister): New file.
7267 * libvirt-qemu-override.c
7268 (libvirt_qemu_virConnectDomainQemuMonitorEventFreeFunc)
7269 (libvirt_qemu_virConnectDomainQemuMonitorEventCallback)
7270 (libvirt_qemu_virConnectDomainQemuMonitorEventRegister)
7271 (libvirt_qemu_virConnectDomainQemuMonitorEventDeregister)
7272 (libvirt_qemu_lookupPythonFunc, getLibvirtQemuDictObject)
7273 (getLibvirtQemuModuleObject): New functions.
7274
7275
7276
7277 2014- 3- 25 Eric Blake <[email protected]>
7278
7279 event: fix domain reference bugs
7280 Noticed this bug while adding qemu monitor events; there's probably
7281 lots of other misuse of libvirt_virDomainPtrWrap, but for now I'm
7282 limiting the fix to all copied-and-pasted event callbacks, since
7283 I'm about to copy it again in the next patch. While at it, check
7284 for failure to extract the "conn" key from the opaque callback
7285 struct, and hoist that check to occur before we reach the point
7286 where it is harder to undo on failure (the network code was the
7287 only code that had it in the right place, but then it failed to
7288 restore thread state on failure).
7289
7290 The graphics callback is still not clean; but incremental
7291 improvements are better than nothing.
7292
7293 * libvirt-override.c (libvirt_virConnectDomainEventCallback)
7294 (libvirt_virConnectDomainEvetnLifecycleCallback)
7295 (libvirt_virConnectDomainEventGenericCallback)
7296 (libvirt_virConnectDomainEventRTCChangeCallback)
7297 (libvirt_virConnectDomainEventWatchdogCallback)
7298 (libvirt_virConnectDomainEventIOErrorCallback)
7299 (libvirt_virConnectDomainEventIOErrorReasonCallback)
7300 (libvirt_virConnectDomainEventGraphicsCallback)
7301 (libvirt_virConnectDomainEventBlockJobCallback)
7302 (libvirt_virConnectDomainEventDiskChangeCallback)
7303 (libvirt_virConnectDomainEventTrayChangeCallback)
7304 (libvirt_virConnectDomainEventPMWakeupCallback)
7305 (libvirt_virConnectDomainEventPMSuspendCallback)
7306 (libvirt_virConnectDomainEventBalloonChangeCallback)
7307 (libvirt_virConnectDomainEventPMSuspendDiskCallback)
7308 (libvirt_virConnectDomainEventDeviceRemovedCallback): Don't pass
7309 NULL to PyObject_CallMethod.
7310 (libvirt_virConnectNetworkEventLifecycleCallback): Likewise, and
7311 don't corrupt thread state.
7312
7313
7314
7315 2014- 3- 25 Martin Kletzander <[email protected]>
7316
7317 generator: Add virConnectDomainQemuMonitorEventCallback to skipped_types
7318
7319
7320 2014- 3- 24 Eric Blake <[email protected]>
7321
7322 maint: balance {} usage
7323 Emacs gets lost when finding function boundaries when #ifdef
7324 sections do not have balanced {}.
7325
7326 * libvirt-override.c (libvirt_PyString_Check): New define.
7327 (virPyDictToTypedParams): Avoid unbalanced {} across ifdef.
7328
7329
7330
7331 2014- 3- 24 Peter Krempa <[email protected]>
7332
7333 maint: Add ctags configuration file and ignore the output
7334 Add the config file to ease creation of tags to help navigation in
7335 editors.
7336
7337
7338 2014- 3- 24 Eric Blake <[email protected]>
7339
7340 maint: set up preferred emacs settings
7341 Copy the relevant settings from libvirt.git, so that emacs users
7342 maintain the style previously used before the two repos split.
7343
7344 * .dir-locals.el: New file.
7345
7346
7347
7348 2014- 3- 21 Eric Blake <[email protected]>
7349
7350 maint: ignore .pyc files
7351 * .gitignore: Add exemption.
7352
7353
7354
7355 2014- 3- 20 Cole Robinson <[email protected]>
7356
7357 override: Return NULL on python failure in getCPUModelNames
7358 Eric pointed this out on the last patch, but I pushed it before noticing
7359 his message.
7360
7361
7362 2014- 3- 20 Cole Robinson <[email protected]>
7363
7364 override: GetCPUModelNames should return None on failure
7365 Right now, on failure, libvirt.py doesn't raise an exception and just
7366 returns -1 to the user.
7367
7368
7369 2014- 3- 19 Daniel P. Berrange <[email protected]>
7370
7371 Add test for setting scheduler parameters
7372 Add a test setting scheduler parameters to validate the
7373 previous bugfix to strncpy of field names.
7374
7375
7376
7377 2014- 3- 19 Daniel P. Berrange <[email protected]>
7378
7379 Add support for running unit tests with nose
7380 Make the 'python setup.py test' able to run unit tests
7381 found under tests/ through the 'nosetests' command
7382
7383
7384
7385 2014- 3- 18 Michal Privoznik <[email protected]>
7386
7387 setPyVirTypedParameter: free whole return variable on error
7388 The @ret value is built in a loop. However, if in one iteration
7389 there's an error, we should free all the fields built so far. For
7390 instance, if there's an error and the previous item was
7391 type of VIR_TYPED_PARAM_STRING we definitely must free it.
7392
7393
7394
7395 2014- 3- 18 Michal Privoznik <[email protected]>
7396
7397 setPyVirTypedParameter: Copy full field name
7398 In the setPyVirTypedParameter we try to produce virTypedParameter
7399 array from a python dictionary. However, when copying field name into
7400 item in returned array, we use strncpy() as the field name is fixed
7401 length array. To determine its size we use sizeof() but mistakenly
7402 dereference it resulting in sizeof(char) which equals to 1 byte.
7403 Moreover, there's no need for using sizeof() when we have a global
7404 macro to tell us the length of the field name:
7405 VIR_TYPED_PARAM_FIELD_LENGTH.
7406
7407 And since array is allocated using VIR_ALLOC() we are sure the memory
7408 is initially filled with zeros. Hence, there's no need to terminate
7409 string we've just copied into field name with '\0' character. It's
7410 there for sure too as we copy up to field length - 1.
7411
7412
7413
7414 2014- 3- 3 Daniel P. Berrange <[email protected]>
7415
7416 Post release version bump to 1.2.3
7417
7418
7419 2014- 3- 2 Daniel Veillard <[email protected]>
7420
7421 Release of libvirt-python 1.2.2
7422
7423
7424 2014- 2- 20 Martin Kletzander <[email protected]>
7425
7426 generator: Skip exporting only sentinels
7427 When enum type has '_LAST' in its name, but is not the last type in
7428 that enum, it's skipped even though it shouldn't be. Currently, this
7429 is the case for only VIR_NETWORK_UPDATE_COMMAND_ADD_LAST inside an
7430 enum virNetworkUpdateCommand.
7431
7432 Also, since _LAST types can have other enums instead of values, that
7433 needs to be filtered out using a try-except when converting the value.
7434
7435
7436
7437 2014- 2- 13 Philipp Hahn <[email protected]>
7438
7439 Fix stream related spelling mistakes
7440 Consistent spelling of all-uppercase I/O.
7441
7442
7443
7444 2014- 2- 12 Eric Blake <[email protected]>
7445
7446 examples: demonstrate network events
7447 Commit 6ea5be0 added network event callback support, so we might
7448 as well demonstrate that it works by updating our example.
7449
7450 * examples/event-test.py: Add network event, fix typos.
7451
7452
7453
7454 2014- 2- 4 Eric Blake <[email protected]>
7455
7456 maint: ignore editor files
7457 * .gitignore: Exclude emacs cruft.
7458
7459
7460
7461 2014- 2- 3 Eric Blake <[email protected]>
7462
7463 Merge tag 'v1.2.1'
7464 Release of libvirt-python-1.2.1
7465
7466
7467 2014- 1- 23 Robie Basak <[email protected]>
7468
7469 Fix calling of virStreamSend method
7470 Change d40861 removed the 'len' argument from the virStreamSend
7471 C level wrapper, but forgot to remove it from the python level
7472 wrapper.
7473
7474 Reported-by: Robie Basak <[email protected]>
7475
7476
7477 2014- 1- 16 Daniel Veillard <[email protected]>
7478
7479 Release of libvirt-python-1.2.1
7480
7481
7482 2014- 1- 11 Doug Goldstein <[email protected]>
7483
7484 virStream.sendAll() fix raising an undeclared var
7485 The exception is raised from the variable 'e', which was undeclared in
7486 this context. Used code that is compatible with old and new Python
7487 versions.
7488
7489
7490 2014- 1- 2 Doug Goldstein <[email protected]>
7491
7492 Add space after comma for consistency with code style
7493
7494
7495 2013- 12- 30 Doug Goldstein <[email protected]>
7496
7497 define __GNUC_PREREQ macro before using it
7498 We brought over use of the __GNUC_PREREQ macro from libvirt but didn't
7499 bring over the definition of it. This brings over the macro from libvirt
7500 sources.
7501
7502
7503 2013- 12- 12 Daniel P. Berrange <[email protected]>
7504
7505 Rewrite libvirt_charPtrUnwrap to work with Python 3.0->3.2
7506 The PyUnicode_AsUTF8 method doesn't exist prior to Python 3.3.
7507 It is also somewhat inefficient, so rewrite it to use an
7508 intermediate PyBytes object.
7509
7510
7511
7512 2013- 12- 12 Daniel P. Berrange <[email protected]>
7513
7514 Add python3 to the automated build and RPM
7515 This updates autobuild.sh to test the python3 build process.
7516 The RPM specfile is changed to build a libvirt-python3 RPM
7517 on Fedora > 18
7518
7519
7520
7521 2013- 12- 11 Daniel P. Berrange <[email protected]>
7522
7523 Skip network event callbacks in sanity test
7524
7525
7526 2013- 12- 11 Daniel P. Berrange <[email protected]>
7527
7528 Fix return type in override method for virStreamRecv
7529 The virStreamRecv override returns a PyObject not an int
7530
7531
7532
7533 2013- 12- 11 Daniel P. Berrange <[email protected]>
7534
7535 sanitytest: remove use of string.lower()
7536 Call lower() directly on the string object instance, not
7537 the class
7538
7539
7540
7541 2013- 12- 11 Daniel P. Berrange <[email protected]>
7542
7543 sanitytest: Fix broken comparison between int and string
7544 Python2 was forgiving of a comparison between an int and string
7545 but Python3 gets very upset.
7546
7547
7548
7549 2013- 12- 11 Daniel P. Berrange <[email protected]>
7550
7551 override: Switch virStreamSend wrapper to use libvirt_charPtrSizeUnwrap
7552 Instead of using a 'z#i' format string to receive byte array,
7553 use 'O' and then libvirt_charPtrSizeUnwrap. This lets us hide
7554 the Python 3 vs 2 differences in typewrappers.c
7555
7556
7557
7558 2013- 12- 11 Daniel P. Berrange <[email protected]>
7559
7560 override: Conditionalize use of PyString_Check and PyInt_Check
7561 The PyString and PyInt classes are gone in Python 3, so we must
7562 conditionalize their use to be Python 2 only.
7563
7564
7565
7566 2013- 12- 11 Daniel P. Berrange <[email protected]>
7567
7568 typewrappers: PyInt/PyLong merge for Python3
7569 In Python3 the PyInt / PyLong types have merged into a single
7570 PyLong type. Conditionalize the use of PyInt to Python 2 only
7571
7572
7573
7574 2013- 12- 11 Daniel P. Berrange <[email protected]>
7575
7576 typewrappers: Replace use of PyString class
7577 Replace use of PyString with either PyBytes or PyUnicode.
7578 The former is used for buffers with explicit sizes, which
7579 are used by APIs processing raw bytes.
7580
7581
7582
7583 2013- 12- 11 Daniel P. Berrange <[email protected]>
7584
7585 override: Replace PyInt_AsLong with helper
7586 Replace use of the PyInt_AsLong libvirt_intUnwrap helper.
7587 This isolates the need for Python3 specific code in one
7588 place
7589
7590
7591
7592 2013- 12- 11 Daniel P. Berrange <[email protected]>
7593
7594 override: Replace Py{Int,Long}_FromLong with helpers
7595 Replace use of the PyInt_FromLong and PyLong_FromLongLong
7596 with libvirt_{int,uint,longlong,ulonglong}Wrap helpers.
7597 This isolates the need for Python3 specific code in one
7598 place.
7599
7600
7601
7602 2013- 12- 11 Daniel P. Berrange <[email protected]>
7603
7604 override: Replace PyString_AsString with libvirt_charPtrUnwrap
7605 Replace calls to PyString_AsString with the helper method
7606 libvirt_charPtrUnwrap. This isolates the code that will
7607 change in Python3.
7608
7609 In making this change, all callers now have responsibility
7610 for free'ing the string.
7611
7612
7613
7614 2013- 12- 11 Daniel P. Berrange <[email protected]>
7615
7616 override: Replace PyString_FromString with libvirt_constcharPtrWrap
7617 Make use of libvirt_constcharPtrWrap in all override code,
7618 to match generated code. This will isolate Python3 specific
7619 changes in one place.
7620
7621
7622
7623 2013- 12- 11 Daniel P. Berrange <[email protected]>
7624
7625 sanitytest: Fix libvirtError class handling for Python 2.4
7626 The Exception class hiearchy in Python 2.4 reports different
7627 data types than in later Python versions. As a result the
7628 type(libvirt.libvirtError) does not return 'type'. We just
7629 special case handling of this class.
7630
7631
7632
7633 2013- 12- 11 Daniel P. Berrange <[email protected]>
7634
7635 override: Fix native module registration to work with Python3
7636 The way native modules are registered has completely
7637 changed, so the code must be #ifdef'd for Python2 & 3
7638
7639
7640
7641 2013- 12- 11 Daniel P. Berrange <[email protected]>
7642
7643 examples: Ensure we write bytes to the self-pipe
7644 Strings in python3 default to unicode, so when writing to
7645 the self-pipe we must be sure to use bytes by calling the
7646 encode() method.
7647
7648
7649
7650 2013- 12- 11 Daniel P. Berrange <[email protected]>
7651
7652 examples: Invoke print("...") instead of print "..."
7653 The 'print' method must be called as a function in python3,
7654 ie with brackets.
7655
7656
7657
7658 2013- 12- 11 Daniel P. Berrange <[email protected]>
7659
7660 Don't free passed in args in libvirt_charPtrWrap / libvirt_charPtrSizeWrap
7661 Functions should not make assumptions about the memory management
7662 callers use for parameters
7663
7664
7665
7666 2013- 12- 11 Cédric Bosdonnat <[email protected]>
7667
7668 Added python binding for the new network events API
7669 The new network events code requires manual binding code to
7670 be written.
7671
7672
7673
7674 2013- 12- 9 Doug Goldstein <[email protected]>
7675
7676 test: Invoke print("...") instead of print "..."
7677 The 'print' statement no longer exists in Python 3 and now must be
7678 called as a function. This is compatible down to Python 2.4 as we are
7679 not using any special syntax of the function.
7680
7681
7682 2013- 12- 9 Doug Goldstein <[email protected]>
7683
7684 override: Fix exception handling syntax
7685 Python 3 no longer accepts 'except Exception, e:' as valid while Python
7686 2.4 does not accept the new syntax 'except Exception as e:' so this uses
7687 a fall back method that is compatible with both.
7688
7689
7690 2013- 12- 9 Daniel P. Berrange <[email protected]>
7691
7692 generator: Sort enums and functions when generating code
7693 To assist in diff comparisons between code generated with
7694 different versions of Python, do an explicit sort of all
7695 functions and enums.
7696
7697
7698
7699 2013- 12- 9 Daniel P. Berrange <[email protected]>
7700
7701 generator: Remove use of string.replace and string.find functions
7702 Call the 'replace' and 'find' functions directly on the
7703 string variables, instead of via the 'string' module.
7704 Python3 only accepts the latter syntax
7705
7706
7707
7708 2013- 12- 9 Daniel P. Berrange <[email protected]>
7709
7710 generator: Update to use sort() 'key' param
7711 The sort() method previously took either a comparator function
7712 or a key function. Only the latter is supported in Python3.
7713
7714
7715
7716 2013- 12- 9 Daniel P. Berrange <[email protected]>
7717
7718 generator: Remove use of 'has_key' function
7719 The code 'XXX.has_key(YYYY)' must be changed to be of
7720 the form 'YYY in XXXX' which works in Python2 and 3
7721
7722 As an added complication, if 'YYY in XXX' is used against
7723 an object overriding the '__getitem__' method it does not
7724 work in Python 2.4. Instead we must use 'YYY in XXX.keys()'
7725
7726
7727
7728 2013- 12- 5 Doug Goldstein <[email protected]>
7729
7730 Update exception catching in generated code
7731 Use a syntax for exception handling that works in both Python 2 and
7732 Python 3. The new syntax is 'except Exception as e:' but this does not
7733 work in older Pythons so we use the most compatible way by just catching
7734 the exception and getting the type and the exception value after the
7735 fact.
7736
7737
7738 2013- 12- 5 Doug Goldstein <[email protected]>
7739
7740 generator: Support exceptions in Python 2 and 3
7741 Use a syntax for exception handling that works in both Python 2 and
7742 Python 3
7743
7744
7745 2013- 12- 5 Doug Goldstein <[email protected]>
7746
7747 setup: Drop unused exception variable
7748 Drop the unused exception variable in setup.py. This has the benefit
7749 of dropping syntax that is not valid with Python 3.
7750
7751
7752 2013- 12- 4 Daniel P. Berrange <[email protected]>
7753
7754 generator: Cast iterators to a list() explicitly
7755 In python3 various methods list 'dict.keys()' do not
7756 return a list, so we must explicitly cast the result.
7757
7758
7759
7760 2013- 12- 4 Daniel P. Berrange <[email protected]>
7761
7762 Revert "Optimize callback lookup in event handlers"
7763 This reverts commit 084729e26905f574b8c057cc4c732b1b6ce852d3.
7764
7765 The PyImport_ImportModuleNoBlock method does not exist in
7766 python 2.4
7767
7768
7769
7770 2013- 12- 4 Daniel P. Berrange <[email protected]>
7771
7772 Revert accidental change to exception handling syntax
7773 The previous commit changed the exception handling syntax to
7774 use 'as' instead of a ','. This doesn't work with python 2.4
7775
7776
7777
7778 2013- 12- 4 Daniel P. Berrange <[email protected]>
7779
7780 generator: Invoke print("...") instead of print "..."
7781 The 'print' method must be called as a function in python3,
7782 ie with brackets.
7783
7784
7785
7786 2013- 12- 4 Daniel P. Berrange <[email protected]>
7787
7788 generator: Remove string.lower(XXX) with XXX.lower()
7789 In python3 the string.lower() method doesn't exist, the
7790 lower() function can only be executed against a string
7791 variable directly. Python2 supported both approaches so
7792 this change is compatible
7793
7794
7795
7796 2013- 12- 4 Daniel P. Berrange <[email protected]>
7797
7798 generator: Don't use 'list' as a variable name
7799 In python3 if we use 'list' as a variable name it causes it
7800 to hide the corresponding 'list()' function from the entire
7801 function that holds the variable.
7802
7803
7804
7805 2013- 12- 4 Daniel P. Berrange <[email protected]>
7806
7807 Optimize callback lookup in event handlers
7808 The event handler code currently invokes PyImport_ImportModule
7809 which is very heavyweight. This is not in fact required, since
7810 we know the libvirt module has already been imported. We can
7811 thus use PyImport_ImportModuleNoBlock and do away with the
7812 global variables caching the imported module reference.
7813
7814
7815
7816 2013- 12- 4 Daniel P. Berrange <[email protected]>
7817
7818 Fix use of virDomainEventRegister in python bindings
7819 If an app used the virDomainEventRegister binding instead
7820 of the virDomainEventRegisterAny binding, it would never
7821 have its callback invoked. This is because the code for
7822 dispatching from the C libvirt_virConnectDomainEventCallback
7823 method was totally fubar.
7824
7825 If DEBUG macro was set in the python build the error would
7826 become visible
7827
7828 "libvirt_virConnectDomainEventCallback dom_class is not a class!"
7829
7830 The code in libvirt_virConnectDomainEventCallback was
7831 inexplicably complex and has apparently never worked. The
7832 fix is to write it the same way as the other callback handlers.
7833
7834
7835
7836 2013- 12- 3 Doug Goldstein <[email protected]>
7837
7838 setup: Use user requested python binary
7839 When setup.py is kicked off with a python interpreter other than the
7840 system 'python', (e.g. python2.7 setup.py build) the build process would
7841 switch to 'python' and not use python2.7 as requested by the user. We
7842 should always respect the user requested python interpreter and use it.
7843
7844
7845 2013- 11- 28 Daniel P. Berrange <[email protected]>
7846
7847 Improve quality of sanitytest check
7848 Validate that every public API method is mapped into the python
7849 and that every python method has a sane C API.
7850
7851
7852
7853 2013- 11- 28 Daniel P. Berrange <[email protected]>
7854
7855 Skip copying manually written python for C APIs which don't exist
7856 If the libvirt-override-virXXXX.py file has methods which call
7857 C APIs that don't exist in the version of libvirt built against
7858 we need to skip copying their code.
7859
7860 eg for 0.9.13 libvirt we should not copy the 'listAllDomains'
7861 method.
7862
7863 The way this works is that it breaks the override file into
7864 individual methods by looking for ' def '. It then collects
7865 the contents until the next method start, whereupon it looks
7866 for a libvirtmod.XXXXXX API call. It checks if the XXXXX part
7867 is present in the XML description we have, and if not, it
7868 discards the entire method.
7869
7870
7871
7872 2013- 11- 28 Daniel P. Berrange <[email protected]>
7873
7874 Fix misc RPM specfile flaws
7875 Fix the RPM summary line, add placeholder %changelog tag,
7876 make %setup quiet, add Url: tag and filter out bogus
7877 provides and add example programs as docs.
7878
7879
7880
7881 2013- 11- 28 Daniel P. Berrange <[email protected]>
7882
7883 Fix code for avoiding overrides of non-existant functions
7884 When reading/writing a global variable from inside a method
7885 it must be declared as a global, otherwise a local variable
7886 by the same name will be used.
7887
7888 Special case the virConnectListDomainsID method which is
7889 bizarrely renamed for no obvious reason.
7890
7891
7892
7893 2013- 11- 28 Daniel P. Berrange <[email protected]>
7894
7895 Deal with old filenames for events/error functions
7896 Older libvirt has files named 'events' and 'virterror'
7897 rather than 'virevent' and 'virerror'. This is visible
7898 in the API XML files. We must look for both names to
7899 ensure we don't lose generation of methods with older
7900 versions of libvirt.
7901
7902
7903
7904 2013- 11- 27 Daniel P. Berrange <[email protected]>
7905
7906 Add missing binding of security model/label APIs
7907 The virNodeGetSecurityModel, virDomainGetSecurityLabel and
7908 virDomainGetSecurityLabelList methods were disabled in the
7909 python binding for inexplicable reasons.
7910
7911
7912
7913 2013- 11- 27 Daniel P. Berrange <[email protected]>
7914
7915 Avoid generating the methods in multiple classes
7916 The python code generator tries to figure out what class a
7917 method should be in by looking at the list of arguments for
7918 any which are object types. Unfortunately missing break
7919 statements meant that methods which have multiple object
7920 arguments (eg migrate as a virDomainPtr followed by a
7921 virConnectPtr) got added to multiple classes.
7922
7923 The following incorrect methods are removed by this change
7924
7925 virStream.download (dup of virStorageVol.download)
7926 virStream.screenshot (dup of virDomain.screenshot)
7927 virStream.upload (dup of virStorageVol.upload)
7928 virConnect.migrate (dup of virDomain.migrate)
7929 virConnect.migrate2 (dup of virDomain.migrate2)
7930 virConnect.migrate3 (dup of virDomain.migrate3)
7931 virConnect.migrateToURI3 (dup of virDomain.migrateToURI3)
7932
7933
7934
7935 2013- 11- 27 Daniel P. Berrange <[email protected]>
7936
7937 Make block pull event dispatcher private
7938 The method dispatchDomainEventBlockPullCallback which is
7939 used internally to dispatch block pull events to the python
7940 application code was missing the leading '_', to denote that
7941 it was private. All other event callback helpers have a
7942 leading '_'. No application should have been using this so
7943 it is justifiable to rename it.
7944
7945
7946
7947 2013- 11- 27 Daniel P. Berrange <[email protected]>
7948
7949 Don't include virDomainSnapshotRef in python API
7950 The reference counting API is for internal use only. Attempts
7951 to use it from python application code will cause havoc.
7952
7953
7954
7955 2013- 11- 26 Doug Goldstein <[email protected]>
7956
7957 Call virGetLastError from mod rather than py wrapper
7958 All other code always calls the methods from the mod rather than using
7959 the python wrapper so this matches the state of all other callers.
7960
7961
7962 2013- 11- 26 Don Dugger <[email protected]>
7963
7964 Return right error code for baselineCPU
7965 This Python interface code is returning a -1 on errors for the
7966 `baselineCPU' API. Since this API is supposed to return a pointer
7967 the error return value should really be VIR_PY_NONE.
7968
7969
7970
7971 2013- 11- 26 Martin Kletzander <[email protected]>
7972
7973 Make setup.py executable
7974
7975
7976 2013- 11- 26 Daniel P. Berrange <[email protected]>
7977
7978 Update README file contents and add HACKING file
7979 The previous README file from the python code is more like a
7980 HACKING file. Rename it and update the content. Then add a
7981 basic README file
7982
7983
7984
7985 2013- 11- 25 Eric Blake <[email protected]>
7986
7987 maint: next release is 1.2.0
7988 No other hits for:
7989 git grep '1\.1\.5'
7990
7991 * libvirt-utils.h: Fix comment.
7992
7993
7994
7995 2013- 11- 22 Daniel P. Berrange <[email protected]>
7996
7997 Ensure API overrides only used if API exists
7998 Entries in the -overrides.xml files should only be recorded
7999 if the API also exists in the main API XML file.
8000
8001
8002
8003 2013- 11- 22 Daniel P. Berrange <[email protected]>
8004
8005 Relax min required libvirt to version 0.9.11
8006
8007
8008 2013- 11- 22 Doug Goldstein <[email protected]>
8009
8010 virConnectGetCPUModelNames API appeared in 1.1.3
8011
8012
8013 2013- 11- 22 Daniel P. Berrange <[email protected]>
8014
8015 VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED appeared in 1.1.1
8016
8017
8018 2013- 11- 22 Doug Goldstein <[email protected]>
8019
8020 virDomainCreateXMLWithFiles and virDomainCreateWithFiles APIs appeared in 1.1.1
8021 virDomainCreateXMLWithFiles() and virDomainCreateWithFiles() were not
8022 added to libvirt until 1.1.1
8023
8024
8025 2013- 11- 22 Doug Goldstein <[email protected]>
8026
8027 virDomainMigrate3 and virDomainMigrateToURI3 appeared in 1.1.0
8028 The functions virDomainMigrate3 and virDomainMigrateToURI3 were not
8029 added to libvirt until v1.1.0.
8030
8031
8032 2013- 11- 22 Doug Goldstein <[email protected]>
8033
8034 virTypedParams* API appeared in 1.0.2 and used in 1.1.0
8035 When building against versions of libvirt prior to 1.0.2, we can not
8036 provide wrappers for virTypedParams* APIs. In addition we don't need
8037 to have the helper APIs until 1.1.0 when the first API we wrap starts
8038 to use them.
8039
8040
8041 2013- 11- 22 Doug Goldstein <[email protected]>
8042
8043 virDomainMigrateGetCompressionCache API appeared in 1.0.3
8044
8045
8046 2013- 11- 22 Doug Goldstein <[email protected]>
8047
8048 virDomainGetJobStats API appeared in 1.0.3
8049
8050
8051 2013- 11- 22 Doug Goldstein <[email protected]>
8052
8053 virNodeGetCPUMap API appeared in 1.0.0
8054
8055
8056 2013- 11- 22 Daniel P. Berrange <[email protected]>
8057
8058 VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK appeared in 1.0.0
8059
8060
8061 2013- 11- 22 Doug Goldstein <[email protected]>
8062
8063 virStoragePoolListAllVolumes API appeared in 0.10.2
8064
8065
8066 2013- 11- 22 Doug Goldstein <[email protected]>
8067
8068 virNode{Get,Set}MemoryParameters API appeared in 0.10.2
8069
8070
8071 2013- 11- 22 Doug Goldstein <[email protected]>
8072
8073 virConnectListAll* APIs appeared in 0.10.2
8074
8075
8076 2013- 11- 22 Daniel P. Berrange <[email protected]>
8077
8078 virDomainQemuAgentCommand appeared in 0.10.0
8079
8080
8081 2013- 11- 22 Doug Goldstein <[email protected]>
8082
8083 virDomainPinEmulator and virDomainGetEmulatorPinInfo APIs appeared in 0.10.0
8084
8085
8086 2013- 11- 22 Daniel P. Berrange <[email protected]>
8087
8088 VIR_DOMAIN_EVENT_ID_BALLOON_CHANGED appeared in 0.10.0
8089
8090
8091 2013- 11- 22 Doug Goldstein <[email protected]>
8092
8093 virConnect{Unr,R}egisterCloseCallback API appeared in 0.10.0
8094
8095
8096 2013- 11- 22 Doug Goldstein <[email protected]>
8097
8098 virDomainSnapshotListAllChildren API appeared in 0.9.13
8099
8100
8101 2013- 11- 22 Doug Goldstein <[email protected]>
8102
8103 virConnectListAllDomains API appeared in 0.9.13
8104
8105
8106 2013- 11- 22 Doug Goldstein <[email protected]>
8107
8108 virDomainListAllSnapshots API appeared in 0.9.13
8109
8110
8111 2013- 11- 22 Doug Goldstein <[email protected]>
8112
8113 Don't build LXC module when building less than 1.0.2
8114 The functions that the LXC module wraps did not appear until 1.0.2 so we
8115 can't build the module unless we're building against 1.0.2 or newer.
8116
8117
8118 2013- 11- 22 Doug Goldstein <[email protected]>
8119
8120 Create array of modules to be built
8121 Create an array of modules to be built to allow for flexibility to
8122 enable or disable some modules in the future and allow for additional
8123 modules to be added easily
8124
8125
8126 2013- 11- 22 Doug Goldstein <[email protected]>
8127
8128 Break generator.py to be called per module
8129 Since we don't always want to build all the modules, and there might be
8130 more modules added in the future but we want to retain backwards
8131 compatibility with older libvirts, change generator.py to be called once
8132 per module instead of with all modules at once.
8133
8134
8135 2013- 11- 22 Daniel P. Berrange <[email protected]>
8136
8137 Setup distutils build system
8138 Create a setup.py for building libvirt python code and add
8139 supporting files
8140
8141
8142
8143 2013- 11- 22 Daniel P. Berrange <[email protected]>
8144
8145 Add execute permission for sanitytest.py
8146
8147
8148 2013- 11- 22 Daniel P. Berrange <[email protected]>
8149
8150 Add build/ to python module path for sanitytest.py
8151 The generated libvirt.py modules will be in the build/
8152 directory, so santitytest.py must use that directory.
8153
8154
8155
8156 2013- 11- 22 Doug Goldstein <[email protected]>
8157
8158 Import some virTypedParams* APIs from libvirt
8159 virTypedParamsClear() and virTypedParamsFree() were introduced in
8160 libvirt 1.0.2. In an effort to keep the code clean bring these two
8161 functions to libvirt-python if we're building against a version of
8162 libvirt that's older than 1.0.2
8163
8164
8165 2013- 11- 22 Doug Goldstein <[email protected]>
8166
8167 Import LIBVIR_CHECK_VERSION macro from libvirt
8168 Add LIBVIR_CHECK_VERSION from libvirt upstream so that we can check the
8169 version of the library we are compiling against and support a range of
8170 libvirt versions. The macro was added to libvirt in 1.2.0 so we must
8171 provide it if its not defined.
8172
8173
8174 2013- 11- 22 Daniel P. Berrange <[email protected]>
8175
8176 Import VIR_FORCE_CLOSE macro from libvirt
8177 Import the macro for safely closing file descriptors
8178
8179
8180
8181 2013- 11- 22 Daniel P. Berrange <[email protected]>
8182
8183 Remove use of virStrcpyStatic
8184
8185
8186 2013- 11- 22 Daniel P. Berrange <[email protected]>
8187
8188 Import VIR_ALLOC / VIR_ALLOC_N / VIR_REALLOC_N functions
8189 Import the libvirt memory allocation functions, stripping the OOM
8190 testing and error reporting pieces.
8191
8192
8193
8194 2013- 11- 22 Daniel P. Berrange <[email protected]>
8195
8196 Import code annotation macros from libvirt
8197 Import ATTRIBUTE_RETURN_CHECK, ATTRIBUTE_UNUSED &
8198 ATTRIBUTE_NONNULL macros
8199
8200
8201
8202 2013- 11- 22 Daniel P. Berrange <[email protected]>
8203
8204 Import gnulib's ignore_value macro
8205
8206
8207 2013- 11- 22 Daniel P. Berrange <[email protected]>
8208
8209 Import gnulib's xalloc_oversized macro
8210
8211
8212 2013- 11- 22 Daniel P. Berrange <[email protected]>
8213
8214 Add decl of MIN macro
8215
8216
8217 2013- 11- 22 Daniel P. Berrange <[email protected]>
8218
8219 Import STREQ macro from libvirt
8220
8221
8222 2013- 11- 22 Daniel P. Berrange <[email protected]>
8223
8224 Update header file includes
8225 We're no longer using automake, so <config.h> files are not
8226 required. Also remove of all libvirt internal util header
8227 files. Reference generated header files in build/ subdir.
8228
8229
8230
8231 2013- 11- 22 Daniel P. Berrange <[email protected]>
8232
8233 Update generator for new code layout
8234 Change the generator.py to
8235
8236 - Take XML API file names on command line
8237 - Generate data in build/ directory instead of cwd
8238
8239
8240 2013- 11- 22 Daniel P. Berrange <[email protected]>
8241
8242 Remove obsolete Makefile.am
8243 We are no longer using automake, so Makefile.am is obsolete
8244
8245
8246
8247 2013- 11- 22 Daniel P. Berrange <[email protected]>
8248
8249 Move python example programs into python/examples/ subdirectory
8250
8251
8252 2013- 11- 22 Daniel P. Berrange <[email protected]>
8253
8254 Mostly revert "python: remove virConnectGetCPUModelNames from globals"
8255 This reverts commit 6b90d7428d72e92db292a9228c44701bfd5003c9.
8256
8257 The original problem was that libvirt_virConnectGetCPUModelNames
8258 was listed twice in the exports table, once automatically from
8259 the generator and once from the manual override. We merely needed
8260 to list it in the skip_impl list, and not delete the manually
8261 written code entirely.
8262
8263
8264 2013- 11- 21 Doug Goldstein <[email protected]>
8265
8266 python: remove virConnectGetCPUModelNames from globals
8267 Commit de51dc9c9aed0e615c8b301cccb89f4859324eb0 primarily added
8268 virConnectGetCPUModelNames as libvirt.getCPUModelNames(conn, arch)
8269 instead of libvirt.virConnect.getCPUModelNames(arch) so revert the code
8270 that does the former while leaving the code that does the later.
8271
8272 This is the rest of the patch that was ACK'd by Dan but I committed only
8273 the partial patch in 6a8b8ae.
8274
8275
8276 2013- 11- 21 Doug Goldstein <[email protected]>
8277
8278 python: remove virConnectGetCPUModelNames from globals
8279 Commit de51dc9c9aed0e615c8b301cccb89f4859324eb0 primarily added
8280 virConnectGetCPUModelNames as libvirt.getCPUModelNames(conn, arch)
8281 instead of libvirt.virConnect.getCPUModelNames(arch) so revert the code
8282 that does the former while leaving the code that does the later.
8283
8284
8285 2013- 11- 20 Eric Blake <[email protected]>
8286
8287 maint: fix comma style issues: python
8288 Most of our code base uses space after comma but not before;
8289 fix the remaining uses before adding a syntax check.
8290
8291 * python/libvirt-override.c: Consistently use commas.
8292
8293
8294
8295 2013- 11- 19 Doug Goldstein <[email protected]>
8296
8297 Add missing break to switch-case block
8298 The case label for VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED did not have its
8299 own break statement but relied on falling through which we probably
8300 don't want.
8301
8302
8303 2013- 10- 22 Marian Neagul <[email protected]>
8304
8305 python: Fix Create*WithFiles filefd passing
8306 Commit d76227be added functions virDomainCreateWithFiles and
8307 virDomainCreateXMLWithFiles, but there was a little piece missing in
8308 python bindings. This patch fixes proper passing of file descriptors
8309 in the overwrites of these functions.
8310
8311
8312 2013- 10- 21 Daniel P. Berrange <[email protected]>
8313
8314 Don't link virt-login-shell against libvirt.so (CVE-2013-4400)
8315 The libvirt.so library has far too many library deps to allow
8316 linking against it from setuid programs. Those libraries can
8317 do stuff in __attribute__((constructor) functions which is
8318 not setuid safe.
8319
8320 The virt-login-shell needs to link directly against individual
8321 files that it uses, with all library deps turned off except
8322 for libxml2 and libselinux.
8323
8324 Create a libvirt-setuid-rpc-client.la library which is linked
8325 to by virt-login-shell. A config-post.h file allows this library
8326 to disable all external deps except libselinux and libxml2.
8327
8328
8329
8330 2013- 10- 14 Eric Blake <[email protected]>
8331
8332 maint: avoid 'const fooPtr' in python bindings
8333 'const fooPtr' is the same as 'foo * const' (the pointer won't
8334 change, but it's contents can). But in general, if an interface
8335 is trying to be const-correct, it should be using 'const foo *'
8336 (the pointer is to data that can't be changed).
8337
8338 Fix up offenders in the python bindings.
8339
8340 * python/generator.py (py_types): Drop useless conversions.
8341 * python/libvirt-override.c (getPyVirTypedParameter)
8342 (setPyVirTypedParameter): Use intended type.
8343
8344
8345
8346 2013- 9- 30 Michal Privoznik <[email protected]>
8347
8348 python: Document virNodeGetInfo bug
8349 The memory size in virNodeGetInfo python API binding is reported in MiB
8350 instead of KiB (like we have in C struct). However, there already might
8351 be applications out there relying on this inconsistence so we can't
8352 simply fix it. Document this sad fact as known bug.
8353
8354
8355 2013- 9- 23 Giuseppe Scrivano <[email protected]>
8356
8357 python: add bindings for virConnectGetCPUModelNames
8358
8359
8360 2013- 9- 23 Giuseppe Scrivano <[email protected]>
8361
8362 libvirt: add new public API virConnectGetCPUModelNames
8363 The new function virConnectGetCPUModelNames allows to retrieve the list
8364 of CPU models known by the hypervisor for a specific architecture.
8365
8366
8367
8368 2013- 9- 20 Daniel P. Berrange <[email protected]>
8369
8370 Fix potential use of uninitialized value in virDomainGetVcpuPinInfo
8371 The virDomainGetVcpuPinInfo python wrapper had a potential use of
8372 uninitialized values
8373
8374
8375
8376 2013- 9- 10 Oskari Saarenmaa <[email protected]>
8377
8378 docs, comments: minor typo fixes
8379
8380
8381 2013- 9- 4 Eric Blake <[email protected]>
8382
8383 build: enforce makefile conditional style
8384 Automake has builtin support to prevent botched conditional nesting,
8385 but only if you use:
8386 if FOO
8387 else !FOO
8388 endif !FOO
8389
8390 An example error message when using the wrong name:
8391
8392 daemon/Makefile.am:378: error: else reminder (LIBVIRT_INIT_SCRIPT_SYSTEMD_TRUE) incompatible with current conditional: LIBVIRT_INIT_SCRIPT_SYSTEMD_FALSE
8393 daemon/Makefile.am:381: error: endif reminder (LIBVIRT_INIT_SCRIPT_SYSTEMD_TRUE) incompatible with current conditional: LIBVIRT_INIT_SCRIPT_SYSTEMD_FALSE
8394
8395 As our makefiles tend to have quite a bit of nested conditionals,
8396 it's better to take advantage of the benefits of the build system
8397 double-checking that our conditionals are well-nested, but that
8398 requires a syntax check to enforce our usage style.
8399
8400 Alas, unlike C preprocessor and spec files, we can't use indentation
8401 to make it easier to see how deeply nesting goes.
8402
8403 * cfg.mk (sc_makefile_conditionals): New rule.
8404 * daemon/Makefile.am: Enforce the style.
8405 * gnulib/tests/Makefile.am: Likewise.
8406 * python/Makefile.am: Likewise.
8407 * src/Makefile.am: Likewise.
8408 * tests/Makefile.am: Likewise.
8409 * tools/Makefile.am: Likewise.
8410
8411
8412
8413 2013- 9- 3 Ján Tomko <[email protected]>
8414
8415 Fix leaks in python bindings
8416 https://bugzilla.redhat.com/show_bug.cgi?id=1003828
8417
8418
8419 2013- 8- 29 Guan Qiang <[email protected]>
8420
8421 python: Fix a PyList usage mistake
8422 Fix PyList usage mistake in Function libvirt_lxc_virDomainLxcOpenNamespace.
8423
8424 https://bugzilla.redhat.com/show_bug.cgi?id=1002383
8425
8426
8427
8428 2013- 8- 23 Claudio Bley <[email protected]>
8429
8430 python: simplify complicated conditional assignment
8431
8432
8433 2013- 8- 23 Claudio Bley <[email protected]>
8434
8435 Test for object identity when checking for None in Python
8436 Consistently use "is" or "is not" to compare variables to None,
8437 because doing so is preferrable, as per PEP 8
8438 (http://www.python.org/dev/peps/pep-0008/#programming-recommendations):
8439
8440 > Comparisons to singletons like None should always be done with is or
8441 > is not, never the equality operators.
8442
8443
8444 2013- 8- 22 Guido Günther <[email protected]>
8445
8446 python: Use RELRO_LDFLAGS and NO_INDIRECT_LDFLAGS
8447 A readonly GOT and detecting indirect linkage is useful here too.
8448
8449
8450 2013- 7- 30 Daniel P. Berrange <[email protected]>
8451
8452 Delete obsolete / unused python test files
8453 The python/tests directory contains a number of so called
8454 "tests" for the python API. These are all hardcoded to
8455 look for Xen and cannot be run in any automated fashion,
8456 and no one is ever manually running them. Given that they
8457 don't meaningully contribute to the test coverage, delete
8458 them.
8459
8460 For some reason these tests were also copied into the
8461 filesystem as part of 'make install'. The change to the
8462 RPM in commit 3347a4203278ec93d7b0ceb88b5ed10e4f14765c
8463 caused a build failure, since it removed the code which
8464 deleted these installed tests.
8465
8466
8467
8468 2013- 7- 29 Cole Robinson <[email protected]>
8469
8470 python: Drop TODO
8471 File hasn't been really touched for 7 years. And with recent rawhide
8472 changes it contributed to an RPM build failure. Let's drop it.
8473
8474 This also removes installation of a libvirt-python doc dir, so drop
8475 handling of it from the RPM spec.
8476
8477
8478 2013- 7- 19 Eric Blake <[email protected]>
8479
8480 maint: split long lines in Makefiles
8481 Makefiles are another easy file to enforce line limits.
8482
8483 Mostly straightforward; interesting tricks worth noting:
8484 src/Makefile.am: $(confdir) was already defined, use it in more places
8485 tests/Makefile.am: path_add and VG required some interesting compression
8486
8487 * cfg.mk (sc_prohibit_long_lines): Add another test.
8488 * Makefile.am: Fix offenders.
8489 * daemon/Makefile.am: Likewise.
8490 * docs/Makefile.am: Likewise.
8491 * python/Makefile.am: Likewise.
8492 * src/Makefile.am: Likewise.
8493 * tests/Makefile.am: Likewise.
8494
8495
8496
8497 2013- 7- 18 Jiri Denemark <[email protected]>
8498
8499 Add VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event
8500
8501
8502 2013- 7- 18 Daniel P. Berrange <[email protected]>
8503
8504 Introduce new domain create APIs to pass pre-opened FDs to LXC
8505 With container based virt, it is useful to be able to pass
8506 pre-opened file descriptors to the container init process.
8507 This allows for containers to be auto-activated from incoming
8508 socket connections, passing the active socket into the container.
8509
8510 To do this, introduce a pair of new APIs, virDomainCreateXMLWithFiles
8511 and virDomainCreateWithFiles, which accept an array of file
8512 descriptors. For the LXC driver, UNIX file descriptor passing
8513 will be used to send them to libvirtd, which will them pass
8514 them down to libvirt_lxc, which will then pass them to the container
8515 init process.
8516
8517 This will only be implemented for LXC right now, but the design
8518 is generic enough it could work with other hypervisors, hence
8519 I suggest adding this to libvirt.so, rather than libvirt-lxc.so
8520
8521
8522
8523 2013- 7- 15 Guannan Ren <[email protected]>
8524
8525 python: return dictionary without value in case of no blockjob
8526 Currently, when there is no blockjob, dom.blockJobInfo('vda')
8527 still reports error because it doesn't distinguish return value 0 from -1.
8528 libvirt.libvirtError: virDomainGetBlockJobInfo() failed
8529
8530 virDomainGetBlockJobInfo() API return value:
8531 -1 in case of failure, 0 when nothing found, 1 found.
8532
8533 And use PyDict_SetItemString instead of PyDict_SetItem when key is
8534 of string type. PyDict_SetItemString increments key/value reference
8535 count, so call Py_DECREF() for value. For key, we don't need to
8536 do this, because PyDict_SetItemString will handle it internally.
8537
8538
8539 2013- 7- 10 Daniel P. Berrange <[email protected]>
8540
8541 Convert 'int i' to 'size_t i' in python/ files
8542 Convert the type of loop iterators named 'i', 'j', k',
8543 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or
8544 'unsigned int', also santizing 'ii', 'jj', 'kk' to use
8545 the normal 'i', 'j', 'k' naming
8546
8547
8548
8549 2013- 7- 10 Michal Privoznik <[email protected]>
8550
8551 viralloc: Report OOM error on failure
8552 Similarly to VIR_STRDUP, we want the OOM error to be reported in
8553 VIR_ALLOC and friends.
8554
8555
8556 2013- 6- 24 Jiri Denemark <[email protected]>
8557
8558 python: Add bindings for extensible migration APIs
8559 The patch implements wrappers for virDomainMigrate3 and
8560 virDomainMigrateToURI3.
8561
8562
8563 2013- 6- 24 Jiri Denemark <[email protected]>
8564
8565 Extensible migration APIs
8566 This patch introduces two new APIs virDomainMigrate3 and
8567 virDomainMigrateToURI3 that may be used in place of their older
8568 variants. These new APIs take optional migration parameters (such as
8569 bandwidth, domain XML, ...) in an array of virTypedParameters, which
8570 makes adding new parameters easier as there's no need to introduce new
8571 APIs whenever a new migration parameter needs to be added. Both APIs are
8572 backward compatible and will automatically use older migration calls in
8573 case the new calls are not supported as long as the typed parameters
8574 array does not contain any parameter which was not supported by the
8575 older calls.
8576
8577
8578 2013- 5- 28 Eric Blake <[email protected]>
8579
8580 syntax: prefer space after semicolon in for loop
8581 I noticed several unusual spacings in for loops, and decided to
8582 fix them up. See the next commit for the syntax check that found
8583 all of these.
8584
8585 * examples/domsuspend/suspend.c (main): Fix spacing.
8586 * python/libvirt-override.c: Likewise.
8587 * src/conf/interface_conf.c: Likewise.
8588 * src/security/virt-aa-helper.c: Likewise.
8589 * src/util/virconf.c: Likewise.
8590 * src/util/virhook.c: Likewise.
8591 * src/util/virlog.c: Likewise.
8592 * src/util/virsocketaddr.c: Likewise.
8593 * src/util/virsysinfo.c: Likewise.
8594 * src/util/viruuid.c: Likewise.
8595 * src/vbox/vbox_tmpl.c: Likewise.
8596 * src/xen/xen_hypervisor.c: Likewise.
8597 * tools/virsh-domain-monitor.c (vshDomainStateToString): Drop
8598 default case, to let compiler check us.
8599 * tools/virsh-domain.c (vshDomainVcpuStateToString): Likewise.
8600
8601
8602
8603 2013- 5- 21 Osier Yang <[email protected]>
8604
8605 python: Remove the whitespace before ";"
8606
8607
8608 2013- 5- 20 Eric Blake <[email protected]>
8609
8610 maint: use LGPL correctly
8611 Several files called out COPYING or COPYING.LIB instead of using
8612 the normal boilerplate. It's especially important that we don't
8613 call out COPYING from an LGPL file, since COPYING is traditionally
8614 used for the GPL. A few files were lacking copyright altogether.
8615
8616 * src/rpc/gendispatch.pl: Add missing copyright.
8617 * Makefile.nonreentrant: Likewise.
8618 * src/check-symfile.pl: Likewise.
8619 * src/check-symsorting.pl: Likewise.
8620 * src/driver.h: Likewise.
8621 * src/internal.h: Likewise.
8622 * tools/libvirt-guests.sh.in: Likewise.
8623 * tools/virt-pki-validate.in: Mention copyright in comment, not just code.
8624 * tools/virt-sanlock-cleanup.in: Likewise.
8625 * src/rpc/genprotocol.pl: Spell out license terms.
8626 * src/xen/xend_internal.h: Likewise.
8627 * src/xen/xend_internal.c: Likewise.
8628 * Makefile.am: Likewise.
8629 * daemon/Makefile.am: Likewise.
8630 * docs/Makefile.am: Likewise.
8631 * docs/schemas/Makefile.am: Likewise.
8632 * examples/apparmor/Makefile.am: Likewise.
8633 * examples/domain-events/events-c/Makefile.am: Likewise.
8634 * examples/dominfo/Makefile.am: Likewise.
8635 * examples/domsuspend/Makefile.am: Likewise.
8636 * examples/hellolibvirt/Makefile.am: Likewise.
8637 * examples/openauth/Makefile.am: Likewise.
8638 * examples/python/Makefile.am: Likewise.
8639 * examples/systemtap/Makefile.am: Likewise.
8640 * examples/xml/nwfilter/Makefile.am: Likewise.
8641 * gnulib/lib/Makefile.am: Likewise.
8642 * gnulib/tests/Makefile.am: Likewise.
8643 * include/Makefile.am: Likewise.
8644 * include/libvirt/Makefile.am: Likewise.
8645 * python/Makefile.am: Likewise.
8646 * python/tests/Makefile.am: Likewise.
8647 * src/Makefile.am: Likewise.
8648 * tests/Makefile.am: Likewise.
8649 * tools/Makefile.am: Likewise.
8650 * configure.ac: Likewise.
8651
8652
8653
8654 2013- 5- 9 Daniel P. Berrange <[email protected]>
8655
8656 Fix build of python bindings on Python 2.4
8657 The PyDict_Next method on Python <= 2.4 used 'int' instead
8658 of "Py_ssize_t" for the 'pos' parameter
8659
8660
8661
8662 2013- 5- 6 Eric Blake <[email protected]>
8663
8664 build: clean up stray files found by 'make distcheck'
8665 'make distcheck' complained:
8666
8667 ERROR: files left in build directory after distclean:
8668 ./python/libvirt.pyc
8669 ./tests/commandhelper.log
8670
8671 Problems introduced in commits f015495 and 25ea8e4 (both v1.0.3).
8672
8673 * tests/commandtest.c (test21): Check (and clean) log file.
8674 * tests/commanddata/test21.log: New file.
8675 * python/Makefile.am (CLEANFILES): Clean up compiled python files.
8676
8677
8678
8679 2013- 5- 2 Eric Blake <[email protected]>
8680
8681 build: always include sanitytest in tarball
8682 The libvirt 1.0.5 tarball is missing a file which renders 'make
8683 check' broken; first reported on list by Guido Günther.
8684
8685 * python/Makefile.am (EXTRA_DIST): Hoist sanitytest.py out of
8686 HAVE_PYTHON conditional.
8687
8688
8689
8690 2013- 5- 2 Michal Privoznik <[email protected]>
8691
8692 virutil: Move string related functions to virstring.c
8693 The source code base needs to be adapted as well. Some files
8694 include virutil.h just for the string related functions (here,
8695 the include is substituted to match the new file), some include
8696 virutil.h without any need (here, the include is removed), and
8697 some require both.
8698
8699
8700 2013- 4- 19 Eric Blake <[email protected]>
8701
8702 docs: fix usage of 'onto'
8703 http://www.uhv.edu/ac/newsletters/writing/grammartip2009.07.01.htm
8704 (and several other sites) give hints that 'onto' is best used if
8705 you can also add 'up' just before it and still make sense. In many
8706 cases in the code base, we really want the two-word form, or even
8707 a simplification to just 'on' or 'to'.
8708
8709 * docs/hacking.html.in: Use correct 'on to'.
8710 * python/libvirt-override.c: Likewise.
8711 * src/lxc/lxc_controller.c: Likewise.
8712 * src/util/virpci.c: Likewise.
8713 * daemon/THREADS.txt: Use simpler 'on'.
8714 * docs/formatdomain.html.in: Better usage.
8715 * docs/internals/rpc.html.in: Likewise.
8716 * src/conf/domain_event.c: Likewise.
8717 * src/rpc/virnetclient.c: Likewise.
8718 * tests/qemumonitortestutils.c: Likewise.
8719 * HACKING: Regenerate.
8720
8721
8722
8723 2013- 4- 18 Osier Yang <[email protected]>
8724
8725 syntax-check: Only allows to include public headers in external tools
8726 With this patch, include public headers in "" form is only allowed
8727 for "internal.h". And only the external tools (examples|tools|python
8728 |include/libvirt) can include the public headers in <> form.
8729
8730
8731 2013- 3- 26 Guannan Ren <[email protected]>
8732
8733 python: set default value to optional arguments
8734 When prefixing with string (optional) or optional in the description
8735 of arguments to libvirt C APIs, in python, these arguments will be
8736 set as optional arugments, for example:
8737
8738 * virDomainSaveFlags:
8739 * @domain: a domain object
8740 * @to: path for the output file
8741 * @dxml: (optional) XML config for adjusting guest xml used on restore
8742 * @flags: bitwise-OR of virDomainSaveRestoreFlags
8743
8744 the corresponding python APIs is
8745 restoreFlags(self, frm, dxml=None, flags=0)
8746
8747 The following python APIs are changed to:
8748 blockCommit(self, disk, base, top, bandwidth=0, flags=0)
8749 blockPull(self, disk, bandwidth=0, flags=0)
8750 blockRebase(self, disk, base, bandwidth=0, flags=0)
8751 migrate(self, dconn, flags=0, dname=None, uri=None, bandwidth=0)
8752 migrate2(self, dconn, dxml=None, flags=0, dname=None, uri=None, bandwidth=0)
8753 migrateToURI(self, duri, flags=0, dname=None, bandwidth=0)
8754 migrateToURI2(self, dconnuri=None, miguri=None, dxml=None, flags=0, \
8755 dname=None, bandwidth=0)
8756 saveFlags(self, to, dxml=None, flags=0)
8757 migrate(self, domain, flags=0, dname=None, uri=None, bandwidth=0)
8758 migrate2(self, domain, dxml=None, flags=0, dname=None, uri=None, bandwidth=0)
8759 restoreFlags(self, frm, dxml=None, flags=0)
8760
8761
8762 2013- 3- 22 Guannan Ren <[email protected]>
8763
8764 python:remove semicolon in python code
8765 This breaked "make syntax-check" testing
8766
8767 Pushed under trivial rule
8768
8769
8770 2013- 3- 22 Guannan Ren <[email protected]>
8771
8772 make: regenerate bindings when <classname>.py changes
8773
8774
8775 2013- 3- 22 Guannan Ren <[email protected]>
8776
8777 python: treat flags as default argument with value 0
8778 The following four functions have not changed because default arguments
8779 have to come after positional arguments. Changing them will break the
8780 the binding APIs.
8781
8782 migrate(self, dconn, flags, dname, uri, bandwidth):
8783 migrate2(self, dconn, dxml, flags, dname, uri, bandwidth):
8784 migrateToURI(self, duri, flags, dname, bandwidth):
8785 migrateToURI2(self, dconnuri, miguri, dxml, flags, dname, bandwidth):
8786
8787
8788 2013- 3- 21 Peter Krempa <[email protected]>
8789
8790 python: Fix emulatorpin API bindings
8791 The addition of emulator pinning APIs didn't think of doing the right
8792 job with python APIs for them. The default generator produced unusable
8793 code for this.
8794
8795 This patch switches to proper code as in the case of domain Vcpu pining.
8796 This change can be classified as a python API-breaker but in the state
8797 the code was before I doubt anyone was able to use it successfully.
8798
8799
8800 2013- 3- 21 Guannan Ren <[email protected]>
8801
8802 python: fix bindings that don't raise an exception
8803 For example:
8804 >>> dom.memoryStats()
8805 libvir: QEMU Driver error : Requested operation is not valid:\
8806 domain is not running
8807
8808 There are six such python API functions like so.
8809 The root reason is that generator.py script checks the type of return
8810 value of a python stub function defined in libvirt-api.xml or
8811 libvirt-override-api.xml to see whether to add the raise clause or not
8812 in python wrapper code in libvirt.py.
8813
8814 The type of return value is supposed to be C types.
8815 For those stub functions which return python non-integer data type like
8816 string, list, tuple, dictionary, the existing type in functions varies
8817 from each other which leads problem like this.
8818
8819 Currently, in generator.py, it maintains a buggy whitelist for stub functions
8820 returning a list type. I think it is easy to forget adding new function name
8821 in the whitelist.
8822
8823 This patch makes the value of type consistent with C type "char *"
8824 in libvirt-override-api.xml. For python, any of types could be printed
8825 as string, so I choose "char *" in this case. And the comment in xml
8826 could explain it when adding new function definition.
8827
8828 <function name='virNodeGetCPUStats' file='python'>
8829 ...
8830 - <return type='virNodeCPUStats' info='...'/>
8831 + <return type='char *' info='...'/>
8832 ...
8833 </function>
8834
8835
8836 2013- 3- 13 Daniel P. Berrange <[email protected]>
8837
8838 Apply security label when entering LXC namespaces
8839 Add a new virDomainLxcEnterSecurityLabel() function as a
8840 counterpart to virDomainLxcEnterNamespaces(), which can
8841 change the current calling process to have a new security
8842 context. This call runs client side, not in libvirtd
8843 so we can't use the security driver infrastructure.
8844
8845 When entering a namespace, the process spawned from virsh
8846 will default to running with the security label of virsh.
8847 The actual desired behaviour is to run with the security
8848 label of the container most of the time. So this changes
8849 virsh lxc-enter-namespace command to invoke the
8850 virDomainLxcEnterSecurityLabel method.
8851
8852 The current behaviour is:
8853
8854 LABEL PID TTY TIME CMD
8855 system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 1 pts/0 00:00:00 systemd
8856 system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 3 pts/1 00:00:00 sh
8857 system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 24 ? 00:00:00 systemd-journal
8858 system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 29 ? 00:00:00 dhclient
8859 staff_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 47 ? 00:00:00 ps
8860
8861 Note the ps command is running as unconfined_t, After this patch,
8862
8863 The new behaviour is this:
8864
8865 virsh -c lxc:/// lxc-enter-namespace dan -- /bin/ps -eZ
8866 LABEL PID TTY TIME CMD
8867 system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 1 pts/0 00:00:00 systemd
8868 system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 3 pts/1 00:00:00 sh
8869 system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 24 ? 00:00:00 systemd-journal
8870 system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 32 ? 00:00:00 dhclient
8871 system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 38 ? 00:00:00 ps
8872
8873 The '--noseclabel' flag can be used to skip security labelling.
8874
8875
8876
8877 2013- 3- 1 Guannan Ren <[email protected]>
8878
8879 python: fix fd leak in generator.py
8880
8881
8882 2013- 3- 1 Guannan Ren <[email protected]>
8883
8884 python: fix typoes and repeated global vars references
8885
8886
8887 2013- 2- 22 Jiri Denemark <[email protected]>
8888
8889 python: Implement virDomainMigrateGetCompressionCache wrapper
8890
8891
8892 2013- 2- 22 Jiri Denemark <[email protected]>
8893
8894 Introduce virDomainMigrate*CompressionCache APIs
8895 Introduce virDomainMigrateGetCompressionCache and
8896 virDomainMigrateSetCompressionCache APIs.
8897
8898
8899 2013- 2- 22 Jiri Denemark <[email protected]>
8900
8901 python: Implement virDomainGetJobStats wrapper
8902
8903
8904 2013- 2- 22 Jiri Denemark <[email protected]>
8905
8906 Introduce virDomainGetJobStats API
8907 This is an extensible version of virDomainGetJobInfo.
8908
8909
8910 2013- 2- 11 Guido Günther <[email protected]>
8911
8912 Check if classes are derived from object
8913 This makes sure we don't regress to old style classes
8914
8915
8916 2013- 2- 7 Guido Günther <[email protected]>
8917
8918 Remove more trailing semicolons in Python files
8919
8920
8921 2013- 2- 7 Guido Günther <[email protected]>
8922
8923 Cosmetics: Remove semicolons
8924 It's Python, not C
8925
8926
8927 2013- 2- 5 Jiri Denemark <[email protected]>
8928
8929 sanitytest.py: Do not rely on system libvirt
8930 When running sanitytest.py we should not rely on libvirt library
8931 installed on the system. And since we generate a nice wrapper called
8932 "run" that sets both PYTHON_PATH and LD_LIBRARY_PATH, we should just use
8933 it rather than trying to duplicate it in the Makefile.
8934
8935
8936 2013- 2- 5 Daniel P. Berrange <[email protected]>
8937
8938 Fix missing error constants in libvirt python module
8939 The previous change to the generator, changed too much - only
8940 the functions are in 'virerror.c', the constants remained in
8941 'virerror.h' which could not be renamed for API compat reasons.
8942
8943 Add a test case to sanity check the generated python bindings
8944
8945
8946
8947 2013- 1- 31 Serge Hallyn <[email protected]>
8948
8949 complete virterror->virerror name change
8950 Without these two string changes in generator.py, the
8951 virGetLastError wrapper does not get created in
8952 /usr/share/pyshared/libvirt.py. Noticed when running
8953 tests with virt-install.
8954
8955
8956
8957 2013- 1- 24 Jiri Denemark <[email protected]>
8958
8959 python: Fix bindings for virDomainSnapshotGet{Domain,Connect}
8960 https://bugzilla.redhat.com/show_bug.cgi?id=895882
8961
8962 virDomainSnapshot.getDomain() and virDomainSnapshot.getConnect()
8963 wrappers around virDomainSnapshotGet{Domain,Connect} were not supposed
8964 to be ever implemented. The class should contain proper domain() and
8965 connect() accessors that fetch python objects stored internally within
8966 the class. While domain() was already provided, connect() was missing.
8967
8968 This patch adds connect() method to virDomainSnapshot class and
8969 reimplements getDomain() and getConnect() methods as aliases to domain()
8970 and connect() for backward compatibility.
8971
8972
8973 2013- 1- 24 Daniel P. Berrange <[email protected]>
8974
8975 Make python objects inherit from 'object' base class
8976 As of python >= 2.2, it is recommended that all objects inherit
8977 from the 'object' base class. We already require python >= 2.3
8978 for libvirt for thread macro support, so we should follow this
8979 best practice.
8980
8981 See also
8982
8983 http://stackoverflow.com/questions/4015417/python-class-inherits-object
8984
8985
8986
8987 2013- 1- 18 Jiri Denemark <[email protected]>
8988
8989 Introduce virTypedParamsClear public API
8990 The function is just a renamed public version of former
8991 virTypedParameterArrayClear.
8992
8993
8994 2013- 1- 18 Jiri Denemark <[email protected]>
8995
8996 Add virTypedParams* APIs
8997 Working with virTypedParameters in clients written in C is ugly and
8998 requires all clients to duplicate the same code. This set of APIs makes
8999 this code for manipulating with virTypedParameters integral part of
9000 libvirt so that all clients may benefit from it.
9001
9002
9003 2013- 1- 17 Jiri Denemark <[email protected]>
9004
9005 python: Avoid freeing uninitialized new_params pointer
9006
9007
9008 2013- 1- 14 Daniel P. Berrange <[email protected]>
9009
9010 Fix build due to previous LXC patch
9011 Mark virDomainLxcEnterNamespace as skipped in python binding
9012 and remove reference to lxcDomainOpenNamespace which doesn't
9013 arrive until a later patch
9014
9015
9016 2013- 1- 14 Daniel P. Berrange <[email protected]>
9017
9018 Introduce an LXC specific public API & library
9019 This patch introduces support for LXC specific public APIs. In
9020 common with what was done for QEMU, this creates a libvirt_lxc.so
9021 library and libvirt/libvirt-lxc.h header file.
9022
9023 The actual APIs are
9024
9025 int virDomainLxcOpenNamespace(virDomainPtr domain,
9026 int **fdlist,
9027 unsigned int flags);
9028
9029 int virDomainLxcEnterNamespace(virDomainPtr domain,
9030 unsigned int nfdlist,
9031 int *fdlist,
9032 unsigned int *noldfdlist,
9033 int **oldfdlist,
9034 unsigned int flags);
9035
9036 which provide a way to use the setns() system call to move the
9037 calling process into the container's namespace. It is not
9038 practical to write in a generically applicable manner. The
9039 nearest that we could get to such an API would be an API which
9040 allows to pass a command + argv to be executed inside a
9041 container. Even if we had such a generic API, this LXC specific
9042 API is still useful, because it allows the caller to maintain
9043 the current process context, in particular any I/O streams they
9044 have open.
9045
9046 NB the virDomainLxcEnterNamespace() API is special in that it
9047 runs client side, so does not involve the internal driver API.
9048
9049
9050
9051 2012- 12- 28 Michal Privoznik <[email protected]>
9052
9053 python: Adapt to virevent rename
9054 With our recent renames under src/util/* we forgot to adapt
9055 python wrapper code generator. This results in some methods being
9056 not exposed:
9057
9058 $ python examples/domain-events/events-python/event-test.py
9059 Using uri:qemu:///system
9060 Traceback (most recent call last):
9061 File "examples/domain-events/events-python/event-test.py", line 585, in <module>
9062 main()
9063 File "examples/domain-events/events-python/event-test.py", line 543, in main
9064 virEventLoopPureStart()
9065 File "examples/domain-events/events-python/event-test.py", line 416, in virEventLoopPureStart
9066 virEventLoopPureRegister()
9067 File "examples/domain-events/events-python/event-test.py", line 397, in virEventLoopPureRegister
9068 libvirt.virEventRegisterImpl(virEventAddHandleImpl,
9069 AttributeError: 'module' object has no attribute 'virEventRegisterImpl'
9070
9071
9072 2012- 12- 21 Daniel P. Berrange <[email protected]>
9073
9074 Rename util.{c,h} to virutil.{c,h}
9075
9076
9077 2012- 12- 21 Daniel P. Berrange <[email protected]>
9078
9079 Rename memory.{c,h} to viralloc.{c,h}
9080
9081
9082 2012- 12- 4 Osier Yang <[email protected]>
9083
9084 Fix the indention
9085 Introduced by commit 1465876a, pushed under build-breaker &&
9086 trivial rule.
9087
9088
9089 2012- 12- 4 Daniel P. Berrange <[email protected]>
9090
9091 Bind connection close callback APIs to python binding
9092 Add code in the python binding to cope with the new APIs
9093 virConnectRegisterCloseCallback and
9094 virConnectUnregisterCloseCallback. Also demonstrate their
9095 use in the python domain events demo
9096
9097
9098
9099 2012- 11- 15 Viktor Mihajlovski <[email protected]>
9100
9101 python: Use virNodeGetCPUMap where possible
9102 Modified the places where virNodeGetInfo was used for the purpose
9103 of obtaining the maximum node CPU number. Transparently falling
9104 back to virNodeGetInfo in case of failure.
9105 Wrote a utility function getPyNodeCPUCount for that purpose.
9106
9107
9108
9109 2012- 11- 2 Daniel P. Berrange <[email protected]>
9110
9111 Remove spurious whitespace between function name & open brackets
9112 The libvirt coding standard is to use 'function(...args...)'
9113 instead of 'function (...args...)'. A non-trivial number of
9114 places did not follow this rule and are fixed in this patch.
9115
9116
9117
9118 2012- 10- 25 Eric Blake <[email protected]>
9119
9120 maint: consistent whitespace after 'if'
9121 Noticed during the review of the previous patch.
9122
9123 * python/libvirt-override.c: Use space between 'if ('.
9124
9125
9126 2012- 10- 25 Viktor Mihajlovski <[email protected]>
9127
9128 virNodeGetCPUMap: Add python binding
9129 Added a method getCPUMap to virConnect.
9130 It can be used as follows:
9131
9132 import libvirt
9133 import sys
9134 import os
9135
9136 conn = libvirt.openReadOnly(None)
9137 if conn == None:
9138 print 'Failed to open connection to the hypervisor'
9139 sys.exit(1)
9140
9141 try:
9142 (cpus, cpumap, online) = conn.getCPUMap(0)
9143 except:
9144 print 'Failed to extract the node cpu map information'
9145 sys.exit(1)
9146
9147 print 'CPUs total %d, online %d' % (cpus, online)
9148 print 'CPU map %s' % str(cpumap)
9149
9150 del conn
9151 print "OK"
9152
9153 sys.exit(0)
9154
9155
9156
9157 2012- 10- 24 Viktor Mihajlovski <[email protected]>
9158
9159 virNodeGetCPUMap: Define public API.
9160 Adding a new API to obtain information about the
9161 host node's present, online and offline CPUs.
9162
9163 int virNodeGetCPUMap(virConnectPtr conn,
9164 unsigned char **cpumap,
9165 unsigned int *online,
9166 unsigned int flags);
9167
9168 The function will return the number of CPUs present on the host
9169 or -1 on failure;
9170 If cpumap is non-NULL virNodeGetCPUMap will allocate an array
9171 containing a bit map representation of the online CPUs. It's
9172 the callers responsibility to deallocate cpumap using free().
9173 If online is non-NULL, the variable pointed to will contain
9174 the number of online host node CPUs.
9175 The variable flags has been added to support future extensions
9176 and must be set to 0.
9177
9178 Extend the driver structure by nodeGetCPUMap entry in support of the
9179 new API virNodeGetCPUMap.
9180 Added implementation of virNodeGetCPUMap to libvirt.c
9181
9182
9183
9184 2012- 10- 15 Martin Kletzander <[email protected]>
9185
9186 Add support for SUSPEND_DISK event
9187 This patch adds support for SUSPEND_DISK event; both lifecycle and
9188 separated. The support is added for QEMU, machines are changed to
9189 PMSUSPENDED, but as QEMU sends SHUTDOWN afterwards, the state changes
9190 to shut-off. This and much more needs to be done in order for libvirt
9191 to work with transient devices, wake-ups etc. This patch is not
9192 aiming for that functionality.
9193
9194
9195 2012- 10- 13 Guido Günther <[email protected]>
9196
9197 Properly parse (unsigned) long long
9198 This fixes problems on platforms where sizeof(long) != sizeof(long long)
9199 like ia32.
9200
9201
9202 2012- 10- 8 Guannan Ren <[email protected]>
9203
9204 python: keep consistent handling of Python integer conversion
9205 libvirt_ulonglongUnwrap requires the integer type of python obj.
9206 But libvirt_longlongUnwrap still could handle python obj of
9207 Pyfloat_type which causes the float value to be rounded up
9208 to an integer.
9209
9210 For example
9211 >>> dom.setSchedulerParameters({'vcpu_quota': 0.88})
9212 0
9213 libvirt_longlongUnwrap treats 0.88 as a valid value 0
9214
9215 However
9216 >>> dom.setSchedulerParameters({'cpu_shares': 1000.22})
9217 libvirt_ulonglongUnwrap will throw out an error
9218 "TypeError: an integer is required"
9219
9220 The patch make this consistent.
9221
9222
9223 2012- 10- 8 Guannan Ren <[email protected]>
9224
9225 python: cleanup vcpu related binding APIs
9226 libvirt_virDomainGetVcpus: add error handling, return -1 instead of None
9227 libvirt_virDomainPinVcpu and libvirt_virDomainPinVcpuFlags:
9228 check the type of argument
9229 make use of libvirt_boolUnwrap
9230
9231 Set bitmap according to these values which are contained in given
9232 argument of vcpu tuple and turn off these bit corresponding to
9233 missing vcpus in argument tuple
9234
9235 The original way ignored the error info from PyTuple_GetItem
9236 if index is out of range.
9237 "IndexError: tuple index out of range"
9238 The error message will only be raised on next command in interactive mode.
9239
9240
9241 2012- 9- 28 Guannan Ren <[email protected]>
9242
9243 python: return error if PyObject obj is NULL for unwrapper helper functions
9244 The result is indeterminate for NULL argument to python
9245 functions as follows. It's better to return negative value in
9246 these situations.
9247
9248 PyObject_IsTrue will segfault if the argument is NULL
9249 PyFloat_AsDouble(NULL) is -1.000000
9250 PyLong_AsUnsignedLongLong(NULL) is 0.000000
9251
9252
9253 2012- 9- 17 Osier Yang <[email protected]>
9254
9255 node_memory: Expose the APIs to Python bindings
9256 * python/libvirt-override-api.xml: (Add document to describe
9257 the APIs).
9258 * python/libvirt-override.c: (Implement the API wrappers manually)
9259
9260
9261 2012- 9- 17 Osier Yang <[email protected]>
9262
9263 node_memory: Define the APIs to get/set memory parameters
9264 * include/libvirt/libvirt.h.in: (Add macros for the param fields,
9265 declare the APIs).
9266 * src/driver.h: (New methods for the driver struct)
9267 * src/libvirt.c: (Implement the public APIs)
9268 * src/libvirt_public.syms: (Export the public symbols)
9269
9270
9271 2012- 9- 17 Osier Yang <[email protected]>
9272
9273 list: Expose virConnectListAllSecrets to Python binding
9274 The implementation is done manually as the generator does not support
9275 wrapping lists of C pointers into Python objects.
9276
9277 python/libvirt-override-api.xml: Document
9278
9279 python/libvirt-override-virConnect.py: Implementation for listAllSecrets.
9280
9281 python/libvirt-override.c: Implementation for the wrapper.
9282
9283
9284 2012- 9- 17 Osier Yang <[email protected]>
9285
9286 list: Define new API virConnectListAllSecrets
9287 This is to list the secret objects. Supports to filter the secrets
9288 by its storage location, and whether it's private or not.
9289
9290 include/libvirt/libvirt.h.in: Declare enum virConnectListAllSecretFlags
9291 and virConnectListAllSecrets.
9292 python/generator.py: Skip auto-generating
9293 src/driver.h: (virDrvConnectListAllSecrets)
9294 src/libvirt.c: Implement the public API
9295 src/libvirt_public.syms: Export the symbol to public
9296
9297
9298 2012- 9- 17 Osier Yang <[email protected]>
9299
9300 list: Expose virConnectListAllNWFilters to Python binding
9301 The implementation is done manually as the generator does not support
9302 wrapping lists of C pointers into Python objects.
9303
9304 python/libvirt-override-api.xml: Document
9305
9306 python/libvirt-override-virConnect.py:
9307 * Implementation for listAllNWFilters.
9308
9309 python/libvirt-override.c: Implementation for the wrapper.
9310
9311
9312 2012- 9- 17 Osier Yang <[email protected]>
9313
9314 list: Define new API virConnectListAllNWFilters
9315 This is to list the network filter objects. No flags are supported
9316
9317 include/libvirt/libvirt.h.in: Declare enum virConnectListAllNWFilterFlags
9318 and virConnectListAllNWFilters.
9319 python/generator.py: Skip auto-generating
9320 src/driver.h: (virDrvConnectListAllNWFilters)
9321 src/libvirt.c: Implement the public API
9322 src/libvirt_public.syms: Export the symbol to public
9323
9324
9325 2012- 9- 17 Osier Yang <[email protected]>
9326
9327 list: Expose virConnectListAllNodeDevices to Python binding
9328 The implementation is done manually as the generator does not support
9329 wrapping lists of C pointers into Python objects.
9330
9331 python/libvirt-override-api.xml: Document
9332
9333 python/libvirt-override-virConnect.py:
9334 * Implementation for listAllNodeDevices.
9335
9336 python/libvirt-override.c: Implementation for the wrapper.
9337
9338
9339 2012- 9- 17 Osier Yang <[email protected]>
9340
9341 list: Define new API virConnectListAllNodeDevices
9342 This is to list the node device objects, supports to filter the results
9343 by capability types.
9344
9345 include/libvirt/libvirt.h.in: Declare enum virConnectListAllNodeDeviceFlags
9346 and virConnectListAllNodeDevices.
9347 python/generator.py: Skip auto-generating
9348 src/driver.h: (virDrvConnectListAllNodeDevices)
9349 src/libvirt.c: Implement the public API
9350 src/libvirt_public.syms: Export the symbol to public
9351
9352
9353 2012- 9- 12 Osier Yang <[email protected]>
9354
9355 list: Expose virConnectListAllInterfaces to Python binding
9356 The implementation is done manually as the generator does not support
9357 wrapping lists of C pointers into Python objects.
9358
9359 python/libvirt-override-api.xml: Document
9360
9361 python/libvirt-override-virConnect.py:
9362 * New file, includes implementation of listAllInterfaces.
9363
9364 python/libvirt-override.c: Implementation for the wrapper.
9365
9366
9367 2012- 9- 12 Osier Yang <[email protected]>
9368
9369 list: Define new API virConnectListAllInterfaces
9370 This is to list the interface objects, supported filtering flags
9371 are: active|inactive.
9372
9373 include/libvirt/libvirt.h.in: Declare enum virConnectListAllInterfaceFlags
9374 and virConnectListAllInterfaces.
9375 python/generator.py: Skip auto-generating
9376 src/driver.h: (virDrvConnectListAllInterfaces)
9377 src/libvirt.c: Implement the public API
9378 src/libvirt_public.syms: Export the symbol to public
9379
9380
9381 2012- 9- 11 Federico Simoncelli <[email protected]>
9382
9383 python: Initialize new_params in virDomainSetSchedulerParameters
9384 The new_params variable must be initialized in case the
9385 virDomainGetSchedulerParameters call fails and we hit the cleanup
9386 section before actually allocating the new parameters.
9387
9388
9389
9390 2012- 9- 11 Daniel P. Berrange <[email protected]>
9391
9392 Check against python None type when filling in auth parameters
9393 When deciding whether to provide an auth function callback
9394 in openAuth(), credcb was checked against NULL, when it
9395 really needs to be checked against Py_None
9396
9397
9398
9399 2012- 9- 11 Daniel P. Berrange <[email protected]>
9400
9401 Print any exception that occurs in authentication callback
9402 If an exception occurs in the python callback for openAuth()
9403 the stack trace isn't seen by the apps, since this code is
9404 called from libvirt context. To aid diagnostics, print the
9405 error to stderr at least
9406
9407
9408
9409 2012- 9- 11 Daniel P. Berrange <[email protected]>
9410
9411 Fix crash passing an empty list to python openAuth() API
9412 If passing a 'credtype' parameter which was an empty list
9413 to the python openAuth() API, the 'credtype' field in
9414 the virConnectAuth struct would not be initialized. This
9415 lead to a crash when later trying to free that field.
9416
9417
9418
9419 2012- 9- 11 Osier Yang <[email protected]>
9420
9421 list: Expose virConnectListAllNetworks to Python binding
9422 The implementation is done manually as the generator does not support
9423 wrapping lists of C pointers into Python objects.
9424
9425 python/libvirt-override-api.xml: Document
9426
9427 python/libvirt-override-virConnect.py: Implement listAllNetworks.
9428
9429 python/libvirt-override.c: Implementation for the wrapper.
9430
9431
9432 2012- 9- 11 Osier Yang <[email protected]>
9433
9434 list: Define new API virConnectListAllNetworks
9435 This is to list the network objects, supported filtering flags
9436 are: active|inactive, persistent|transient, autostart|no-autostart.
9437
9438 include/libvirt/libvirt.h.in: Declare enum virConnectListAllNetworkFlags
9439 and virConnectListAllNetworks.
9440 python/generator.py: Skip auto-generating
9441 src/driver.h: (virDrvConnectListAllNetworks)
9442 src/libvirt.c: Implement the public API
9443 src/libvirt_public.syms: Export the symbol to public
9444
9445
9446 2012- 9- 10 Osier Yang <[email protected]>
9447
9448 list: Expose virStoragePoolListAllVolumes to Python binding
9449 The implementation is done manually as the generator does not support
9450 wrapping lists of C pointers into Python objects.
9451
9452 python/libvirt-override-api.xml: Document
9453
9454 python/libvirt-override-virStoragePool.py:
9455 * New file, includes implementation of listAllVolumes.
9456
9457 python/libvirt-override.c: Implementation for the wrapper.
9458
9459
9460 2012- 9- 10 Osier Yang <[email protected]>
9461
9462 list: Define new API virStoragePoolListAllVolumes
9463 Simply returns the storage volume objects. No supported filter
9464 flags.
9465
9466 include/libvirt/libvirt.h.in: Declare the API
9467 python/generator.py: Skip the function for generating. virStoragePool.py
9468 will be added in later patch.
9469 src/driver.h: virDrvStoragePoolListVolumesFlags
9470 src/libvirt.c: Implementation for the API.
9471 src/libvirt_public.syms: Export the symbol to public
9472
9473
9474 2012- 9- 7 Jiri Denemark <[email protected]>
9475
9476 Fix PMSuspend and PMWakeup events
9477 The unused reason parameter of PM{Suspend,Wakeup} event callbacks was
9478 completely ignored in lot of places and those events were not actually
9479 working at all.
9480
9481
9482 2012- 9- 6 Osier Yang <[email protected]>
9483
9484 python: Expose virStorageListAllStoragePools to python binding
9485 The implementation is done manually as the generator does not support
9486 wrapping lists of C pointers into Python objects.
9487
9488 python/libvirt-override-api.xml: Document
9489 python/libvirt-override-virConnect.py: Add listAllStoragePools
9490 python/libvirt-override.c: Implementation for the wrapper.
9491
9492
9493 2012- 9- 6 Osier Yang <[email protected]>
9494
9495 list: Define new API virStorageListAllStoragePools
9496 This introduces a new API to list the storage pool objects,
9497 4 groups of flags are provided to filter the returned pools:
9498
9499 * Active or not
9500
9501 * Autostarting or not
9502
9503 * Persistent or not
9504
9505 * And the pool type.
9506
9507 include/libvirt/libvirt.h.in: New enum virConnectListAllStoragePoolFlags;
9508 Declare the API.
9509 python/generator.py: Skip the generating
9510 src/driver.h: (virDrvConnectListAllStoragePools)
9511 src/libvirt.c: Implementation for the API.
9512 src/libvirt_public.syms: Export the symbol.
9513
9514
9515 2012- 8- 31 Eric Blake <[email protected]>
9516
9517 python: don't mask libvirt errors
9518 A user reported this crash when using python bindings:
9519
9520 File "/home/nox/workspace/NOX/src/NOX/hooks.py", line 134, in trigger
9521 hook.trigger(event)
9522 File "/home/nox/workspace/NOX/src/NOX/hooks.py", line 33, in trigger
9523 self.handlers[event]()
9524 File "/home/nox/workspace/NOX/hooks/volatility.py", line 81, in memory_dump
9525 for block in Memory(self.ctx):
9526 File "/home/see/workspace/NOX/src/NOX/lib/libtools.py", line 179, in next
9527 libvirt.VIR_MEMORY_PHYSICAL)
9528 File "/usr/lib/python2.7/dist-packages/libvirt.py", line 1759, in memoryPeek
9529 ret = libvirtmod.virDomainMemoryPeek(self._o, start, size, flags)
9530 SystemError: error return without exception set
9531
9532 In the python bindings, returning NULL makes python think an
9533 exception was thrown, while returning the None object lets the
9534 wrappers know that a libvirt error exists.
9535
9536 Reported by Nox DaFox, fix suggested by Dan Berrange.
9537
9538 * python/libvirt-override.c (libvirt_virDomainBlockPeek)
9539 (libvirt_virDomainMemoryPeek): Return python's None object, so
9540 wrapper knows to check libvirt error.
9541
9542
9543 2012- 8- 23 MATSUDA Daiki <[email protected]>
9544
9545 agent: add python module support
9546 Add virDomainQemuAgentCommand() support function to python module.
9547
9548
9549
9550 2012- 8- 23 MATSUDA Daiki <[email protected]>
9551
9552 agent: add virDrvDomainQemuAgentCommand prototype for drivers.
9553 Add virDrvDomainQemuAgentCommand prototype for drivers.
9554 Add virDomainQemuAgentCommand() for virDrvDomainQemuAgentCommand.
9555
9556
9557
9558 2012- 8- 20 Marcelo Cerri <[email protected]>
9559
9560 Update the remote API
9561 This patch updates libvirt's API to allow applications to inspect the
9562 full list of security labels of a domain.
9563
9564
9565
9566 2012- 7- 30 Peter Krempa <[email protected]>
9567
9568 python: Don't generate bodies for close callback functions
9569 Commit 6ed5a1b9bd6240b8f2736790e48dd1c284c2e0e1 adds close callback
9570 functions to the public API but doesn't add python implementation. This
9571 patch sets the function to be written manually (to fix the build), but
9572 doesn't implement them yet.
9573
9574
9575 2012- 7- 14 Daniel P. Berrange <[email protected]>
9576
9577 Define public API for receiving guest memory balloon events
9578 When the guest changes its memory balloon applications may want
9579 to know what the new value is, without having to periodically
9580 poll on XML / domain info. Introduce a "balloon change" event
9581 to let apps see this
9582
9583 * include/libvirt/libvirt.h.in: Define the
9584 virConnectDomainEventBalloonChangeCallback callback
9585 and VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE constant
9586 * python/libvirt-override-virConnect.py,
9587 python/libvirt-override.c: Wire up helpers for new event
9588 * daemon/remote.c: Helper for serializing balloon event
9589 * examples/domain-events/events-c/event-test.c,
9590 examples/domain-events/events-python/event-test.py: Add
9591 example of balloon event usage
9592 * src/conf/domain_event.c, src/conf/domain_event.h: Handling
9593 of balloon events
9594 * src/remote/remote_driver.c: Add handler of balloon events
9595 * src/remote/remote_protocol.x: Define wire protocol for
9596 balloon events
9597 * src/remote_protocol-structs: Likewise.
9598
9599
9600 2012- 6- 19 Eric Blake <[email protected]>
9601
9602 list: provide python bindings for snapshots
9603 This adds support for the new virDomainListAllSnapshots (a domain
9604 function) and virDomainSnapshotListAllChildren (a snapshot function)
9605 to the libvirt-python bindings. The implementation is done manually
9606 as the generator does not support wrapping lists of C pointers into
9607 python objects.
9608
9609 * python/libvirt-override.c (libvirt_virDomainListAllSnapshots)
9610 (libvirt_virDomainSnapshotListAllChildren): New functions.
9611 * python/libvirt-override-api.xml: Document them.
9612 * python/libvirt-override-virDomain.py (listAllSnapshots): New
9613 file.
9614 * python/libvirt-override-virDomainSnapshot.py (listAllChildren):
9615 Likewise.
9616 * python/Makefile.am (CLASSES_EXTRA): Ship them.
9617
9618
9619 2012- 6- 19 Eric Blake <[email protected]>
9620
9621 list: add virDomainListAllSnapshots API
9622 There was an inherent race between virDomainSnapshotNum() and
9623 virDomainSnapshotListNames(), where an additional snapshot could
9624 be created in the meantime, or where a snapshot could be deleted
9625 before converting the name back to a virDomainSnapshotPtr. It
9626 was also an awkward name: the function operates on domains, not
9627 domain snapshots. virDomainSnapshotListChildrenNames() suffered
9628 from the same inherent race, although its naming was nicer.
9629
9630 This patch makes things nicer by grabbing a snapshot list
9631 atomically, in the format most useful to the user.
9632
9633 * include/libvirt/libvirt.h.in (virDomainListAllSnapshots)
9634 (virDomainSnapshotListAllChildren): New declarations.
9635 * src/libvirt.c (virDomainSnapshotListNames)
9636 (virDomainSnapshotListChildrenNames): Add cross-references.
9637 (virDomainListAllSnapshots, virDomainSnapshotListAllChildren):
9638 New functions.
9639 * src/libvirt_public.syms (LIBVIRT_0.9.13): Export them.
9640 * src/driver.h (virDrvDomainListAllSnapshots)
9641 (virDrvDomainSnapshotListAllChildren): New callbacks.
9642 * python/generator.py (skip_function): Prepare for later
9643 hand-written versions.
9644
9645
9646 2012- 6- 18 Peter Krempa <[email protected]>
9647
9648 python: add API exports for virConnectListAllDomains()
9649 This patch adds export of the new API function
9650 virConnectListAllDomains() to the libvirt-python bindings. The
9651 virConnect object now has method "listAllDomains" that takes only the
9652 flags parameter and returns a python list of virDomain object
9653 corresponding to virDomainPtrs returned by the underlying api.
9654
9655 The implementation is done manually as the generator does not support
9656 wrapping list of virDomainPtrs into virDomain objects.
9657
9658
9659 2012- 6- 18 Peter Krempa <[email protected]>
9660
9661 lib: Add public api to enable atomic listing of guest
9662 This patch adds a new public api that lists domains. The new approach is
9663 different from those used before. There are key points to this:
9664
9665 1) The list is acquired atomically and contains both active and inactive
9666 domains (guests). This eliminates the need to call two different list
9667 APIs, where the state might change in between the calls.
9668
9669 2) The returned list consists of virDomainPtrs instead of names or ID's
9670 that have to be converted to virDomainPtrs anyways using separate calls
9671 for each one of them. This is more convenient and saves hypervisor calls.
9672
9673 3) The returned list is auto-allocated. This saves a lot of hassle for
9674 the users.
9675
9676 4) Built in support for filtering. The API call supports various
9677 filtering flags that modify the output list according to user needs.
9678
9679 Available filter groups:
9680 Domain status:
9681 VIR_CONNECT_LIST_DOMAINS_ACTIVE, VIR_CONNECT_LIST_DOMAINS_INACTIVE
9682
9683 Domain persistence:
9684 VIR_CONNECT_LIST_DOMAINS_PERSISTENT,
9685 VIR_CONNECT_LIST_DOMAINS_TRANSIENT
9686
9687 Domain state:
9688 VIR_CONNECT_LIST_DOMAINS_RUNNING, VIR_CONNECT_LIST_DOMAINS_PAUSED,
9689 VIR_CONNECT_LIST_DOMAINS_SHUTOFF, VIR_CONNECT_LIST_DOMAINS_OTHER
9690
9691 Existence of managed save image:
9692 VIR_CONNECT_LIST_DOMAINS_MANAGEDSAVE,
9693 VIR_CONNECT_LIST_DOMAINS_NO_MANAGEDSAVE
9694
9695 Auto-start option:
9696 VIR_CONNECT_LIST_DOMAINS_AUTOSTART,
9697 VIR_CONNECT_LIST_DOMAINS_NO_AUTOSTART
9698
9699 Existence of snapshot:
9700 VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT,
9701 VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOT
9702
9703 5) The python binding returns a list of domain objects that is very neat
9704 to work with.
9705
9706 The only problem with this approach is no support from code generators
9707 so both RPC code and python bindings had to be written manually.
9708
9709 *include/libvirt/libvirt.h.in: - add API prototype
9710 - clean up whitespace mistakes nearby
9711 *python/generator.py: - inhibit generation of the bindings for the new
9712 api
9713 *src/driver.h: - add driver prototype
9714 - clean up some whitespace mistakes nearby
9715 *src/libvirt.c: - add public implementation
9716 *src/libvirt_public.syms: - export the new symbol
9717
9718
9719 2012- 6- 12 Eric Blake <[email protected]>
9720
9721 python: fix snapshot listing bugs
9722 Python exceptions are different than libvirt errors, and we had
9723 some corner case bugs on OOM situations.
9724
9725 * python/libvirt-override.c (libvirt_virDomainSnapshotListNames)
9726 (libvirt_virDomainSnapshotListChildrenNames): Use correct error
9727 returns, avoid segv on OOM, and avoid memory leaks on error.
9728
9729
9730 2012- 6- 12 Eric Blake <[email protected]>
9731
9732 python: use simpler methods
9733 * python/libvirt-override.c (libvirt_virDomainGetVcpus)
9734 (libvirt_virDomainGetVcpuPinInfo): Use Py_XDECREF instead of
9735 open-coding it.
9736
9737
9738 2012- 5- 4 Osier Yang <[email protected]>
9739
9740 Coverity: Fix the forward_null error in Python binding codes
9741 Related coverity log:
9742
9743 Error: FORWARD_NULL:
9744 /builddir/build/BUILD/libvirt-0.9.10/python/libvirt-override.c:355:
9745 assign_zero: Assigning: "params" = 0.
9746 /builddir/build/BUILD/libvirt-0.9.10/python/libvirt-override.c:458:
9747 var_deref_model: Passing null variable "params" to function
9748 "getPyVirTypedParameter", which dereferences it. (The dereference is assumed on
9749 the basis of the 'nonnull' parameter attribute.)
9750
9751
9752 2012- 4- 27 Cole Robinson <[email protected]>
9753
9754 python: Fix doc directory name for stable releases
9755 We were using the libvirt release version (like 0.9.11) and not
9756 the configure version (which for stable releases is 0.9.11.X)
9757
9758 Most other places got this right so hopefully that's all the fallout
9759 from the version format change :)
9760
9761
9762
9763 2012- 4- 10 Stefan Berger <[email protected]>
9764
9765 Fix compilation error on 32bit
9766 Below code failed to compile on a 32 bit machine with error
9767
9768 typewrappers.c: In function 'libvirt_intUnwrap':
9769 typewrappers.c:135:5: error: logical 'and' of mutually exclusive tests is always false [-Werror=logical-op]
9770 cc1: all warnings being treated as errors
9771
9772 The patch fixes this error.
9773
9774
9775
9776 2012- 3- 31 Eric Blake <[email protected]>
9777
9778 python: improve conversion validation
9779 Laszlo Ersek pointed out that in trying to convert a long to an
9780 unsigned int, we used:
9781
9782 long long_val = ...;
9783 if ((unsigned int)long_val == long_val)
9784
9785 According to C99 integer promotion rules, the if statement is
9786 equivalent to:
9787
9788 (unsigned long)(unsigned int)long_val == (unsigned long)long_val
9789
9790 since you get an unsigned comparison if at least one side is
9791 unsigned, using the largest rank of the two sides; but on 32-bit
9792 platforms, where unsigned long and unsigned int are the same size,
9793 this comparison is always true and ends up converting negative
9794 long_val into posigive unsigned int values, rather than rejecting
9795 the negative value as we had originally intended (python longs
9796 are unbounded size, and we don't want to do silent modulo
9797 arithmetic when converting to C code).
9798
9799 Fix this by using direct comparisons, rather than casting.
9800
9801 * python/typewrappers.c (libvirt_intUnwrap, libvirt_uintUnwrap)
9802 (libvirt_ulongUnwrap, libvirt_ulonglongUnwrap): Fix conversion
9803 checks.
9804
9805
9806 2012- 3- 28 Guannan Ren <[email protected]>
9807
9808 python: make python APIs use these helper functions
9809 *setPyVirTypedParameter
9810 *libvirt_virDomainGetCPUStats
9811
9812
9813 2012- 3- 28 Guannan Ren <[email protected]>
9814
9815 python: Add new helper functions for python to C integral conversion
9816 int libvirt_intUnwrap(PyObject *obj, int *val);
9817 int libvirt_uintUnwrap(PyObject *obj, unsigned int *val);
9818 int libvirt_longUnwrap(PyObject *obj, long *val);
9819 int libvirt_ulongUnwrap(PyObject *obj, unsigned long *val);
9820 int libvirt_longlongUnwrap(PyObject *obj, long long *val);
9821 int libvirt_ulonglongUnwrap(PyObject *obj, unsigned long long *val);
9822 int libvirt_doubleUnwrap(PyObject *obj, double *val);
9823 int libvirt_boolUnwrap(PyObject *obj, bool *val);
9824
9825
9826 2012- 3- 26 Martin Kletzander <[email protected]>
9827
9828 Cleanup for a return statement in source files
9829 Return statements with parameter enclosed in parentheses were modified
9830 and parentheses were removed. The whole change was scripted, here is how:
9831
9832 List of files was obtained using this command:
9833 git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \
9834 grep -e '\.[ch]$' -e '\.py$'
9835
9836 Found files were modified with this command:
9837 sed -i -e \
9838 's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
9839 -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
9840
9841 Then checked for nonsense.
9842
9843 The whole command looks like this:
9844 git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \
9845 grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e \
9846 's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
9847 -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
9848
9849
9850 2012- 3- 23 Osier Yang <[email protected]>
9851
9852 Add support for the suspend event
9853 This patch introduces a new event type for the QMP event
9854 SUSPEND:
9855
9856 VIR_DOMAIN_EVENT_ID_PMSUSPEND
9857
9858 The event doesn't take any data, but considering there might
9859 be reason for wakeup in future, the callback definition is:
9860
9861 typedef void
9862 (*virConnectDomainEventSuspendCallback)(virConnectPtr conn,
9863 virDomainPtr dom,
9864 int reason,
9865 void *opaque);
9866
9867 "reason" is unused currently, always passes "0".
9868
9869
9870 2012- 3- 23 Osier Yang <[email protected]>
9871
9872 Add support for the wakeup event
9873 This patch introduces a new event type for the QMP event
9874 WAKEUP:
9875
9876 VIR_DOMAIN_EVENT_ID_PMWAKEUP
9877
9878 The event doesn't take any data, but considering there might
9879 be reason for wakeup in future, the callback definition is:
9880
9881 typedef void
9882 (*virConnectDomainEventWakeupCallback)(virConnectPtr conn,
9883 virDomainPtr dom,
9884 int reason,
9885 void *opaque);
9886
9887 "reason" is unused currently, always passes "0".
9888
9889
9890 2012- 3- 23 Osier Yang <[email protected]>
9891
9892 Add support for event tray moved of removable disks
9893 This patch introduces a new event type for the QMP event
9894 DEVICE_TRAY_MOVED, which occurs when the tray of a removable
9895 disk is moved (i.e opened or closed):
9896
9897 VIR_DOMAIN_EVENT_ID_TRAY_CHANGE
9898
9899 The event's data includes the device alias and the reason
9900 for tray status' changing, which indicates why the tray
9901 status was changed. Thus the callback definition for the event
9902 is:
9903
9904 enum {
9905 VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN = 0,
9906 VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE,
9907
9908 \#ifdef VIR_ENUM_SENTINELS
9909 VIR_DOMAIN_EVENT_TRAY_CHANGE_LAST
9910 \#endif
9911 } virDomainEventTrayChangeReason;
9912
9913 typedef void
9914 (*virConnectDomainEventTrayChangeCallback)(virConnectPtr conn,
9915 virDomainPtr dom,
9916 const char *devAlias,
9917 int reason,
9918 void *opaque);
9919
9920
9921 2012- 3- 22 Guannan Ren <[email protected]>
9922
9923 python: add virDomainGetCPUStats python binding API
9924 dom.getCPUStats(True, 0)
9925 [{'cpu_time': 24699446159L, 'system_time': 10870000000L, 'user_time': 950000000L}]
9926 dom.getCPUStats(False, 0)
9927 [{'cpu_time': 8535292289L}, {'cpu_time': 1005395355L}, {'cpu_time': 9351766377L}, {'cpu_time': 5813545649L}]
9928
9929 *generator.py Add a new naming rule
9930 *libvirt-override-api.xml The API function description
9931 *libvirt-override.c Implement it.
9932
9933
9934 2012- 3- 22 Alex Jia <[email protected]>
9935
9936 python: Avoid memory leaks on libvirt_virNodeGetCPUStats
9937 Detected by valgrind. Leaks are introduced in commit 4955602.
9938
9939 * python/libvirt-override.c (libvirt_virNodeGetCPUStats): fix memory leaks
9940 and improve codes return value.
9941
9942 For details, please see the following link:
9943 RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=770943
9944
9945
9946
9947 2012- 3- 21 Alex Jia <[email protected]>
9948
9949 python: Avoid memory leaks on libvirt_virNodeGetMemoryStats
9950 Detected by valgrind. Leaks are introduced in commit 17c7795.
9951
9952 * python/libvirt-override.c (libvirt_virNodeGetMemoryStats): fix memory leaks
9953 and improve codes return value.
9954
9955 For details, please see the following link:
9956 RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=770944
9957
9958
9959
9960 2012- 3- 20 Eric Blake <[email protected]>
9961
9962 python: always include config.h first
9963 On RHEL 5.7, I got this compilation failure:
9964
9965 In file included from /usr/include/python2.4/pyport.h:98,
9966 from /usr/include/python2.4/Python.h:55,
9967 from libvirt.c:3:
9968 ../gnulib/lib/time.h:468: error: expected ';', ',' or ')' before '__timer'
9969
9970 Turns out that our '#define restrict __restrict' from config.h wasn't
9971 being picked up. Gnulib _requires_ that all .c files include <config.h>
9972 first, otherwise the gnulib header overrides tend to misbehave.
9973
9974 Problem introduced by patch c700613b8.
9975
9976 * python/generator.py (buildStubs): Include <config.h> first.
9977
9978
9979 2012- 2- 16 Alex Jia <[email protected]>
9980
9981 python: Expose virDomain{G,S}etInterfaceParameters APIs in python binding
9982 The v4 patch corrects indentation issues.
9983
9984 The v3 patch follows latest python binding codes and change 'size'
9985 type from int to Py_ssize_t.
9986
9987 An simple example to show how to use it:
9988
9989 #!/usr/bin/env python
9990
9991 import libvirt
9992
9993 conn = libvirt.open(None)
9994 dom = conn.lookupByName('foo')
9995
9996 print dom.interfaceParameters('vnet0', 0)
9997
9998 params = {'outbound.peak': 10,
9999 'inbound.peak': 10,
10000 'inbound.burst': 20,
10001 'inbound.average': 20,
10002 'outbound.average': 30,
10003 'outbound.burst': 30}
10004
10005 print dom.setInterfaceParameters('vnet0', params, 0)
10006 print dom.interfaceParameters('vnet0', 0)
10007
10008
10009
10010 2012- 2- 11 Guannan Ren <[email protected]>
10011
10012 python: make other APIs share common {get, set}PyVirTypedParameter
10013 *libvirt_virDomainBlockStatsFlags
10014 *libvirt_virDomainGetSchedulerParameters
10015 *libvirt_virDomainGetSchedulerParametersFlags
10016 *libvirt_virDomainSetSchedulerParameters
10017 *libvirt_virDomainSetSchedulerParametersFlags
10018 *libvirt_virDomainSetBlkioParameters
10019 *libvirt_virDomainGetBlkioParameters
10020 *libvirt_virDomainSetMemoryParameters
10021 *libvirt_virDomainGetMemoryParameters
10022 *libvirt_virDomainSetBlockIoTune
10023 *libvirt_virDomainGetBlockIoTune
10024
10025
10026 2012- 2- 9 Guannan Ren <[email protected]>
10027
10028 python: refactoring virTypedParameter conversion for NUMA tuning APIs
10029 *getPyVirTypedParameter
10030 *setPyVirTypedParameter
10031 *virDomainSetNumaParameters
10032 *virDomainGetNumaParameters
10033
10034
10035
10036 2012- 2- 9 Osier Yang <[email protected]>
10037
10038 python: Correct arguments number for migrateSetMaxSpeed
10039 The API definition accepts "flags" argument, however, the
10040 implementation ignores it, though "flags" is unused currently,
10041 we should expose it instead of hard coding, the API
10042 implementation inside hypervisor driver is responsible to check
10043 if the passed "flags" is valid.
10044
10045
10046 2012- 2- 8 Eric Blake <[email protected]>
10047
10048 python: drop unused function
10049 Gcc warned about an unused static function.
10050
10051 * python/libvirt-qemu-override.c (py_str): Delete.
10052
10053
10054 2012- 2- 7 Michal Privoznik <[email protected]>
10055
10056 pyhton: Don't link against libvirt_util.la
10057 As we already link with libvirt.la which contains libvirt_utils.la.
10058 Double linking causes global symbols to be presented twice and
10059 thus confusion. This partially reverts c700613b8d463212d142c97108b7a2352e23e559
10060
10061
10062 2012- 2- 3 Eric Blake <[email protected]>
10063
10064 maint: consolidate several .gitignore files
10065 Unlike .cvsignore under CVS, git allows for ignoring nested
10066 names. We weren't very consistent where new tests were
10067 being ignored (some in .gitignore, some in tests/.gitignore),
10068 and I found it easier to just consolidate everything.
10069
10070 * .gitignore: Subsume entries from subdirectories.
10071 * daemon/.gitignore: Delete.
10072 * docs/.gitignore: Likewise.
10073 * docs/devhelp/.gitignore: Likewise.
10074 * docs/html/.gitignore: Likewise.
10075 * examples/dominfo/.gitignore: Likewise.
10076 * examples/domsuspend/.gitignore: Likewise.
10077 * examples/hellolibvirt/.gitignore: Likewise.
10078 * examples/openauth/.gitignore: Likewise.
10079 * examples/domain-events/events-c/.gitignore: Likewise.
10080 * include/libvirt/.gitignore: Likewise.
10081 * src/.gitignore: Likewise.
10082 * src/esx/.gitignore: Likewise.
10083 * tests/.gitignore: Likewise.
10084 * tools/.gitignore: Likewise.
10085
10086
10087 2012- 2- 3 Martin Kletzander <[email protected]>
10088
10089 Added missing memory reporting into python bindings
10090 Two types of memory stats were not reported by python bindings. This
10091 patch fixes both of them.
10092
10093
10094 2012- 2- 3 Eric Blake <[email protected]>
10095
10096 python: use libvirt_util to avoid raw free
10097 This patch starts the process of elevating the python binding code
10098 to be on the same level as the rest of libvirt when it comes to
10099 requiring good coding styles. Statically linking against the
10100 libvirt_util library makes it much easier to write good code,
10101 rather than having to open-code and reinvent things locally.
10102
10103 Done by global search and replace of s/free(/VIR_FREE(/, followed
10104 by hand-inspection of remaining malloc and redundant memset.
10105
10106 * cfg.mk (exclude_file_name_regexp--sc_prohibit_raw_allocation):
10107 Remove python from exemption.
10108 * python/Makefile.am (INCLUDES): Add gnulib and src/util. Drop
10109 $(top_builddir)/$(subdir), as automake already guarantees that.
10110 (mylibs, myqemulibs): Pull in libvirt_util and gnulib.
10111 (libvirtmod_la_CFLAGS): Catch compiler warnings if configured to
10112 use -Werror.
10113 * python/typewrappers.c (libvirt_charPtrSizeWrap)
10114 (libvirt_charPtrWrap): Convert free to VIR_FREE.
10115 * python/generator.py (print_function_wrapper): Likewise.
10116 * python/libvirt-override.c: Likewise.
10117
10118
10119 2012- 2- 3 Eric Blake <[email protected]>
10120
10121 python: drop redundant function
10122 I noticed some redundant code while preparing my next patch.
10123
10124 * python/generator.py (py_types): Fix 'const char *' mapping.
10125 * python/typewrappers.h (libvirt_charPtrConstWrap): Drop.
10126 * python/typewrappers.c (libvirt_charPtrConstWrap): Delete, since
10127 it is identical to libvirt_constcharPtrWrap.
10128
10129
10130 2012- 2- 3 Eric Blake <[email protected]>
10131
10132 build: clean up CPPFLAGS/INCLUDES usage
10133 Our syntax checker missed all-lower-case variables (this will
10134 be fixed by the next .gnulib update). Additionally, anywhere
10135 that we mix in-tree files with generated files, automake recommends
10136 listing builddir prior to srcdir for VPATH builds.
10137
10138 * src/Makefile.am (*_la_CFLAGS): Favor $(top_srcdir).
10139 (INCLUDES): Likewise, and follow automake recommendations on
10140 builddir before srcdir.
10141 * python/Makefile.am (INCLUDES): Swap directory order.
10142 * tests/Makefile.am (INCLUDES): Likewise.
10143 * tools/Makefile.am (INCLUDES): Likewise.
10144 * daemon/Makefile.am (INCLUDES): Likewise.
10145 (libvirtd.init, libvirtd.service): Favor $().
10146 * examples/hellolibvirt/Makefile.am (hellolibvirt_LDADD):
10147 Likewise.
10148 * examples/openauth/Makefile.am (openauth_LDADD): Likewise.
10149 * examples/dominfo/Makefile.am (INCLUDES): Drop dead include.
10150 * examples/domsuspend/Makefile.am (INCLUDES): Likewise.
10151
10152
10153 2012- 2- 1 Jiri Denemark <[email protected]>
10154
10155 python: Add binding for virDomainGetDiskErrors
10156
10157
10158 2012- 2- 1 Jiri Denemark <[email protected]>
10159
10160 virDomainGetDiskErrors public API
10161 We already provide ways to detect when a domain has been paused as a
10162 result of I/O error, but there was no way of getting the exact error or
10163 even the device that experienced it. This new API may be used for both.
10164
10165
10166 2012- 2- 1 Alex Jia <[email protected]>
10167
10168 python: correct a copy-paste error
10169 * python/libvirt-override-virStream.py: fix a copy-paste error in sendAll().
10170
10171
10172
10173 2012- 1- 28 KAMEZAWA Hiroyuki <[email protected]>
10174
10175 Add new public API virDomainGetCPUStats()
10176 add new API virDomainGetCPUStats() for getting cpu accounting information
10177 per real cpus which is used by a domain. The API is designed to allow
10178 future extensions for additional statistics.
10179
10180 based on ideas by Lai Jiangshan and Eric Blake.
10181
10182 * src/libvirt_public.syms: add API for LIBVIRT_0.9.10
10183 * src/libvirt.c: define virDomainGetCPUStats()
10184 * include/libvirt/libvirt.h.in: add virDomainGetCPUStats() header
10185 * src/driver.h: add driver API
10186 * python/generator.py: add python API (as not implemented)
10187
10188
10189
10190 2012- 1- 28 Zeeshan Ali (Khattak) <[email protected]>
10191
10192 resize: add virStorageVolResize() API
10193 Add a new function to allow changing of capacity of storage volumes.
10194 Plan out several flags, even if not all of them will be implemented
10195 up front.
10196
10197 Expose the new command via 'virsh vol-resize'.
10198
10199
10200
10201 2012- 1- 20 Eric Blake <[email protected]>
10202
10203 API: make declaration of _LAST enum values conditional
10204 Although this is a public API break, it only affects users that
10205 were compiling against *_LAST values, and can be trivially
10206 worked around without impacting compilation against older
10207 headers, by the user defining VIR_ENUM_SENTINELS before using
10208 libvirt.h. It is not an ABI break, since enum values do not
10209 appear as .so entry points. Meanwhile, it prevents users from
10210 using non-stable enum values without explicitly acknowledging
10211 the risk of doing so.
10212
10213 See this list discussion:
10214 https://www.redhat.com/archives/libvir-list/2012-January/msg00804.html
10215
10216 * include/libvirt/libvirt.h.in: Hide all sentinels behind
10217 LIBVIRT_ENUM_SENTINELS, and add missing sentinels.
10218 * src/internal.h (VIR_DEPRECATED): Allow inclusion after
10219 libvirt.h.
10220 (LIBVIRT_ENUM_SENTINELS): Expose sentinels internally.
10221 * daemon/libvirtd.h: Use the sentinels.
10222 * src/remote/remote_protocol.x (includes): Don't expose sentinels.
10223 * python/generator.py (enum): Likewise.
10224 * tests/cputest.c (cpuTestCompResStr): Silence compiler warning.
10225 * tools/virsh.c (vshDomainStateReasonToString)
10226 (vshDomainControlStateToString): Likewise.
10227
10228
10229 2011- 12- 29 Hu Tao <[email protected]>
10230
10231 domiftune: Add API virDomain{S,G}etInterfaceParameters
10232 The APIs are used to set/get domain's network interface's parameters.
10233 Currently supported parameters are bandwidth settings.
10234
10235 * include/libvirt/libvirt.h.in: new API and parameters definition
10236 * python/generator.py: skip the Python API generation
10237 * src/driver.h: add new entry to the driver structure
10238 * src/libvirt_public.syms: export symbols
10239
10240
10241 2011- 12- 29 Daniel Veillard <[email protected]>
10242
10243 remove a static limit on max domains in python bindings
10244 * python/libvirt-override.c: remove the predefined array in the
10245 virConnectListDomainsID binding and call virConnectNumOfDomains
10246 to do a proper allocation
10247
10248
10249 2011- 12- 29 Alex Jia <[email protected]>
10250
10251 python: Fix problems of virDomain{Set, Get}BlockIoTune bindings
10252 The parameter 'params' is useless for virDomainGetBlockIoTune API,
10253 and the return value type should be a virTypedParameterPtr but not
10254 integer. And "PyArg_ParseTuple" in functions
10255 libvirt_virDomain{Set,Get}BlockIoTune misses format unit for "format"
10256 argument.
10257
10258 * libvirt-override-api.xml: Remove useless the parameter 'params'
10259 from virDomainGetBlockIoTune API, and change return value type from
10260 integer to virTypedParameterPtr.
10261
10262 * python/libvirt-override.c: Add the missed format units.
10263
10264 RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=770683
10265
10266
10267
10268 2011- 12- 20 Hu Tao <[email protected]>
10269
10270 add new API virDomain{G, S}etNumaParameters
10271 Set up the types for the numa functions and insert them into the
10272 virDriver structure definition.
10273
10274
10275 2011- 12- 19 Alex Jia <[email protected]>
10276
10277 python: plug memory leak on libvirt_virConnectOpenAuth
10278 * Detected by valgrind. Leak introduced in commit 5ab109f.
10279
10280 * python/libvirt-override.c: avoid memory leak on libvirt_virConnectOpenAuth.
10281
10282 * How to reproduce?
10283
10284 % valgrind -v --leak-check=full virt-clone --print-xml
10285 Note: it can hit the issue although options are incomplete.
10286
10287 * Actual valgrind result:
10288
10289 ==1801== 12 bytes in 1 blocks are definitely lost in loss record 25 of 3,270
10290 ==1801== at 0x4A05FDE: malloc (vg_replace_malloc.c:236)
10291 ==1801== by 0xCF1F60E: libvirt_virConnectOpenAuth (libvirt-override.c:1507)
10292 ==1801== by 0x3AFEEDE7F3: PyEval_EvalFrameEx (ceval.c:3794)
10293 ==1801== by 0x3AFEEDF99E: PyEval_EvalFrameEx (ceval.c:3880)
10294 ==1801== by 0x3AFEEDF99E: PyEval_EvalFrameEx (ceval.c:3880)
10295 ==1801== by 0x3AFEEDF99E: PyEval_EvalFrameEx (ceval.c:3880)
10296 ==1801== by 0x3AFEEDF99E: PyEval_EvalFrameEx (ceval.c:3880)
10297 ==1801== by 0x3AFEEE0466: PyEval_EvalCodeEx (ceval.c:3044)
10298 ==1801== by 0x3AFEEE0541: PyEval_EvalCode (ceval.c:545)
10299 ==1801== by 0x3AFEEFB88B: run_mod (pythonrun.c:1351)
10300 ==1801== by 0x3AFEEFB95F: PyRun_FileExFlags (pythonrun.c:1337)
10301 ==1801== by 0x3AFEEFCE4B: PyRun_SimpleFileExFlags (pythonrun.c:941)
10302
10303
10304
10305 2011- 12- 15 Osier Yang <[email protected]>
10306
10307 python: Expose blockPeek and memoryPeek in Python binding
10308 A simple example to show how to use it:
10309
10310 \#! /usr/bin/python
10311
10312 import os
10313 import sys
10314 import libvirt
10315
10316 disk = "/var/lib/libvirt/images/test.img"
10317
10318 conn = libvirt.open(None)
10319 dom = conn.lookupByName('test')
10320
10321 mem_contents = dom.memoryPeek(0, 32, libvirt.VIR_MEMORY_VIRTUAL);
10322 sys.stdout.write(mem_contents)
10323
10324 % python test.py | hexdump
10325 0000000 1660 0209 0000 0000 0000 0000 0000 0000
10326 0000010 0000 0000 0000 0000 d3a0 01d0 0000 0000
10327 0000020
10328
10329
10330 2011- 12- 13 Peter Krempa <[email protected]>
10331
10332 python: Fix export of virDomainSnapshotListChildrenNames
10333 Commit f2013c9dd1ce468b8620ee35c232a93ef7026fb0 added implementation of
10334 virDomainSnapshotListChildrenNames override export, but registration of
10335 the newly exported function was not added.
10336
10337 *python/libvirt-override.c: - register export of function
10338
10339
10340 2011- 12- 5 Peter Krempa <[email protected]>
10341
10342 python: Expose binding for virNodeGetMemoryStats()
10343 This patch adds binding for virNodeGetMemoryStats method of libvirtd.
10344 Return value is represented as a python dictionary mapping field
10345 names to values.
10346
10347
10348 2011- 12- 5 Peter Krempa <[email protected]>
10349
10350 python: Expose binding for virNodeGetCPUStats()
10351 This patch adds binding for virNodeGetCPUStats method of libvirtd.
10352 Return value is represented as a python dictionary mapping field names
10353 to values.
10354
10355
10356 2011- 11- 30 Lei Li <[email protected]>
10357
10358 Support virDomain{Set, Get}BlockIoTune in the python API
10359 Python support for both setting and getting block I/O throttle.
10360
10361
10362
10363 2011- 11- 30 Lei Li <[email protected]>
10364
10365 Add new API virDomain{Set, Get}BlockIoTune
10366 This patch add new pulic API virDomainSetBlockIoTune and
10367 virDomainGetBlockIoTune.
10368
10369
10370
10371 2011- 10- 31 Matthias Bolte <[email protected]>
10372
10373 python: Fix documentation of virStream recv
10374 This was fixed in be757a3f7baf93b for libvirt.c.
10375
10376
10377 2011- 10- 25 Michal Privoznik <[email protected]>
10378
10379 startupPolicy: Emit event on disk source dropping
10380 If a disk source gets dropped because it is not accessible,
10381 mgmt application might want to be informed about this. Therefore
10382 we need to emit an event. The event presented in this patch
10383 is however a bit superset of what written above. The reason is simple:
10384 an intention to be easily expanded, e.g. on 'user ejected disk
10385 in guest' events. Therefore, callback gets source string and disk alias
10386 (which should be unique among a domain) and reason (an integer);
10387
10388
10389 2011- 10- 17 Philipp Hahn <[email protected]>
10390
10391 Fix two comments related to error handling
10392
10393
10394 2011- 10- 10 Eric Blake <[email protected]>
10395
10396 snapshot: new virDomainSnapshotListChildrenNames API
10397 The previous API addition allowed traversal up the hierarchy;
10398 this one makes it easier to traverse down the hierarchy.
10399
10400 In the python bindings, virDomainSnapshotNumChildren can be
10401 generated, but virDomainSnapshotListChildrenNames had to copy
10402 from the hand-written example of virDomainSnapshotListNames.
10403
10404 * include/libvirt/libvirt.h.in (virDomainSnapshotNumChildren)
10405 (virDomainSnapshotListChildrenNames): New prototypes.
10406 (VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS): New flag alias.
10407 * src/libvirt.c (virDomainSnapshotNumChildren)
10408 (virDomainSnapshotListChildrenNames): New functions.
10409 * src/libvirt_public.syms: Export them.
10410 * src/driver.h (virDrvDomainSnapshotNumChildren)
10411 (virDrvDomainSnapshotListChildrenNames): New callbacks.
10412 * python/generator.py (skip_impl, nameFixup): Update lists.
10413 * python/libvirt-override-api.xml: Likewise.
10414 * python/libvirt-override.c
10415 (libvirt_virDomainSnapshotListChildrenNames): New wrapper function.
10416
10417
10418 2011- 10- 10 Eric Blake <[email protected]>
10419
10420 maint: typo fixes
10421 I noticed a couple typos in recent commits, and fixed the remaining
10422 instances of them.
10423
10424 * docs/internals/command.html.in: Fix spelling errors.
10425 * include/libvirt/libvirt.h.in (virConnectDomainEventCallback):
10426 Likewise.
10427 * python/libvirt-override.py (virEventAddHandle): Likewise.
10428 * src/lxc/lxc_container.c (lxcContainerChild): Likewise.
10429 * src/util/hash.c (virHashCreateFull): Likewise.
10430 * src/storage/storage_backend_logical.c
10431 (virStorageBackendLogicalMakeVol): Likewise.
10432 * src/esx/esx_driver.c (esxFormatVMXFileName): Likewise.
10433 * src/vbox/vbox_tmpl.c (vboxIIDIsEqual_v3_x): Likewise.
10434
10435
10436 2011- 9- 16 Jiri Denemark <[email protected]>
10437
10438 python: Fix bindings generated in VPATH build
10439
10440
10441 2011- 9- 15 Cole Robinson <[email protected]>
10442
10443 python: Fix libvirt.py generation to include virterror info
10444 Recent generator refactoring broke libvirt.py. With this patch, libvirt.py
10445 is generated exactly the same as before offending commit 9eba0d25.
10446
10447
10448 2011- 9- 14 Osier Yang <[email protected]>
10449
10450 qemu_api: Update Makefile to generate libvirtmod_qemu lib
10451
10452
10453 2011- 9- 14 Osier Yang <[email protected]>
10454
10455 qemu_api: Update Py binding generator to generate files for QEMU APIs
10456 It will generate:
10457 libvirt-qemu.py
10458 libvirt-qemu.h
10459 libvirt-qemu.c
10460 libvirt-qemu-export.c
10461
10462
10463 2011- 9- 14 Osier Yang <[email protected]>
10464
10465 qemu_api: Add override XML and C files for QEMU APIs
10466 There is only one function (virDomainQemuMonitorCommand) need to
10467 be hand-craft.
10468
10469
10470 2011- 9- 6 Osier Yang <[email protected]>
10471
10472 latency: Expose the new API for Python binding
10473
10474
10475 2011- 9- 1 Jim Fehlig <[email protected]>
10476
10477 Add public API for getting migration speed
10478 Includes impl of python binding since the generator was not
10479 able to cope.
10480
10481 Note: Requires gendispatch.pl patch from Matthias Bolte
10482
10483 https://www.redhat.com/archives/libvir-list/2011-August/msg01367.html
10484
10485
10486 2011- 8- 2 Eric Blake <[email protected]>
10487
10488 python: avoid unlikely sign extension bug
10489 Detected by Coverity; same analysis as for commit f73198df.
10490
10491 * python/libvirt-override.c (libvirt_virDomainGetVcpuPinInfo): Use
10492 correct type.
10493
10494
10495 2011- 7- 29 Matthias Bolte <[email protected]>
10496
10497 freebsd: Fix build problem due to picking up the wrong libvirt.h
10498 Gettext annoyingly modifies CPPFLAGS in-place, putting
10499 -I/usr/local/include into the search patch if libintl headers
10500 must be used from that location. But since we must support
10501 automake 1.9.6 which lacks AM_CPPFLAGS, and since CPPFLAGS is used
10502 prior to INCLUDES, this means that the build picks up the _old_
10503 installed libvirt.h in priority to the in-tree version, leading
10504 to all sorts of weird build failures on FreeBSD.
10505
10506 Fix this by teaching configure to undo gettext's actions, but
10507 to keep any changes required by gettext at the end of INCLUDES
10508 after all in-tree locations are used first. Also requires
10509 adding a wrapper Makefile.am and making gnulib-tool create
10510 just gnulib.mk files during the bootstrap process.
10511
10512
10513
10514 2011- 7- 28 Eric Blake <[email protected]>
10515
10516 maint: add missing copyright notices
10517 I went with the shorter license notice used by src/libvirt.c,
10518 rather than spelling out the full LGPLv2+ clause into each of
10519 these files.
10520
10521 * configure.ac: Declare copyright.
10522 * all Makefile.am: Likewise.
10523
10524
10525 2011- 7- 28 Hu Tao <[email protected]>
10526
10527 python: add python binding for virDomainSetMemoryParameters
10528
10529
10530 2011- 7- 28 Hu Tao <[email protected]>
10531
10532 python: add python binding for virDomainGetMemoryParameters
10533
10534
10535 2011- 7- 28 Hu Tao <[email protected]>
10536
10537 python: add python binding for virDomainSetBlkioParameters
10538
10539
10540 2011- 7- 28 Hu Tao <[email protected]>
10541
10542 python: add python binding for virDomainGetBlkioParameters
10543
10544
10545 2011- 7- 27 Lai Jiangshan <[email protected]>
10546
10547 send-key: Implement Python API
10548
10549
10550 2011- 7- 26 Cole Robinson <[email protected]>
10551
10552 python: Properly report errors if virStreamRecv fails
10553 We only want to raise the special value -2. -1 should return None
10554 which tells the bindings to throw an exception.
10555
10556
10557 2011- 7- 25 Cole Robinson <[email protected]>
10558
10559 python: Handle embedded NUL in stream.send data
10560 Otherwise things like volume upload are only useful with text data.
10561
10562
10563 2011- 7- 25 Taku Izumi <[email protected]>
10564
10565 python: add Python binding for virDomainGetVcpuPinInfo API
10566 This patch adds the Python bindings for virDomainGetVcpuPinInfo API.
10567 * python/generator.py: add it to generator skip list
10568 * python/libvirt-override-api.xml: provide an override description
10569 * python/libvirt-override.c: provide an override binding implementation
10570
10571
10572 2011- 7- 25 Taku Izumi <[email protected]>
10573
10574 python: add Python binding for virDomainPinVcpusFlags API
10575 This patch adds the Python bindings for virDomainPinVcpuFlags API.
10576 * python/generator.py: add it to the generator skip list
10577 * python/libvirt-override-api.xml: provide override description
10578 * python/libvirt-override.c: provide override bindings implementation
10579
10580
10581 2011- 7- 25 Taku Izumi <[email protected]>
10582
10583 python: add Python binding for virDomainGetSchedulerParametersFlags API
10584 This patch adds the Python bindings for
10585 virDomainGetSchedulerParametersFlags API.
10586
10587
10588 2011- 7- 25 Taku Izumi <[email protected]>
10589
10590 python: add Python binding for virDomainGetSchedulerParametersFlags API
10591 This patch adds the Python bindings for
10592 virDomainGetSchedulerParametersFlags API.
10593 * python/libvirt-override-api.xml: provide and override description
10594 * python/libvirt-override.c: implement the bindings
10595
10596
10597 2011- 7- 22 Adam Litke <[email protected]>
10598
10599 Asynchronous event for BlockJob completion
10600 When an operation started by virDomainBlockPull completes (either with
10601 success or with failure), raise an event to indicate the final status.
10602 This API allow users to avoid polling on virDomainGetBlockJobInfo if
10603 they would prefer to use an event mechanism.
10604
10605 * daemon/remote.c: Dispatch events to client
10606 * include/libvirt/libvirt.h.in: Define event ID and callback signature
10607 * src/conf/domain_event.c, src/conf/domain_event.h,
10608 src/libvirt_private.syms: Extend API to handle the new event
10609 * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
10610 for block_stream completion and emit a libvirt block pull event
10611 * src/remote/remote_driver.c: Receive and dispatch events to application
10612 * src/remote/remote_protocol.x: Wire protocol definition for the event
10613 * src/remote_protocol-structs: structure definitions for protocol verification
10614 * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
10615 src/qemu/qemu_monitor_json.c: Watch for BLOCK_STREAM_COMPLETED event
10616 from QEMU monitor
10617
10618
10619 2011- 7- 22 Adam Litke <[email protected]>
10620
10621 Enable virDomainBlockPull in the python API
10622 virDomainGetBlockJobInfo requires manual override since it returns a
10623 custom type.
10624
10625 * python/generator.py: reenable bindings for this entry point
10626 * python/libvirt-override-api.xml python/libvirt-override.c:
10627 manual overrides
10628
10629
10630 2011- 7- 22 Adam Litke <[email protected]>
10631
10632 Add new API virDomainBlockPull* to headers
10633 Set up the types for the block pull functions and insert them into the
10634 virDriver structure definition. Symbols are exported in this patch to
10635 prevent
10636 documentation compile failures.
10637
10638 * include/libvirt/libvirt.h.in: new API
10639 * src/driver.h: add the new entry to the driver structure
10640 * python/generator.py: fix compiler errors, the actual python bindings
10641 * are
10642 implemented later
10643 * src/libvirt_public.syms: export symbols
10644 * docs/apibuild.py: Extend 'unsigned long' parameter exception to this
10645 * API
10646
10647
10648 2011- 7- 21 Matthias Bolte <[email protected]>
10649
10650 python: Fix makefile rule for code generation
10651 Commit 8665f85523f0451c changed generated.stamp to $(GENERATE).stamp,
10652 but missed one instance in the CLEANFILES list. This can break the
10653 build in case the generated code is deleted but the .stamp file stays
10654 around and therefore the code isn't regenerated.
10655
10656
10657 2011- 7- 19 Daniel P. Berrange <[email protected]>
10658
10659 Quieten build & ensure API build scripts exit with non-zero status
10660 The current API build scripts will continue and exit with a zero
10661 status even if they find problems. This has been the cause of many
10662 build problems, or hidden build errors, in the past. Change the
10663 scripts so they always exit with a non-zero status for any problems
10664 they do not understand. Also turn off all debug output by default
10665 so they respect $(AM_V_GEN)
10666
10667 * docs/Makefile.am: Use $(AM_V_GEN) for API/HTML scripts
10668 * docs/apibuild.py, python/generator.py: Exit with non-zero status
10669 if problems are found. Also be silent, not outputting any debug
10670 messages.
10671 * src/Makefile.am: Use $(AM_V_GEN) for ESX generator
10672 * python/Makefile.am: Tweak rule
10673
10674
10675 2011- 7- 13 Eric Blake <[email protected]>
10676
10677 python: prefer unsigned flags
10678 * python/libvirt-override.c (libvirt_virConnectOpenAuth)
10679 (libvirt_virDomainSnapshotListNames)
10680 (libvirt_virDomainRevertToSnapshot): Change flags type.
10681
10682
10683 2011- 7- 7 Matthias Bolte <[email protected]>
10684
10685 python: Fix bogus label placement
10686
10687
10688 2011- 7- 1 Eric Blake <[email protected]>
10689
10690 build: consistently use CFLAGS
10691 According to the automake manual, CPPFLAGS (aka INCLUDES, as spelled
10692 in automake 1.9.6) should only include -I, -D, and -U directives; more
10693 generic directives like -Wall belong in CFLAGS since they affect more
10694 phases of the build process. Therefore, we should be sticking CFLAGS
10695 additions into a CFLAGS container, not a CPPFLAGS container.
10696
10697 * src/Makefile.am (libvirt_driver_vmware_la_CFLAGS): Use AM_CFLAGS.
10698 (INCLUDES): Move CFLAGS items...
10699 (AM_CFLAGS): ...to their proper location.
10700 * python/Makefile.am (INCLUDES, AM_CFLAGS): Likewise.
10701 * tests/Makefile.am (INCLUDES, AM_CFLAGS): Likewise.
10702 (commandtest_CFLAGS, commandhelper_CFLAGS)
10703 (virnetmessagetest_CFLAGS, virnetsockettest_CFLAGS): Use AM_CFLAGS.
10704
10705
10706 2011- 6- 24 Matthias Bolte <[email protected]>
10707
10708 python: Don't declare Py_ssize_t for Python 2.6
10709 Commit cd48c3f4e95597 added a Py_ssize_t typedef for Python < 2.7.
10710 But Py_ssize_t was added in Python 2.5. This makes the build fail
10711 for Python 2.6.
10712
10713 Adjust the check to match Python < 2.5 to fix this.
10714
10715
10716 2011- 6- 24 Eric Blake <[email protected]>
10717
10718 Revert "Add new API virDomainBlockPull* to headers"
10719 This reverts commit 7d56a16d036d9aa7292e10e884c129742036f8a7.
10720
10721 Conflicts:
10722
10723 python/generator.py
10724 src/libvirt_public.syms
10725
10726
10727 2011- 6- 24 Eric Blake <[email protected]>
10728
10729 Revert "Enable virDomainBlockPull in the python API."
10730 This reverts commit d74b86f5d6ecae3d18a391f90a918fcac75914db.
10731
10732 Conflicts:
10733
10734 python/generator.py
10735
10736
10737 2011- 6- 24 Eric Blake <[email protected]>
10738
10739 Revert "Asynchronous event for BlockPull completion"
10740 This reverts commit 12cd77a0c58a80179182f7d09e8e73f9f66b4677.
10741
10742 Conflicts:
10743
10744 python/libvirt-override-virConnect.py
10745 python/libvirt-override.c
10746 src/remote/remote_protocol.x
10747
10748
10749 2011- 6- 24 Eric Blake <[email protected]>
10750
10751 build: avoid python 2.4 build failure
10752 I'm not sure when Py_ssize_t was introduced; but Fedora 14 Python 2.7
10753 has it, while RHEL 5 Python 2.4 lacks it. It should be easy enough
10754 to adjust if someone runs into problems.
10755
10756 * python/typewrappers.h (Py_ssize_t): Define for older python.
10757
10758
10759 2011- 6- 24 Eric Blake <[email protected]>
10760
10761 build: avoid python 2.4 build failure
10762 On RHEL 5, I got:
10763
10764 /usr/bin/python ./generator.py /usr/bin/python
10765 File "./generator.py", line 427
10766 "virStreamFree", # Needed in custom virStream __del__, but free shouldn't
10767 ^
10768 SyntaxError: invalid syntax
10769
10770 * python/generator.py (function_skip_python_impl): Use same syntax
10771 as other skip lists.
10772
10773
10774 2011- 6- 23 Cole Robinson <[email protected]>
10775
10776 python: Generate virStreamFree but don't expose in bindings
10777 Turns out I was right in removing this the first time :) This is
10778 needed in our custom __del__ function, but the C code wasn't
10779 being generated. Add new infrastructure to do what we want
10780
10781
10782 2011- 6- 21 Cole Robinson <[email protected]>
10783
10784 python: Mark event callback wrappers as private
10785 These functions aren't intended to be called directly by users, so mark
10786 them as private.
10787
10788 While we're at it, remove unneeded exception handling, and break some
10789 long lines.
10790
10791
10792 2011- 6- 21 Cole Robinson <[email protected]>
10793
10794 python: events: Fix C->Python handle callback prototype
10795 If registering our own event loop implementation written in python,
10796 any handles or timeouts callbacks registered by libvirt C code must
10797 be wrapped in a python function. There is some argument trickery that
10798 makes this all work, by wrapping the user passed opaque value in
10799 a tuple, along with the callback function.
10800
10801 Problem is, the current setup requires the user's event loop to know
10802 about this trickery, rather than just treating the opaque value
10803 as truly opaque.
10804
10805 Fix this in a backwards compatible manner, and adjust the example
10806 python event loop to do things the proper way.
10807
10808
10809 2011- 6- 21 Cole Robinson <[email protected]>
10810
10811 python: Add bindings for virEvent*Handle/Timeout
10812
10813
10814 2011- 6- 21 Cole Robinson <[email protected]>
10815
10816 Promote virEvent*Handle/Timeout to public API
10817 Since we virEventRegisterDefaultImpl is now a public API, callers need
10818 a way to invoke the default registered Handle and Timeout functions. We
10819 already have general functions for these internally, so promote
10820 them to the public API.
10821
10822 v2:
10823 Actually add APIs to libvirt.h
10824
10825
10826 2011- 6- 21 Cole Robinson <[email protected]>
10827
10828 python: Implement virStreamSend/RecvAll helpers
10829 Pure python implementation. The handler callbacks have been altered
10830 a bit compared to the C API: RecvAll doesn't pass length of the data read
10831 since that can be trivially obtained from python string objects, and SendAll
10832 requires the handler to return the string data to send rather than
10833 store the data in a string pointer.
10834
10835
10836 2011- 6- 21 Cole Robinson <[email protected]>
10837
10838 python: Implement virStreamSend/Recv
10839 The return values for the python version are different that the C version
10840 of virStreamSend: on success we return a string, an error raises an exception,
10841 and if the stream would block we return int(-2). We need to do this
10842 since strings aren't passed by reference in python.
10843
10844
10845 2011- 6- 20 Cole Robinson <[email protected]>
10846
10847 python: Implement bindings for virStreamEventAddCallback
10848 v2:
10849 Don't generate virStreamFree
10850
10851
10852 2011- 6- 20 Cole Robinson <[email protected]>
10853
10854 python: generator: Don't print warning if nothing to warn about
10855
10856
10857 2011- 6- 20 Cole Robinson <[email protected]>
10858
10859 python: libvirt-override: use simpler debug
10860 In a couple instances we have to mark a debug variable as ATTRIBUTE_UNUSED
10861 to avoid warnings.
10862
10863 v2:
10864 Use #if 0 to comment out debug define
10865
10866
10867 2011- 6- 16 Jiri Denemark <[email protected]>
10868
10869 Introduce virDomainGetControlInfo API
10870 The API can be used to query current state of an interface to VMM used
10871 to control a domain. In QEMU world this translates into monitor
10872 connection.
10873
10874
10875 2011- 6- 15 Adam Litke <[email protected]>
10876
10877 Asynchronous event for BlockPull completion
10878 When an operation started by virDomainBlockPullAll completes (either with
10879 success or with failure), raise an event to indicate the final status. This
10880 allows an API user to avoid polling on virDomainBlockPullInfo if they would
10881 prefer to use the event mechanism.
10882
10883 * daemon/remote.c: Dispatch events to client
10884 * include/libvirt/libvirt.h.in: Define event ID and callback signature
10885 * src/conf/domain_event.c, src/conf/domain_event.h,
10886 src/libvirt_private.syms: Extend API to handle the new event
10887 * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
10888 for block_stream completion and emit a libvirt block pull event
10889 * src/remote/remote_driver.c: Receive and dispatch events to application
10890 * src/remote/remote_protocol.x: Wire protocol definition for the event
10891 * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
10892 src/qemu/qemu_monitor_json.c: Watch for BLOCK_STREAM_COMPLETED event
10893 from QEMU monitor
10894
10895
10896
10897 2011- 6- 15 Adam Litke <[email protected]>
10898
10899 Enable virDomainBlockPull in the python API.
10900 virDomainBlockPullAll and virDomainBlockPullAbort are handled automatically.
10901 virDomainBlockPull and virDomainBlockPullInfo require manual overrides since
10902 they return a custom type.
10903
10904 * python/generator.py: reenable bindings for this entry point
10905 * python/libvirt-override-api.xml python/libvirt-override.c:
10906 manual overrides
10907
10908 Acked-by: Daniel P. Berrange <[email protected]>
10909
10910
10911 2011- 6- 15 Adam Litke <[email protected]>
10912
10913 Add new API virDomainBlockPull* to headers
10914 Set up the types for the block pull functions and insert them into the
10915 virDriver structure definition. Symbols are exported in this patch to prevent
10916 documentation compile failures.
10917
10918 * include/libvirt/libvirt.h.in: new API
10919 * src/driver.h: add the new entry to the driver structure
10920 * python/generator.py: fix compiler errors, the actual python bindings are
10921 implemented later
10922 * src/libvirt_public.syms: export symbols
10923
10924
10925
10926 2011- 6- 14 Minoru Usui <[email protected]>
10927
10928 virNodeGetMemoryStats: Expose new API
10929
10930
10931 2011- 6- 14 Minoru Usui <[email protected]>
10932
10933 virNodeGetCPUStats: Expose new API
10934
10935
10936 2011- 6- 14 Lai Jiangshan <[email protected]>
10937
10938 send-key: Defining the public API
10939 Add public virDomainSendKey() and enum libvirt_keycode_set
10940 for the @codeset.
10941
10942 Python version of virDomainSendKey() has not been implemented yet,
10943 it will be done soon.
10944
10945
10946
10947 2011- 6- 13 Hu Tao <[email protected]>
10948
10949 Deprecate several CURRENT/LIVE/CONFIG enums
10950 This patch deprecates following enums:
10951
10952 VIR_DOMAIN_MEM_CURRENT
10953 VIR_DOMAIN_MEM_LIVE
10954 VIR_DOMAIN_MEM_CONFIG
10955
10956 VIR_DOMAIN_VCPU_LIVE
10957 VIR_DOMAIN_VCPU_CONFIG
10958
10959 VIR_DOMAIN_DEVICE_MODIFY_CURRENT
10960 VIR_DOMAIN_DEVICE_MODIFY_LIVE
10961 VIR_DOMAIN_DEVICE_MODIFY_CONFIG
10962
10963 And modify internal codes to use virDomainModificationImpact.
10964
10965
10966 2011- 6- 8 Eric Blake <[email protected]>
10967
10968 python: avoid unlikely sign extension bug
10969 Detected by Coverity. cpumap was allocated with a value of
10970 (unsigned short)*(int), which is an int computation, and then
10971 promotes to size_t. On a 64-bit platform, this fails if bit
10972 32 of the product is set (because of sign extension giving
10973 a HUGE value to malloc), even though a naive programmer would
10974 assume that since the first value is unsigned, the product
10975 is also unsigned and at most 4GB would be allocated.
10976
10977 Won't bite in practice (the product should never be that large),
10978 but worth using the right types to begin with, so that we are
10979 now computing (unsigned short)*(size_t).
10980
10981 * python/libvirt-override.c (libvirt_virDomainGetVcpus): Use
10982 correct type.
10983
10984
10985 2011- 5- 29 Daniel P. Berrange <[email protected]>
10986
10987 Introduce a new event emitted when a virtualization failure occurs
10988 This introduces a new domain
10989
10990 VIR_DOMAIN_EVENT_ID_CONTROL_ERROR
10991
10992 Which uses the existing generic callback
10993
10994 typedef void (*virConnectDomainEventGenericCallback)(virConnectPtr conn,
10995 virDomainPtr dom,
10996 void *opaque);
10997
10998 This event is intended to be emitted when there is a failure in
10999 some part of the domain virtualization system. Whether the domain
11000 continues to run/exist after the failure is an implementation
11001 detail specific to the hypervisor.
11002
11003 The idea is that with some types of failure, hypervisors may
11004 prefer to leave the domain running in a "degraded" mode of
11005 operation. For example, if something goes wrong with the QEMU
11006 monitor, it is possible to leave the guest OS running quite
11007 happily. The mgmt app will simply loose the ability todo various
11008 tasks. The mgmt app can then choose how/when to deal with the
11009 failure that occured.
11010 * daemon/remote.c: Dispatch of new event
11011 * examples/domain-events/events-c/event-test.c: Demo catch
11012 of event
11013 * include/libvirt/libvirt.h.in: Define event ID and callback
11014 * src/conf/domain_event.c, src/conf/domain_event.h: Internal
11015 event handling
11016 * src/remote/remote_driver.c: Receipt of new event from daemon
11017 * src/remote/remote_protocol.x: Wire protocol for new event
11018 * src/remote_protocol-structs: add new event for checks
11019
11020
11021 2011- 5- 29 Eric Blake <[email protected]>
11022
11023 sched: introduce virDomainGetSchedulerParametersFlags
11024 If we can choose live or config when setting, then we need to
11025 be able to choose which one we are querying.
11026
11027 Also, make the documentation clear that set must use a non-empty
11028 subset (some of the hypervisors fail if params is NULL).
11029
11030 * include/libvirt/libvirt.h.in
11031 (virDomainGetSchedulerParametersFlags): New prototype.
11032 * src/libvirt.c (virDomainGetSchedulerParametersFlags): Implement
11033 it.
11034 * src/libvirt_public.syms: Export it.
11035 * python/generator.py (skip_impl): Don't auto-generate.
11036 * src/driver.h (virDrvDomainGetSchedulerParametersFlags): New
11037 callback.
11038
11039
11040 2011- 5- 29 Eric Blake <[email protected]>
11041
11042 libvirt.h: avoid regression, and document preferred name
11043 Commit 824dcaff was a regression (thankfully unreleased) for any
11044 client code that used 'struct _virSchedParameter' directly rather
11045 than the preferred virSchedParameter typedef. Adding a #define
11046 avoids even that API change, while rearranging the file makes it
11047 clear what the old vs. new API is.
11048
11049 * include/libvirt/libvirt.h.in: Rearrange older names to the
11050 bottom and improve documentation on preferred names.
11051 (virDomainGetSchedulerParameters, virDomainSetSchedulerParameters)
11052 (virDomainSetSchedulerParametersFlags)
11053 (virDomainSetBlkioParameters, virDomainGetBlkioParameters)
11054 (virDomainSetMemoryParameters, virDomainGetMemoryParameters):
11055 Use newer type names.
11056 * python/libvirt-override.c: Adjust code generation to cope.
11057 Suggested by Daniel P. Berrange.
11058
11059
11060 2011- 5- 24 Michal Privoznik <[email protected]>
11061
11062 python: Don't free must-not-free variables
11063 py_str() function call PyString_AsString(). As written in documentation,
11064 the caller must not free the returned value, because it points to some
11065 internal structures.
11066
11067
11068 2011- 5- 23 Michal Privoznik <[email protected]>
11069
11070 python: Fix typo in bindings
11071 This typo caused a bug in which we wanted to free() invalid pointer.
11072
11073
11074 2011- 5- 18 Eric Blake <[email protected]>
11075
11076 libvirt.h: consolidate typed parameter handling
11077 The new type is identical to the three old types that it replaces,
11078 and by creating a common type, this allows future patches to share
11079 common code that manipulates typed parameters.
11080
11081 This change is backwards-compatible in API (recompilation works
11082 without any edits) and ABI (an older client that has not been
11083 recompiled uses the same layout) for code using only public
11084 names; only code using private names (those beginning with _)
11085 will have to adapt.
11086
11087 * include/libvirt/libvirt.h.in (virTypedParameterType)
11088 (VIR_TYPED_PARAM_FIELD_LENGTH, _virTypedParameter): New enum,
11089 macro, and type.
11090 (virSchedParameter, virBlkioParameter, virMemoryParameter):
11091 Rewrite in terms of a common type, while keeping all old public
11092 names for backwards compatibility.
11093 (struct _virSchedParameter, struct _virBlkioParameter)
11094 (struct _virMemoryParameter): Delete - these are private names.
11095 * python/generator.py (enum): Cope with the refactoring.
11096
11097
11098 2011- 5- 17 Hu Tao <[email protected]>
11099
11100 introduce virDomainSetSchedulerParametersFlags
11101 This new function allows aditional flags to be passed into from
11102 the virsh command line.
11103
11104
11105 2011- 5- 16 Jiri Denemark <[email protected]>
11106
11107 virDomainGetState public API
11108 This API is supposed to replace virDomainGetInfo when the only purpose
11109 of calling it is getting current domain status.
11110
11111
11112 2011- 3- 14 Jiri Denemark <[email protected]>
11113
11114 python: Use hardcoded python path in libvirt.py
11115 This partially reverts (and fixes that part in a different way) commit
11116 e4384459c93e3e786aa483c7f077d1d22148f689, which replaced
11117 ``/usr/bin/python'' with ``/usr/bin/env python'' in all examples or
11118 scripts used during build to generate other files.
11119
11120 However, python bindings module is compiled and linked against a
11121 specific python discovered or explicitly provided in configure phase.
11122 Thus libvirt.py, which is generated and installed into the system,
11123 should use the same python binary for which the module has been built.
11124
11125 The hunk in Makefile.am replaces $(srcdir) with $(PYTHON), which might
11126 seem wrong but it is not. generator.py didn't use any of its command
11127 line arguments so passing $(srcdir) to it was redundant.
11128
11129
11130 2011- 3- 11 Gui Jianfeng <[email protected]>
11131
11132 libvirt: add virDomain{Get,Set}BlkioParameters
11133 Add virDomainSetBlkioParameters virDomainGetBlkioParameters
11134
11135
11136
11137 2011- 2- 21 Eric Blake <[email protected]>
11138
11139 maint: fix grammar in error message
11140 * python/tests/create.py: Use correct wording.
11141
11142
11143 2011- 2- 18 Jiri Denemark <[email protected]>
11144
11145 maint: Expand tabs in python code
11146 Also cfg.mk is tweaked to force this for all future changes to *.py
11147 files.
11148
11149
11150 2011- 1- 10 Cole Robinson <[email protected]>
11151
11152 python: Use PyCapsule API if available
11153 On Fedore 14, virt-manager spews a bunch of warnings to the console:
11154
11155 /usr/lib64/python2.7/site-packages/libvirt.py:1781: PendingDeprecationWarning: The CObject type is marked Pending Deprecation in Python 2.7. Please use capsule objects instead.
11156
11157 Have libvirt use the capsule API if available. I've verified this compiles
11158 fine on older python (2.6 in RHEL6 which doesn't have capsules), and
11159 virt-manager seems to function fine.
11160
11161
11162 2010- 11- 14 Matthias Bolte <[email protected]>
11163
11164 Use python discovered through env instead of hardcoding a path
11165 This is more flexible regarding the location of the python binary
11166 but doesn't allow to pass the -u flag. The -i flag can be passed
11167 from inside the script using the PYTHONINSPECT env variable.
11168
11169 This fixes a problem with the esx_vi_generator.py on FreeBSD.
11170
11171
11172 2010- 10- 12 Matthias Bolte <[email protected]>
11173
11174 Fix several minor problems introduced by the memtune series
11175 Add proper documentation to the new VIR_DOMAIN_MEMORY_* macros in
11176 libvirt.h.in to placate apibuild.py.
11177
11178 Mark args as unused in for libvirt_virDomain{Get,Set}MemoryParameters
11179 in the Python bindings and add both to the libvirtMethods array.
11180
11181 Update remote_protocol-structs to placate make syntax-check.
11182
11183 Undo unintended modifications in vboxDomainGetInfo.
11184
11185 Update the function table of the VirtualBox and XenAPI drivers.
11186
11187
11188 2010- 10- 12 Nikunj A. Dadhania <[email protected]>
11189
11190 Adding structure and defines for virDomainSet/GetMemoryParameters
11191 This patch adds a structure virMemoryParameter, it contains the name of
11192 the
11193 parameter and the type of the parameter along with a union.
11194
11195 dv:
11196 + rename enums to VIR_DOMAIN_MEMORY_PARAM_*
11197 + remove some extraneous tabs
11198
11199 v4:
11200 + Add unsigned int flags to the public api for future extensions
11201
11202 v3:
11203 + Protoype for virDomainGetMemoryParameters and dummy python binding.
11204
11205 v2:
11206 + Includes dummy python bindings for the library to build cleanly.
11207 + Define string constants like "hard_limit", etc.
11208 + re-order this patch.
11209
11210
11211 2010- 9- 27 Dan Kenigsberg <[email protected]>
11212
11213 python: drop unnecessary conn assignment
11214 Since 554d82a200289938d5639a782a9f12e3e2e968f0, conn is unused. Let's
11215 drop it - but keep the signature of the constructor for backward
11216 compatibility.
11217
11218
11219 2010- 7- 23 Philipp Hahn <[email protected]>
11220
11221 Fix SEGV on exit after domainEventDeregister()
11222 When the last callback is removed using domainEventDeregister(), the
11223 events dispatcher is deregistered from the C-library, but
11224 domainEventsCallbacks is still an empty list.
11225 On shutdown __del__() deregisters the dispatacher again, which SEGVs
11226
11227 # You need the event-loop implementation from the Python examples;
11228 # give the file a name which is importable by Python.
11229 ln examples/domain-events/events-python/event-test.py eloop.py
11230 python -c 'from eloop import *
11231 import sys
11232
11233 def dump(*args): print " ".join(map(str, args))
11234
11235 virEventLoopPureStart()
11236 c = libvirt.open("xen:///")
11237 c.domainEventRegister(dump, None)
11238 c.domainEventDeregister(dump)
11239 sys.exit(0)'
11240
11241 domainEventDeregister() needs to delete domainEventCallbacks so subsequent
11242 calls to __del__() and domainEventRegister() choose the right code paths.
11243 Setting it to None is not enough, since calling domainEventRegiser() again
11244 would trigger an TypeError.
11245
11246
11247
11248 2010- 7- 14 Cole Robinson <[email protected]>
11249
11250 python: Fix IOErrorReasonCallback bindings
11251 A copy and paste error was causing us to dispatch the incorrect
11252 routine. Spotted by Dan Kenigsberg.
11253
11254
11255 2010- 7- 12 Daniel P. Berrange <[email protected]>
11256
11257 Ensure we return the callback ID in python events binding
11258 A missing return statement in the python binding meant that
11259 the callers could not get the callback ID, and thus not be
11260 able to unregister event callbacks
11261
11262 * python/libvirt-override-virConnect.py: Add missing return
11263 statement
11264
11265
11266 2010- 6- 25 Daniel P. Berrange <[email protected]>
11267
11268 Add missing parameter in python Disk IO error callback
11269 The IO error callback was forgetting to pass the action
11270 parameter, causing a stack trace when IO errors arrive
11271
11272 * python/libvirt-override-virConnect.py: Add missing action
11273 parameter in IO error callback
11274
11275
11276 2010- 6- 18 Philipp Hahn <[email protected]>
11277
11278 Fix description of virStorageVolGetInfo()
11279 Probably a copy-paste-bug in python/libvirt-override-api.xml:
11280 virStorageVolGetInfo() extracts information about a "storage volume",
11281 not the "storage pool" as virStoragePoolGetInfo() does.
11282
11283
11284
11285 2010- 6- 15 Eric Blake <[email protected]>
11286
11287 maint: simplify some ignore files
11288 * .hgignore: Delete, no longer used.
11289 * examples/python/.gitignore: Delete, covered globally.
11290 * include/.gitignore: Likewise.
11291 * python/tests/.gitignore: Likewise.
11292 * docs/schemas/.gitignore: Likewise.
11293 * tests/xml2sexprdata/.gitignore: Likewise.
11294 * tests/sexpr2xmldata/.gitignore: Likewise.
11295 * tests/confdata/.gitignore: Likewise.
11296 * tests/xencapsdata/.gitignore: Likewise.
11297 * tests/xmconfigdata/.gitignore: Likewise.
11298 * tests/xml2sexprdata/.gitignore: Likewise.
11299
11300
11301 2010- 5- 20 Chris Lalancette <[email protected]>
11302
11303 Fix up the python bindings for snapshotting.
11304 This involved a few fixes. To start with,
11305 an virDomainSnapshot object is really tied to a
11306 domain, not a connection, so we have to generate
11307 a slightly different object so that we can get
11308 at self._dom for the object.
11309
11310 Next, we had to "dummy" up an override piece of
11311 XML with a bogus argument that the function doesn't
11312 actually take. That's so that the generator places
11313 virDomainRevertToSnapshot underneath the correct
11314 class (namely, the virDomain class).
11315
11316 Finally, we had to hand-implement the
11317 virDomainRevertToSnapshot implementation, ignoring the
11318 bogus pointer we are being passed.
11319
11320 With all of this in place, I was able to successfully
11321 take a snapshot and revert to it using only the
11322 Python bindings.
11323
11324
11325
11326 2010- 5- 18 Jim Meyering <[email protected]>
11327
11328 python: don't ignore virInitialize failure in module initialization
11329 * python/libvirt-override.c (initlibvirtmod): Upon virInitialize
11330 failure, skip the Py_InitModule call.
11331
11332
11333 2010- 4- 30 Daniel P. Berrange <[email protected]>
11334
11335 Add support for another explicit IO error event
11336 This introduces a new event type
11337
11338 VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
11339
11340 This event is the same as the previous VIR_DOMAIN_ID_IO_ERROR
11341 event, but also includes a string describing the cause of
11342 the event.
11343
11344 Thus there is a new callback definition for this event type
11345
11346 typedef void (*virConnectDomainEventIOErrorReasonCallback)(virConnectPtr conn,
11347 virDomainPtr dom,
11348 const char *srcPath,
11349 const char *devAlias,
11350 int action,
11351 const char *reason,
11352 void *opaque);
11353
11354 This is currently wired up to the QEMU block IO error events
11355
11356 * daemon/remote.c: Dispatch IO error events to client
11357 * examples/domain-events/events-c/event-test.c: Watch for
11358 IO error events
11359 * include/libvirt/libvirt.h.in: Define new IO error event ID
11360 and callback signature
11361 * src/conf/domain_event.c, src/conf/domain_event.h,
11362 src/libvirt_private.syms: Extend API to handle IO error events
11363 * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
11364 for block IO errors and emit a libvirt IO error event
11365 * src/remote/remote_driver.c: Receive and dispatch IO error
11366 events to application
11367 * src/remote/remote_protocol.x: Wire protocol definition for
11368 IO error events
11369 * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
11370 src/qemu/qemu_monitor_json.c: Watch for BLOCK_IO_ERROR event
11371 from QEMU monitor
11372
11373
11374 2010- 4- 29 Daniel P. Berrange <[email protected]>
11375
11376 Implement python binding for virDomainGetBlockInfo
11377 This binds the virDomainGetBlockInfo API to python's blockInfo
11378 method on the domain object
11379
11380 >>> c = libvirt.openReadOnly('qemu:///session')
11381 >>> d = c.lookupByName('demo')
11382 >>> f = d.blockInfo("/dev/loop0", 0)
11383 >>> print f
11384 [1048576000L, 104857600L, 104857600L]
11385
11386 * python/libvirt-override-api.xml: Define override signature
11387 * python/generator.py: Skip C impl generator for virDomainGetBlockInfo
11388 * python/libvirt-override.c: Manual impl of virDomainGetBlockInfo
11389
11390
11391 2010- 4- 29 Stefan Berger <[email protected]>
11392
11393 nwfilter: python bindings for nwfilter
11394 I have primarily followed the pattern of the 'secret' driver to provide
11395 support for the missing python bindings for the network filter API.
11396
11397
11398 2010- 4- 20 Philipp Hahn <[email protected]>
11399
11400 Don't ship generated python/libvirt.? files.
11401 libvirt.c and libvirt.h are auto-generated files. Mentioning their names
11402 in *_SOURCES includes them in the distribution. During an out-of-tree
11403 build these shipped files are included instead of the auto-generated
11404 version, potentially breaking the build (as it happend in 0.8.0, because
11405 the shipped libvirt.h was missing the declaration for
11406 'libvirt_virDomainUpdateDeviceFlags')
11407
11408 Use the nodist_*_SOURCES automake variable instead.
11409
11410
11411
11412 2010- 4- 20 Daniel P. Berrange <[email protected]>
11413
11414 Fixup python binding for virDomainSnapshot APIs
11415 The generator code was totally wrong for the virDomainSnapshot
11416 APIs, not generating the wrapper class, and giving methods the
11417 wrong names
11418
11419 * generator.py: Set metadata for virDomainSnapshot type & APIs
11420 * libvirt-override-api.xml, libvirt-override.c: Hand-code the
11421 virDomainSnapshotListNames glue layer
11422
11423
11424 2010- 4- 9 Daniel P. Berrange <[email protected]>
11425
11426 More event callback fixes
11427 In a couple of cases typos meant we were firing the wrong type
11428 of event. In the python code my previous commit accidentally
11429 missed some chunks of the code.
11430
11431 * python/libvirt-override-virConnect.py: Add missing python glue
11432 accidentally left out of previous commit
11433 * src/conf/domain_event.c, src/qemu/qemu_monitor_json.c: Fix typos
11434 in event name / method name to invoke
11435
11436
11437 2010- 4- 8 Daniel P. Berrange <[email protected]>
11438
11439 Fix up python bindings for new event callbacks
11440 The generator was disabled for the new event callbacks, since they
11441 need to be hand written. This patch adds the C and python glue to
11442 expose the new APIs in the python binding. The python example
11443 program is extended to demonstrate of the code
11444
11445 * python/libvirt-override.c: Registration and dispatch of events
11446 at the C layer
11447 * python/libvirt-override-virConnect.py: Python glue for events
11448 * examples/domain-events/events-python/event-test.py: Demo use
11449 of new event callbacks
11450
11451
11452 2010- 4- 5 Chris Lalancette <[email protected]>
11453
11454 Snapshot API framework.
11455
11456
11457 2010- 3- 26 Stefan Berger <[email protected]>
11458
11459 Core driver implementation with ebtables support
11460 This patch implements the core driver and provides
11461 - management functionality for managing the filter XMLs
11462 - compiling the internal filter representation into ebtables rules
11463 - applying ebtables rules on a network (tap,macvtap) interface
11464 - tearing down ebtables rules that were applied on behalf of an
11465 interface
11466 - updating of filters while VMs are running and causing the firewalls to
11467 be rebuilt
11468 - other bits and pieces
11469
11470
11471
11472 2010- 3- 26 Daniel P. Berrange <[email protected]>
11473
11474 Add domain events for graphics network clients
11475 This introduces a new event type
11476
11477 VIR_DOMAIN_EVENT_ID_GRAPHICS
11478
11479 The same event can be emitted in 3 scenarios
11480
11481 typedef enum {
11482 VIR_DOMAIN_EVENT_GRAPHICS_CONNECT = 0,
11483 VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE,
11484 VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT,
11485 } virDomainEventGraphicsPhase;
11486
11487 Connect/disconnect are triggered at socket accept/close.
11488 The initialize phase is immediately after the protocol
11489 setup and authentication has completed. ie when the
11490 client is authorized and about to start interacting with
11491 the graphical desktop
11492
11493 This event comes with *a lot* of potential information
11494
11495 - IP address, port & address family of client
11496 - IP address, port & address family of server
11497 - Authentication scheme (arbitrary string)
11498 - Authenticated subject identity. A subject may have
11499 multiple identities with some authentication schemes.
11500 For example, vencrypt+sasl results in a x509dname
11501 and saslUsername identities.
11502
11503 This results in a very complicated callback :-(
11504
11505 typedef enum {
11506 VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4,
11507 VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6,
11508 } virDomainEventGraphicsAddressType;
11509
11510 struct _virDomainEventGraphicsAddress {
11511 int family;
11512 const char *node;
11513 const char *service;
11514 };
11515 typedef struct _virDomainEventGraphicsAddress virDomainEventGraphicsAddress;
11516 typedef virDomainEventGraphicsAddress *virDomainEventGraphicsAddressPtr;
11517
11518 struct _virDomainEventGraphicsSubject {
11519 int nidentity;
11520 struct {
11521 const char *type;
11522 const char *name;
11523 } *identities;
11524 };
11525 typedef struct _virDomainEventGraphicsSubject virDomainEventGraphicsSubject;
11526 typedef virDomainEventGraphicsSubject *virDomainEventGraphicsSubjectPtr;
11527
11528 typedef void (*virConnectDomainEventGraphicsCallback)(virConnectPtr conn,
11529 virDomainPtr dom,
11530 int phase,
11531 virDomainEventGraphicsAddressPtr local,
11532 virDomainEventGraphicsAddressPtr remote,
11533 const char *authScheme,
11534 virDomainEventGraphicsSubjectPtr subject,
11535 void *opaque);
11536
11537 The wire protocol is similarly complex
11538
11539 struct remote_domain_event_graphics_address {
11540 int family;
11541 remote_nonnull_string node;
11542 remote_nonnull_string service;
11543 };
11544
11545 const REMOTE_DOMAIN_EVENT_GRAPHICS_IDENTITY_MAX = 20;
11546
11547 struct remote_domain_event_graphics_identity {
11548 remote_nonnull_string type;
11549 remote_nonnull_string name;
11550 };
11551
11552 struct remote_domain_event_graphics_msg {
11553 remote_nonnull_domain dom;
11554 int phase;
11555 remote_domain_event_graphics_address local;
11556 remote_domain_event_graphics_address remote;
11557 remote_nonnull_string authScheme;
11558 remote_domain_event_graphics_identity subject<REMOTE_DOMAIN_EVENT_GRAPHICS_IDENTITY_MAX>;
11559 };
11560
11561 This is currently implemented in QEMU for the VNC graphics
11562 protocol, but designed to be usable with SPICE graphics in
11563 the future too.
11564
11565 * daemon/remote.c: Dispatch graphics events to client
11566 * examples/domain-events/events-c/event-test.c: Watch for
11567 graphics events
11568 * include/libvirt/libvirt.h.in: Define new graphics event ID
11569 and callback signature
11570 * src/conf/domain_event.c, src/conf/domain_event.h,
11571 src/libvirt_private.syms: Extend API to handle graphics events
11572 * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
11573 for VNC events and emit a libvirt graphics event
11574 * src/remote/remote_driver.c: Receive and dispatch graphics
11575 events to application
11576 * src/remote/remote_protocol.x: Wire protocol definition for
11577 graphics events
11578 * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
11579 src/qemu/qemu_monitor_json.c: Watch for VNC_CONNECTED,
11580 VNC_INITIALIZED & VNC_DISCONNETED events from QEMU monitor
11581
11582
11583 2010- 3- 26 Daniel P. Berrange <[email protected]>
11584
11585 Add support for an explicit IO error event
11586 This introduces a new event type
11587
11588 VIR_DOMAIN_EVENT_ID_IO_ERROR
11589
11590 This event includes the action that is about to be taken
11591 as a result of the watchdog triggering
11592
11593 typedef enum {
11594 VIR_DOMAIN_EVENT_IO_ERROR_NONE = 0,
11595 VIR_DOMAIN_EVENT_IO_ERROR_PAUSE,
11596 VIR_DOMAIN_EVENT_IO_ERROR_REPORT,
11597 } virDomainEventIOErrorAction;
11598
11599 In addition it has the source path of the disk that had the
11600 error and its unique device alias. It does not include the
11601 target device name (/dev/sda), since this would preclude
11602 triggering IO errors from other file backed devices (eg
11603 serial ports connected to a file)
11604
11605 Thus there is a new callback definition for this event type
11606
11607 typedef void (*virConnectDomainEventIOErrorCallback)(virConnectPtr conn,
11608 virDomainPtr dom,
11609 const char *srcPath,
11610 const char *devAlias,
11611 int action,
11612 void *opaque);
11613
11614 This is currently wired up to the QEMU block IO error events
11615
11616 * daemon/remote.c: Dispatch IO error events to client
11617 * examples/domain-events/events-c/event-test.c: Watch for
11618 IO error events
11619 * include/libvirt/libvirt.h.in: Define new IO error event ID
11620 and callback signature
11621 * src/conf/domain_event.c, src/conf/domain_event.h,
11622 src/libvirt_private.syms: Extend API to handle IO error events
11623 * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
11624 for block IO errors and emit a libvirt IO error event
11625 * src/remote/remote_driver.c: Receive and dispatch IO error
11626 events to application
11627 * src/remote/remote_protocol.x: Wire protocol definition for
11628 IO error events
11629 * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
11630 src/qemu/qemu_monitor_json.c: Watch for BLOCK_IO_ERROR event
11631 from QEMU monitor
11632
11633
11634 2010- 3- 26 Daniel P. Berrange <[email protected]>
11635
11636 Add support for an explicit watchdog event
11637 This introduces a new event type
11638
11639 VIR_DOMAIN_EVENT_ID_WATCHDOG
11640
11641 This event includes the action that is about to be taken
11642 as a result of the watchdog triggering
11643
11644 typedef enum {
11645 VIR_DOMAIN_EVENT_WATCHDOG_NONE = 0,
11646 VIR_DOMAIN_EVENT_WATCHDOG_PAUSE,
11647 VIR_DOMAIN_EVENT_WATCHDOG_RESET,
11648 VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF,
11649 VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN,
11650 VIR_DOMAIN_EVENT_WATCHDOG_DEBUG,
11651 } virDomainEventWatchdogAction;
11652
11653 Thus there is a new callback definition for this event type
11654
11655 typedef void (*virConnectDomainEventWatchdogCallback)(virConnectPtr conn,
11656 virDomainPtr dom,
11657 int action,
11658 void *opaque);
11659
11660 * daemon/remote.c: Dispatch watchdog events to client
11661 * examples/domain-events/events-c/event-test.c: Watch for
11662 watchdog events
11663 * include/libvirt/libvirt.h.in: Define new watchdg event ID
11664 and callback signature
11665 * src/conf/domain_event.c, src/conf/domain_event.h,
11666 src/libvirt_private.syms: Extend API to handle watchdog events
11667 * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
11668 for watchdogs and emit a libvirt watchdog event
11669 * src/remote/remote_driver.c: Receive and dispatch watchdog
11670 events to application
11671 * src/remote/remote_protocol.x: Wire protocol definition for
11672 watchdog events
11673 * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
11674 src/qemu/qemu_monitor_json.c: Watch for WATCHDOG event
11675 from QEMU monitor
11676
11677
11678 2010- 3- 26 Daniel P. Berrange <[email protected]>
11679
11680 Add support for an explicit RTC change event
11681 This introduces a new event type
11682
11683 VIR_DOMAIN_EVENT_ID_RTC_CHANGE
11684
11685 This event includes the new UTC offset measured in seconds.
11686 Thus there is a new callback definition for this event type
11687
11688 typedef void (*virConnectDomainEventRTCChangeCallback)(virConnectPtr conn,
11689 virDomainPtr dom,
11690 long long utcoffset,
11691 void *opaque);
11692
11693 If the guest XML configuration for the <clock> is set to
11694 offset='variable', then the XML will automatically be
11695 updated with the new UTC offset value. This ensures that
11696 during migration/save/restore the new offset is preserved.
11697
11698 * daemon/remote.c: Dispatch RTC change events to client
11699 * examples/domain-events/events-c/event-test.c: Watch for
11700 RTC change events
11701 * include/libvirt/libvirt.h.in: Define new RTC change event ID
11702 and callback signature
11703 * src/conf/domain_event.c, src/conf/domain_event.h,
11704 src/libvirt_private.syms: Extend API to handle RTC change events
11705 * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
11706 for RTC changes and emit a libvirt RTC change event
11707 * src/remote/remote_driver.c: Receive and dispatch RTC change
11708 events to application
11709 * src/remote/remote_protocol.x: Wire protocol definition for
11710 RTC change events
11711 * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
11712 src/qemu/qemu_monitor_json.c: Watch for RTC_CHANGE event
11713 from QEMU monitor
11714
11715
11716 2010- 3- 26 Daniel P. Berrange <[email protected]>
11717
11718 Introduce a new public API for domain events
11719 The current API for domain events has a number of problems
11720
11721 - Only allows for domain lifecycle change events
11722 - Does not allow the same callback to be registered multiple times
11723 - Does not allow filtering of events to a specific domain
11724
11725 This introduces a new more general purpose domain events API
11726
11727 typedef enum {
11728 VIR_DOMAIN_EVENT_ID_LIFECYCLE = 0, /* virConnectDomainEventCallback */
11729 ...more events later..
11730 }
11731
11732 int virConnectDomainEventRegisterAny(virConnectPtr conn,
11733 virDomainPtr dom, /* Optional, to filter */
11734 int eventID,
11735 virConnectDomainEventGenericCallback cb,
11736 void *opaque,
11737 virFreeCallback freecb);
11738
11739 int virConnectDomainEventDeregisterAny(virConnectPtr conn,
11740 int callbackID);
11741
11742 Since different event types can received different data in the callback,
11743 the API is defined with a generic callback. Specific events will each
11744 have a custom signature for their callback. Thus when registering an
11745 event it is neccessary to cast the callback to the generic signature
11746
11747 eg
11748
11749 int myDomainEventCallback(virConnectPtr conn,
11750 virDomainPtr dom,
11751 int event,
11752 int detail,
11753 void *opaque)
11754 {
11755 ...
11756 }
11757
11758 virConnectDomainEventRegisterAny(conn, NULL,
11759 VIR_DOMAIN_EVENT_ID_LIFECYCLE,
11760 VIR_DOMAIN_EVENT_CALLBACK(myDomainEventCallback)
11761 NULL, NULL);
11762
11763 The VIR_DOMAIN_EVENT_CALLBACK() macro simply does a "bad" cast
11764 to the generic signature
11765
11766 * include/libvirt/libvirt.h.in: Define new APIs for registering
11767 domain events
11768 * src/driver.h: Internal driver entry points for new events APIs
11769 * src/libvirt.c: Wire up public API to driver API for events APIs
11770 * src/libvirt_public.syms: Export new APIs
11771 * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/opennebula/one_driver.c,
11772 src/openvz/openvz_driver.c, src/phyp/phyp_driver.c,
11773 src/qemu/qemu_driver.c, src/remote/remote_driver.c,
11774 src/test/test_driver.c, src/uml/uml_driver.c,
11775 src/vbox/vbox_tmpl.c, src/xen/xen_driver.c,
11776 src/xenapi/xenapi_driver.c: Stub out new API entries
11777
11778
11779 2010- 3- 17 Philip Hahn <[email protected]>
11780
11781 python: Fix networkLookupByUUID
11782 According to:
11783
11784 http://libvirt.org/html/libvirt-libvirt.html#virNetworkLookupByUUID
11785
11786 virNetworkLookupByUUID() expects a virConnectPtr as its first argument,
11787 thus making it a method of the virConnect Python class.
11788
11789 Currently it's a method of libvirt.virNetwork.
11790
11791 @@ -805,13 +805,6 @@ class virNetwork:
11792 if ret == -1: raise libvirtError ('virNetworkGetAutostart() failed', net=self)
11793 return ret
11794
11795 - def networkLookupByUUID(self, uuid):
11796 - """Try to lookup a network on the given hypervisor based on its UUID. """
11797 - ret = libvirtmod.virNetworkLookupByUUID(self._o, uuid)
11798 - if ret is None:raise libvirtError('virNetworkLookupByUUID() failed', net=self)
11799 - __tmp = virNetwork(self, _obj=ret)
11800 - return __tmp
11801 -
11802 class virInterface:
11803 def __init__(self, conn, _obj=None):
11804 self._conn = conn
11805 @@ -1689,6 +1682,13 @@ class virConnect:
11806 __tmp = virDomain(self,_obj=ret)
11807 return __tmp
11808
11809 + def networkLookupByUUID(self, uuid):
11810 + """Try to lookup a network on the given hypervisor based on its UUID. """
11811 + ret = libvirtmod.virNetworkLookupByUUID(self._o, uuid)
11812 + if ret is None:raise libvirtError('virNetworkLookupByUUID() failed', conn=self)
11813 + __tmp = virNetwork(self, _obj=ret)
11814 + return __tmp
11815 +
11816
11817
11818 2010- 3- 9 Eric Blake <[email protected]>
11819
11820 build: consistently indent preprocessor directives
11821 * global: patch created by running:
11822 for f in $(git ls-files '*.[ch]') ; do
11823 cppi $f > $f.t && mv $f.t $f
11824 done
11825
11826
11827 2010- 3- 2 Daniel P. Berrange <[email protected]>
11828
11829 Introduce public API for domain async job handling
11830 Introduce a new public API that provides a way to get progress
11831 info on currently running jobs on a virDomainpPtr. APIs that
11832 are initially within scope of this idea are
11833
11834 virDomainMigrate
11835 virDomainMigrateToURI
11836 virDomainSave
11837 virDomainRestore
11838 virDomainCoreDump
11839
11840 These all take a potentially long time and benefit from monitoring.
11841 The virDomainJobInfo struct allows for various pieces of information
11842 to be reported
11843
11844 - Percentage completion
11845 - Time
11846 - Overall data
11847 - Guest memory data
11848 - Guest disk/file data
11849
11850 * include/libvirt/libvirt.h.in: Add virDomainGetJobInfo
11851 * python/generator.py, python/libvirt-override-api.xml,
11852 python/libvirt-override.c: Override for virDomainGetJobInfo API
11853 * python/typewrappers.c, python/typewrappers.h: Introduce wrapper
11854 for unsigned long long type
11855
11856
11857 2010- 2- 17 Cole Robinson <[email protected]>
11858
11859 python: Actually add virConnectGetVersion to generated bindings
11860 The recent commit to implement a python version of this function
11861 didn't drop an explicit 'ignore' check in the generator, so this
11862 never ended up in the bindings.
11863
11864
11865 2010- 2- 16 Jim Meyering <[email protected]>
11866
11867 libvirt-override.c: avoid a leak upon call with invalid argument
11868 * python/libvirt-override.c (libvirt_virConnectBaselineCPU): Don't leak
11869 the xmlcpus buffer upon encountering a non-string list element.
11870
11871
11872 2010- 2- 12 Jiri Denemark <[email protected]>
11873
11874 virConnectBaselineCPU public API
11875
11876
11877 2010- 1- 22 Taizo ITO <[email protected]>
11878
11879 Add virConnectGetVersion Python API
11880 adds a new python API call for retrieving the running
11881 hypervisor version used by a connection: virConnectGetVersion
11882
11883 * python/generator.py: skip virConnectGetVersion from autogenerated
11884 * python/libvirt-override-api.xml python/libvirt-override.c: define
11885 direct native bindings
11886
11887
11888 2010- 1- 18 Jim Meyering <[email protected]>
11889
11890 gnulib added a new syntax-check test: use $(VAR), not @VAR@
11891 The latter is not officially "wrong", but *is* terribly anachronistic.
11892 I think automake documentation or comments call that syntax obsolescent.
11893 * cfg.mk (_makefile_at_at_check_exceptions): Exempt @SCHEMADIR@
11894 and @SYSCONFDIR@ uses -- there are no Makefile variables for those.
11895 * docs/Makefile.am: Use $(INSTALL), not @INSTALL@.
11896 * examples/dominfo/Makefile.am: Similar.
11897 * examples/domsuspend/Makefile.am: Similar.
11898 * proxy/Makefile.am: Similar.
11899 * python/Makefile.am: Similar.
11900 * python/tests/Makefile.am: Similar.
11901 * src/Makefile.am: Similar.
11902 * tests/Makefile.am: Similar.
11903
11904
11905 2010- 1- 6 Diego Elio Pettenò <[email protected]>
11906
11907 Disable building of static Python module
11908 * python/Makefile.am: python modules are loaded at runtime so the static
11909 version is not needed, avoid building it
11910
11911
11912 2009- 12- 20 Adam Litke <[email protected]>
11913
11914 python: Add python bindings for virDomainMemoryStats
11915 Enable virDomainMemoryStats in the python API. dom.memoryStats() will return a
11916 dictionary containing the supported statistics. A dictionary is required
11917 because the meaining of each quantity cannot be inferred from its index in a
11918 list.
11919
11920 * python/generator.py: reenable bindings for this entry point
11921 * python/libvirt-override-api.xml python/libvirt-override.c: the
11922 generator can't handle this new function, add the new binding,
11923 and the XML description
11924
11925
11926 2009- 12- 20 Adam Litke <[email protected]>
11927
11928 Add new API virDomainMemoryStats to header and drivers
11929 Set up the types for the domainMemoryStats function and insert it into the
11930 virDriver structure definition. Because of static initializers, update
11931 every driver and set the new field to NULL.
11932
11933 * include/libvirt/libvirt.h.in: new API
11934 * src/driver.h src/*/*_driver.c src/vbox/vbox_tmpl.c: add the new
11935 entry to the driver structure
11936 * python/generator.py: fix compiler errors, the actual python binding is
11937 implemented later
11938
11939
11940 2009- 12- 14 Matthias Bolte <[email protected]>
11941
11942 Fix install location for Python bindings
11943 Commit 66137344feb488ea87b0d92f3c03844d9a7a7786 changed the Python detection
11944 mechanism in configure to use AM_PATH_PYTHON. This results in a changed
11945 install location for the Python bindings, at least on Fedora 12 64bit systems.
11946
11947 Before this commit libvirt.py and libvirtmod.so were installed to
11948
11949 /usr/lib64/python2.6/site-packages
11950
11951 After this commit they are installed to
11952
11953 /usr/lib/python2.6/site-packages
11954
11955 Mixed Python packages (containing *.py and *.so files) should be installed to
11956 the pyexecdir directory detected by AM_PATH_PYTHON.
11957
11958 This restores the install location from before the AM_PATH_PYTHON commit.
11959
11960 * configure.in: remove unnecessary pythondir export
11961 * python/Makefile.am: switch from pythondir to pyexecdir
11962
11963
11964 2009- 12- 8 Matthias Bolte <[email protected]>
11965
11966 Use AM_PATH_PYTHON and python-config to detect Python configuration
11967 Using AM_PATH_PYTHON solves the site-packages directory problem. At least
11968 in Ubuntu with Python 2.6 and later site-packages is renamed to dist-packages
11969 and site-packages is not part of sys.path anymore. So installing the libvirt
11970 Python bindings to site-packages renders them unusable, because they can be
11971 imported from there without manually including site-packages into sys.path.
11972
11973 AM_PATH_PYTHON detects the correct site-packages/dist-packages directory.
11974
11975 python-config --includes gives the correct include path for the Python header
11976 files. The old probing code stays there as fallback mechanism.
11977
11978 * configure.in: use AM_PATH_PYTHON and python-config
11979 * python/Makefile.am: remove -I because PYTHON_INCLUDES contains it now
11980
11981
11982 2009- 11- 26 Daniel P. Berrange <[email protected]>
11983
11984 Fix threading problems in python bindings
11985 * libvirt-override.c: Add many missing calls to allow threading
11986 when entering C code, otherwise python blocks & then deadlocks
11987 when we have an async event to dispatch back into python code.
11988 Fix return value check for virDomainPinVcpu binding.
11989
11990
11991 2009- 11- 20 Cole Robinson <[email protected]>
11992
11993 python: Actually implement list*Interfaces bindings
11994 * python/generator.py python/libvirt-override-api.xml
11995 python/libvirt-override.c: implement the bindings for
11996 virConnectListInterfaces() and virConnectListDefinedInterfaces()
11997
11998
11999 2009- 11- 12 Cole Robinson <[email protected]>
12000
12001 Add virConnectGetLibvirtVersion API
12002 There is currently no way to determine the libvirt version of a remote
12003 libvirtd we are connected to. This is a useful piece of data to enable
12004 feature detection.
12005
12006
12007 2009- 11- 3 Dan Kenigsberg <[email protected]>
12008
12009 give up python interpreter lock before calling cb
12010 suggested by danpb on irc, patch by danken fixed for proper C syntax
12011
12012 * python/libvirt-override.c: on event callback release the python
12013 interpreter lock and take it again when coming back so that the
12014 callback can reinvoke libvirt.
12015
12016
12017 2009- 10- 5 Cole Robinson <[email protected]>
12018
12019 python: Add a newline after custom classes
12020 In the generated bindings, custom classes are squashed against the following
12021 class, which hurts readability.
12022
12023
12024 2009- 10- 5 Cole Robinson <[email protected]>
12025
12026 python: Fix generated virInterface method names
12027 A mistake in the generator was causing virInterface methods to be generated
12028 with unpredicatable names ('ceUndefine', instead of just 'undefine'). This
12029 fixes the method names to match existing convention.
12030
12031 Does anyone care if we are breaking API compat? My guess is that no one is
12032 using the python interface bindings yet.
12033
12034
12035
12036 2009- 10- 5 Cole Robinson <[email protected]>
12037
12038 python: Use a pure python implementation of 'vir*GetConnect'
12039 The API docs explictly warn that we shouldn't use the C vir*GetConnect calls
12040 in bindings: doing so can close the internal connection pointer and cause
12041 things to get screwy. Implement these calls in python.
12042
12043
12044
12045 2009- 10- 5 Cole Robinson <[email protected]>
12046
12047 python: Don't generate bindings for vir*Ref
12048 They are only for use in implementing the bindings, so shouldn't be
12049 exposed to regular API users.
12050
12051
12052
12053 2009- 10- 5 Cole Robinson <[email protected]>
12054
12055 python: Don't generate conflicting conn.createXML functions.
12056 A special case in the generator wasn't doing its job, and duplicate
12057 conn.createXML functions were being generated. The bindings diff is:
12058
12059 @@ -1079,14 +1079,6 @@ class virConnect:
12060 return __tmp
12061
12062 def createXML(self, xmlDesc, flags):
12063 - """Create a new device on the VM host machine, for example,
12064 - virtual HBAs created using vport_create. """
12065 - ret = libvirtmod.virNodeDeviceCreateXML(self._o, xmlDesc, flags)
12066 - if ret is None:raise libvirtError('virNodeDeviceCreateXML() failed', conn=self)
12067 - __tmp = virNodeDevice(self, _obj=ret)
12068 - return __tmp
12069 -
12070 - def createXML(self, xmlDesc, flags):
12071 """Launch a new guest domain, based on an XML description
12072 similar to the one returned by virDomainGetXMLDesc() This
12073 function may requires privileged access to the hypervisor.
12074 @@ -1327,6 +1319,14 @@ class virConnect:
12075 __tmp = virNetwork(self, _obj=ret)
12076 return __tmp
12077
12078 + def nodeDeviceCreateXML(self, xmlDesc, flags):
12079 + """Create a new device on the VM host machine, for example,
12080 + virtual HBAs created using vport_create. """
12081 + ret = libvirtmod.virNodeDeviceCreateXML(self._o, xmlDesc, flags)
12082 + if ret is None:raise libvirtError('virNodeDeviceCreateXML() failed', conn=self)
12083 + __tmp = virNodeDevice(self, _obj=ret)
12084 + return __tmp
12085 +
12086 def nodeDeviceLookupByName(self, name):
12087 """Lookup a node device by its name. """
12088 ret = libvirtmod.virNodeDeviceLookupByName(self._o, name)
12089
12090
12091
12092 2009- 10- 5 Cole Robinson <[email protected]>
12093
12094 python: Remove use of xmllib in generator.py
12095 xmllib has been deprecated since python 2.0, and running the generator throws
12096 a warning. Move to using xml.sax
12097
12098
12099
12100 2009- 10- 5 Cole Robinson <[email protected]>
12101
12102 python: Remove FastParser from generator.
12103 FastParser uses sgmlop, a non-standard python module meant as a replacement
12104 for xmllib (which is deprecated since python 2.0). Fedora doesn't even carry
12105 this module, and the generator doesn't have high performance requirements, so
12106 just rip the code out.
12107
12108
12109
12110 2009- 9- 29 Daniel P. Berrange <[email protected]>
12111
12112 Add public API definition for data stream handling
12113 * include/libvirt/libvirt.h.in: Public API contract for
12114 virStreamPtr object
12115 * src/libvirt_public.syms: Export data stream APIs
12116 * src/libvirt_private.syms: Export internal helper APIs
12117 * src/libvirt.c: Data stream API driver dispatch
12118 * src/datatypes.h, src/datatypes.c: Internal helpers for virStreamPtr
12119 object
12120 * src/driver.h: Define internal driver API for streams
12121 * .x-sc_avoid_write: Ignore src/libvirt.c because it trips
12122 up on comments including write()
12123 * python/Makefile.am: Add libvirt-override-virStream.py
12124 * python/generator.py: Add rules for virStreamPtr class
12125 * python/typewrappers.h, python/typewrappers.c: Wrapper
12126 for virStreamPtr
12127 * docs/libvirt-api.xml, docs/libvirt-refs.xml: Regenerate
12128 with new APIs
12129
12130
12131 2009- 9- 28 Daniel P. Berrange <[email protected]>
12132
12133 Fix API doc extractor to stop munging comment formatting
12134 The python method help docs are copied across from the C
12135 funtion comments, but in the process all line breaks and
12136 indentation was being lost. This made the resulting text
12137 and code examples completely unreadable. Both the API
12138 doc extractor and the python generator were destroying
12139 whitespace & this fixes them to preserve it exactly.
12140
12141 * docs/apibuild.py: Preserve all whitespace when extracting
12142 function comments. Print function comment inside a <![CDATA[
12143 section to fully preserve all whitespace. Look for the
12144 word 'returns' to describe return values, instead of 'return'
12145 to avoid getting confused with code examples including the
12146 C 'return' statement.
12147 * python/generator.py: Preserve all whitespace when printing
12148 function help docs
12149 * src/libvirt.c: Change any return parameter indicated by
12150 'return' to be 'returns', to avoid confusing the API extractor
12151 * docs/libvirt-api.xml: Re-build for fixed descriptions
12152
12153
12154 2009- 9- 21 Daniel P. Berrange <[email protected]>
12155
12156 Misc syntax-check fixes
12157
12158
12159 2009- 9- 21 Daniel P. Berrange <[email protected]>
12160
12161 Re-arrange python generator to make it clear what's auto-generated
12162 * README: New file describing what each file is used for
12163 * livvirt-override.c, libvirt-override.py, libvirt-override-api.xml,
12164 libvirt-override-virConnect.py: Manually written code overriding
12165 the generator
12166 * typewrappers.c, typewrappers.h: Data type wrappers
12167 * generator.py: Automatically pre-prend contents of libvirt-override.py
12168 to generated libvirt.py. Output into libvirt.py directly instead of
12169 libvirtclass.py. Don't generate libvirtclass.txt at all. Write C
12170 files into libvirt.c/.h directly
12171 * Makefile.am: Remove rule for creating libvirt.py from libvirt-override.py
12172 and libvirtclass.py, since generator.py does it directly
12173
12174
12175 2009- 9- 14 Daniel P. Berrange <[email protected]>
12176
12177 Add usage type/id as a public API property of virSecret
12178 * include/libvirt/libvirt.h, include/libvirt/libvirt.h.in: Add
12179 virSecretGetUsageType, virSecretGetUsageID and virLookupSecretByUsage
12180 * python/generator.py: Mark virSecretGetUsageType, virSecretGetUsageID
12181 as not throwing exceptions
12182 * qemud/remote.c: Implement dispatch for virLookupSecretByUsage
12183 * qemud/remote_protocol.x: Add usage type & ID as attributes of
12184 remote_nonnull_secret. Add RPC calls for new public APIs
12185 * qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
12186 qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
12187 qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
12188 * src/datatypes.c, src/datatypes.h: Add usageType and usageID as
12189 properties of virSecretPtr
12190 * src/driver.h: Add virLookupSecretByUsage driver entry point
12191 * src/libvirt.c: Implement virSecretGetUsageType, virSecretGetUsageID
12192 and virLookupSecretByUsage
12193 * src/libvirt_public.syms: Export virSecretGetUsageType, virSecretGetUsageID
12194 and virLookupSecretByUsage
12195 * src/remote_internal.c: Implement virLookupSecretByUsage entry
12196 * src/secret_conf.c, src/secret_conf.h: Remove the
12197 virSecretUsageType enum, now in public API. Make volume
12198 path mandatory when parsing XML
12199 * src/secret_driver.c: Enforce usage uniqueness when defining secrets.
12200 Implement virSecretLookupByUsage api method
12201 * src/virsh.c: Include usage for secret-list command
12202
12203
12204 2009- 9- 14 Daniel P. Berrange <[email protected]>
12205
12206 Fix UUID handling in secrets/storage encryption APIs
12207 Convert all the secret/storage encryption APIs / wire format to
12208 handle UUIDs in raw format instead of non-canonical printable
12209 format. Guarentees data format correctness.
12210
12211 * docs/schemas/storageencryption.rng: Make UUID mandatory for a secret
12212 and validate fully
12213 * docs/schemas/secret.rng: Fully validate UUID
12214 * include/libvirt/libvirt.h, include/libvirt/libvirt.h.in, Add
12215 virSecretLookupByUUID and virSecretGetUUID. Make
12216 virSecretGetUUIDString follow normal API design pattern
12217 * python/generator.py: Skip generation of virSecretGetUUID,
12218 virSecretGetUUIDString and virSecretLookupByUUID
12219 * python/libvir.c, python/libvirt-python-api.xml: Manual impl
12220 of virSecretGetUUID,virSecretGetUUIDString and virSecretLookupByUUID
12221 * qemud/remote.c: s/virSecretLookupByUUIDString/virSecretLookupByUUID/
12222 Fix get_nonnull_secret/make_nonnull_secret to use unsigned char
12223 * qemud/remote_protocol.x: Fix remote_nonnull_secret to use a
12224 remote_uuid instead of remote_nonnull_string for UUID field.
12225 Rename REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING to
12226 REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING and make it take an
12227 remote_uuid value
12228 * qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
12229 qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
12230 qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
12231 * src/datatypes.h, src/datatypes.c: Store UUID in raw format instead
12232 of printable. Change virGetSecret to use raw format UUID
12233 * src/driver.h: Rename virDrvSecretLookupByUUIDString to
12234 virDrvSecretLookupByUUID and use raw format UUID
12235 * src/libvirt.c: Add virSecretLookupByUUID and virSecretGetUUID
12236 and re-implement virSecretLookupByUUIDString and
12237 virSecretGetUUIDString in terms of those
12238 * src/libvirt_public.syms: Add virSecretLookupByUUID and
12239 virSecretGetUUID
12240 * src/remote_internal.c: Rename remoteSecretLookupByUUIDString
12241 to remoteSecretLookupByUUID. Fix typo in args for
12242 remoteSecretDefineXML impl. Use raw UUID format for
12243 get_nonnull_secret and make_nonnull_secret
12244 * src/storage_encryption_conf.c, src/storage_encryption_conf.h:
12245 Storage UUID in raw format, and require it to be present in
12246 XML. Use UUID parser to validate.
12247 * secret_conf.h, secret_conf.c: Generate a UUID if none is provided.
12248 Storage UUID in raw format.
12249 * src/secret_driver.c: Adjust to deal with raw UUIDs. Save secrets
12250 in a filed with printable UUID, instead of base64 UUID.
12251 * src/virsh.c: Adjust for changed public API contract of
12252 virSecretGetUUIDString.
12253 * src/storage_Backend.c: DOn't undefine secret we just generated
12254 upon successful volume creation. Fix to handle raw UUIDs. Generate
12255 a non-clashing UUID
12256 * src/qemu_driver.c: Change to use lookupByUUID instead of
12257 lookupByUUIDString
12258
12259
12260 2009- 9- 3 Jim Meyering <[email protected]>
12261
12262 python: let libvirt_virConnectDomainEventCallback indicate success
12263 * python/libvir.c (libvirt_virConnectDomainEventCallback): Return 0
12264 when successful, rather than always returning -1.
12265 clang flagged this function for its dead-store of "ret=0".
12266 Once "ret" was set to 0, it was never used, and
12267 the function would always return -1.
12268
12269
12270 2009- 9- 1 Miloslav Trmač <[email protected]>
12271
12272 Secret manipulation API docs refresh & wire up python generator
12273 Sample session:
12274
12275 >>> import libvirt
12276 >>> c = libvirt.open('qemu:///session')
12277
12278 >>> c.listSecrets()
12279 ['12247729-47d2-a783-88ce-b329d4781cd3', 'reee', 'abc']
12280
12281 >>> s = c.secretDefineXML("<secret ephemeral='no' private='no'>\n<description>Something for use</description>\n<volume>/foo/bar</volume>\n</secret>\n")
12282
12283 >>> s.UUIDString()
12284 '340c2dfb-811b-eda8-da9e-25ccd7bfd650'
12285
12286 >>> s.XMLDesc()
12287 "<secret ephemeral='no' private='no'>\n <uuid>340c2dfb-811b-eda8-da9e-25ccd7bfd650</uuid>\n <description>Something for use</description>\n <volume>/foo/bar</volume>\n</secret>\n"
12288
12289 >>> s.setValue('abc\0xx\xffx')
12290 0
12291
12292 >>> s.value()
12293 'abc\x00xx\xffx'
12294
12295 >>> s.undefine()
12296 0
12297
12298 * python/generator.py: Add rules for virSecret APIs
12299 * python/libvir.c, python/libvirt-python-api.xml: Manual impl of
12300 virSecretSetValue, virSecretGetValue$ and virConnectListSecrets APIs
12301 * python/libvirt_wrap.h, python/types.c: Wrapper for virSecret objects
12302 * docs/libvirt-api.xml, docs/libvirt-refs.xml,
12303 docs/html/libvirt-virterror.html, docs/html/libvirt-libvirt.html,
12304 docs/devhelp/libvirt-virterror.html, docs/devhelp/libvirt-libvirt.html:
12305 Re-generate with 'make api'
12306
12307
12308 2009- 7- 26 Cole Robinson <[email protected]>
12309
12310 python: Raise exceptions if virDomain*Stats fail.
12311 The generator couldn't tell that the stats return values were pointers.
12312 Stick a white list in the function which tries to make this distinction.
12313
12314
12315 2009- 7- 16 Jim Meyering <[email protected]>
12316
12317 remove all trailing blank lines
12318 by running this command:
12319 git ls-files -z | xargs -0 perl -pi -0777 -e 's/\n\n+$/\n/'
12320 This is in preparation for a more strict make syntax-check
12321 rule that will detect trailing blank lines.
12322
12323
12324 2009- 7- 8 Jim Meyering <[email protected]>
12325
12326 remove all .cvsignore files
12327
12328
12329 2009- 7- 6 Dan Kenigsberg <[email protected]>
12330
12331 Fix python examples to use read-write conn
12332 * docs/examples/python/domstart.py python/tests/create.py:
12333 The two example were broken as they needed full-access connection
12334 but only opened read-only connections
12335
12336
12337 2009- 5- 28 Daniel P. Berrange <[email protected]>
12338
12339 Fix python domain events example & binding
12340
12341
12342 2009- 5- 21 Daniel P. Berrange <[email protected]>
12343
12344 Add virInterface APIs to python code generator
12345
12346
12347 2009- 5- 19 Cole Robinson <[email protected]>
12348
12349 Better error reporting if 'import libvirtmod' fails
12350 Don't squash a possibly legitimate libvirtmod error (e.g. some from
12351 clashing libvirt.so versions) with 'Cannot import cygvirtmod'
12352
12353
12354 2009- 4- 1 Daniel P. Berrange <[email protected]>
12355
12356 Fix crash after calling virConnectClose
12357
12358
12359 2009- 4- 1 Daniel P. Berrange <[email protected]>
12360
12361 Fix generation of networkCreateXML and storagePoolCreateXML
12362
12363
12364 2009- 3- 3 Jim Meyering <[email protected]>
12365
12366 update .gitignore and .hgignore files
12367
12368
12369 2009- 3- 3 Daniel P. Berrange <[email protected]>
12370
12371 Internal driver API for sVirt support (James Morris & Dan Walsh)
12372
12373
12374 2009- 3- 2 Daniel P. Berrange <[email protected]>
12375
12376 Ignore some generated autotools files in example app
12377
12378
12379 2009- 2- 26 Daniel Veillard <[email protected]>
12380
12381 * python/Makefile.am: avoid a parallel make issue #472702 provided by Michael Marineau Daniel
12382
12383
12384 2009- 2- 16 Cole Robinson <[email protected]>
12385
12386 Fix building python bindings: Skip bindings for virSaveLastError and virFreeError
12387
12388
12389 2009- 1- 20 Daniel P. Berrange <[email protected]>
12390
12391 Use global thread-local error for all python error reporting
12392
12393
12394 2008- 12- 18 Daniel P. Berrange <[email protected]>
12395
12396 Replace __FUNCTION__ with __func__ for better portability (John Levon)
12397
12398
12399 2008- 12- 18 Daniel P. Berrange <[email protected]>
12400
12401 Fix gcc-ism in python build (John Levon)
12402
12403
12404 2008- 12- 15 Jim Meyering <[email protected]>
12405
12406 syntax-check: enforce the no-cvs-keywords prohibition
12407 * Makefile.maint (sc_prohibit_cvs_keyword): New rule.
12408 Suggested by Daniel Veillard.
12409 The new test exposed two uses of $Date$.
12410 * docs/Goals: Don't use $Date$.
12411 * python/TODO: Likewise.
12412
12413
12414 2008- 11- 25 Daniel P. Berrange <[email protected]>
12415
12416 Support domain lifecycle events for Xen (Ben Guthro & Daniel Berrange)
12417
12418
12419 2008- 11- 24 Daniel P. Berrange <[email protected]>
12420
12421 Fix python bindings events code (David Lively)
12422
12423
12424 2008- 11- 21 Daniel P. Berrange <[email protected]>
12425
12426 Python binding for node device APIs (David Lively)
12427
12428
12429 2008- 11- 19 Daniel P. Berrange <[email protected]>
12430
12431 Add a virFreeCallback to event loop APIs
12432
12433
12434 2008- 11- 19 Daniel P. Berrange <[email protected]>
12435
12436 Change public API for virEventAddHandle to allow multiple registrations per FD
12437
12438
12439 2008- 11- 19 Daniel P. Berrange <[email protected]>
12440
12441 Add a virFreeCallback to virDomainEventRegister (from David Lively)
12442
12443
12444 2008- 11- 17 Daniel P. Berrange <[email protected]>
12445
12446 Add domain events detail information
12447
12448
12449 2008- 11- 17 Daniel P. Berrange <[email protected]>
12450
12451 Fix domain events python thread safety & incorrect enum generation
12452
12453
12454 2008- 10- 31 Daniel Veillard <[email protected]>
12455
12456 * python/virConnect.py: needed for events from the python bindings by Ben Guthro daniel
12457
12458
12459 2008- 10- 31 Daniel Veillard <[email protected]>
12460
12461 * python/Makefile.am python/generator.py python/libvir.c python/libvir.py python/libvirt_wrap.h python/types.c: adds support for events from the python bindings, also improves the generator allowing to embbed per function definition files, patch by Ben Guthro * examples/domain-events/events-python/event-test.py: also adds a programming example Daniel
12462
12463
12464 2008- 10- 23 Daniel Veillard <[email protected]>
12465
12466 Massive patch adding event APIs by Ben Guthro * include/libvirt/libvirt.h include/libvirt/libvirt.h.in src/libvirt.c src/libvirt_sym.version: new libvirt event entry points, big patch provided by Ben Guthro * Makefile.am configure.in src/driver.h src/event.c src/event.h src/internal.h src/libvirt.c src/libvirt_sym.version src/lxc_driver.c src/openvz_driver.c src/qemu_conf.h src/qemu_driver.c src/remote_internal.c src/storage_backend_fs.c src/test.c qemud/event.c qemud/event.h qemud/mdns.c qemud/qemud.c qemud/qemud.h qemud/remote.c qemud/remote_dispatch_localvars.h qemud/remote_dispatch_proc_switch.h qemud/remote_dispatch_prototypes.h qemud/remote_protocol.c qemud/remote_protocol.h qemud/remote_protocol.x proxy/Makefile.am python/generator.py: Not much is left untouched by the patch adding the events support * docs/libvirt-api.xml docs/libvirt-refs.xml docs/html/libvirt-libvirt.html: regenerated the docs * examples/domain-events/events-c/Makefile.am examples/domain-events/events-c/event-test.c: a test example * AUTHORS: added Ben Guthro daniel
12467
12468
12469 2008- 10- 17 Jim Meyering <[email protected]>
12470
12471 generate .gitignore files from .cvsignore ones
12472 * Makefile.maint (sync-vcs-ignore-files): New target.
12473 Prompted by a patch from James Morris.
12474 http://thread.gmane.org/gmane.comp.emulators.libvirt/8619/focus=8773
12475 Add all (now-generated) .gitignore files.
12476 * .gitignore: New file.
12477 * build-aux/.gitignore: New file.
12478 * docs/.gitignore: New file.
12479 * docs/devhelp/.gitignore: New file.
12480 * docs/examples/.gitignore: New file.
12481 * docs/examples/python/.gitignore: New file.
12482 * gnulib/lib/.gitignore: New file.
12483 * gnulib/lib/arpa/.gitignore: New file.
12484 * gnulib/lib/netinet/.gitignore: New file.
12485 * gnulib/lib/sys/.gitignore: New file.
12486 * gnulib/tests/.gitignore: New file.
12487 * include/.gitignore: New file.
12488 * include/libvirt/.gitignore: New file.
12489 * po/.gitignore: New file.
12490 * proxy/.gitignore: New file.
12491 * python/.gitignore: New file.
12492 * python/tests/.gitignore: New file.
12493 * qemud/.gitignore: New file.
12494 * src/.gitignore: New file.
12495 * tests/.gitignore: New file.
12496 * tests/confdata/.gitignore: New file.
12497 * tests/sexpr2xmldata/.gitignore: New file.
12498 * tests/virshdata/.gitignore: New file.
12499 * tests/xencapsdata/.gitignore: New file.
12500 * tests/xmconfigdata/.gitignore: New file.
12501 * tests/xml2sexprdata/.gitignore: New file.
12502
12503
12504 2008- 10- 1 Daniel Veillard <[email protected]>
12505
12506 Xen interface order and fix python parallel build * src/xend_internal.c: fix ordering when parsing multiple Xen interfaces, patch by Jim Fehlig * python/Makefile.am: fix parallel build Daniel
12507
12508
12509 2008- 8- 22 Daniel P. Berrange <[email protected]>
12510
12511 Use libvirt error message for python exceptions
12512
12513
12514 2008- 8- 12 Daniel Veillard <[email protected]>
12515
12516 Fix connection lookup in python storage instances * python/generator.py: patch from Cole Robinson trying to fix problem of connection lookup when creating storage instances Daniel
12517
12518
12519 2008- 7- 25 Daniel Veillard <[email protected]>
12520
12521 Skip python bindings for virDomainBlockPeek and virDomainMemoryPeek * python/generator.py: skip generation for virDomainBlockPeek and virDomainMemoryPeek as they break the build Daniel
12522
12523
12524 2008- 7- 9 Daniel P. Berrange <[email protected]>
12525
12526 Ignore JIT'd python files
12527
12528
12529 2008- 6- 25 Daniel Veillard <[email protected]>
12530
12531 * python/types.c: patch from Ryan Scott to remove misplaced verbosity when compiling in debug mode. Daniel
12532
12533
12534 2008- 6- 11 Daniel Veillard <[email protected]>
12535
12536 * python/libvir.py python/libvirt-python-api.xml: more python cleanups by Cole Robinson Daniel
12537
12538
12539 2008- 6- 10 Daniel Veillard <[email protected]>
12540
12541 * python/generator.py python/libvir.c python/libvirt-python-api.xml: Apply patch from Cole Robinson fixing UUIDString for python Daniel
12542
12543
12544 2008- 5- 29 Daniel P. Berrange <[email protected]>
12545
12546 Fix python code generation for storage APIs
12547
12548
12549 2008- 5- 21 Daniel P. Berrange <[email protected]>
12550
12551 Don't free C object after destroy method in python
12552
12553
12554 2008- 4- 18 Daniel P. Berrange <[email protected]>
12555
12556 Python header workaround
12557
12558
12559 2008- 4- 18 Jim Meyering <[email protected]>
12560
12561 Work around Python.h name-space pollution.
12562 * python/libvir.c (HAVE_PTHREAD_H): #undef.
12563 Without this, we'd get a redefinition warning.
12564
12565
12566 2008- 4- 10 Jim Meyering <[email protected]>
12567
12568 convert TAB-based indentation in C sources to use only spaces
12569 Done using this command (also includes .c.in and .h.in files):
12570 for i in $(g ls-files|grep -E '\.[ch](\.in)?$'|grep -v gnulib); do
12571 expand -i $i > j && mv j $i;done
12572
12573
12574 2008- 4- 10 Jim Meyering <[email protected]>
12575
12576 remove Vim and Emacs variable settings from C source files
12577 Done with these commands:
12578 git grep -l Local.variab|xargs \
12579 perl -0x3b -pi -e 's,\n+/\*\n \* vim:(.|\n)*,\n,'
12580
12581 git grep -l Local.variab|xargs \
12582 perl -0x3b -pi -e 's,\n+/\*\n \* Local variables:\n(.|\n)*,\n,'
12583
12584
12585 2008- 4- 8 Daniel Veillard <[email protected]>
12586
12587 Fix potential infinite loop in python generator * python/generator.py: fix an infinite loop bug Daniel
12588
12589
12590 2008- 3- 14 Richard W.M. Jones <[email protected]>
12591
12592 Fix typo "informations" -> "information" (Atsushi SAKAI and Saori FUKUTA).
12593
12594
12595 2008- 2- 29 Richard W.M. Jones <[email protected]>
12596
12597 Many typos fixed (Atsushi SAKAI).
12598
12599
12600 2008- 2- 20 Daniel P. Berrange <[email protected]>
12601
12602 Added python binding for storage APIs
12603
12604
12605 2008- 2- 7 Daniel Veillard <[email protected]>
12606
12607 Python bindings return values fixes * python/libvir.c: apply patch from Cole Robinson to provide return values for manulally written python bindings. Daniel
12608
12609
12610 2008- 2- 5 Jim Meyering <[email protected]>
12611
12612 Remove all trailing blanks; turn on the rule to detect them.
12613 * Makefile.cfg (local-checks-to-skip): Remove sc_trailing_blank.
12614 * .x-sc_trailing_blank: New file, to exempt the few binary files.
12615
12616
12617 2008- 1- 29 Jim Meyering <[email protected]>
12618
12619 Enable the <config.h>-requiring test; fix violations
12620 Use <config.h>, not "config.h", per autoconf documentation.
12621 * Makefile.cfg (local-checks-to-skip) [sc_require_config_h]: Enable.
12622 * .x-sc_require_config_h: New file, to list exempted files.
12623 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h.
12624
12625
12626 2008- 1- 29 Jim Meyering <[email protected]>
12627
12628 Given code like if (foo) free (foo); remove the useless "if (foo) " part.
12629 Likewise, given if (foo != NULL) free (foo); remove the useless "if" test.
12630
12631 * proxy/libvirt_proxy.c: Remove unnecessary "if" test before free.
12632 * python/generator.py: Likewise.
12633 * qemud/qemud.c: Likewise.
12634 * src/buf.c: Likewise.
12635 * src/conf.c: Likewise.
12636 * src/hash.c: Likewise.
12637 * src/iptables.c: Likewise.
12638 * src/libvirt.c: Likewise.
12639 * src/openvz_conf.c: Likewise.
12640 * src/qemu_conf.c: Likewise.
12641 * src/qemu_driver.c: Likewise.
12642 * src/remote_internal.c: Likewise.
12643 * src/test.c: Likewise.
12644 * src/virsh.c: Likewise.
12645 * src/virterror.c: Likewise.
12646 * src/xen_internal.c: Likewise.
12647 * src/xen_unified.c: Likewise.
12648 * src/xend_internal.c: Likewise.
12649 * src/xm_internal.c: Likewise.
12650 * src/xml.c: Likewise.
12651 * src/xmlrpc.c: Likewise.
12652 * src/xs_internal.c: Likewise.
12653 * tests/testutils.c: Likewise.
12654 * tests/xencapstest.c: Likewise.
12655 * tests/xmconfigtest.c: Likewise.
12656
12657
12658 2008- 1- 21 Daniel P. Berrange <[email protected]>
12659
12660 Make python generator fail build on any missing APIs
12661
12662
12663 2008- 1- 21 Daniel P. Berrange <[email protected]>
12664
12665 Add missing vcpu/schedular APIs to python binding
12666
12667
12668 2008- 1- 17 Jim Meyering <[email protected]>
12669
12670 Handle PyTuple_New's malloc failure.
12671 * python/libvir.c (libvirt_virDomainBlockStats): Handle a NULL
12672 return from PyTuple_New.
12673 (libvirt_virDomainInterfaceStats, libvirt_virGetLastError): Likewise.
12674 (libvirt_virConnGetLastError): Likewise.
12675
12676
12677 2008- 1- 17 Jim Meyering <[email protected]>
12678
12679 Factor out some duplication.
12680 * python/libvir.c (VIR_PY_NONE): New macro, to encapsulate
12681 a common two-statement sequence.
12682 Replace all such 2-stmt sequences.
12683
12684
12685 2007- 12- 11 Jim Meyering <[email protected]>
12686
12687 Use a variable name as sizeof argument, not a type name.
12688 Given code like: T *var = calloc (n, sizeof (T));
12689 Convert to this: T *var = calloc (n, sizeof (*var));
12690 This first-cut change adjusts all malloc, calloc, and
12691 realloc statements.
12692
12693 The only binary differences are in remote_internal.c
12694 (due to the bug fix) and in xmlrpc.c (due to factorization).
12695
12696 * python/libvir.c: As above.
12697 * qemud/event.c: Likewise.
12698 * qemud/mdns.c: Likewise.
12699 * qemud/qemud.c: Likewise.
12700 * qemud/remote.c: Likewise.
12701 * src/bridge.c: Likewise.
12702 * src/buf.c: Likewise.
12703 * src/conf.c: Likewise.
12704 * src/hash.c: Likewise.
12705 * src/iptables.c: Likewise.
12706 * src/openvz_conf.c: Likewise.
12707 * src/qemu_conf.c: Likewise.
12708 * src/qemu_driver.c: Likewise.
12709 * src/test.c: Likewise.
12710 * src/xen_internal.c: Likewise.
12711 * src/xen_unified.c: Likewise.
12712 * src/xm_internal.c: Likewise.
12713 * src/xml.c: Likewise.
12714 * tests/qemuxml2argvtest.c: Likewise.
12715 * src/xmlrpc.c (xmlRpcValuePtr): Likewise, and minor factorization.
12716 * src/remote_internal.c (remoteAuthMakeCredentials): Use the right
12717 type when allocating space for an array of cred _pointers_.
12718
12719
12720 2007- 12- 7 Jim Meyering <[email protected]>
12721
12722 Include "config.h" in remaining non-generated files.
12723 * proxy/libvirt_proxy.c: Likewise.
12724 * python/libvir.c: Likewise.
12725 * python/types.c: Likewise.
12726 * src/event.c: Likewise.
12727 * src/xm_internal.c: Likewise.
12728 * tests/reconnect.c: Likewise.
12729 * tests/testutils.c: Likewise.
12730
12731
12732 2007- 12- 7 Daniel Veillard <[email protected]>
12733
12734 * python/generator.py python/libvir.c python/libvirt-python-api.xml: add a python binding for virNodeGetCellsFreeMemory Daniel
12735
12736
12737 2007- 12- 5 Daniel P. Berrange <[email protected]>
12738
12739 Add manual impl of virConnectOpenAuth python binding
12740
12741
12742 2007- 12- 5 Richard W.M. Jones <[email protected]>
12743
12744 Wed Dec 5 13:48:00 UTC 2007 Richard W.M. Jones <[email protected]>
12745 * python/libvir.c, python/libvirt_wrap.h, qemud/qemud.c,
12746 qemud/remote.c, src/internal.h, src/openvz_conf.c,
12747 src/openvz_driver.c, src/proxy_internal.h, src/qemu_conf.c,
12748 src/qemu_driver.c, src/remote_internal.h, src/test.h, src/util.c,
12749 src/xen_unified.c, src/xen_unified.h, tests/nodeinfotest.c,
12750 tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c, tests/reconnect.c,
12751 tests/sexpr2xmltest.c, tests/virshtest.c, tests/xencapstest.c,
12752 tests/xmconfigtest.c, tests/xml2sexprtest.c:
12753 Change #include <> to #include "" for local includes.
12754 Removed many includes from src/internal.h and put them in
12755 the C files which actually use them.
12756 Removed <ansidecl.h> - unused.
12757 Added a comment around __func__.
12758 Removed a clashing redefinition of VERSION symbol.
12759 All limits (PATH_MAX etc) now done in src/internal.h, so we
12760 don't need to include those headers in other files.
12761
12762
12763 2007- 11- 30 Richard W.M. Jones <[email protected]>
12764
12765 Fri Nov 30 11:04:00 GMT 2007 Richard W.M. Jones <[email protected]>
12766 * python/libvir.c, python/libvir.py: Make Python aware that
12767 the C bindings module is called cygvirtmod.dll when compiled
12768 by CYGWIN.
12769 * python/Makefile.am: Remove symlink libvirtmod.dll -> cygvirtmod.dll
12770 no longer necessary because of the above.
12771 * configure.in: Remove AM_CONDITIONAL(CYGWIN).
12772
12773
12774 2007- 11- 29 Richard W.M. Jones <[email protected]>
12775
12776 Thu Nov 29 17:40:00 GMT 2007 Richard W.M. Jones <[email protected]>
12777 * configure.in: Added CYGWIN_EXTRA_LDFLAGS, CYGWIN_EXTRA_LIBADD,
12778 CYGWIN_EXTRA_PYTHON_LIBADD, CYGWIN automake conditional.
12779 * src/Makefile.am: Extra flags required to build DLL of libvirt
12780 for Cygwin.
12781 * python/Makefile.am: Extra flags and rule required to build
12782 Python module for Cygwin.
12783
12784
12785 2007- 11- 15 Jim Meyering <[email protected]>
12786
12787 Make "make distcheck" work.
12788 * Makefile.am: Expand some "*" wildcards, and (for now) disable
12789 the relatively unimportant, distuninstallcheck target.
12790 Fix a few redirect-directly-to-target bugs.
12791 Add a few $(srcdir)/ prefixes and add an uninstall-local rule.
12792 * docs/Makefile.am: More of the same. Split some long lines.
12793 * python/Makefile.am: Likewise.
12794 * python/tests/Makefile.am: Likewise.
12795 * qemud/Makefile.am: Likewise.
12796 * tests/Makefile.am: Remove the directories already listed in SUBDIRS.
12797 * docs/examples/index.py: Adapt to produce the desired changes in
12798 docs/examples/Makefile.am. Also, sort *.c, so results are reproducible,
12799 and emit a comment telling emacs and vi that the file is read-only.
12800 * docs/examples/Makefile.am: Regenerate.
12801
12802
12803 Author: Jim Meyering <[email protected]>
12804
12805
12806 2007- 9- 30 Daniel Veillard <[email protected]>
12807
12808 * python/generator.py python/libvir.c python/libvirt-python-api.xml: provide bindings for block and interface statistics Daniel
12809
12810
12811 2007- 7- 24 Daniel Veillard <[email protected]>
12812
12813 * libvirt.spec.in NEWS docs/* po/*: preparing release 0.3.1 * src/libvirt.c python/generator.py: some cleanup and warnings from Richard W.M. Jones Daniel
12814
12815
12816 2007- 6- 26 Richard W.M. Jones <[email protected]>
12817
12818 Tue Jun 26 14:40:00 BST 2007 Richard W.M. Jones <[email protected]>
12819 * src/remote_internal.c, python/Makefile.am: Python bindings
12820 fixed, and now building virConnect.getHostname and
12821 virConnect.getURI. Fixed a problem which stopped
12822 libvirt.py from being (re-)built. Rearranged
12823 python/Makefile.am to make it cleaner and clearer.
12824
12825
12826 2007- 6- 25 Richard W.M. Jones <[email protected]>
12827
12828 Mon Jun 25 16:55:00 BST 2007 Richard W.M. Jones <[email protected]>
12829 * include/libvirt/libvirt.h.in, src/libvirt.c, src/libvirt_sym.version,
12830 python/generator.py: Added virDomainGetConnect and
12831 virNetworkGetConnect to allow us to get the "hidden"
12832 connection associated with each domain or network.
12833
12834
12835 2007- 6- 15 Richard W.M. Jones <[email protected]>
12836
12837 Fri Jun 15 08:53:00 BST 2007 Richard W.M. Jones <[email protected]>
12838 * src/internal.h, src/virsh.c: Replace _N with N_ so that
12839 Solaris builds work (Mark Johnson).
12840 * src/virsh.c: Add a couple of missing error messages (Mark
12841 Johnson).
12842 * python/types.c: Fix NULL pointer deref on DEBUG build
12843 (Mark Johnson).
12844 * src/virsh.c: Spelling fix (Mark Johnson).
12845
12846
12847 2007- 5- 29 Richard W.M. Jones <[email protected]>
12848
12849 +Tue May 29 15:56:00 BST 2007 Richard W.M. Jones <[email protected]> + + * python/generator.py, python/libvir.c, python/libvir.py: + Wrap the virGetVersion call as Python libvirt.getVersion. + + * src/libvirt.c: Change virGetVersion so that the driver name + is case insensitive. +
12850
12851
12852 2007- 4- 16 Daniel P. Berrange <[email protected]>
12853
12854 Fixed exception reporting for domain/network operations
12855
12856
12857 2007- 4- 10 Daniel P. Berrange <[email protected]>
12858
12859 Added vir*GetAutostart APIs to python
12860
12861
12862 2007- 3- 28 Richard W.M. Jones <[email protected]>
12863
12864 * python/generator.py: Python bindings now throw exceptions in almost all cases where an error is encountered in the underlying libvirt code.
12865
12866
12867 2007- 3- 16 Daniel Veillard <[email protected]>
12868
12869 * python/generator.py: patch from Tatsuro Enokura to fix virNetworkDefine binding Daniel
12870
12871
12872 2007- 3- 15 Daniel Veillard <[email protected]>
12873
12874 * python/generator.py: fix the python binding generation for virNetworkLookup...() functions, which were clashing with equivalent virConnLookup...() equivalents, as reported by Tatsuro Enokura Daniel
12875
12876
12877 2007- 3- 9 Daniel P. Berrange <[email protected]>
12878
12879 Added python bindings for networking APIs
12880
12881
12882 2007- 3- 6 Daniel P. Berrange <[email protected]>
12883
12884 Fixed up numerous compiler warnings
12885
12886
12887 2007- 3- 1 Mark McLoughlin <[email protected]>
12888
12889 Thu Mar 01 16:17:48 EST 2007 Mark McLoughlin <[email protected]>
12890 * acinclude.m4: add LIBVIRT_COMPILE_WARNINGS, copied from
12891 GNOME but with a few more flags we'd been using.
12892
12893 * configure.in: use that instead of setting CFLAGS
12894 directly.
12895
12896 * proxy/Makefile.am, python/Makefile.am, qemud/Makefile.am,
12897 src/Makefile.am, tests/Makefile.am: use $(WARN_CFLAGS)
12898
12899
12900 2007- 2- 14 Daniel P. Berrange <[email protected]>
12901
12902 Blacklist vshRunConsole from python
12903
12904
12905 2007- 1- 23 Mark McLoughlin <[email protected]>
12906
12907 Mon Jan 23 14:36:18 IST 2007 Mark McLoughlin <[email protected]>
12908 * include/libvirt/libvirt.h.in: add VIR_UUID_BUFLEN and
12909 VIR_UUID_STRING_BUFLEN
12910
12911 * libvirt/proxy/libvirt_proxy.c, libvirt/src/hash.c,
12912 libvirt/src/internal.h, libvirt/src/libvirt.c,
12913 libvirt/src/proxy_internal.c, libvirt/src/test.c,
12914 libvirt/src/virsh.c, libvirt/src/xend_internal.c,
12915 libvirt/src/xm_internal.c, libvirt/src/xml.c,
12916 libvirt/python/libvir.c: use them
12917
12918
12919 2006- 11- 16 Daniel P. Berrange <[email protected]>
12920
12921 Added binding for virConnectListDefinedDomains api
12922
12923
12924 2006- 11- 15 Daniel P. Berrange <[email protected]>
12925
12926 Fix unsigned long wraparound in python binding
12927
12928
12929 2006- 11- 10 Daniel P. Berrange <[email protected]>
12930
12931 Fixed string concatenation in case where there is no lower level error
12932
12933
12934 2006- 11- 9 Daniel Veillard <[email protected]>
12935
12936 * python/generator.py: changed the generator to generate a reference from Domain class instances to the Connect they were issued from should fix rhbz#204490 * docs//*: rebuilt Daniel
12937
12938
12939 2006- 11- 7 Daniel P. Berrange <[email protected]>
12940
12941 Propagate libvirt errors back with python exceptions
12942
12943
12944 2006- 10- 24 Daniel P. Berrange <[email protected]>
12945
12946 Make python bindings threaded, by dropping/acquiring Python GIL where needed
12947
12948
12949 2006- 8- 29 Daniel Veillard <[email protected]>
12950
12951 * python/libvir.c: Pete Vetere pointed out a bug in string cast when handling errors in Python Daniel
12952
12953
12954 2006- 8- 4 Daniel Veillard <[email protected]>
12955
12956 * python/generator.py: fix the generator when handling long integers Dan Berrange reported problems due to this when using virDomainSetMemory bindings Daniel
12957
12958
12959 2006- 7- 5 Mark McLoughlin <[email protected]>
12960
12961 unleash the hush puppies
12962
12963
12964 2006- 6- 26 Daniel Veillard <[email protected]>
12965
12966 * configure.in libvirt.spec.in docs/examples/* include/Makefile.am include/libvirt/virterror.h python/generator.py python/libvir.c python/libvirt_wrap.h src/driver.h src/internal.h src/test.h src/virsh.c src/virterror.c src/xend_internal.c src/xend_internal.h src/xml.c src/xml.h: moved the includes from include/ to include/libvirt to reflect the installed include tree. This avoid using "" in the includes themselves. Daniel
12967
12968
12969 2006- 3- 29 Daniel Veillard <[email protected]>
12970
12971 * python/libvir.c: fixed a bug in the new wrapper * python/tests/Makefile.am python/tests/node.py: added a new test for the new API * python/tests/create.py: remove a debug Daniel
12972
12973
12974 2006- 3- 29 Daniel Veillard <[email protected]>
12975
12976 * include/libvirt.h[.in] include/virterror.h src/driver.h src/internal.h src/libvirt_sym.version src/xen_internal.c src/xs_internal.c: added a new entry point to get node hardware informations virGetNodeInfo, and associated driver hook. * src/xend_internal.c: implemented the node and version information hooks for the Xen Daemon * python/libvir.c python/libvirt-python-api.xml python/generator.py: also added Python bindings for the new call Daniel
12977
12978
12979 2006- 3- 28 Daniel Veillard <[email protected]>
12980
12981 * python/libvir.c: call the initialize entry point * src/libvirt_sym.version: add initialize entry point * src/libvirt.c: make sure we always initialize the lib * python/tests/*.py: start updating exemple for exception handling as pointed by Jim Meyering Daniel
12982
12983
12984 2006- 3- 28 Daniel Veillard <[email protected]>
12985
12986 * doc/site.xsl doc/libvir.html doc/*: added informations about the Perl bindings, regenerated * python/libvirt_wrap.h: added a missing include. Daniel
12987
12988
12989 2006- 3- 23 Daniel Veillard <[email protected]>
12990
12991 * src/xs_internal.c src/xs_internal.h include/virterror.h src/virterror.c: created a new module related to Xen Store accesses * src/libvirt.c src/xen_internal.[ch] src/xend_internal.[ch]: nearly completed the separation of the code from the different modules Daniel
12992
12993
12994 2006- 3- 22 Daniel Veillard <[email protected]>
12995
12996 * python/tests/create.py: add one more image path * src/libvirt.c src/xend_internal.c src/xend_internal.h: more work on the xend refactoring Daniel
12997
12998
12999 2006- 3- 22 Daniel Veillard <[email protected]>
13000
13001 * python/tests/create.py: adapt to new naming scheme in FC5 Daniel
13002
13003
13004 2006- 2- 28 Daniel Veillard <[email protected]>
13005
13006 * NEWS configure.in libvirt.spec.in include/libvirt.h docs/*: preparing release 0.0.6 Daniel
13007
13008
13009 2006- 2- 28 Daniel Veillard <[email protected]>
13010
13011 Fixed the test, daniel
13012
13013
13014 2006- 2- 28 Daniel Veillard <[email protected]>
13015
13016 * TODO: updated * python/Makefile.am python/generator.py python/libvir.c python/libvir.py: improved python binding, raise exception when an instance creation or lookup fails, and add support for the global error handler, per conn handler still needed * python/tests/error.py python/tests/Makefile.am: adding a regression test Daniel
13017
13018
13019 2006- 2- 24 Daniel Veillard <[email protected]>
13020
13021 * python/generator.py python/libvir.c python/libvirt-python-api.xml: UUID strings can contain zeroes, so the autogenerated conversion functions don't work. Daniel
13022
13023
13024 2006- 2- 23 Daniel Veillard <[email protected]>
13025
13026 * src/libvirt.c: fixing a bug before the release of 0.0.5 * python/generator.py python/libvir.c python/libvirt-python-api.xml: also fixing the binding for getting a domain UUID * python/tests/Makefile.am python/tests/uuid.py: added a test for the new UUID API Daniel
13027
13028
13029 2006- 2- 23 Daniel Veillard <[email protected]>
13030
13031 * python/tests/Makefile.am: added the create.py in the regression tests Daniel
13032
13033
13034 2006- 2- 21 Daniel Veillard <[email protected]>
13035
13036 * TODO: updated * python/tests/Makefile.am: fix a small PYTHONPATH bug * docs//*: fixed the xsl a bit for toc names, added doc for the python bindings, regenerated Daniel
13037
13038
13039 2006- 2- 20 Daniel Veillard <[email protected]>
13040
13041 * docs/examples/examples.xsl docs/examples/index.html docs/site.xsl: integates the examples page in the web site * docs//* : fixed generator and rebuilt the docs * python/tests/basic.py python/tests/create.py: couple cleanups Daniel
13042
13043
13044 2006- 2- 17 Daniel Veillard <[email protected]>
13045
13046 * python/tests/create.py: trying to make test more generic, but it's difficult since it requires a system image * src/libvirt.c src/xend_internal.c: fixed the shutdown API which was broken due to a bad reason at the xend level. Daniel
13047
13048
13049 2006- 2- 16 Daniel Veillard <[email protected]>
13050
13051 * configure.in src/Makefile.am: adding dependency to libxml2 * include/libvirt.h* src/libvirt.c src/xend_internal.[ch] src/xml.[ch]: added XML parsing for Xen domain descriptions needed for creates, plugged in a converter to s-exp and xend call. Modified the virDomainCreateLinux() to reflect that XML based description. Seems to work. * python/tests/create.py: added a test case which seems to work not tested much yet * docs/*: regenerated Daniel
13052
13053
13054 2006- 2- 15 Daniel Veillard <[email protected]>
13055
13056 * configure.in libvirt.spec.in include/libvirt.h.in python/Makefile.am src/Makefile.am: fix rpm packaging problems whith head, more LIBVIR -> LIBVIRT changes. Daniel
13057
13058
13059 2006- 2- 14 Daniel Veillard <[email protected]>
13060
13061 * Makefile.am configure.in python/Makefile.am python/tests/Makefile.am python/tests/basic.py: added first python test script and a 'make tests' target Daniel
13062
13063
13064 2006- 2- 10 Daniel Veillard <[email protected]>
13065
13066 * python/libvir.c: fixed one more problem prior to 0.0.4 Daniel
13067
13068
13069 2006- 2- 9 Daniel Veillard <[email protected]>
13070
13071 * //* : renamed the project libvirt , this affects all makefiles, the specs, the icons, the docs, etc ... * configure.in: prepare for 0.0.3 Daniel
13072
13073
13074 2006- 1- 31 Daniel Veillard <[email protected]>
13075
13076 * python/*: update of the python bindings, fix names, add missing features like list of domains and domain info extraction Daniel
13077
13078
13079 2006- 1- 28 Daniel Veillard <[email protected]>
13080
13081 * python/libvir.c: fix a stupid bug in python bindings (DomainDestroy is still mishandled though) Daniel
13082
13083
13084 2006- 1- 26 Daniel Veillard <[email protected]>
13085
13086 * TODO: updated * docs/search.php: use the new web site design * python/generator.py: fix a generation bug on python keyword Daniel
13087
13088
13089 2005- 12- 19 Daniel Veillard <[email protected]>
13090
13091 * Makefile.am configure.in libvir.spec.in python/*: added a first version for python bindings, heavilly based on libxml2/libxslt way of doing things, maybe this need to be revisited. Added packaging too. * src/hash.h: fixed the Copyright notice. Daniel
13092