summaryrefslogtreecommitdiffstats
path: root/python
Commit message (Collapse)AuthorAgeFilesLines
* java: Add guestfs-java(3) man page.Richard W.M. Jones2011-07-191-0/+1
|
* python: Add explicit g.close() method (RHBZ#717786).Richard W.M. Jones2011-06-301-0/+59
|
* Add new guestfs-rescue(1) man page with recipes.Richard W.M. Jones2011-05-181-0/+1
|
* python: Ensure Python GIL state is correct during callback.Richard W.M. Jones2011-04-221-0/+8
| | | | This updates commit 2cac52000a6a96a583af72e289a4296c596047d5.
* python: Implement new event API.Richard W.M. Jones2011-04-223-0/+215
| | | | | This implements set_event_callback and delete_event_callback so that Python programs can use the new event mechanism.
* python: Rearrange C files for bindings.Richard W.M. Jones2011-04-223-1/+137
| | | | | | | Move the hand-written functions into two new files: guestfs-py.h and guestfs-py-byhand.c This is just code motion.
* perl: Translate C examples into Perl and include a manual page.Richard W.M. Jones2011-01-301-0/+1
|
* fish: Don't fail if some mountpoints in /etc/fstab are bogus (RHBZ#668574).Richard W.M. Jones2011-01-111-1/+4
| | | | | | | | | | | | | | | | | Fix guestfish (and other C tools) so that they ignore errors when /etc/fstab contains bogus entries. Update the documentation for inspect-get-mountpoints to emphasize that callers must be aware of this when mounting the returned values. Add a regression test. Update the example code ("inspect_vm") to reflect the way this API ought to be called. For more detail see: https://bugzilla.redhat.com/show_bug.cgi?id=668574
* build: Use ./configure --with-python-installdir=DIR to select Python dir.Richard W.M. Jones2010-12-091-1/+1
| | | | | | We don't always want to install in the site-packages directory. Allow the directory to be chosen using a configure option. Rename the variable PYTHON_INSTALLDIR to reflect its true purpose.
* python: Combine tests to reduce number of launches.Richard W.M. Jones2010-11-302-30/+2
|
* ruby: Translate C examples into Ruby and include documentation.Richard W.M. Jones2010-11-241-0/+1
|
* python: Translate C examples into Python and include documentation.Richard W.M. Jones2010-11-245-0/+231
|
* generator: Optional arguments, add-drive-opts (RHBZ#642934,CVE-2010-3851).Richard W.M. Jones2010-10-221-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This large commit changes the generator so that optional arguments can be supported for functions. The model for arguments (known as the "style") is changed from (ret, args) to (ret, args, optargs) where optargs is a more limited list of arguments. One function has been added which takes optional arguments, it is "add-drive-opts", modelled as: (RErr, [String "filename"], #required [Bool "readonly"; String "format"; String "iface"]) #optional Note that this function is processed in the library (does not go over the RPC protocol to the daemon). This has allowed us to simplify the current implementation by omitting changes related to RPC or the daemon, although we plan to add these at some point in the future. From C this function can be called in 3 different ways as in these examples: guestfs_add_drive_opts (g, filename, GUESTFS_ADD_DRIVE_OPTS_READONLY, 1, GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", -1); (the argument(s) between 'filename' and '-1' are the optional ones). guestfs_add_drive_opts_va (g, filename, args); where 'args' is a va_list. This works like the first version. struct guestfs_add_drive_opts_argv optargs = { .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK, .readonly = 1, } guestfs_add_drive_opts_argv (g, filename, &optargs); This last form lets you construct lists of optional arguments, and is used by guestfish and the language bindings. In guestfish optional arguments are used like this: add-drive-opts filename readonly:true In OCaml these are mapped naturally to OCaml optional arguments, eg: g#add_drive_opts ~readonly:true filename; In Perl these are mapped to extra arguments, eg: $g->add_drive_opts ($filename, readonly => 1); In Python these are mapped to optional arguments, eg: g.add_drive_opts ("file", readonly = 1, format = "qcow2") In Ruby these are mapped to a final hash argument, eg: g.add_drive_opts("file", {}) g.add_drive_opts("file", :readonly => 1) g.add_drive_opts("file", :readonly => 1, :iface => "virtio") In PHP these are mapped to extra parameters. This is not quite accurate since you cannot omit arbitrary optional parameters, but there's not much than can be done within the limitations of PHP as a language. Unimplemented in: Haskell, C#, Java.
* build: Fix inter-directory dependenciesMatthew Booth2009-11-191-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds an explicit dependency on generator.ml for every file it generates, except java files. Java is left for another time because it's considerably trickier. It also adds a build rule for src/libguestfs.la so it can be rebuilt as required from other directories. It does this by creating a top level make file, subdir-rules.mk, which can be included from sub-directories. sub-directories need to define 'generator_built' to include local files which are built by generator.ml, and they will be updated automatically. This fixes parallel make, and will automatically re-create generated files when make is run from any directory. It also fixes the problem which efad4f53 was targetting. Specifically, src/guestfs_protocol.(c|h) had an erroneous dependency on stamp-generator, and therefore generator.ml, despite not being directly created by it. This caused them to be recreated every time generator.ml ran rather than only when src/guestfs_protocol.x was updated, which cascaded into a daemon and therefore appliance update. This patch also changes the contents of the distribution tarball by including files created by rpcgen.
* Remove guestfs_wait_ready (turn it into a no-op).Richard Jones2009-09-212-2/+0
| | | | | | | | | | | | | | This commit changes guestfs_launch so that it both launches the appliance and waits until it is ready (ie. the daemon communicates back to us). Since we removed the pretence that we could implement a low-level asynchronous API, the need to call launch() followed by wait_ready() has looked a bit silly. Now guestfs_wait_ready() is basically a no-op. It is left in the API for backwards compatibility. Any calls to guestfs_wait_ready() can be removed from client code.
* build: remove trailing blank lines; enable the syntax-check ruleJim Meyering2009-08-041-1/+0
| | | | | | | | | | | | | | * cfg.mk (disable_temporarily): Remove sc_prohibit_trailing_blank_lines. * appliance/Makefile.am: Remove trailing blank line(s). * appliance/debian/modules/y0_install-guestfsd: Likewise. * appliance/make.sh.in: Likewise. * appliance/packagelist.in: Likewise. * appliance/update.sh.in: Likewise. * haskell/run-bindtests: Likewise. * ocaml/run-bindtests: Likewise. * python/run-python-tests: Likewise. * recipes/squashfs.example: Likewise. * ruby/run-ruby-tests: Likewise.
* RHEL 5: $(builddir) did not exist with this old autoconf/automake, so ↵Richard Jones2009-07-071-0/+3
| | | | workaround.
* Make it possible to build in a separate directoryMatthew Booth2009-07-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | This patch allows you to do: mkdir build cd build ../configure ... make This will output all generated files to the build directory. Given that autogen automatically runs configure, you can also do: BUILDDIR=./build ./autogen.sh which will do the right thing. Also: * Fix a dependency bug which means that guestfs_protocol.h isn't automatically rebuilt. * Re-running autogen.sh with no arguments won't blow away your previous configure arguments.
* Remove generated code from git.Richard W.M. Jones2009-07-023-7462/+0
| | | | | | | | Git users now require the OCaml compiler in order to regenerate the generated code after a checkout. Generated code will remain in the tarball, so users of the source tarball will not need the OCaml compiler.
* Add 'readdir' call.Richard W.M. Jones2009-07-022-0/+70
| | | | | | | | | | | | This adds a readdir call (mostly intended for programs). The return value is a list of guestfs_dirent structures. This adds the new types 'struct guestfs_dirent' and 'struct guestfs_dirent_list', along with all the code to return these in the different language bindings. Also includes additional tests for OCaml and Perl bindings to test this.
* Generated code for the virtio_blk change.Richard W.M. Jones2009-07-011-2/+6
|
* Generated code for mknod, mkfifo, mknod_b, mknod_c, umask.Richard W.M. Jones2009-06-302-0/+188
|
* Generated code for 'set_memsize'/'get_memsize' calls.Richard W.M. Jones2009-06-302-0/+77
|
* Generated code for the 'mkswap*' commands.Richard W.M. Jones2009-06-292-0/+95
|
* Generated code for mount-loop command.Richard W.M. Jones2009-06-292-0/+34
|
* Generated code for 'initrd-list'.Richard W.M. Jones2009-06-292-0/+42
|
* Generated code for 'du' command.Richard W.M. Jones2009-06-292-0/+38
|
* Generated code for df / df-h.Richard W.M. Jones2009-06-292-0/+70
|
* Generated code for head/tail commands.Richard W.M. Jones2009-06-292-5/+173
|
* Generated code for 'wc_*' commands.Richard W.M. Jones2009-06-292-0/+93
|
* Clarify documentation for mkdtemp.Richard W.M. Jones2009-06-241-4/+8
|
* Generated code for 'mkdtemp' command.Richard W.M. Jones2009-06-242-0/+45
|
* Generated code for 'scrub-*' commands.Richard W.M. Jones2009-06-232-1/+116
|
* Generated code for 'glob-expand'.Richard Jones2009-06-222-0/+42
|
* Generated code for 'sh' and 'sh-lines' commands.Richard Jones2009-06-222-1/+83
|
* Generated code for ntfs_3g_probe command.Richard Jones2009-06-082-0/+43
|
* Generated code for the 'sleep' command.Richard Jones2009-06-042-0/+31
|
* Generated code for 'add_drive_ro' call.Richard Jones2009-06-022-0/+60
|
* Add tests for bindings parameters, fix several broken bindings.Richard W.M. Jones2009-05-284-3/+89
|
* Add the test0* functions, used to test language bindings.Richard W.M. Jones2009-05-282-0/+776
|
* Move the appliance and build scripts into new appliance/ subdirectory.Richard W.M. Jones2009-05-281-2/+2
|
* Generated code for e2fsck-f command.Richard Jones2009-05-212-0/+43
|
* Generated code for 'find' command.Richard Jones2009-05-192-0/+57
|
* Generated code for lvresize, resize2fs.Richard Jones2009-05-182-0/+66
|
* Add vg-activate{,-all} commands, and resize recipe.Richard Jones2009-05-182-0/+83
|
* Add: pvresize, sfdisk-N, sfdisk-l, sfdisk-kernel-geomtry, ↵Richard W.M. Jones2009-05-152-0/+184
| | | | sfdisk-disk-geometry commands. Pass --no-reread flag to sfdisk.
* Add support for zerofree command.Richard W.M. Jones2009-05-142-0/+40
|
* Don't stash strings in the handle.Richard W.M. Jones2009-05-131-12/+0
| | | | | - makes it impossible to write bindings for set_{path,qemu,append} functions
* Add 'append', LIBGUESTFS_APPEND to set additional kernel options.Richard W.M. Jones2009-05-132-0/+74
|
* Test the 'command' and 'command_lines' functions thoroughly.Richard Jones2009-05-121-0/+15
|