[Xorp-hackers] Question about Template file functionality

Kristen Nielsen krn at krn.dk
Mon May 8 08:54:34 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi xorp-hackers list

In the template file (etc/templates/*tp) I have a short question:

in the part below (from bgp.tp):

targetname {
  %help: short "Set the target name";
  %set:;
}

bgp-id {
  %set: xrl "$(bgp.targetname)/bgp/0.2/set_bgp_id?id:ipv4=$(@)";
  %get: xrl "$(bgp.targetname)/bgp/0.2/get_bgp_id->id:ipv4";
}

In the targetname: node
Does the set:; line map to a function that sets the value of the
targetname leaf-node (but do not invoke any xrl calls)?

Does the missing %delete:; and %get:; mean that it is not possible to
delete and get this value from the node e.g. from the xorpsh?

I guess that other lines in the template file will be able to read the
targetname value, is this correct?

In the bgp-id node lines:
does the returned value from the %get: line opdate the bgp-id node value ?
Is the %get xrl being executed when other template rules want to read
the bgp-id node-value.


Thanks

Kristen Nielsen
Denmark
krn at krn.dk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEX2m4e7tFxipD00wRAkRoAKCOL/TWl58UwKCljcTmVKdyz3MeZQCgzy8I
rHmi6xUSqz6bIa9KdIQ6yvw=
=3rix
-----END PGP SIGNATURE-----



More information about the Xorp-hackers mailing list