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

[Libguestfs] GObject bindings



This is the first iteration of the GObject bindings. I have 'kicked the tyres'
on these, meaning I have ensured that a bunch of basic manual tests work as
expected. I'm in the process of adding more comprehensive tests.

Here's an example simple javascript program which uses these bindings:

===
const Guestfs = imports.gi.Guestfs;

print('Starting');
var g = new Guestfs.Session();

var o = new Guestfs.AddDriveOpts({format: 'raw', iface: 'virtio'});
g.add_drive_opts('tests/guests/fedora.img', null);
g.launch();

r = g.inspect_os();
m = g.inspect_get_mountpoints(r[0]);
print(m['/boot']);

print('Finished');
===

Run this file as ./run gjs gobject-test.js


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