[libvirt] beta libvirt-java port uploaded

Hi, we are using libvirt in our softwaredemo.de plattform (launching in 2 or 3 weeks).. Because I saw some thread relating to the java-port, I uploaded our modified version (SNAPSHOT of my eclipse-workspace, based on the Tóth István libvir-java port - e.g. http://www.mail-archive.com/libvir-list@redhat.com/msg03131.html) to http://www.softwaredemo.de/index.php?id=154 for free access. At the moment, it's does not support all the XML-elements, because if haven't enough time to update it out XSD-file - but I works with the current libvirt 0.4.4-1 (-: - and work for us .... The uploaded java-project depends on some other (internal) staff of our company (devtools, ivy-repository), so it will not compile out-of-the-box for you - sorry for this at the moment. The TGZ includes all Dependant libs in lib/compiler Dependant infos in output/ivy-report Output artifacts in output/artifact (jar-files for using to access libvirt ...) If there are people wanting to work-on/update/extend these sources, I will think about adapting our individual-company-dependant project-build-framework to run everywhere (replace our ivy-repos with public maven-repos, insert the missing ant-scripts, ...) Maybe it could be also a good input for other people's to restart the libvirt-java project for their own (look into the project and uses some fragemets/ideas - staf, testing, buildprocess, ..) Thx to libvirt-community Danny (from softwaredemo.de ;-) If you have question, please ask (-:

Cool - there's an "official" port... http://comments.gmane.org/gmane.comp.emulators.libvirt/7118 sorry for my last port, i didn't watch this list in the last time .. regards Danny

On Thu, Jul 03, 2008 at 12:10:40PM +0200, Daniel Schwager wrote:
Cool - there's an "official" port... http://comments.gmane.org/gmane.comp.emulators.libvirt/7118
sorry for my last port, i didn't watch this list in the last time ..
BTW there is a new one 0.1.2 with better portability and JPackage compatibility. I must admit i'm a bit lost by all the code in your tarball, there are changes to libvirt-java, even in code already included in 0.1.0 , and a lot of subtrees which seems only loosely coupled to libvirt. What are the diffs which should be applied to the cirrent 0.1.2 code base ? and what specifically should be added in libvirt-java CVS. The Beans support seems one of them (but i have no idea how it's supposed to be used). A bit of explanations would go a long way ;-) Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

What are the diffs which should be applied to the cirrent 0.1.2 code base ? and what specifically should be added in libvirt-java CVS. The Beans support seems one of them (but i have no idea how it's supposed to be used). A bit of explanations would go a long way ;-)
Daniel
Hi Daniel, some (maybe) useful things could be a) integration of apache-commons 'ivy' for dependencymanagement depends on log4j and apache-xmlbeans maybe maven-repos could also be a way .. b) build (compile) the native libraries remote on a targetsystems (32bit, 64bit) libvirt_jni-32bit.so libvirt_jni-64bit.so using ant build (target compile.native-library) and http://staf.sf.net - maybe ant-based ssh-execution of makefile would maybe better (we use STAF in our company) c) integration of apache-xmlbeans for getting rid of the java XML-hacking: - using an XSD-File (descriptors/libvirt.xsd*) for defining the libvirt-XML language AND autocreating all the java beans mapped to the XML - refer to build.xml, target: create-xmlbeans - using Xml helper class LibvirtXmlUtil - for e.g. verifing the incoming libvirt-XML LibvirtXmlUtil p = new LibvirtXmlUtil(); DomainDocumentXmlBean doc = p.read(new File("domain.xml"); System.out.println(p.toString(doc)); - creating a object-trees of the libvirt-XML-code (e.g. TestXml.java) easily // Define a new Domain DomainDocumentXmlBean doc = DomainDocumentXmlBean.Factory.newInstance(); DomainXmlBean domain = doc.addNewDomain(); domain.setName("domainName"); domain.setType(DomainTypeXmlBean.XEN); domain.setMemory(256 * 1024); domain.setVcpu(1); domain.setOnReboot(LifeCycleActionXmlBean.RESTART); domain.setOnPoweroff(LifeCycleActionXmlBean.DESTROY); domain.setOnCrash(LifeCycleActionXmlBean.DESTROY); domain.addNewFeatures().addNewPae(); // and showing the XML output like System.output(new LibvirtXmlUtil().toString(doc)); - for easy accessing all elements in the XML-structur - bean like DomainDocumentXmlBean doc = new LibvirtXmlUtil().read("domain1.xml"); System.out(doc.getDomain().getDevices().getDiskList().get(0).getSource() .getFile()); Regards Danny
participants (2)
-
Daniel Schwager
-
Daniel Veillard