Displaying 5 results from an estimated 5 matches for "check_variable".
2019 Mar 25
2
Re: [PATCH 2/3] v2v: add Var_expander
...ts? Existing template systems solve these kinds of problems
already.
Anyway ...
> +let var_re = PCRE.compile "%{([^}]+)}"
Are we planning to allow a completely free choice for variable names,
or could we limit this regexp to only matching ASCII alphanumeric +
underscore?
> +let check_variable var =
> + String.iter (
> + function
> + | '0'..'9'
> + | 'a'..'z'
> + | 'A'..'Z'
> + | '_'
> + | '-' -> ()
> + | _ -> raise (Invalid_variable var)
> + ) var
... and then this fu...
2019 Feb 25
0
[PATCH 2/3] v2v: add Var_expander
...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_variable var)
+ ) var
+
+let scan_variables str =
+ let res = ref [] in
+ let offset =...
2019 Mar 29
0
Re: [PATCH 2/3] v2v: add Var_expander
...mit this regexp to only matching ASCII alphanumeric +
> underscore?
This regex allows anything as variables for two reasons:
1) we do not miss any variable-like pattern (so we do not silently
skip any now, while handling it in the future in case we accept
more characters)
> > +let check_variable var =
> > + String.iter (
> > + function
> > + | '0'..'9'
> > + | 'a'..'z'
> > + | 'A'..'Z'
> > + | '_'
> > + | '-' -> ()
> > + | _ -> raise (Invalid_variable...
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