[PATCH] protocol templates
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello list! Patch permits templates generation via 'template' keyword. Protocols can inherit templates (and templates can inherit templates) via 'inherit' keyword. At the moment patch supports BGP only (however adding other protocols is trivial) E.g. template bgp rr_client_general { local as 65000; multihop; rr client; } template bgp rr_client_bb { inherit bgp_rr_client_general; rr cluster id 1.2.3.4; } protocol bgp rr_cl_ft { inherit rr_client_bb; neighbor 10.4.7.2 as 65000; } Review/comments are welcome -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6rK5oACgkQwcJ4iSZ1q2lTrgCfa6qKEgDv312ixHuQSg0/cAzY 6+cAoIGtXS7xWRKj4wXXpXBdUXN+kUxF =k0LL -----END PGP SIGNATURE-----
On Sat, Oct 29, 2011 at 02:24:27AM +0400, Alexander V. Chernikov wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello list!
Patch permits templates generation via 'template' keyword. Protocols can inherit templates (and templates can inherit templates) via 'inherit' keyword. At the moment patch supports BGP only (however adding other protocols is trivial)
Great. Just one major comment - 'inherit' keyword inside a body of protocol is (IMHO) not a good idea - it looks like option but it is really something different (meta-option) and also silently overwrites every option used before that (if not used first in the body). protocol bgp rr_cl_ft by rr_client_bb { neighbor 10.4.7.2 as 65000; } (Not being native english speaker i am not sure whether 'by' is really the most apt keyword, any comments on that? Perhaps 'from'?) I will update the patch and merge it soon. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Op 2-11-2011 12:47, Ondrej Zajicek schreef:
protocol bgp rr_cl_ft by rr_client_bb { neighbor 10.4.7.2 as 65000; }
(Not being native english speaker i am not sure whether 'by' is really the most apt keyword, any comments on that? Perhaps 'from'?) Programming languages tend to use 'inherits' or a colon for inheritance. Multiple inheritance or implementation of multiple interfaces can be specified using a comma.
protocol bgp rr_cl_ft : rr_client_bb, rr_client_cc { The patch certainly looks useful. Quagga-like peer groups, but much more powerful! Good job, Alexander. -- Ivo
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ivo Smits wrote:
Op 2-11-2011 12:47, Ondrej Zajicek schreef:
protocol bgp rr_cl_ft by rr_client_bb { neighbor 10.4.7.2 as 65000; }
(Not being native english speaker i am not sure whether 'by' is really the most apt keyword, any comments on that? Perhaps 'from'?) Programming languages tend to use 'inherits' or a colon for inheritance. Multiple inheritance or implementation of multiple interfaces can be specified using a comma.
protocol bgp rr_cl_ft : rr_client_bb, rr_client_cc {
The patch certainly looks useful. Quagga-like peer groups, but much more powerful! Good job, Alexander.
Actually, peer-group usually serves another important function (and it is the main reason this patch appears): eliminating the need to make BGP update / filtering for each peer in peer-group. bird is very fast, but it can be much faster when acting as RR. However, caching sent updates / grouping routing updates is not so trivial to do..
-- Ivo
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6xrKcACgkQwcJ4iSZ1q2kFWwCghvc7uQnKr8eswVPBenAaeE4B K5sAmweR+Hw7v4Hj08Jfvr4O2WfkqGbV =A98h -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ondrej Zajicek wrote:
On Sat, Oct 29, 2011 at 02:24:27AM +0400, Alexander V. Chernikov wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello list!
Patch permits templates generation via 'template' keyword. Protocols can inherit templates (and templates can inherit templates) via 'inherit' keyword. At the moment patch supports BGP only (however adding other protocols is trivial)
Great. Just one major comment - 'inherit' keyword inside a body of protocol is (IMHO) not a good idea - it looks like option but it is really something different (meta-option) and also silently Well, (from my point of view) it is really the general protocol option, like any other, changing some protocol options. overwrites every option used before that (if not used first in the body). We can easily enforce check for 'inherit' to be the very first option in protocol block
protocol bgp rr_cl_ft by rr_client_bb { neighbor 10.4.7.2 as 65000; }
(Not being native english speaker i am not sure whether 'by' is really the most apt keyword, any comments on that? Perhaps 'from'?)
Unfortunately I'm not a native speaker, too :( Maybe someone ? Personally I prefer 'inherit' keyword (either inside or in protocol block definition) since it is self-explaining (instead of 'by' or 'from')
I will update the patch and merge it soon.
Great! P.S. And what about other patches? :) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6xqEcACgkQwcJ4iSZ1q2nLTwCcDFKKJII/ItNBRJFR2LFaFwiW 154An1X/mvA1j7o6wFmaJXJ5Lr/Zu+na =gjm4 -----END PGP SIGNATURE-----
--On 3 November 2011 00:29:59 +0400 "Alexander V. Chernikov" <melifaro@ipfw.ru> wrote:
Personally I prefer 'inherit' keyword (either inside or in protocol block definition) since it is self-explaining (instead of 'by' or 'from')
"derived-from", "inheriting", "from", or "via"? To be honest, I preferred the simplicity of the colon though. -- Alex Bligh
participants (4)
-
Alex Bligh -
Alexander V. Chernikov -
Ivo Smits -
Ondrej Zajicek