Parametric options

Version 1 (Gioacchino Mazzurco, 04/18/2014 05:26 pm)

1 1 Gioacchino Mazzurco
h1. Parametric options
2 1 Gioacchino Mazzurco
3 1 Gioacchino Mazzurco
Options like system.hostname, network.main_ipv4_address, network.main_ipv6_address, can be parametric so what the user write is a template of what the value will be, this page is about to try to define a flexible yet not complicated formalism for those templates.
4 1 Gioacchino Mazzurco
5 1 Gioacchino Mazzurco
Old formalism provide just substitution by mac address byte but this is eventually quite limited and already showed limits, like the impossibility for the user to control the format in which the mac address byte should be represented.
6 1 Gioacchino Mazzurco
7 1 Gioacchino Mazzurco
The new formalism should have following characteristics:
8 1 Gioacchino Mazzurco
> * Easy parsing just with "lua patterns":http://lua-users.org/wiki/PatternsTutorial
9 1 Gioacchino Mazzurco
> * Compact format
10 1 Gioacchino Mazzurco
> * Possibility to take byte from mac address
11 1 Gioacchino Mazzurco
> * Possibility to take randoms byte
12 1 Gioacchino Mazzurco
> * Possibility to choose the output format
13 1 Gioacchino Mazzurco
14 1 Gioacchino Mazzurco
I was thinking a way to have bit level control but all ides I had needed too much complication of patterns syntax