Tue, May 22, 2012 at 02:03:10PM CEST, rpazdera(a)redhat.com wrote:
I looked at the IP address to device translation function
(what we discussed earlier).
I found out, that the translation is already implemented
in LNST, device names are resolved and conveniently
available from in the recipe. They can be accessed
through recipe_eval or the equivalent alias:
{$recipe['machines'][1]['netconfig'][1]['name']}
This can be used together with the new system_config
as follows:
<command type="system_config"
option="/proc/sys/net/ipv4/config/{$recipe['machines'][1]['netconfig'][1]['name']}/force_igmp_version"
value="2" machine_id="1" />
The only problem with this is, that it can get pretty long.
We cannot break it down onto multiple lines, because
it's a path and also multi-line tag attributes could cause
some trouble.
I'm thinking, what if we added some sort of "predefined
aliases" for such things as IP/MAC/device name for
each host? It could be done as functions too. For
instance
{dev_name(1, 1)} ~
{$recipe['machines'][1]['netconfig'][1]['name']}
{ip(host_id, if_id)} for ip addresses
{mac(host_id, if_id)} for MAC's
The goal is to make referencing those values as short as
possible (especially referencing IP addresses is used a lot).
Just discussed this. I like it!
Thanks.
Jirka
Radek
_______________________________________________
LNST-developers mailing list
LNST-developers(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/lnst-developers