[libvirt-java] [PATCH 00/65]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

Here are a few patches that piled up in my local branch. Some of them
I already submitted to this list, but there has been no reponse to
them.

Included are a few trivial fixes as well as memory leak fixes and
additions to the public API.

There had been some minor interest in my first version of domain event
support in the Java wrapper[1], which I have reworked almost entirely.

If nobody objects, say, within the next two weeks or so, I'll go ahead
and push the whole series as was suggested to me by Daniel P. Berrange
on this list[2].

I've made sure that all JUnit tests pass after every commit with JNA
versions 3.4.1, 3.4.2, 3.5.0, 3.5.1, 3.5.2 and 4.0.0.

I'd really appreciate your comments or suggestions.

Thanks!

[1]: https://www.redhat.com/archives/libvir-list/2013-January/msg01236.html 
[2]: https://www.redhat.com/archives/libvir-list/2014-January/msg01091.html

Claudio Bley (65):
  Fix warnings about using raw types
  Fix warnings about accessing static methods
  Fix typos in Error.java
  test: fix typo in testConnection()
  test: ensure that exceptions are thrown when expected
  Make comments proper javadoc comments for enum constants
  Ignore editor backup files
  Depend on JNA versions 3.4.1 to 4.0.0
  jna: load virt-0 or virt library depending on the platform
  Fix wrapping of native size_t data type
  Use virFree in order to release memory acquired from libvirt
  tests: remove obsolete test driver
  Make Device.listCapabilities return only valid array elements
  test: ensure the Device.listCapabilities method works
  Start refactoring of error handling
  Remove processError from Device class
  Remove processError from Domain class
  Remove processError from DomainSnapshot class
  Remove processError from Interface class
  Remove processError method from Network class
  Remove processError method from NetworkFilter class
  Remove processError method from Secret class
  Remove processError method from StoragePool class
  Remove processError method from StorageVol class
  Remove processError method from Stream class
  Remove processError method from Connect class
  Call processError only when virInitialize signalled an error
  Remove ErrorHandler.processError(Libvirt) method
  Implement equals and hashCode methods for Connect and Domain
  Fix Domain.getSchedulerParameters / getSchedulerType
  Fix memleak in Domain.snapshotListNames
  Fix memleak in StoragePool.listVolumes
  Fix memleak in DomainSnapshot.getXMLDesc
  Fix memleak in StorageVol.getPath
  Fix memleak in StorageVol.getXMLDesc
  jna: Wrap the virEvent(Add,Remove)Timeout libvirt functions
  Implement Connect.isAlive
  Implement Connect.setKeepAlive
  Introduce event loop support
  Add constants for enum virDomainEventID
  Prepare to define proper domain event callback support
  Add constructIncRef factory method to Domain class
  events: handle registration for IOError events
  events: handle registration for Reboot events
  events: handle registration of domain lifecycle events
  test: add unit test for domain lifecycle events
  events: handle registration for PMWakeup events
  events: add support for PMSuspend events
  Implement connection close callback support
  Implement Connect.getSysinfo
  Implement Domain.blockPeek
  Implement Domain.memoryPeek
  Implement Secret.getUsageType
  Implement Domain.isUpdated
  Implement Domain.reset
  Implement Domain.PMwakeup
  Implement Domain.sendKey
  Implement interface ByteChannel for Stream class
  Implement Domain.screenshot
  test: add testDomainScreenshot JUnit test
  Add helper for handling bit-flags
  Connect: add constructors using java.net.URI params
  Replace Connect.getLibVirVersion method with Library.getVersion
  Replace static connectionVersion method with getLibVersion
  Deprecate Connect.getHypervisorVersion

 .gitignore                                         |    2 +
 pom.xml.in                                         |    2 +-
 src/main/java/org/libvirt/BitFlags.java            |   18 +
 src/main/java/org/libvirt/Connect.java             |  731 +++++++++++++++++---
 src/main/java/org/libvirt/Device.java              |   57 +-
 src/main/java/org/libvirt/Domain.java              |  672 +++++++++++-------
 src/main/java/org/libvirt/DomainSnapshot.java      |   29 +-
 src/main/java/org/libvirt/Error.java               |  409 +++++++----
 src/main/java/org/libvirt/ErrorHandler.java        |   54 +-
 src/main/java/org/libvirt/Interface.java           |   43 +-
 src/main/java/org/libvirt/KeycodeSet.java          |   46 ++
 src/main/java/org/libvirt/Library.java             |  134 +++-
 src/main/java/org/libvirt/MemoryAddressMode.java   |   19 +
 src/main/java/org/libvirt/Network.java             |   61 +-
 src/main/java/org/libvirt/NetworkFilter.java       |   43 +-
 src/main/java/org/libvirt/Secret.java              |   72 +-
 src/main/java/org/libvirt/SecretUsageType.java     |   23 +
 src/main/java/org/libvirt/StoragePool.java         |  106 ++-
 src/main/java/org/libvirt/StorageVol.java          |   68 +-
 src/main/java/org/libvirt/Stream.java              |  232 +++++--
 src/main/java/org/libvirt/SuspendTarget.java       |   15 +
 src/main/java/org/libvirt/event/CrashedDetail.java |   15 +
 src/main/java/org/libvirt/event/DefinedDetail.java |   17 +
 src/main/java/org/libvirt/event/DetailInfo.java    |    5 +
 src/main/java/org/libvirt/event/DomainEvent.java   |   71 ++
 .../java/org/libvirt/event/DomainEventDetail.java  |    7 +
 .../java/org/libvirt/event/DomainEventType.java    |   60 ++
 src/main/java/org/libvirt/event/EventListener.java |    7 +
 src/main/java/org/libvirt/event/IOErrorAction.java |   39 ++
 .../java/org/libvirt/event/IOErrorListener.java    |   21 +
 .../java/org/libvirt/event/LifecycleListener.java  |   24 +
 .../java/org/libvirt/event/PMSuspendListener.java  |   17 +
 .../java/org/libvirt/event/PMSuspendReason.java    |    5 +
 .../java/org/libvirt/event/PMSuspendedDetail.java  |   15 +
 .../java/org/libvirt/event/PMWakeupListener.java   |   17 +
 .../java/org/libvirt/event/PMWakeupReason.java     |    5 +
 .../java/org/libvirt/event/RebootListener.java     |   15 +
 src/main/java/org/libvirt/event/ResumedDetail.java |   20 +
 .../java/org/libvirt/event/ShutdownDetail.java     |   12 +
 src/main/java/org/libvirt/event/StartedDetail.java |   30 +
 src/main/java/org/libvirt/event/StoppedDetail.java |   40 ++
 .../java/org/libvirt/event/SuspendedDetail.java    |   40 ++
 .../java/org/libvirt/event/UndefinedDetail.java    |    7 +
 src/main/java/org/libvirt/jna/Libvirt.java         |  121 +++-
 src/main/java/org/libvirt/jna/SizeT.java           |   19 +
 .../java/org/libvirt/jna/SizeTByReference.java     |   50 ++
 src/main/java/org/libvirt/jna/virConnectAuth.java  |    4 +-
 .../java/org/libvirt/jna/virConnectCredential.java |    4 +-
 .../java/org/libvirt/jna/virDomainBlockInfo.java   |    4 +-
 .../java/org/libvirt/jna/virDomainBlockStats.java  |    4 +-
 src/main/java/org/libvirt/jna/virDomainInfo.java   |    4 +-
 .../org/libvirt/jna/virDomainInterfaceStats.java   |    4 +-
 .../java/org/libvirt/jna/virDomainJobInfo.java     |    4 +-
 .../java/org/libvirt/jna/virDomainMemoryStats.java |    4 +-
 src/main/java/org/libvirt/jna/virError.java        |    4 +-
 src/main/java/org/libvirt/jna/virNodeInfo.java     |    4 +-
 .../java/org/libvirt/jna/virSchedParameter.java    |    4 +-
 .../java/org/libvirt/jna/virStoragePoolInfo.java   |    4 +-
 .../java/org/libvirt/jna/virStorageVolInfo.java    |    4 +-
 src/main/java/org/libvirt/jna/virVcpuInfo.java     |    4 +-
 src/test/java/org/libvirt/TestJavaBindings.java    |  139 +++-
 src/test/java/org/libvirt/TestLibvirtGlobals.java  |    4 +
 src/test/java/test.java                            |  280 --------
 63 files changed, 2807 insertions(+), 1187 deletions(-)
 create mode 100644 src/main/java/org/libvirt/BitFlags.java
 create mode 100644 src/main/java/org/libvirt/KeycodeSet.java
 create mode 100644 src/main/java/org/libvirt/MemoryAddressMode.java
 create mode 100644 src/main/java/org/libvirt/SecretUsageType.java
 create mode 100644 src/main/java/org/libvirt/SuspendTarget.java
 create mode 100644 src/main/java/org/libvirt/event/CrashedDetail.java
 create mode 100644 src/main/java/org/libvirt/event/DefinedDetail.java
 create mode 100644 src/main/java/org/libvirt/event/DetailInfo.java
 create mode 100644 src/main/java/org/libvirt/event/DomainEvent.java
 create mode 100644 src/main/java/org/libvirt/event/DomainEventDetail.java
 create mode 100644 src/main/java/org/libvirt/event/DomainEventType.java
 create mode 100644 src/main/java/org/libvirt/event/EventListener.java
 create mode 100644 src/main/java/org/libvirt/event/IOErrorAction.java
 create mode 100644 src/main/java/org/libvirt/event/IOErrorListener.java
 create mode 100644 src/main/java/org/libvirt/event/LifecycleListener.java
 create mode 100644 src/main/java/org/libvirt/event/PMSuspendListener.java
 create mode 100644 src/main/java/org/libvirt/event/PMSuspendReason.java
 create mode 100644 src/main/java/org/libvirt/event/PMSuspendedDetail.java
 create mode 100644 src/main/java/org/libvirt/event/PMWakeupListener.java
 create mode 100644 src/main/java/org/libvirt/event/PMWakeupReason.java
 create mode 100644 src/main/java/org/libvirt/event/RebootListener.java
 create mode 100644 src/main/java/org/libvirt/event/ResumedDetail.java
 create mode 100644 src/main/java/org/libvirt/event/ShutdownDetail.java
 create mode 100644 src/main/java/org/libvirt/event/StartedDetail.java
 create mode 100644 src/main/java/org/libvirt/event/StoppedDetail.java
 create mode 100644 src/main/java/org/libvirt/event/SuspendedDetail.java
 create mode 100644 src/main/java/org/libvirt/event/UndefinedDetail.java
 create mode 100644 src/main/java/org/libvirt/jna/SizeT.java
 create mode 100644 src/main/java/org/libvirt/jna/SizeTByReference.java
 delete mode 100644 src/test/java/test.java

-- 
1.7.9.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]