Hi Petr,
glad you've found a workaround !
I think that adding host tagging is a nice idea, thanks for that! One of
the next commits will support
- "device.tag = ..." and, as a shortcut, "tag = ..." in device/host context
- "device.tag" comparisions in script context.
Cheers,
Marc
On 11.03.2024 12:54, Petr Issakov wrote:
> Found workaround due label log variable. May be will be usefull for
> others:
> device ipcore_NN { # about 100 regs with CRs BBRs ASBRs
> device ipcore_NN_CR {
> *label = "CR,Cisco"*
> address = 1.1.1.1
> address = 1.1.1.2
> ...
> }
> device ipcore_NN_BBR {
> *label = "BBR,Juniper"*
> address = 2.2.2.1
> address = 2.2.2.2
> ...
> }
> device ipcore_NN_ASBR {
> * label = "ASBR,Huawei"*
> if ('${*label*}' =~ /CR/) {
> profile = mbh_cn_adm
> permit
> }
> if ('${ *label* }' =~ /BBR/ ) {
> profile = mbh_cn_mon
> permit
> }
> }
> .................
> }
> }
> }
> понедельник, 11 марта 2024 г. в 10:38:25 UTC+6, Petr Issakov:
>
> Hello, Marc! It would be great to distinct devices with several
> abstract grouping criteria, for example *tags *
> Usage:
> I have huge device config:
> device ipcore_ALL {
> .......
> device ipcore_NN { # about 100 regs with CRs BBRs ASBRs
> device ipcore_NN_CR {
> *tag = CR*
> * tag = Huawei
> *address = 1.1.1.1
> address = 1.1.1.2
> ...
> }
> device ipcore_NN_BBR {
> *tag = BBR*
> * tag = Cisco
> *address = 2.2.2.1
> address = 2.2.2.2
> ...
> }
> device ipcore_NN_ASBR {
> *tag = ASBR*
> *tag = Juniper*
> if (*tag*== CR) {
> profile = mbh_cn_adm
> permit
> }
> if (*tag*== BBR ) {
> profile = mbh_cn_mon
> permit
> }
> }
> .................
> }
> }
> }
>
> Yes, I can create *Nets *config and group them separately
> according to each of the criteria (tags), but in this case I need
> to describe the same devices in networks several times according
> to different criteria
>
> --
> You received this message because you are subscribed to the Google
> Groups "Event-Driven Servers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
event-driven-ser...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/event-driven-servers/0795660e-9df4-428f-9611-37584bafda28n%40googlegroups.com
> <
https://groups.google.com/d/msgid/event-driven-servers/0795660e-9df4-428f-9611-37584bafda28n%40googlegroups.com?utm_medium=email&utm_source=footer>.