Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peer groups and peers are siblings #12

Open
adrian62 opened this issue Nov 20, 2023 · 0 comments
Open

Peer groups and peers are siblings #12

adrian62 opened this issue Nov 20, 2023 · 0 comments

Comments

@adrian62
Copy link

adrian62 commented Nov 20, 2023

How could one separate peer groups from peers in a config section where they are similarly declared (neighbor ...) and at the same level of the hierarchy.
With a parser configuration like the Cisco_ios the peer groups and the actual member neighbors appear as siblings.
However it would be nicer if the peer group can be a container for the peer-group settings and children for each member peer.
This sample config:

router bgp 100
 router-id 0.0.1.1
 neighbor IBGP peer group
 neighbor IBGP remote-as 64500
 neighbor 172.16.255.12 peer group IBGP
 neighbor 172.16.255.12 description GW2

Decodes as:

{
    "bgp": {
        "local_as": "100",
        "router_id": "0.0.1.1",
        "neighbor": {
            "peer_group": "IBGP",
            "IBGP": {
                "remote_as": "64500"
            },
            "172.16.255.12": {
                "peer_group": "IBGP",
                "description": "GW2"
            }
        }
    }
}

The peer group is at the same level as the neighbor --which is how the config represents it. The peer group name (alpha string) can be matched by a separate rule but is it possible to write rules that would place peers into the peer group containers.

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant