Adding more then one bgp community at once
Hello! Is this possible to add many communites at once? bgp_community.add([(1,1), (1,2)]) is wrong "Setting clist attribute to non-clist value" Regards, Boris -- С уважением, Борис Коваленко
On Mon, Feb 27, 2017 at 08:04:41AM +0000, Борис Коваленко wrote:
Hello!
Is this possible to add many communites at once? bgp_community.add([(1,1), (1,2)]) is wrong "Setting clist attribute to non-clist value"
No, this is not implemented (although it makes sense). You have to add each community independently. But the code should generate a different error message ("Can't add set"), that seems like bug. -- 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."
Hello, Ondrej! Would You please implement it? It is very usefull in sutiation where there is "common" import/export function like: function f_bgp_peer_i(int v_local_pref, int set flags, clist v_comms) and call to this function import where f_bgp_peer_i(350, [], [(X:1), (X:2)]) Regards, Boris вт, 28 февр. 2017 г. в 5:49, Ondrej Zajicek <santiago@crfreenet.org>:
On Mon, Feb 27, 2017 at 08:04:41AM +0000, Борис Коваленко wrote:
Hello!
Is this possible to add many communites at once? bgp_community.add([(1,1), (1,2)]) is wrong "Setting clist attribute to non-clist value"
No, this is not implemented (although it makes sense). You have to add each community independently. But the code should generate a different error message ("Can't add set"), that seems like bug.
-- 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."
-- С уважением, Борис Коваленко
Hi, I tried the same at BIRD 2.13 . It reports "Can't add set". At the same time in docs -- |add(/C/,/P/)| adds pair (or quad) /P/ to clist /C/ and returns the result. If item /P/ is already in clist /C/, it does nothing. /P/ may also be a clist, in that case all its members are added; i.e., it works as clist union. --- What did I miss? Ondrej Zajicek пишет 28.02.2017 3:49:
On Mon, Feb 27, 2017 at 08:04:41AM +0000, Борис Коваленко wrote:
Hello!
Is this possible to add many communites at once? bgp_community.add([(1,1), (1,2)]) is wrong "Setting clist attribute to non-clist value" No, this is not implemented (although it makes sense). You have to add each community independently. But the code should generate a different error message ("Can't add set"), that seems like bug.
On Fri, May 05, 2023 at 01:10:10PM +0300, Mikhail Grishin wrote:
Hi,
I tried the same at BIRD 2.13 . It reports "Can't add set".
At the same time in docs -- |add(/C/,/P/)| adds pair (or quad) /P/ to clist /C/ and returns the result. If item /P/ is already in clist /C/, it does nothing. /P/ may also be a clist, in that case all its members are added; i.e., it works as clist union.
Hi The docs says "/P/ may also be a clist", but it cannot be a pair set, while the literal '[(1,1), (1,2)]' is a pair set literal. Unfortunately we do not have literals for clists. -- 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."
I think one can now write a custom function using "for" to obtain that functionality. On Fri, May 5, 2023 at 3:40 PM Ondrej Zajicek <santiago@crfreenet.org> wrote:
On Fri, May 05, 2023 at 01:10:10PM +0300, Mikhail Grishin wrote:
Hi,
I tried the same at BIRD 2.13 . It reports "Can't add set".
At the same time in docs -- |add(/C/,/P/)| adds pair (or quad) /P/ to clist /C/ and returns the result. If item /P/ is already in clist /C/, it does nothing. /P/ may also be a clist, in that case all its members are added; i.e., it works as clist union.
Hi
The docs says "/P/ may also be a clist", but it cannot be a pair set, while the literal '[(1,1), (1,2)]' is a pair set literal. Unfortunately we do not have literals for clists.
-- 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."
participants (4)
-
Alexander Zubkov -
Mikhail Grishin -
Ondrej Zajicek -
Борис Коваленко