search for: replace_fn

Displaying 6 results from an estimated 6 matches for "replace_fn".

2019 Feb 25
0
[PATCH 2/3] v2v: add Var_expander
...ariables str = + let res = ref [] in + let offset = ref 0 in + while PCRE.matches ~offset:!offset var_re str; do + let var = PCRE.sub 1 in + check_variable var; + let _, end_ = PCRE.subi 0 in + List.push_back res var; + offset := end_ + done; + List.remove_duplicates !res + +let replace_fn str fn = + let res = ref str in + let offset = ref 0 in + while PCRE.matches ~offset:!offset var_re !res; do + let var = PCRE.sub 1 in + check_variable var; + let start_, end_ = PCRE.subi 0 in + match fn var with + | None -> + offset := end_ + | Some text -> + r...
2019 Mar 29
5
[PATCH v2 0/3] v2v: add -o json output mode
This series adds a new output mode for virt-v2v, called -o json. It produces local files, just like -o local, although the metadata produced is a JSON file with data that v2v collected in the conversion process. This can be useful for converting to unsupported destinations, still based on QEMU/KVM. In addition to a simple different metadata, it offers a way to relocate the disks, with
2019 Feb 25
7
[PATCH 0/3] RFC: v2v: add -o json output mode
This series adds a new output mode for virt-v2v, called -o json. It produces local files, just like -o local, although the metadata produced is a JSON file with data that v2v collected in the conversion process. This can be useful for converting to unsupported destinations, still based on QEMU/KVM. In addition to a simple different metadata, it offers a way to relocate the disks, with
2019 Mar 25
1
Re: [PATCH 3/3] v2v: add -o json output mode
...tion > + | "DiskNo" -> Some (string_of_int (i+1)) > + | "DiskDeviceName" -> Some ov.ov_sd > + | "GuestName" -> Some source.s_name > + | _ -> assert false > + in > + Var_expander.replace_fn json_options.json_disks_pattern vars_fn in > + let destname = dir // outname in > + mkdir_p (Filename.dirname destname) 0o755; > + TargetFile destname > + ) overlays > + > + method supported_firmware = [ TargetBIOS; TargetUEFI ] > + > + method creat...
2019 Feb 25
0
[PATCH 3/3] v2v: add -o json output mode
...+ let vars_fn = function + | "DiskNo" -> Some (string_of_int (i+1)) + | "DiskDeviceName" -> Some ov.ov_sd + | "GuestName" -> Some source.s_name + | _ -> assert false + in + Var_expander.replace_fn json_options.json_disks_pattern vars_fn in + let destname = dir // outname in + mkdir_p (Filename.dirname destname) 0o755; + TargetFile destname + ) overlays + + method supported_firmware = [ TargetBIOS; TargetUEFI ] + + method create_metadata source targets +...
2019 Mar 29
0
[PATCH v2 3/3] v2v: add -o json output mode
...+ let vars_fn = function + | "DiskNo" -> Some (string_of_int (i+1)) + | "DiskDeviceName" -> Some ov.ov_sd + | "GuestName" -> Some source.s_name + | _ -> assert false + in + Var_expander.replace_fn json_options.json_disks_pattern vars_fn in + let destname = dir // outname in + mkdir_p (Filename.dirname destname) 0o755; + TargetFile destname + ) overlays + + method supported_firmware = [ TargetBIOS; TargetUEFI ] + + method create_metadata source targets +...