search for: inspect_get_mountpoint

Displaying 20 results from an estimated 82 matches for "inspect_get_mountpoint".

2016 Mar 03
1
[PATCH] mllib: factor out mounting of guest root
...nsertions(+), 44 deletions(-) diff --git a/builder/builder.ml b/builder/builder.ml index 1f9a472..debd7e3 100644 --- a/builder/builder.ml +++ b/builder/builder.ml @@ -664,15 +664,7 @@ let main () = let root = match Array.to_list (g#inspect_os ()) with | [root] -> - let mps = g#inspect_get_mountpoints root in - let cmp (a,_) (b,_) = - compare (String.length a) (String.length b) in - let mps = List.sort cmp mps in - List.iter ( - fun (mp, dev) -> - try g#mount dev mp - with G.Error msg -> warning (f_"%s (ignored)") msg - ) mps;...
2013 Apr 03
1
RHashtable and the python bindings
I've discovered that libguestfs apis which return RHashtable are currently returned as a list of tuples in the python bindings rather than the obvious dict. I propose fixing this, whilst also maintaining API compatibility for a period of time. The following apis return RHashtable: inspect_get_mountpoints list_filesystems inspect_get_drive_mappings tune2fs_l mountpoints md_detail blkid list_disk_labels I propose the following: h = guestfs.GuestFS(return_dict=True) If return_dict is set, any RHashtable api would return a dict rather than a list of tuples. If not, the behaviour would be unchanged....
2012 Dec 20
1
Supporting btrfs subvolumes during inspection
...fs which means we can't inspect filesystems in btrfs subvolumes: https://bugzilla.redhat.com/show_bug.cgi?id=824021 This is the default configuration if you select btrfs in F17+. The issue is that it requires an api to fix it, as the return values of inspect_os, inspect_get_filesystems and inspect_get_mountpoints can't express a btrfs subvolume as they're expected to be the names of block devices. As a starter for 10, I propose the addition of parallel apis suffixed _ext which return annotated device descriptions, e.g.: block:/dev/vda2 btrfsvol:/dev/vda4,root The string before the colon is a...
2016 Aug 19
2
[PATCH] New API: aug_transform
Expose the aug_transform API through the library, so it's possible to add/remove Augeas transformations to handle files in custom places using existing lenses. --- daemon/augeas.c | 21 +++++++++++++++++++++ generator/actions.ml | 12 ++++++++++++ gobject/Makefile.inc | 2 ++ src/MAX_PROC_NR | 2 +- 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/daemon/augeas.c
2011 Apr 26
7
[PATCH 1/7] Push $desc creation into Sys::VirtConvert::Converter->convert
...alled without desc argument") unless defined($desc); + croak("convert called without root argument") unless defined($root); croak("convert called without meta argument") unless defined($meta); my $guestcaps; + # Mount up the disks. + my %fses = $g->inspect_get_mountpoints ($root); + my @fses = sort { length $a <=> length $b } keys %fses; + foreach (@fses) { + eval { $g->mount_options ("", $fses{$_}, $_) }; + print __x("{e} (ignored)\n", e => $@) if $@; + } + + # Construct the "$desc" hashref which...
2013 Jan 22
1
APIs affected by btrfs subvolumes
...riptor. Inspection APIS: All take a root filesystem as an argument, which may not be a block device. inspect_get_arch inspect_get_distro inspect_get_drive_mappings inspect_get_filesystems inspect_get_format inspect_get_hostname inspect_get_icon inspect_get_major_version inspect_get_minor_version inspect_get_mountpoints inspect_get_package_format inspect_get_package_management inspect_get_product_name inspect_get_product_variant inspect_get_type inspect_get_windows_current_control_set inspect_get_windows_systemroot inspect_is_live inspect_is_multipart inspect_is_netinst inspect_list_applications inspect_list_appl...
2020 Jul 07
1
Re: [PATCH] python: Add type hints
...uses the following weird line wrapping: def btrfs_subvolume_show(self, subvolume: str) -> Union[List[Tuple[str, str]], dict]: def inspect_get_drive_mappings(self, root: str) -> Union[List[Tuple[str, str]], dict]: def inspect_get_mountpoints(self, root: str) -> Union[List[Tuple[str, str]], dict]: In my opinion it is okay, pep8 complains about this and actually requires either: Option A def btrfs_subvolume_show(self, subvolume: str) -> Union[List[Tuple[str,...
2016 Nov 02
4
[PATCH v4 1/2] v2v: bootloaders: search grub config for all distributions
...(g : G.guestfs) inspect grub_config = + let () = + if grub_config = "/boot/efi/EFI/redhat/grub.conf" then + g#aug_transform "grub" "/boot/efi/EFI/redhat/grub.conf" in + (* Grub prefix? Usually "/boot". *) let grub_prefix = let mounts = g#inspect_get_mountpoints inspect.i_root in @@ -191,7 +199,7 @@ type default_kernel_method = | MethodNone (** No known way. *) (* Grub2 representation. *) -class bootloader_grub2 (g : G.guestfs) grub_config = +class bootloader_grub2 (g : G.guestfs) inspect grub_config = let grub2_mkconfig_cmd = let elems =...
2016 Nov 01
3
[PATCH v3] v2v: bootloaders: search grub config for all distributions
...herefore tell Augeas that + * grub_config is a grub file (this apparently doesn't affect + * Augeas if it already parsed the file). + *) + let () = g#aug_transform "grub" grub_config in + (* Grub prefix? Usually "/boot". *) let grub_prefix = let mounts = g#inspect_get_mountpoints inspect.i_root in @@ -191,7 +199,7 @@ type default_kernel_method = | MethodNone (** No known way. *) (* Grub2 representation. *) -class bootloader_grub2 (g : G.guestfs) grub_config = +class bootloader_grub2 (g : G.guestfs) inspect grub_config = let grub2_mkconfig_cmd = let elems =...
2016 Aug 19
0
[PATCH] v2v: linux: handle UEFI path for Grub1 (RHBZ#1152369)
...match grub with | `Grub2 -> "" | `Grub1 -> + if grub_config = "/boot/efi/EFI/redhat/grub.conf" then ( + g#aug_transform "grub" "/boot/efi/EFI/redhat/grub.conf"; + Linux.augeas_reload g; + ); + let mounts = g#inspect_get_mountpoints inspect.i_root in try List.find ( -- 2.7.4
2018 Jan 16
0
[PATCH v3 2/3] New APIs: part_set_gpt_attributes and part_get_gpt_attributes
...; style = RErr, [String (Pathname, "oldpath"); String (Pathname, "newpath")], []; diff --git a/generator/proc_nr.ml b/generator/proc_nr.ml index 3e393da73..9e16ab14a 100644 --- a/generator/proc_nr.ml +++ b/generator/proc_nr.ml @@ -510,6 +510,8 @@ let proc_nr = [ 500, "inspect_get_mountpoints"; 501, "inspect_get_filesystems"; 502, "inspect_get_drive_mappings"; +503, "part_set_gpt_attributes"; +504, "part_get_gpt_attributes"; ] (* End of list. If adding a new entry, add it at the end of the list diff --git a/lib/MAX_PROC_NR b/lib/MAX_P...
2018 Jan 15
0
[PATCH v2 2/3] New APIs: part_set_gpt_attributes and part_get_gpt_attributes
...; style = RErr, [String (Pathname, "oldpath"); String (Pathname, "newpath")], []; diff --git a/generator/proc_nr.ml b/generator/proc_nr.ml index 3e393da73..9e16ab14a 100644 --- a/generator/proc_nr.ml +++ b/generator/proc_nr.ml @@ -510,6 +510,8 @@ let proc_nr = [ 500, "inspect_get_mountpoints"; 501, "inspect_get_filesystems"; 502, "inspect_get_drive_mappings"; +503, "part_set_gpt_attributes"; +504, "part_get_gpt_attributes"; ] (* End of list. If adding a new entry, add it at the end of the list diff --git a/lib/MAX_PROC_NR b/lib/MAX_P...
2018 Jan 10
0
[PATCH 2/3] New APIs: part_set_gpt_attributes and part_get_gpt_attributes
...; style = RErr, [String (Pathname, "oldpath"); String (Pathname, "newpath")], []; diff --git a/generator/proc_nr.ml b/generator/proc_nr.ml index 3e393da73..9e16ab14a 100644 --- a/generator/proc_nr.ml +++ b/generator/proc_nr.ml @@ -510,6 +510,8 @@ let proc_nr = [ 500, "inspect_get_mountpoints"; 501, "inspect_get_filesystems"; 502, "inspect_get_drive_mappings"; +503, "part_set_gpt_attributes"; +504, "part_get_gpt_attributes"; ] (* End of list. If adding a new entry, add it at the end of the list diff --git a/lib/MAX_PROC_NR b/lib/MAX_P...
2016 Nov 10
0
[PATCH v5 1/3] v2v: bootloaders: search grub config for all distributions
...(g : G.guestfs) inspect grub_config = + let () = + if grub_config = "/boot/efi/EFI/redhat/grub.conf" then + g#aug_transform "grub" "/boot/efi/EFI/redhat/grub.conf" in + (* Grub prefix? Usually "/boot". *) let grub_prefix = let mounts = g#inspect_get_mountpoints inspect.i_root in @@ -191,7 +199,7 @@ type default_kernel_method = | MethodNone (** No known way. *) (* Grub2 representation. *) -class bootloader_grub2 (g : G.guestfs) grub_config = +class bootloader_grub2 (g : G.guestfs) inspect grub_config = let grub2_mkconfig_cmd = let elems =...
2019 Apr 24
4
[PATCH 0/3] Few minor changes for bindings
*** BLURB HERE *** Pino Toscano (3): python: modernize inspect_vm example perl: silence usage of add_cdrom in test python: silence usage of add_cdrom in test perl/t/060-handle-properties.t | 7 +++++-- python/examples/inspect_vm.py | 26 ++++++++++++-------------- python/t/test050HandleProperties.py | 5 ++++- 3 files changed, 21 insertions(+), 17 deletions(-) -- 2.20.1
2016 Nov 01
0
Re: [PATCH v3] v2v: bootloaders: search grub config for all distributions
...b_config is a grub file (this apparently doesn't affect > + * Augeas if it already parsed the file). > + *) > + let () = g#aug_transform "grub" grub_config in > + > (* Grub prefix? Usually "/boot". *) > let grub_prefix = > let mounts = g#inspect_get_mountpoints inspect.i_root in > @@ -191,7 +199,7 @@ type default_kernel_method = > | MethodNone (** No known way. *) > > (* Grub2 representation. *) > -class bootloader_grub2 (g : G.guestfs) grub_config = > +class bootloader_grub2 (g : G.guestfs) inspect grub_config = > > l...
2017 Apr 28
0
Re: [PATCH v6 1/1] v2v: bootloaders: search grub config for all distributions
...Augeas < 1.7.0 will error out otherwise. > + *) > + if g#aug_ls ("/files" ^ grub_config) = [||] then > + g#aug_transform "grub" grub_config in > + > (* Grub prefix? Usually "/boot". *) > let grub_prefix = > let mounts = g#inspect_get_mountpoints inspect.i_root in > @@ -191,7 +202,7 @@ type default_kernel_method = > | MethodNone (** No known way. *) > > (* Grub2 representation. *) > -class bootloader_grub2 (g : G.guestfs) grub_config = > +class bootloader_grub2 (g : G.guestfs) inspect grub_config = NACK, see below...
2017 May 02
2
[PATCH] v2v: bootloaders: search grub config for all distributions
...s not handling the file + * already -- Augeas < 1.7.0 will error out otherwise. + *) + if g#aug_ls ("/files" ^ grub_config) = [||] then + g#aug_transform "grub" grub_config in + (* Grub prefix? Usually "/boot". *) let grub_prefix = let mounts = g#inspect_get_mountpoints inspect.i_root in @@ -335,33 +342,46 @@ object (self) end let detect_bootloader (g : G.guestfs) inspect = - let config_file, typ = - let locations = [ - "/boot/grub2/grub.cfg", Grub2; - "/boot/grub/grub.cfg", Grub2; - "/boot/grub/menu.lst", Grub...
2016 Nov 10
5
[PATCH v5 0/3] v2v and augeas
Augeas 1.7.0 was released a couple of days ago. By encouraging everyone to upgrade to this we can drop several calls to aug_transform and also our custom copies of two lenses, and a lot of related code. Rich.
2017 Apr 28
0
Re: [PATCH v6 1/1] v2v: bootloaders: search grub config for all distributions
...*) > >>+ if g#aug_ls ("/files" ^ grub_config) = [||] then > >>+ g#aug_transform "grub" grub_config in > >>+ > >> (* Grub prefix? Usually "/boot". *) > >> let grub_prefix = > >> let mounts = g#inspect_get_mountpoints inspect.i_root in > >>@@ -191,7 +202,7 @@ type default_kernel_method = > >> | MethodNone (** No known way. *) > >> > >> (* Grub2 representation. *) > >>-class bootloader_grub2 (g : G.guestfs) grub_config = > >>+class bootloader_grub2 (g :...