search for: invalid_variable

Displaying 8 results from an estimated 8 matches for "invalid_variable".

2019 Feb 25
0
[PATCH 2/3] v2v: add Var_expander
...NU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +open Std_utils + +exception Invalid_variable of string + +let var_re = PCRE.compile "%{([^}]+)}" + +let check_variable var = + String.iter ( + function + | '0'..'9' + | 'a'..'z' + | 'A'..'Z' + | '_' + | '-' -> () + | _ -> raise (Invalid_varia...
2019 Mar 25
2
Re: [PATCH 2/3] v2v: add Var_expander
...SCII alphanumeric + underscore? > +let check_variable var = > + String.iter ( > + function > + | '0'..'9' > + | 'a'..'z' > + | 'A'..'Z' > + | '_' > + | '-' -> () > + | _ -> raise (Invalid_variable var) > + ) var ... and then this function would presumably go away. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, an...
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 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 Mar 29
0
Re: [PATCH 2/3] v2v: add Var_expander
...et check_variable var = > > + String.iter ( > > + function > > + | '0'..'9' > > + | 'a'..'z' > > + | 'A'..'Z' > > + | '_' > > + | '-' -> () > > + | _ -> raise (Invalid_variable var) > > + ) var > > ... and then this function would presumably go away. 2) we can check that a variable has only allowed characters, and report that to the user -- Pino Toscano
2019 Mar 25
1
Re: [PATCH 3/3] v2v: add -o json output mode
...t; + | "json-disks-pattern", v -> > + if !json_disks_pattern <> None then > + error (f_"-o json: -oo json-disks-pattern set more than once"); > + let vars = > + try Var_expander.scan_variables v > + with Var_expander.Invalid_variable var -> > + error (f_"-o json: -oo json-disks-pattern: invalid variable %%{%s}") > + var in > + List.iter ( > + fun var -> > + if not (List.mem var known_pattern_variables) then > + error (f_"-o json: -o...
2019 Feb 25
0
[PATCH 3/3] v2v: add -o json output mode
...List.iter ( + function + | "json-disks-pattern", v -> + if !json_disks_pattern <> None then + error (f_"-o json: -oo json-disks-pattern set more than once"); + let vars = + try Var_expander.scan_variables v + with Var_expander.Invalid_variable var -> + error (f_"-o json: -oo json-disks-pattern: invalid variable %%{%s}") + var in + List.iter ( + fun var -> + if not (List.mem var known_pattern_variables) then + error (f_"-o json: -oo json-disks-pattern: unhandle...
2019 Mar 29
0
[PATCH v2 3/3] v2v: add -o json output mode
...List.iter ( + function + | "json-disks-pattern", v -> + if !json_disks_pattern <> None then + error (f_"-o json: -oo json-disks-pattern set more than once"); + let vars = + try Var_expander.scan_variables v + with Var_expander.Invalid_variable var -> + error (f_"-o json: -oo json-disks-pattern: invalid variable %%{%s}") + var in + List.iter ( + fun var -> + if not (List.mem var known_pattern_variables) then + error (f_"-o json: -oo json-disks-pattern: unhandle...