X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=generator%2Fgenerator_actions.ml;h=c684e3587093aa0b9f7456292c89a96310e657e0;hp=d01871f289295d95aded3ebd4b52962d9d6c204c;hb=7739d7f471f9575828bd32489695d92dde005a9c;hpb=0003ea2c3dbaa7e22f4f616539136821d80694b8 diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index d01871f..c684e35 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -1,5 +1,5 @@ (* libguestfs - * Copyright (C) 2009-2010 Red Hat Inc. + * Copyright (C) 2009-2011 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -58,7 +58,7 @@ let test_all_rets = [ ] let test_functions = [ - ("test0", (RErr, test_all_args), -1, [NotInFish; NotInDocs], + ("test0", (RErr, test_all_args, []), -1, [NotInFish; NotInDocs], [], "internal test function - do not use", "\ @@ -72,7 +72,7 @@ You probably don't want to call this function."); ] @ List.flatten ( List.map ( fun (name, ret) -> - [(name, (ret, [String "val"]), -1, [NotInFish; NotInDocs], + [(name, (ret, [String "val"], []), -1, [NotInFish; NotInDocs], [], "internal test function - do not use", "\ @@ -83,7 +83,7 @@ return type correctly. It converts string C to the return type. You probably don't want to call this function."); - (name ^ "err", (ret, []), -1, [NotInFish; NotInDocs], + (name ^ "err", (ret, [], []), -1, [NotInFish; NotInDocs], [], "internal test function - do not use", "\ @@ -103,7 +103,7 @@ You probably don't want to call this function.")] *) let non_daemon_functions = test_functions @ [ - ("launch", (RErr, []), -1, [FishAlias "run"], + ("launch", (RErr, [], []), -1, [FishAlias "run"; Progress], [], "launch the qemu subprocess", "\ @@ -113,7 +113,7 @@ using L. You should call this after configuring the handle (eg. adding drives) but before performing any actions."); - ("wait_ready", (RErr, []), -1, [NotInFish], + ("wait_ready", (RErr, [], []), -1, [NotInFish; DeprecatedBy "launch"], [], "wait until the qemu subprocess launches (no op)", "\ @@ -128,50 +128,34 @@ If you see any calls to this function in code then you can just remove them, unless you want to retain compatibility with older versions of the API."); - ("kill_subprocess", (RErr, []), -1, [], + ("kill_subprocess", (RErr, [], []), -1, [], [], "kill the qemu subprocess", "\ This kills the qemu subprocess. You should never need to call this."); - ("add_drive", (RErr, [String "filename"]), -1, [FishAlias "add"], + ("add_drive", (RErr, [String "filename"], []), -1, [], [], "add an image to examine or modify", "\ -This function adds a virtual machine disk image C to the -guest. The first time you call this function, the disk appears as IDE -disk 0 (C) in the guest, the second time as C, and -so on. - -You don't necessarily need to be root when using libguestfs. However -you obviously do need sufficient permissions to access the filename -for whatever operations you want to perform (ie. read access if you -just want to read the image or write access if you want to modify the -image). - -This is equivalent to the qemu parameter -C<-drive file=filename,cache=off,if=...>. - -C is omitted in cases where it is not supported by -the underlying filesystem. +This function is the equivalent of calling C +with no optional parameters, so the disk is added writable, with +the format being detected automatically. -C is set at compile time by the configuration option -C<./configure --with-drive-if=...>. In the rare case where you -might need to change this at run time, use C -or C. +Automatic detection of the format opens you up to a potential +security hole when dealing with untrusted raw-format images. +See CVE-2010-3851 and RHBZ#642934. Specifying the format closes +this security hole. Therefore you should think about replacing +calls to this function with calls to C, +and specifying the format."); -Note that this call checks for the existence of C. This -stops you from specifying other types of drive which are supported -by qemu such as C and C URLs. To specify those, use -the general C call instead."); - - ("add_cdrom", (RErr, [String "filename"]), -1, [FishAlias "cdrom"], + ("add_cdrom", (RErr, [String "filename"], []), -1, [DeprecatedBy "add_drive_opts"], [], "add a CD-ROM disk image to examine", "\ This function adds a virtual CD-ROM disk image to the guest. -This is equivalent to the qemu parameter C<-cdrom filename>. +This is equivalent to the qemu parameter I<-cdrom filename>. Notes: @@ -192,38 +176,21 @@ should probably use C instead. =back"); - ("add_drive_ro", (RErr, [String "filename"]), -1, [FishAlias "add-ro"], + ("add_drive_ro", (RErr, [String "filename"], []), -1, [FishAlias "add-ro"], [], "add a drive in snapshot mode (read-only)", "\ -This adds a drive in snapshot mode, making it effectively -read-only. - -Note that writes to the device are allowed, and will be seen for -the duration of the guestfs handle, but they are written -to a temporary file which is discarded as soon as the guestfs -handle is closed. We don't currently have any method to enable -changes to be committed, although qemu can support this. - -This is equivalent to the qemu parameter -C<-drive file=filename,snapshot=on,if=...>. - -C is set at compile time by the configuration option -C<./configure --with-drive-if=...>. In the rare case where you -might need to change this at run time, use C -or C. - -Note that this call checks for the existence of C. This -stops you from specifying other types of drive which are supported -by qemu such as C and C URLs. To specify those, use -the general C call instead."); +This function is the equivalent of calling C +with the optional parameter C set to 1, +so the disk is added read-only, with the format being detected +automatically."); - ("config", (RErr, [String "qemuparam"; OptString "qemuvalue"]), -1, [], + ("config", (RErr, [String "qemuparam"; OptString "qemuvalue"], []), -1, [], [], "add qemu parameters", "\ This can be used to add arbitrary qemu command line parameters -of the form C<-param value>. Actually it's not quite arbitrary - we +of the form I<-param value>. Actually it's not quite arbitrary - we prevent you from setting some parameters which would interfere with parameters that we use. @@ -231,7 +198,7 @@ The first character of C string must be a C<-> (dash). C can be NULL."); - ("set_qemu", (RErr, [OptString "qemu"]), -1, [FishAlias "qemu"], + ("set_qemu", (RErr, [OptString "qemu"], []), -1, [FishAlias "qemu"], [], "set the qemu binary", "\ @@ -253,7 +220,7 @@ so you might see inconsistent results. Using the environment variable C is safest of all since that picks the qemu binary at the same time as the handle is created."); - ("get_qemu", (RConstString "qemu", []), -1, [], + ("get_qemu", (RConstString "qemu", [], []), -1, [], [InitNone, Always, TestRun ( [["get_qemu"]])], "get the qemu binary", @@ -263,7 +230,7 @@ Return the current qemu binary. This is always non-NULL. If it wasn't set already, then this will return the default qemu binary name."); - ("set_path", (RErr, [OptString "searchpath"]), -1, [FishAlias "path"], + ("set_path", (RErr, [OptString "searchpath"], []), -1, [FishAlias "path"], [], "set the search path", "\ @@ -274,7 +241,7 @@ C environment variable. Setting C to C restores the default path."); - ("get_path", (RConstString "path", []), -1, [], + ("get_path", (RConstString "path", [], []), -1, [], [InitNone, Always, TestRun ( [["get_path"]])], "get the search path", @@ -284,7 +251,7 @@ Return the current search path. This is always non-NULL. If it wasn't set already, then this will return the default path."); - ("set_append", (RErr, [OptString "append"]), -1, [FishAlias "append"], + ("set_append", (RErr, [OptString "append"], []), -1, [FishAlias "append"], [], "add options to kernel command line", "\ @@ -297,7 +264,7 @@ C environment variable. Setting C to C means I additional options are passed (libguestfs always adds a few of its own)."); - ("get_append", (RConstOptString "append", []), -1, [], + ("get_append", (RConstOptString "append", [], []), -1, [], (* This cannot be tested with the current framework. The * function can return NULL in normal operations, which the * test framework interprets as an error. @@ -310,41 +277,45 @@ guest kernel command line. If C then no options are added."); - ("set_autosync", (RErr, [Bool "autosync"]), -1, [FishAlias "autosync"], + ("set_autosync", (RErr, [Bool "autosync"], []), -1, [FishAlias "autosync"], [], "set autosync mode", "\ If C is true, this enables autosync. Libguestfs will make a -best effort attempt to run C followed by -C when the handle is closed +best effort attempt to make filesystems consistent and synchronized +when the handle is closed (also if the program exits without closing handles). -This is disabled by default (except in guestfish where it is -enabled by default)."); +This is enabled by default (since libguestfs 1.5.24, previously it was +disabled by default)."); - ("get_autosync", (RBool "autosync", []), -1, [], - [InitNone, Always, TestRun ( + ("get_autosync", (RBool "autosync", [], []), -1, [], + [InitNone, Always, TestOutputTrue ( [["get_autosync"]])], "get autosync mode", "\ Get the autosync flag."); - ("set_verbose", (RErr, [Bool "verbose"]), -1, [FishAlias "verbose"], + ("set_verbose", (RErr, [Bool "verbose"], []), -1, [FishAlias "verbose"], [], "set verbose mode", "\ -If C is true, this turns on verbose messages (to C). +If C is true, this turns on verbose messages. Verbose messages are disabled unless the environment variable -C is defined and set to C<1>."); +C is defined and set to C<1>. + +Verbose messages are normally sent to C, unless you +register a callback to send them somewhere else (see +C)."); - ("get_verbose", (RBool "verbose", []), -1, [], + ("get_verbose", (RBool "verbose", [], []), -1, [], [], "get verbose mode", "\ This returns the verbose messages flag."); - ("is_ready", (RBool "ready", []), -1, [], + ("is_ready", (RBool "ready", [], []), -1, [], [InitNone, Always, TestOutputTrue ( [["is_ready"]])], "is ready to accept commands", @@ -354,7 +325,7 @@ This returns true iff this handle is ready to accept commands For more information on states, see L."); - ("is_config", (RBool "config", []), -1, [], + ("is_config", (RBool "config", [], []), -1, [], [InitNone, Always, TestOutputFalse ( [["is_config"]])], "is in configuration state", @@ -364,7 +335,7 @@ This returns true iff this handle is being configured For more information on states, see L."); - ("is_launching", (RBool "launching", []), -1, [], + ("is_launching", (RBool "launching", [], []), -1, [], [InitNone, Always, TestOutputFalse ( [["is_launching"]])], "is launching subprocess", @@ -374,7 +345,7 @@ This returns true iff this handle is launching the subprocess For more information on states, see L."); - ("is_busy", (RBool "busy", []), -1, [], + ("is_busy", (RBool "busy", [], []), -1, [], [InitNone, Always, TestOutputFalse ( [["is_busy"]])], "is busy processing a command", @@ -384,7 +355,7 @@ This returns true iff this handle is busy processing a command For more information on states, see L."); - ("get_state", (RInt "state", []), -1, [], + ("get_state", (RInt "state", [], []), -1, [], [], "get the current state", "\ @@ -393,7 +364,7 @@ only useful for printing debug and internal error messages. For more information on states, see L."); - ("set_memsize", (RErr, [Int "memsize"]), -1, [FishAlias "memsize"], + ("set_memsize", (RErr, [Int "memsize"], []), -1, [FishAlias "memsize"], [InitNone, Always, TestOutputInt ( [["set_memsize"; "500"]; ["get_memsize"]], 500)], @@ -410,7 +381,7 @@ created. For more information on the architecture of libguestfs, see L."); - ("get_memsize", (RInt "memsize", []), -1, [], + ("get_memsize", (RInt "memsize", [], []), -1, [], [InitNone, Always, TestOutputIntOp ( [["get_memsize"]], ">=", 256)], "get memory allocated to the qemu subprocess", @@ -425,7 +396,7 @@ then this returns the compiled-in default value for memsize. For more information on the architecture of libguestfs, see L."); - ("get_pid", (RInt "pid", []), -1, [FishAlias "pid"], + ("get_pid", (RInt "pid", [], []), -1, [FishAlias "pid"], [InitNone, Always, TestOutputIntOp ( [["get_pid"]], ">=", 1)], "get PID of qemu subprocess", @@ -435,7 +406,7 @@ qemu subprocess, then this will return an error. This is an internal call used for debugging and testing."); - ("version", (RStruct ("version", "version"), []), -1, [], + ("version", (RStruct ("version", "version"), [], []), -1, [], [InitNone, Always, TestOutputStruct ( [["version"]], [CompareWithInt ("major", 1)])], "get the library version number", @@ -471,7 +442,7 @@ features from later versions into earlier versions, making this an unreliable way to test for features. Use C instead."); - ("set_selinux", (RErr, [Bool "selinux"]), -1, [FishAlias "selinux"], + ("set_selinux", (RErr, [Bool "selinux"], []), -1, [FishAlias "selinux"], [InitNone, Always, TestOutputTrue ( [["set_selinux"; "true"]; ["get_selinux"]])], @@ -486,7 +457,7 @@ Permissive mode (C). For more information on the architecture of libguestfs, see L."); - ("get_selinux", (RBool "selinux", []), -1, [], + ("get_selinux", (RBool "selinux", [], []), -1, [], [], "get SELinux enabled flag", "\ @@ -496,33 +467,33 @@ is passed to the appliance at boot time. See C. For more information on the architecture of libguestfs, see L."); - ("set_trace", (RErr, [Bool "trace"]), -1, [FishAlias "trace"], + ("set_trace", (RErr, [Bool "trace"], []), -1, [FishAlias "trace"], [InitNone, Always, TestOutputFalse ( [["set_trace"; "false"]; ["get_trace"]])], "enable or disable command traces", "\ -If the command trace flag is set to 1, then commands are -printed on stderr before they are executed in a format -which is very similar to the one used by guestfish. In -other words, you can run a program with this enabled, and -you will get out a script which you can feed to guestfish -to perform the same set of actions. +If the command trace flag is set to 1, then libguestfs +calls, parameters and return values are traced. If you want to trace C API calls into libguestfs (and other libraries) then possibly a better way is to use the external ltrace(1) command. Command traces are disabled unless the environment variable -C is defined and set to C<1>."); +C is defined and set to C<1>. - ("get_trace", (RBool "trace", []), -1, [], +Trace messages are normally sent to C, unless you +register a callback to send them somewhere else (see +C)."); + + ("get_trace", (RBool "trace", [], []), -1, [], [], "get command trace enabled flag", "\ Return the command trace flag."); - ("set_direct", (RErr, [Bool "direct"]), -1, [FishAlias "direct"], + ("set_direct", (RErr, [Bool "direct"], []), -1, [FishAlias "direct"], [InitNone, Always, TestOutputFalse ( [["set_direct"; "false"]; ["get_direct"]])], @@ -541,13 +512,13 @@ are doing. The default is disabled."); - ("get_direct", (RBool "direct", []), -1, [], + ("get_direct", (RBool "direct", [], []), -1, [], [], "get direct appliance mode flag", "\ Return the direct appliance mode flag."); - ("set_recovery_proc", (RErr, [Bool "recoveryproc"]), -1, [FishAlias "recovery-proc"], + ("set_recovery_proc", (RErr, [Bool "recoveryproc"], []), -1, [FishAlias "recovery-proc"], [InitNone, Always, TestOutputTrue ( [["set_recovery_proc"; "true"]; ["get_recovery_proc"]])], @@ -567,27 +538,27 @@ if the main process will fork itself into the background thinks that the main program has disappeared and so kills qemu, which is not very helpful."); - ("get_recovery_proc", (RBool "recoveryproc", []), -1, [], + ("get_recovery_proc", (RBool "recoveryproc", [], []), -1, [], [], "get recovery process enabled flag", "\ Return the recovery process enabled flag."); - ("add_drive_with_if", (RErr, [String "filename"; String "iface"]), -1, [], + ("add_drive_with_if", (RErr, [String "filename"; String "iface"], []), -1, [DeprecatedBy "add_drive_opts"], [], "add a drive specifying the QEMU block emulation to use", "\ This is the same as C but it allows you to specify the QEMU interface emulation to use at run time."); - ("add_drive_ro_with_if", (RErr, [String "filename"; String "iface"]), -1, [], + ("add_drive_ro_with_if", (RErr, [String "filename"; String "iface"], []), -1, [DeprecatedBy "add_drive_opts"], [], "add a drive read-only specifying the QEMU block emulation to use", "\ This is the same as C but it allows you to specify the QEMU interface emulation to use at run time."); - ("file_architecture", (RString "arch", [Pathname "filename"]), -1, [], + ("file_architecture", (RString "arch", [Pathname "filename"], []), -1, [], [InitISOFS, Always, TestOutput ( [["file_architecture"; "/bin-i586-dynamic"]], "i386"); InitISOFS, Always, TestOutput ( @@ -715,7 +686,7 @@ initrd or kernel module(s) instead. =back"); - ("inspect_os", (RStringList "roots", []), -1, [], + ("inspect_os", (RStringList "roots", [], []), -1, [], [], "inspect disk and return list of operating systems found", "\ @@ -751,13 +722,10 @@ Please read L for more details. See also C."); - ("inspect_get_type", (RString "name", [Device "root"]), -1, [], + ("inspect_get_type", (RString "name", [Device "root"], []), -1, [], [], "get type of inspected operating system", "\ -This function should only be called with a root device string -as returned by C. - This returns the type of the inspected operating system. Currently defined types are: @@ -771,6 +739,10 @@ Any Linux-based operating system. Any Microsoft Windows operating system. +=item \"freebsd\" + +FreeBSD. + =item \"unknown\" The operating system type could not be determined. @@ -782,13 +754,10 @@ The caller should be prepared to handle any string. Please read L for more details."); - ("inspect_get_arch", (RString "arch", [Device "root"]), -1, [], + ("inspect_get_arch", (RString "arch", [Device "root"], []), -1, [], [], "get architecture of inspected operating system", "\ -This function should only be called with a root device string -as returned by C. - This returns the architecture of the inspected operating system. The possible return values are listed under C. @@ -798,13 +767,10 @@ string C is returned. Please read L for more details."); - ("inspect_get_distro", (RString "distro", [Device "root"]), -1, [], + ("inspect_get_distro", (RString "distro", [Device "root"], []), -1, [], [], "get distro of inspected operating system", "\ -This function should only be called with a root device string -as returned by C. - This returns the distro (distribution) of the inspected operating system. @@ -812,31 +778,71 @@ Currently defined distros are: =over 4 +=item \"archlinux\" + +Arch Linux. + +=item \"centos\" + +CentOS. + =item \"debian\" -Debian or a Debian-derived distro such as Ubuntu. +Debian. =item \"fedora\" Fedora. +=item \"gentoo\" + +Gentoo. + +=item \"linuxmint\" + +Linux Mint. + +=item \"mandriva\" + +Mandriva. + +=item \"meego\" + +MeeGo. + +=item \"pardus\" + +Pardus. + =item \"redhat-based\" Some Red Hat-derived distro. =item \"rhel\" -Red Hat Enterprise Linux and some derivatives. +Red Hat Enterprise Linux. -=item \"windows\" +=item \"scientificlinux\" -Windows does not have distributions. This string is -returned if the OS type is Windows. +Scientific Linux. + +=item \"slackware\" + +Slackware. + +=item \"ubuntu\" + +Ubuntu. =item \"unknown\" The distro could not be determined. +=item \"windows\" + +Windows does not have distributions. This string is +returned if the OS type is Windows. + =back Future versions of libguestfs may return other strings here. @@ -844,13 +850,10 @@ The caller should be prepared to handle any string. Please read L for more details."); - ("inspect_get_major_version", (RInt "major", [Device "root"]), -1, [], + ("inspect_get_major_version", (RInt "major", [Device "root"], []), -1, [], [], "get major version of inspected operating system", "\ -This function should only be called with a root device string -as returned by C. - This returns the major version number of the inspected operating system. @@ -865,13 +868,10 @@ If the version could not be determined, then C<0> is returned. Please read L for more details."); - ("inspect_get_minor_version", (RInt "minor", [Device "root"]), -1, [], + ("inspect_get_minor_version", (RInt "minor", [Device "root"], []), -1, [], [], "get minor version of inspected operating system", "\ -This function should only be called with a root device string -as returned by C. - This returns the minor version number of the inspected operating system. @@ -880,13 +880,10 @@ If the version could not be determined, then C<0> is returned. Please read L for more details. See also C."); - ("inspect_get_product_name", (RString "product", [Device "root"]), -1, [], + ("inspect_get_product_name", (RString "product", [Device "root"], []), -1, [], [], "get product name of inspected operating system", "\ -This function should only be called with a root device string -as returned by C. - This returns the product name of the inspected operating system. The product name is generally some freeform string which can be displayed to the user, but should not be @@ -897,17 +894,18 @@ string C is returned. Please read L for more details."); - ("inspect_get_mountpoints", (RHashtable "mountpoints", [Device "root"]), -1, [], + ("inspect_get_mountpoints", (RHashtable "mountpoints", [Device "root"], []), -1, [], [], "get mountpoints of inspected operating system", "\ -This function should only be called with a root device string -as returned by C. - This returns a hash of where we think the filesystems associated with this operating system should be mounted. Callers should note that this is at best an educated guess made by reading configuration files such as C. +I that this may return filesystems +which are non-existent or not mountable and callers should +be prepared to handle or ignore failures if they try to +mount them. Each element in the returned hashtable has a key which is the path of the mountpoint (eg. C) and a value @@ -917,16 +915,19 @@ which is the filesystem that would be mounted there Non-mounted devices such as swap devices are I returned in this list. +For operating systems like Windows which still use drive +letters, this call will only return an entry for the first +drive \"mounted on\" C. For information about the +mapping of drive letters to partitions, see +C. + Please read L for more details. See also C."); - ("inspect_get_filesystems", (RStringList "filesystems", [Device "root"]), -1, [], + ("inspect_get_filesystems", (RStringList "filesystems", [Device "root"], []), -1, [], [], "get filesystems associated with inspected operating system", "\ -This function should only be called with a root device string -as returned by C. - This returns a list of all the filesystems that we think are associated with this operating system. This includes the root filesystem, other ordinary filesystems, and @@ -938,7 +939,7 @@ for a filesystem to be shared between operating systems. Please read L for more details. See also C."); - ("set_network", (RErr, [Bool "network"]), -1, [FishAlias "network"], + ("set_network", (RErr, [Bool "network"], []), -1, [FishAlias "network"], [], "set enable network flag", "\ @@ -951,13 +952,13 @@ This affects whether commands are able to access the network You must call this before calling C, otherwise it has no effect."); - ("get_network", (RBool "network", []), -1, [], + ("get_network", (RBool "network", [], []), -1, [], [], "get enable network flag", "\ This returns the enable network flag."); - ("list_filesystems", (RHashtable "fses", []), -1, [], + ("list_filesystems", (RHashtable "fses", [], []), -1, [], [], "list filesystems", "\ @@ -990,6 +991,560 @@ be mountable but require special options. Filesystems may not all belong to a single logical operating system (use C to look for OSes)."); + ("add_drive_opts", (RErr, [String "filename"], [Bool "readonly"; String "format"; String "iface"]), -1, [FishAlias "add"], + [], + "add an image to examine or modify", + "\ +This function adds a virtual machine disk image C to +libguestfs. The first time you call this function, the disk +appears as C, the second time as C, and +so on. + +You don't necessarily need to be root when using libguestfs. However +you obviously do need sufficient permissions to access the filename +for whatever operations you want to perform (ie. read access if you +just want to read the image or write access if you want to modify the +image). + +This call checks that C exists. + +The optional arguments are: + +=over 4 + +=item C + +If true then the image is treated as read-only. Writes are still +allowed, but they are stored in a temporary snapshot overlay which +is discarded at the end. The disk that you add is not modified. + +=item C + +This forces the image format. If you omit this (or use C +or C) then the format is automatically detected. +Possible formats include C and C. + +Automatic detection of the format opens you up to a potential +security hole when dealing with untrusted raw-format images. +See CVE-2010-3851 and RHBZ#642934. Specifying the format closes +this security hole. + +=item C + +This rarely-used option lets you emulate the behaviour of the +deprecated C call (q.v.) + +=back"); + + ("inspect_get_windows_systemroot", (RString "systemroot", [Device "root"], []), -1, [], + [], + "get Windows systemroot of inspected operating system", + "\ +This returns the Windows systemroot of the inspected guest. +The systemroot is a directory path such as C. + +This call assumes that the guest is Windows and that the +systemroot could be determined by inspection. If this is not +the case then an error is returned. + +Please read L for more details."); + + ("inspect_get_roots", (RStringList "roots", [], []), -1, [], + [], + "return list of operating systems found by last inspection", + "\ +This function is a convenient way to get the list of root +devices, as returned from a previous call to C, +but without redoing the whole inspection process. + +This returns an empty list if either no root devices were +found or the caller has not called C. + +Please read L for more details."); + + ("debug_cmdline", (RStringList "cmdline", [], []), -1, [NotInDocs], + [], + "debug the QEMU command line (internal use only)", + "\ +This returns the internal QEMU command line. 'debug' commands are +not part of the formal API and can be removed or changed at any time."); + + ("add_domain", (RInt "nrdisks", [String "dom"], [String "libvirturi"; Bool "readonly"; String "iface"; Bool "live"; Bool "allowuuid"]), -1, [FishAlias "domain"], + [], + "add the disk(s) from a named libvirt domain", + "\ +This function adds the disk(s) attached to the named libvirt +domain C. It works by connecting to libvirt, requesting +the domain and domain XML from libvirt, parsing it for disks, +and calling C on each one. + +The number of disks added is returned. This operation is atomic: +if an error is returned, then no disks are added. + +This function does some minimal checks to make sure the libvirt +domain is not running (unless C is true). In a future +version we will try to acquire the libvirt lock on each disk. + +Disks must be accessible locally. This often means that adding disks +from a remote libvirt connection (see L) +will fail unless those disks are accessible via the same device path +locally too. + +The optional C parameter sets the libvirt URI +(see L). If this is not set then +we connect to the default libvirt URI (or one set through an +environment variable, see the libvirt documentation for full +details). + +The optional C flag controls whether this call will try +to connect to a running virtual machine C process if +it sees a suitable EchannelE element in the libvirt +XML definition. The default (if the flag is omitted) is never +to try. See L for more +information. + +If the C flag is true (default is false) then a UUID +I be passed instead of the domain name. The C string is +treated as a UUID first and looked up, and if that lookup fails +then we treat C as a name as usual. + +The other optional parameters are passed directly through to +C."); + +(* +This interface is not quite baked yet. -- RWMJ 2010-11-11 + ("add_libvirt_dom", (RInt "nrdisks", [Pointer ("virDomainPtr", "dom")], [Bool "readonly"; String "iface"; Bool "live"]), -1, [NotInFish], + [], + "add the disk(s) from a libvirt domain", + "\ +This function adds the disk(s) attached to the libvirt domain C. +It works by requesting the domain XML from libvirt, parsing it for +disks, and calling C on each one. + +In the C API we declare C, but really it has type +C. This is so we don't need Elibvirt.hE. + +The number of disks added is returned. This operation is atomic: +if an error is returned, then no disks are added. + +This function does some minimal checks to make sure the libvirt +domain is not running (unless C is true). In a future +version we will try to acquire the libvirt lock on each disk. + +Disks must be accessible locally. This often means that adding disks +from a remote libvirt connection (see L) +will fail unless those disks are accessible via the same device path +locally too. + +The optional C flag controls whether this call will try +to connect to a running virtual machine C process if +it sees a suitable EchannelE element in the libvirt +XML definition. The default (if the flag is omitted) is never +to try. See L for more +information. + +The other optional parameters are passed directly through to +C."); +*) + + ("inspect_get_package_format", (RString "packageformat", [Device "root"], []), -1, [], + [], + "get package format used by the operating system", + "\ +This function and C return +the package format and package management tool used by the +inspected operating system. For example for Fedora these +functions would return C (package format) and +C (package management). + +This returns the string C if we could not determine the +package format I if the operating system does not have +a real packaging system (eg. Windows). + +Possible strings include: C, C, C, C, C. +Future versions of libguestfs may return other strings. + +Please read L for more details."); + + ("inspect_get_package_management", (RString "packagemanagement", [Device "root"], []), -1, [], + [], + "get package management tool used by the operating system", + "\ +C and this function return +the package format and package management tool used by the +inspected operating system. For example for Fedora these +functions would return C (package format) and +C (package management). + +This returns the string C if we could not determine the +package management tool I if the operating system does not have +a real packaging system (eg. Windows). + +Possible strings include: C, C, +C (for all Debian derivatives), +C, C, C, C. +Future versions of libguestfs may return other strings. + +Please read L for more details."); + + ("inspect_list_applications", (RStructList ("applications", "application"), [Device "root"], []), -1, [], + [], + "get list of applications installed in the operating system", + "\ +Return the list of applications installed in the operating system. + +I This call works differently from other parts of the +inspection API. You have to call C, then +C, then mount up the disks, +before calling this. Listing applications is a significantly +more difficult operation which requires access to the full +filesystem. Also note that unlike the other +C calls which are just returning +data cached in the libguestfs handle, this call actually reads +parts of the mounted filesystems during the call. + +This returns an empty list if the inspection code was not able +to determine the list of applications. + +The application structure contains the following fields: + +=over 4 + +=item C + +The name of the application. For Red Hat-derived and Debian-derived +Linux guests, this is the package name. + +=item C + +The display name of the application, sometimes localized to the +install language of the guest operating system. + +If unavailable this is returned as an empty string C<\"\">. +Callers needing to display something can use C instead. + +=item C + +For package managers which use epochs, this contains the epoch of +the package (an integer). If unavailable, this is returned as C<0>. + +=item C + +The version string of the application or package. If unavailable +this is returned as an empty string C<\"\">. + +=item C + +The release string of the application or package, for package +managers that use this. If unavailable this is returned as an +empty string C<\"\">. + +=item C + +The installation path of the application (on operating systems +such as Windows which use installation paths). This path is +in the format used by the guest operating system, it is not +a libguestfs path. + +If unavailable this is returned as an empty string C<\"\">. + +=item C + +The install path translated into a libguestfs path. +If unavailable this is returned as an empty string C<\"\">. + +=item C + +The name of the publisher of the application, for package +managers that use this. If unavailable this is returned +as an empty string C<\"\">. + +=item C + +The URL (eg. upstream URL) of the application. +If unavailable this is returned as an empty string C<\"\">. + +=item C + +For packaging systems which support this, the name of the source +package. If unavailable this is returned as an empty string C<\"\">. + +=item C + +A short (usually one line) description of the application or package. +If unavailable this is returned as an empty string C<\"\">. + +=item C + +A longer description of the application or package. +If unavailable this is returned as an empty string C<\"\">. + +=back + +Please read L for more details."); + + ("inspect_get_hostname", (RString "hostname", [Device "root"], []), -1, [], + [], + "get hostname of the operating system", + "\ +This function returns the hostname of the operating system +as found by inspection of the guest's configuration files. + +If the hostname could not be determined, then the +string C is returned. + +Please read L for more details."); + + ("inspect_get_format", (RString "format", [Device "root"], []), -1, [], + [], + "get format of inspected operating system", + "\ +This returns the format of the inspected operating system. You +can use it to detect install images, live CDs and similar. + +Currently defined formats are: + +=over 4 + +=item \"installed\" + +This is an installed operating system. + +=item \"installer\" + +The disk image being inspected is not an installed operating system, +but a I install disk, live CD, or similar. + +=item \"unknown\" + +The format of this disk image is not known. + +=back + +Future versions of libguestfs may return other strings here. +The caller should be prepared to handle any string. + +Please read L for more details."); + + ("inspect_is_live", (RBool "live", [Device "root"], []), -1, [], + [], + "get live flag for install disk", + "\ +If C returns C (this +is an install disk), then this returns true if a live image +was detected on the disk. + +Please read L for more details."); + + ("inspect_is_netinst", (RBool "netinst", [Device "root"], []), -1, [], + [], + "get netinst (network installer) flag for install disk", + "\ +If C returns C (this +is an install disk), then this returns true if the disk is +a network installer, ie. not a self-contained install CD but +one which is likely to require network access to complete +the install. + +Please read L for more details."); + + ("inspect_is_multipart", (RBool "multipart", [Device "root"], []), -1, [], + [], + "get multipart flag for install disk", + "\ +If C returns C (this +is an install disk), then this returns true if the disk is +part of a set. + +Please read L for more details."); + + ("set_attach_method", (RErr, [String "attachmethod"], []), -1, [FishAlias "attach-method"], + [], + "set the attach method", + "\ +Set the method that libguestfs uses to connect to the back end +guestfsd daemon. Possible methods are: + +=over 4 + +=item C + +Launch an appliance and connect to it. This is the ordinary method +and the default. + +=item C> + +Connect to the Unix domain socket I. + +This method lets you connect to an existing daemon or (using +virtio-serial) to a live guest. For more information, see +L. + +=back"); + + ("get_attach_method", (RString "attachmethod", [], []), -1, [], + [InitNone, Always, TestOutput ( + [["get_attach_method"]], "appliance")], + "get the attach method", + "\ +Return the current attach method. See C."); + + ("inspect_get_product_variant", (RString "variant", [Device "root"], []), -1, [], + [], + "get product variant of inspected operating system", + "\ +This returns the product variant of the inspected operating +system. + +For Windows guests, this returns the contents of the Registry key +C +C which is usually a string such as +C or C (other values are possible). This +can be used to distinguish consumer and enterprise versions +of Windows that have the same version number (for example, +Windows 7 and Windows 2008 Server are both version 6.1, +but the former is C and the latter is C). + +For enterprise Linux guests, in future we intend this to return +the product variant such as C, C and so on. But +this is not implemented at present. + +If the product variant could not be determined, then the +string C is returned. + +Please read L for more details. +See also C, +C."); + + ("inspect_get_windows_current_control_set", (RString "controlset", [Device "root"], []), -1, [], + [], + "get Windows CurrentControlSet of inspected operating system", + "\ +This returns the Windows CurrentControlSet of the inspected guest. +The CurrentControlSet is a registry key name such as C. + +This call assumes that the guest is Windows and that the +Registry could be examined by inspection. If this is not +the case then an error is returned. + +Please read L for more details."); + + ("inspect_get_drive_mappings", (RHashtable "drives", [Device "root"], []), -1, [], + [], + "get drive letter mappings", + "\ +This call is useful for Windows which uses a primitive system +of assigning drive letters (like \"C:\") to partitions. +This inspection API examines the Windows Registry to find out +how disks/partitions are mapped to drive letters, and returns +a hash table as in the example below: + + C => /dev/vda2 + E => /dev/vdb1 + F => /dev/vdc1 + +Note that keys are drive letters. For Windows, the key is +case insensitive and just contains the drive letter, without +the customary colon separator character. + +In future we may support other operating systems that also used drive +letters, but the keys for those might not be case insensitive +and might be longer than 1 character. For example in OS-9, +hard drives were named C, C

etc. + +For Windows guests, currently only hard drive mappings are +returned. Removable disks (eg. DVD-ROMs) are ignored. + +For guests that do not use drive mappings, or if the drive mappings +could not be determined, this returns an empty hash table. + +Please read L for more details. +See also C, +C."); + + ("inspect_get_icon", (RBufferOut "icon", [Device "root"], [Bool "favicon"; Bool "highquality"]), -1, [], + [], + "get the icon corresponding to this operating system", + "\ +This function returns an icon corresponding to the inspected +operating system. The icon is returned as a buffer containing a +PNG image (re-encoded to PNG if necessary). + +If it was not possible to get an icon this function returns a +zero-length (non-NULL) buffer. I. + +Libguestfs will start by looking for a file called +C or C +and if it has the correct format, the contents of this file will +be returned. You can disable favicons by passing the +optional C boolean as false (default is true). + +If finding the favicon fails, then we look in other places in the +guest for a suitable icon. + +If the optional C boolean is true then +only high quality icons are returned, which means only icons of +high resolution with an alpha channel. The default (false) is +to return any icon we can, even if it is of substandard quality. + +Notes: + +=over 4 + +=item * + +Unlike most other inspection API calls, the guest's disks must be +mounted up before you call this, since it needs to read information +from the guest filesystem during the call. + +=item * + +B The icon data comes from the untrusted guest, +and should be treated with caution. PNG files have been +known to contain exploits. Ensure that libpng (or other relevant +libraries) are fully up to date before trying to process or +display the icon. + +=item * + +The PNG image returned can be any size. It might not be square. +Libguestfs tries to return the largest, highest quality +icon available. The application must scale the icon to the +required size. + +=item * + +Extracting icons from Windows guests requires the external +C program from the C package, and +several programs (C, C, C) +from the C package. These must be installed separately. + +=item * + +Operating system icons are usually trademarks. Seek legal +advice before using trademarks in applications. + +=back"); + + ("set_pgroup", (RErr, [Bool "pgroup"], []), -1, [FishAlias "pgroup"], + [], + "set process group flag", + "\ +If C is true, child processes are placed into +their own process group. + +The practical upshot of this is that signals like C (from +users pressing C<^C>) won't be received by the child process. + +The default for this flag is false, because usually you want +C<^C> to kill the subprocess."); + + ("get_pgroup", (RBool "pgroup", [], []), -1, [], + [], + "get process group flag", + "\ +This returns the process group flag."); + ] (* daemon_functions are any functions which cause some action @@ -997,7 +1552,7 @@ not all belong to a single logical operating system *) let daemon_functions = [ - ("mount", (RErr, [Device "device"; String "mountpoint"]), 1, [], + ("mount", (RErr, [Device "device"; String "mountpoint"], []), 1, [DeprecatedBy "mount_options"], [InitEmpty, Always, TestOutput ( [["part_disk"; "/dev/sda"; "mbr"]; ["mkfs"; "ext2"; "/dev/sda1"]; @@ -1030,7 +1585,7 @@ C in any code that needs performance, and instead use C (use an empty string for the first parameter if you don't want any options)."); - ("sync", (RErr, []), 2, [], + ("sync", (RErr, [], []), 2, [], [ InitEmpty, Always, TestRun [["sync"]]], "sync disks, writes are flushed through to the disk image", "\ @@ -1040,10 +1595,10 @@ underlying disk image. You should always call this if you have modified a disk image, before closing the handle."); - ("touch", (RErr, [Pathname "path"]), 3, [], - [InitBasicFS, Always, TestOutputTrue ( - [["touch"; "/new"]; - ["exists"; "/new"]])], + ("touch", (RErr, [Pathname "path"], []), 3, [], + [InitScratchFS, Always, TestOutputTrue ( + [["touch"; "/touch"]; + ["exists"; "/touch"]])], "update file timestamps or create a new file", "\ Touch acts like the L command. It can be used to @@ -1053,7 +1608,7 @@ to create a new zero-length file. This command only works on regular files, and will fail on other file types such as directories, symbolic links, block special etc."); - ("cat", (RString "content", [Pathname "path"]), 4, [ProtocolLimitWarning], + ("cat", (RString "content", [Pathname "path"], []), 4, [ProtocolLimitWarning], [InitISOFS, Always, TestOutput ( [["cat"; "/known-2"]], "abcdef\n")], "list the contents of a file", @@ -1065,7 +1620,7 @@ Note that this function cannot correctly handle binary files as end of string). For those you need to use the C or C functions which have a more complex interface."); - ("ll", (RString "listing", [Pathname "directory"]), 5, [], + ("ll", (RString "listing", [Pathname "directory"], []), 5, [], [], (* XXX Tricky to test because it depends on the exact format * of the 'ls -l' command, which changes between F10 and F11. *) @@ -1077,12 +1632,13 @@ there is no cwd) in the format of 'ls -la'. This command is mostly useful for interactive sessions. It is I intended that you try to parse the output string."); - ("ls", (RStringList "listing", [Pathname "directory"]), 6, [], - [InitBasicFS, Always, TestOutputList ( - [["touch"; "/new"]; - ["touch"; "/newer"]; - ["touch"; "/newest"]; - ["ls"; "/"]], ["lost+found"; "new"; "newer"; "newest"])], + ("ls", (RStringList "listing", [Pathname "directory"], []), 6, [], + [InitScratchFS, Always, TestOutputList ( + [["mkdir"; "/ls"]; + ["touch"; "/ls/new"]; + ["touch"; "/ls/newer"]; + ["touch"; "/ls/newest"]; + ["ls"; "/ls"]], ["new"; "newer"; "newest"])], "list the files in a directory", "\ List the files in C (relative to the root directory, @@ -1092,7 +1648,7 @@ hidden files are shown. This command is mostly useful for interactive sessions. Programs should probably use C instead."); - ("list_devices", (RStringList "devices", []), 7, [], + ("list_devices", (RStringList "devices", [], []), 7, [], [InitEmpty, Always, TestOutputListOfDevices ( [["list_devices"]], ["/dev/sda"; "/dev/sdb"; "/dev/sdc"; "/dev/sdd"])], "list the block devices", @@ -1103,12 +1659,15 @@ The full block device names are returned, eg. C. See also C."); - ("list_partitions", (RStringList "partitions", []), 8, [], + ("list_partitions", (RStringList "partitions", [], []), 8, [], [InitBasicFS, Always, TestOutputListOfDevices ( - [["list_partitions"]], ["/dev/sda1"]); + [["list_partitions"]], ["/dev/sda1"; "/dev/sdb1"]); InitEmpty, Always, TestOutputListOfDevices ( - [["sfdiskM"; "/dev/sda"; ",100 ,200 ,"]; - ["list_partitions"]], ["/dev/sda1"; "/dev/sda2"; "/dev/sda3"])], + [["part_init"; "/dev/sda"; "mbr"]; + ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; + ["part_add"; "/dev/sda"; "p"; "204800"; "409599"]; + ["part_add"; "/dev/sda"; "p"; "409600"; "-64"]; + ["list_partitions"]], ["/dev/sda1"; "/dev/sda2"; "/dev/sda3"; "/dev/sdb1"])], "list the partitions", "\ List all the partitions detected on all block devices. @@ -1120,11 +1679,14 @@ call C. See also C."); - ("pvs", (RStringList "physvols", []), 9, [Optional "lvm2"], + ("pvs", (RStringList "physvols", [], []), 9, [Optional "lvm2"], [InitBasicFSonLVM, Always, TestOutputListOfDevices ( [["pvs"]], ["/dev/sda1"]); InitEmpty, Always, TestOutputListOfDevices ( - [["sfdiskM"; "/dev/sda"; ",100 ,200 ,"]; + [["part_init"; "/dev/sda"; "mbr"]; + ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; + ["part_add"; "/dev/sda"; "p"; "204800"; "409599"]; + ["part_add"; "/dev/sda"; "p"; "409600"; "-64"]; ["pvcreate"; "/dev/sda1"]; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; @@ -1139,11 +1701,14 @@ PVs (eg. C). See also C."); - ("vgs", (RStringList "volgroups", []), 10, [Optional "lvm2"], + ("vgs", (RStringList "volgroups", [], []), 10, [Optional "lvm2"], [InitBasicFSonLVM, Always, TestOutputList ( [["vgs"]], ["VG"]); InitEmpty, Always, TestOutputList ( - [["sfdiskM"; "/dev/sda"; ",100 ,200 ,"]; + [["part_init"; "/dev/sda"; "mbr"]; + ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; + ["part_add"; "/dev/sda"; "p"; "204800"; "409599"]; + ["part_add"; "/dev/sda"; "p"; "409600"; "-64"]; ["pvcreate"; "/dev/sda1"]; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; @@ -1160,11 +1725,14 @@ detected (eg. C). See also C."); - ("lvs", (RStringList "logvols", []), 11, [Optional "lvm2"], + ("lvs", (RStringList "logvols", [], []), 11, [Optional "lvm2"], [InitBasicFSonLVM, Always, TestOutputList ( [["lvs"]], ["/dev/VG/LV"]); InitEmpty, Always, TestOutputList ( - [["sfdiskM"; "/dev/sda"; ",100 ,200 ,"]; + [["part_init"; "/dev/sda"; "mbr"]; + ["part_add"; "/dev/sda"; "p"; "64"; "204799"]; + ["part_add"; "/dev/sda"; "p"; "204800"; "409599"]; + ["part_add"; "/dev/sda"; "p"; "409600"; "-64"]; ["pvcreate"; "/dev/sda1"]; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; @@ -1184,28 +1752,28 @@ This returns a list of the logical volume device names See also C, C."); - ("pvs_full", (RStructList ("physvols", "lvm_pv"), []), 12, [Optional "lvm2"], + ("pvs_full", (RStructList ("physvols", "lvm_pv"), [], []), 12, [Optional "lvm2"], [], (* XXX how to test? *) "list the LVM physical volumes (PVs)", "\ List all the physical volumes detected. This is the equivalent of the L command. The \"full\" version includes all fields."); - ("vgs_full", (RStructList ("volgroups", "lvm_vg"), []), 13, [Optional "lvm2"], + ("vgs_full", (RStructList ("volgroups", "lvm_vg"), [], []), 13, [Optional "lvm2"], [], (* XXX how to test? *) "list the LVM volume groups (VGs)", "\ List all the volumes groups detected. This is the equivalent of the L command. The \"full\" version includes all fields."); - ("lvs_full", (RStructList ("logvols", "lvm_lv"), []), 14, [Optional "lvm2"], + ("lvs_full", (RStructList ("logvols", "lvm_lv"), [], []), 14, [Optional "lvm2"], [], (* XXX how to test? *) "list the LVM logical volumes (LVs)", "\ List all the logical volumes detected. This is the equivalent of the L command. The \"full\" version includes all fields."); - ("read_lines", (RStringList "lines", [Pathname "path"]), 15, [], + ("read_lines", (RStringList "lines", [Pathname "path"], []), 15, [], [InitISOFS, Always, TestOutputList ( [["read_lines"; "/known-4"]], ["abc"; "def"; "ghi"]); InitISOFS, Always, TestOutputList ( @@ -1222,7 +1790,7 @@ Note that this function cannot correctly handle binary files as end of line). For those you need to use the C function which has a more complex interface."); - ("aug_init", (RErr, [Pathname "root"; Int "flags"]), 16, [Optional "augeas"], + ("aug_init", (RErr, [Pathname "root"; Int "flags"], []), 16, [Optional "augeas"], [], (* XXX Augeas code needs tests. *) "create a new Augeas handle", "\ @@ -1253,7 +1821,12 @@ do not overwrite original. Overrides C. =item C = 4 -Typecheck lenses (can be expensive). +Typecheck lenses. + +This option is only useful when debugging Augeas lenses. Use +of this option may require additional memory for the libguestfs +appliance. You may need to set the C +environment variable or call C. =item C = 8 @@ -1273,7 +1846,7 @@ To close the handle, you can call C. To find out more about Augeas, see L."); - ("aug_close", (RErr, []), 26, [Optional "augeas"], + ("aug_close", (RErr, [], []), 26, [Optional "augeas"], [], (* XXX Augeas code needs tests. *) "close the current Augeas handle", "\ @@ -1282,7 +1855,7 @@ used by it. After calling this, you have to call C again before you can use any other Augeas functions."); - ("aug_defvar", (RInt "nrnodes", [String "name"; OptString "expr"]), 17, [Optional "augeas"], + ("aug_defvar", (RInt "nrnodes", [String "name"; OptString "expr"], []), 17, [Optional "augeas"], [], (* XXX Augeas code needs tests. *) "define an Augeas variable", "\ @@ -1293,7 +1866,7 @@ undefined. On success this returns the number of nodes in C, or C<0> if C evaluates to something which is not a nodeset."); - ("aug_defnode", (RStruct ("nrnodescreated", "int_bool"), [String "name"; String "expr"; String "val"]), 18, [Optional "augeas"], + ("aug_defnode", (RStruct ("nrnodescreated", "int_bool"), [String "name"; String "expr"; String "val"], []), 18, [Optional "augeas"], [], (* XXX Augeas code needs tests. *) "define an Augeas node", "\ @@ -1308,14 +1881,14 @@ On success this returns a pair containing the number of nodes in the nodeset, and a boolean flag if a node was created."); - ("aug_get", (RString "val", [String "augpath"]), 19, [Optional "augeas"], + ("aug_get", (RString "val", [String "augpath"], []), 19, [Optional "augeas"], [], (* XXX Augeas code needs tests. *) "look up the value of an Augeas path", "\ Look up the value associated with C. If C matches exactly one node, the C is returned."); - ("aug_set", (RErr, [String "augpath"; String "val"]), 20, [Optional "augeas"], + ("aug_set", (RErr, [String "augpath"; String "val"], []), 20, [Optional "augeas"], [], (* XXX Augeas code needs tests. *) "set Augeas path to value", "\ @@ -1326,7 +1899,7 @@ the value to NULL. Due to an oversight in the libguestfs API you cannot do that with this call. Instead you must use the C call."); - ("aug_insert", (RErr, [String "augpath"; String "label"; Bool "before"]), 21, [Optional "augeas"], + ("aug_insert", (RErr, [String "augpath"; String "label"; Bool "before"], []), 21, [Optional "augeas"], [], (* XXX Augeas code needs tests. *) "insert a sibling Augeas node", "\ @@ -1338,7 +1911,7 @@ C must match exactly one existing node in the tree, and C