Beispiel #1
0
 def _getDefaultCommands(self):
     return [
         ulgmodel.TextCommand('show version'),
         ulgmodel.TextCommand('show bgp summary'),
         JuniperShowRoute(),
         JuniperShowBgpNeigh(self),
         JuniperShowRouteBgpRecv(self),
         JuniperShowRouteBgpAdv(self),
         JuniperGraphShowRoute(),
     ]
Beispiel #2
0
 def _getDefaultCommands(self):
     return [
         ulgmodel.TextCommand("ping -c 4 %s",
                              param_specs=[ulgmodel.IPv4AddressParameter()
                                           ]),
         ulgmodel.TextCommand("ping6 -c 4 %s",
                              param_specs=[ulgmodel.IPv6AddressParameter()
                                           ]),
         ulgmodel.TextCommand("traceroute %s",
                              param_specs=[ulgmodel.IPv4AddressParameter()
                                           ]),
         ulgmodel.TextCommand("traceroute6 %s",
                              param_specs=[ulgmodel.IPv6AddressParameter()
                                           ]),
     ]
Beispiel #3
0
    def _getBGPCommands(self):
        _show_bgp_ipv4_uni_neigh = CiscoCommandShowBgpIPv4Neigh(self)
        _show_bgp_ipv4_uni_neigh_advertised = CiscoCommandShowBgpIPv4NeighAdv(
            self)
        _show_bgp_ipv4_uni_neigh_received_routes = CiscoCommandShowBgpIPv4NeighRecv(
            self)
        _show_bgp_ipv6_uni_neigh = CiscoCommandShowBgpIPv6Neigh(self)
        _show_bgp_ipv6_uni_neigh_advertised = CiscoCommandShowBgpIPv6NeighAdv(
            self)
        _show_bgp_ipv6_uni_neigh_received_routes = CiscoCommandShowBgpIPv6NeighRecv(
            self)
        _graph_show_bgp_ipv4_uni = CiscoCommandGraphShowBgpIPv4Uni(
            self, COMMAND_NAME_GRAPH4)
        _graph_show_bgp_ipv6_uni = CiscoCommandGraphShowBgpIPv6Uni(
            self, COMMAND_NAME_GRAPH6)

        return [
            CiscoCommandBgpIPv4Sum(
                'show bgp ipv4 unicast summary',
                peer_address_command=_show_bgp_ipv4_uni_neigh,
                peer_received_command=_show_bgp_ipv4_uni_neigh_received_routes
            ),
            CiscoCommandBgpIPv6Sum(
                'show bgp ipv6 unicast summary',
                peer_address_command=_show_bgp_ipv6_uni_neigh,
                peer_received_command=_show_bgp_ipv6_uni_neigh_received_routes
            ),
            _show_bgp_ipv4_uni_neigh,
            _show_bgp_ipv6_uni_neigh,
            _show_bgp_ipv4_uni_neigh_received_routes,
            _show_bgp_ipv6_uni_neigh_received_routes,
            _show_bgp_ipv4_uni_neigh_advertised,
            _show_bgp_ipv6_uni_neigh_advertised,
            CiscoShowBgpIPv4Uni(),
            CiscoShowBgpIPv6Uni(),
            _graph_show_bgp_ipv4_uni,
            _graph_show_bgp_ipv6_uni,
            ulgmodel.TextCommand('ping %s',
                                 [ulgmodel.IPv64AddressParameter()]),
            ulgmodel.TextCommand('traceroute %s',
                                 [ulgmodel.IPv64AddressParameter()]),
        ]
Beispiel #4
0
    def _getAllCommands(self):
        _show_bgp_ipv4_uni_neigh = CiscoCommandShowBgpIPv4Neigh(self)
        _show_bgp_ipv4_uni_neigh_advertised = CiscoCommandShowBgpIPv4NeighAdv(
            self)
        _show_bgp_ipv4_uni_neigh_received_routes = CiscoCommandShowBgpIPv4NeighRecv(
            self)
        _show_bgp_ipv6_uni_neigh = CiscoCommandShowBgpIPv6Neigh(self)
        _show_bgp_ipv6_uni_neigh_advertised = CiscoCommandShowBgpIPv6NeighAdv(
            self)
        _show_bgp_ipv6_uni_neigh_received_routes = CiscoCommandShowBgpIPv6NeighRecv(
            self)
        _graph_show_bgp_ipv4_uni = CiscoCommandGraphShowBgpIPv4Uni(
            self, COMMAND_NAME_GRAPH4)
        _graph_show_bgp_ipv6_uni = CiscoCommandGraphShowBgpIPv6Uni(
            self, COMMAND_NAME_GRAPH6)

        return [
            ulgmodel.TextCommand('show version'),
            ulgmodel.TextCommand('show interfaces status'),
            CiscoCommandBgpIPv4Sum(
                'show bgp ipv4 unicast summary',
                peer_address_command=_show_bgp_ipv4_uni_neigh,
                peer_received_command=_show_bgp_ipv4_uni_neigh_received_routes
            ),
            CiscoCommandBgpIPv6Sum(
                'show bgp ipv6 unicast summary',
                peer_address_command=_show_bgp_ipv6_uni_neigh,
                peer_received_command=_show_bgp_ipv6_uni_neigh_received_routes
            ),
            _show_bgp_ipv4_uni_neigh,
            _show_bgp_ipv6_uni_neigh,
            _show_bgp_ipv4_uni_neigh_received_routes,
            _show_bgp_ipv6_uni_neigh_received_routes,
            _show_bgp_ipv4_uni_neigh_advertised,
            _show_bgp_ipv6_uni_neigh_advertised,
            CiscoShowBgpIPv4Uni(),
            CiscoShowBgpIPv6Uni(),
            ulgmodel.TextCommand('show ip route %s',
                                 [ulgmodel.IPv4AddressParameter()]),
            ulgmodel.TextCommand('show ipv6 route %s',
                                 [ulgmodel.IPv6AddressParameter()]),
            ulgmodel.TextCommand('show ip arp %s', [
                ulgmodel.TextParameter(
                    '.*', name=defaults.STRING_NONEORINTORIPADDRESS)
            ]),
            ulgmodel.TextCommand('show ipv6 neighbors %s', [
                ulgmodel.TextParameter(
                    '.*', name=defaults.STRING_NONEORINTORIPADDRESS)
            ]),
            ulgmodel.TextCommand('show mac-address-table address %s', [
                ulgmodel.TextParameter(MAC_ADDRESS_REGEXP,
                                       name=defaults.STRING_MACADDRESS)
            ]),
            ulgmodel.TextCommand(
                'show mac-address-table interface %s',
                [ulgmodel.TextParameter('.*', name=defaults.STRING_INTERFACE)
                 ]),
            _graph_show_bgp_ipv4_uni,
            _graph_show_bgp_ipv6_uni,
            ulgmodel.TextCommand('ping %s',
                                 [ulgmodel.IPv64AddressParameter()]),
            ulgmodel.TextCommand('traceroute %s',
                                 [ulgmodel.IPv64AddressParameter()]),
        ]