summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-03-23Align function headersHEADmasterJayashree Deshpande6-102/+168
In the code we like to have the return type of function on one line, followed by function name among with the first argument on the second line, followed by the rest of function arguments, each one on a separate line.
2015-03-06Post-release version bump to 0.0.3Daniel P. Berrange1-1/+1
2015-03-06Update NEWS for 0.0.2 releaseDaniel P. Berrange1-0/+36
2015-03-06Add devel-doc sub-RPMDaniel P. Berrange1-2/+14
2015-03-06Add vala bindings to RPMDaniel P. Berrange1-1/+26
2015-03-06Remove unused with_python variable in RPM specDaniel P. Berrange1-1/+0
2015-03-04Makefile: Build tests at the same time as the restMichal Privoznik1-2/+2
Currently, since we were using check_PROGRAMS in the Makefile template, the test program build was postponed until 'make check' was run. That's not optimal. Lets build (not run!) test program in the 'make all' phase. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-03-04Fix gvir_designer_domain_get_guest_full() leakChristophe Fergeau1-0/+2
One GVirConfigCapabilitiesGuestArch instance was created for each loop iteration, but it was never unref'ed, causing a memory leak.
2015-03-04Fix gvir_designer_domain_get_fallback_disk_controller leakChristophe Fergeau1-2/+4
When the list of devices is empty (osinfo_list_get_length(devices) == 0), the 'devices' object would be leaked.
2015-03-04test: Add new SimpleDisk testMichal Privoznik1-0/+92
This test is meant for adding CDROM, floppy and disk to a domain. For now, each method has _file and _device variant, which are tested for now. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-03-03Fix GVirConfigDomainDiskDriver leakChristophe Fergeau1-0/+4
A GVirConfigDomainDiskDriver is created in gvir_designer_domain_add_disk_full but it's never unref'ed. This commit fixes that, including when an error occurs.
2015-03-03Add gvir_designer_domain_interface_{bridge,user} methodsChristophe Fergeau3-2/+75
These cover 2 additional types of libvirt interfaces: usermode/SLIRP networking and bridge.
2015-03-03Add more preconditions to gvir_designer_domain_add_interface_network()Christophe Fergeau1-0/+2
2015-03-03Don't return uninitialized memory from gvir_designer_domain_add_interface_full()Christophe Fergeau1-1/+1
When an unknown NIC type is passed to gvir_designer_domain_add_interface_full(), 'ret' would be returned uninitialized to the caller.
2015-03-03virtxml: Don't leak 'iface' in add_iface()Christophe Fergeau1-0/+1
The caller of gvir_designer_domain_add_interface_network() owns a reference on the returned GVirConfigDomainInterface instance, so it needs to be released when no longer needed.
2015-03-03build-sys: Update manywarnings.m4 from gnulibChristophe Fergeau1-76/+137
This fixes gcc warning about -Wmudflap on fedora 21
2015-03-03build-sys: Use AM_CPPFLAGS instead of INCLUDESChristophe Fergeau1-1/+1
The latter is deprecated in favour of the former.
2014-01-30virtxml: Rename to virt-designerMichal Privoznik6-26/+26
Our example utility is called virtxml. However with Cole's latest work, where he introduced virt-xml binary for editing libvirt XML on CLI [1]. It would be better if our example is called virt-designer so we don't confuse users. 1: https://www.redhat.com/archives/libvir-list/2014-January/msg01226.html Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2014-01-30gvir_designer_domain_add_disk_full: Adapt to latest libvirt-glibMichal Privoznik4-3/+68
With libvirt-glib update, I've noticed a deprecation warning: libvirt-designer-domain.c: In function 'gvir_designer_domain_add_disk_full': libvirt-designer-domain.c:1610:9: error: 'gvir_config_domain_disk_set_driver_type' is deprecated (declared at /usr/include/libvirt-gconfig-1.0/libvirt-gconfig/libvirt-gconfig-domain-disk.h:145): Use 'gvir_config_domain_disk_set_driver_format' instead [-Werror=deprecated-declarations] gvir_config_domain_disk_set_driver_type(disk, format); ^ cc1: all warnings being treated as errors Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2013-09-26Use latest warnings.m4 from gnulibChristophe Fergeau1-20/+62
The one we were using does not work properly with clang, causing the build process to try to use -f/-W options that are not supported by clang.
2013-08-27Fix typo in error messageChristophe Fergeau1-1/+1
2013-06-06Implement gvir_designer_domain_add_video()Christophe Fergeau4-0/+178
This takes into account the devices specified by the deployment, if this fails, consider the intersection of devices supported by the OS and by the platform, and if this still fails, falls back to a hardcoded hypervisor type -> video model mapping.
2013-06-06Implement gvir_designer_domain_add_smartcard()Christophe Fergeau4-0/+50
This setups smartcard redirection to the guest. I'm not yet fully sure what users could want to tweak there (there are various ways of setting up the smartcard redirection), so this code may need to be made more flexible. The current code is also not checking whether the hypervisor supports this kind of redirection or not.
2013-06-06Implement gvir_designer_domain_add_usb_redir()Christophe Fergeau4-0/+135
This will add an USB redirection channel to the VM. This can be called multiple times to redirect several USB devices at once. This will also add the needed controllers if they are not already present in the VM. The current code has 2 shortcomings: - USB redirection is only supported with SPICE, but this is not checked for - the USB controller added to the VM are hardcoded, no check if they are supported by the OS, hypervisor, ...
2013-06-06Check for vioserial availability before adding a SPICE agentChristophe Fergeau1-3/+46
This makes use of the new gvir_designer_domain_get_supported_devices() method.
2013-06-06Automatically add SPICE channel with SPICE graphicsChristophe Fergeau1-0/+85
When the user sets up the graphical framebuffer to use SPICE, we now add automatically the SPICE agent channel if it's not present already.
2013-06-06Implement gvir_designer_domain_add_graphics()Christophe Fergeau5-1/+149
This allows to choose between SPICE, VNC or a local display, which will go through SDL or 'desktop' depending on the hypervisor.
2013-06-05Update copyright noticeChristophe Fergeau1-1/+2
2013-06-05Implement gvir_designer_domain_add_sound()Christophe Fergeau4-0/+139
2013-06-04Improve VM skeleton created by gvir_designer_domain_setup_guest()Christophe Fergeau1-0/+95
Add various devices/configuration to libvirt XML config when creating the VM. This configuration is generic enough that it should be useful on all created VMs, that's why no public API is added to set them up. However, they are split in several helpers that can easily be exported if needed. What this commit adds is: - clock - input device (a tablet which will act as a mouse) - a console (Boxes is adding one, not sure if it's required...) For maximum flexibility, we may want to let applications decide whether they want a console or not. In addition to these devices, gvir_designer_domain_setup_guest() now disables power management, and sets the domain to stop on power off/crash, and to restart on reboots.
2013-04-22Add missing files to EXTRA_DISTChristophe Fergeau1-0/+2
This fixes make distcheck
2013-04-22Rework disk bus type handlingChristophe Fergeau1-94/+90
The current handling of bus types has some issues: - it assumes that if the design uses a disk controller hanging off a PCI bus, then it can use virtio, which is not true for Windows for example unless an additional driver is installed - it checks for "ide", "sata", "virtio" bus names, but they are not used in libosinfo, and "sata is not mentioned in libosinfo.rng - if the bus type could not determined, falling back to an IDE bus should be a safe guess This commit changes the code to guessing the best disk controller to use, and then derives the bus type from it when needed. One limitation of this approach is that we are currently limited to virtio or IDE as libosinfo is not expressive enough for us to tell if a given disk controller is IDE/SATA/SCSI/... One way of making this distinction possible would be to attach the PCI subclass to libosinfo device descriptions as this contains the information we need.
2013-04-22Add gvir_designer_domain_get_supported_devices()Christophe Fergeau2-3/+81
This method gathers the list of devices supported by the hypervisor, and intersects this list with the list of devices supported by the OS, natively or using a driver (added with gvir_designer_domain_add_driver()). The lists can be filtered if needed. This commit changes gvir_designer_domain_get_supported_disk_bus_types() to make use of that new helper. This will slightly change its behaviour as before this commit, it will consider any block devices from GVirDesignerDomain::os, while after this commit, it will only consider block devices from GVirDesignerDomain::os that are supported by GVirDesignerDomain::platform. This will cause a change for example for OSes that only list virtio-block as a supported block device, such as Fedora as described in libosinfo v0.2.6-9-g7a8deb4
2013-04-22Add driver handling methods to GVirDesignerDomainChristophe Fergeau3-0/+87
They are useful to tell libvirt-designer about which drivers are install/will be installed in the OS associated with the domain. This in turns allows libvirt-designer code to use these devices when it's making some guesses about what to enable/not enable in the VM being created.
2013-04-22Set min versions from configure in .spec fileChristophe Fergeau2-5/+5
Minimum libvirt-gobject, libvirt-gconfig and libosinfo versions are set in configure.ac, it's better not to duplicate them in libvirt-designer.spec.in, it's too easy to get them out of sync.
2013-04-22Automatically set min versions in READMEChristophe Fergeau4-2/+12
Minimum libvirt-gconfig and libosinfo versions appear in both README and configure.ac, which means they easily get out of sync. This commit renames README to README.in so that we can substitute the configure.ac version in the README file. This way they are always in sync.
2013-04-22Fix 'dependancy' typo in README fileChristophe Fergeau1-1/+1
2013-04-19libvirt-designer-main.c: Re-indent function headersMichal Privoznik1-3/+3
2013-04-19cfg.mk: Update list of syntax-check exceptionsMichal Privoznik1-3/+3
The bindtextdomain syntax-check macro is doing some dumb checking: each file containing '\<main *(' must call bindtextdomain. Even if it's mentioned inside a comment block, which we do as of e71ad8e13e7.
2013-04-19Increment soname + symbol versionsDaniel P. Berrange2-2/+2
The ABI of some methods was explicitly broken, so the soname and symbol versions must all be incremented to reflect the ABI incompatibility
2013-04-19Adapt saner libtool versioning scheme from libvirtDaniel P. Berrange1-1/+39
The current way libtool versioning is calculated has a timebomb when the package version number changes to 1.0.0, which will cause the library soname to change. Adapt to the latest libvirt macros for libtool versioning, which use an explicit variable LIBVIRT_DESIGNER_SONUM setting for changing soname.
2013-04-18Add support for floppies and CDROMsChristophe Fergeau4-13/+240
This mirrors disk_file/disk_device API so that it's possible to add CDROMs and floppies to a GVirDesignerDomain. This also adds the corresponding -C/-F options to virtxml
2013-04-18Add Vala APIZeeshan Ali (Khattak)4-1/+67
This is mostly (modified) copy&paste from libvirt-glib.
2013-04-18Add transfer annotation to *init.argvZeeshan Ali (Khattak)1-2/+6
Add transfer annotation to argv parameter of library init functions.
2013-04-12Fix 'be find' typo in error messageChristophe Fergeau1-1/+1
2013-04-11virtxml: Fix 2 memory leaksChristophe Fergeau1-3/+8
2013-04-11Fix some wrong gtk-doc transfer annotationsChristophe Fergeau1-3/+3
2013-04-11test: Adapt to new gvir_designer_domain_new signatureMichal Privoznik1-2/+6
After 46be1aed the signature of gvir_designer_domain_new has changed. The OsinfoDb parameter appeared there. However, the test suite hasn't been adapted.
2013-04-11Don't redefine _FORTIFY_SOURCE macroMichal Privoznik1-1/+1
If the _FORTIFY_SOURCE has been already defined, we unconditionally redefine it, leaving us with warning/error thrown at compilation time.
2013-04-08Auto-generate AUTHORS file from GIT logsDaniel P. Berrange6-21/+23
Rather than trying to manually keep track of authors, just auto-generate the list from GIT logs Signed-off-by: Daniel P. Berrange <berrange@redhat.com>