Juniper-SE / Apstra_IBA_Probes

1 stars 1 forks source link

[OSPF Neighbour] Refactor the probe to use `show ospf neighbours instance all` to collect all VRFs in one command #3

Open mehdi-juniper opened 6 months ago

mehdi-juniper commented 6 months ago

Check details in ESC-331

mehdi-juniper commented 6 months ago
admin@rack-001-leaf1> show ospf neighbor instance all
Instance: blue
Address          Interface              State           ID               Pri  Dead
10.0.2.101       irb.201                ExStart         10.0.2.101       128    34
10.0.2.100       irb.201                ExStart         10.0.2.100       128    36

Instance: red
Address          Interface              State           ID               Pri  Dead
10.0.1.101       irb.101                ExStart         10.0.1.101       128    31
10.0.1.100       irb.101                ExStart         10.0.1.100       128    33

{master:0}
admin@rack-001-leaf1> show ospf neighbor instance all | display xml
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/22.2R0/junos">
    <ospf-neighbor-information-all xmlns="http://xml.juniper.net/junos/22.2R0/junos-routing">
        <ospf-instance-neighbor>
            <ospf-instance-name>blue</ospf-instance-name>
            <ospf-neighbor>
                <neighbor-address>10.0.2.101</neighbor-address>
                <interface-name>irb.201</interface-name>
                <ospf-neighbor-state>ExStart</ospf-neighbor-state>
                <neighbor-id>10.0.2.101</neighbor-id>
                <neighbor-priority>128</neighbor-priority>
                <activity-timer>38</activity-timer>
            </ospf-neighbor>
            <ospf-neighbor>
                <neighbor-address>10.0.2.100</neighbor-address>
                <interface-name>irb.201</interface-name>
                <ospf-neighbor-state>ExStart</ospf-neighbor-state>
                <neighbor-id>10.0.2.100</neighbor-id>
                <neighbor-priority>128</neighbor-priority>
                <activity-timer>33</activity-timer>
            </ospf-neighbor>
        </ospf-instance-neighbor>
        <ospf-instance-neighbor>
            <ospf-instance-name>red</ospf-instance-name>
            <ospf-neighbor>
                <neighbor-address>10.0.1.101</neighbor-address>
                <interface-name>irb.101</interface-name>
                <ospf-neighbor-state>ExStart</ospf-neighbor-state>
                <neighbor-id>10.0.1.101</neighbor-id>
                <neighbor-priority>128</neighbor-priority>
                <activity-timer>38</activity-timer>
            </ospf-neighbor>
            <ospf-neighbor>
                <neighbor-address>10.0.1.100</neighbor-address>
                <interface-name>irb.101</interface-name>
                <ospf-neighbor-state>ExStart</ospf-neighbor-state>
                <neighbor-id>10.0.1.100</neighbor-id>
                <neighbor-priority>128</neighbor-priority>
                <activity-timer>32</activity-timer>
            </ospf-neighbor>
        </ospf-instance-neighbor>
    </ospf-neighbor-information-all>
    <cli>
        <banner>{master:0}</banner>
    </cli>
</rpc-reply>

{master:0}
admin@rack-001-leaf1>``