7.7. cisco parser - arp
cisco show arp table command output parser
- nettoolkit.facts_finder.generators.cisco._cmd_parse_arp_table.get_arp_table(cmd_op, *args)[source]
parser - show ip arp command output
- Parsed Fields:
port/interface
ip address
mac address
- Parameters:
cmd_op (list, str) – command output in list/multiline string.
- Returns:
output dictionary with parsed fields
- Return type:
dict
7.8. cisco parser - bgp
cisco running-config parser for bgp section output
- class nettoolkit.facts_finder.generators.cisco._cmd_parse_bgp.AddressFamily(cmd_op)[source]
Bases:
BGP_Papaobject for address-family BGP running config parser
- Parameters:
cmd_op (list, str) – running config output, either list of multiline string
- class nettoolkit.facts_finder.generators.cisco._cmd_parse_bgp.BGP(cmd_op)[source]
Bases:
BGP_Papaobject for native BGP running config parser
- Parameters:
cmd_op (list, str) – running config output, either list of multiline string
- class nettoolkit.facts_finder.generators.cisco._cmd_parse_bgp.BGP_Papa(cmd_op)[source]
Bases:
objectparent object for BGP level running config parser
- Parameters:
cmd_op (list, str) – running config output, either list of multiline string
- nettoolkit.facts_finder.generators.cisco._cmd_parse_bgp.get_bgp_af_running(cmd_op, *args)[source]
defines set of methods executions. to get various bgp address-family parameters. uses AddressFamily in order to get all.
- Parameters:
cmd_op (list, str) – running config output, either list of multiline string
- Returns:
output dictionary with parsed with system fields
- Return type:
dict
- nettoolkit.facts_finder.generators.cisco._cmd_parse_bgp.get_bgp_running(cmd_op, *args)[source]
defines set of methods executions. to get various bgp native parameters. uses BGP in order to get all.
- Parameters:
cmd_op (list, str) – running config output, either list of multiline string
- Returns:
output dictionary with parsed with system fields
- Return type:
dict
7.9. cisco parser - cdp
cisco show cdp neighbour command output parser
- nettoolkit.facts_finder.generators.cisco._cmd_parse_cdp.get_cdp_neighbour(cmd_op, *args, dsr=True)[source]
parser - show cdp neigh command output // Deprycated and removed // use lldp neighbor instead.
- Parsed Fields:
port/interface
neighbor interface
neighbor plateform
neighbor hostname
- Parameters:
cmd_op (list, str) – command output in list/multiline string.
dsr (bool, optional) – DOMAIN SUFFIX REMOVAL. Defaults to True.
- Returns:
output dictionary with parsed fields
- Return type:
dict
7.10. cisco parser - if description
cisco show interface description command output parser
- nettoolkit.facts_finder.generators.cisco._cmd_parse_int_description.get_interface_description(cmd_op, *args)[source]
parser - show int descript command output
- Parsed Fields:
port/interface
description
- Parameters:
cmd_op (list, str) – command output in list/multiline string.
- Returns:
output dictionary with parsed fields
- Return type:
dict
7.11. cisco parser - if status
cisco show interface status command output parser
- nettoolkit.facts_finder.generators.cisco._cmd_parse_int_status.get_interface_status(cmd_op, *args)[source]
parser - show int status command output
- Parsed Fields:
port/interface
port_type
duplex
speed
port_status
- Parameters:
cmd_op (list, str) – command output in list/multiline string.
- Returns:
output dictionary with parsed fields
- Return type:
dict
7.12. cisco parser - lldp
cisco show lldp neighbour command output parser
- nettoolkit.facts_finder.generators.cisco._cmd_parse_lldp.get_lldp_neighbour(cmd_op, *args, dsr=True)[source]
parser - show lldp neigh command output
- Parsed Fields:
port/interface
neighbor interface
neighbor hostname
- Parameters:
cmd_op (list, str) – command output in list/multiline string.
dsr (bool, optional) – DOMAIN SUFFIX REMOVAL. Defaults to True.
- Returns:
output dictionary with parsed fields
- Return type:
dict
7.13. cisco parser - mac
cisco show mac address-table command output parser
- nettoolkit.facts_finder.generators.cisco._cmd_parse_mac_table.get_mac_address_table(cmd_op, *args)[source]
parser - show mac address-table command output
- Parsed Fields:
port/interface
neighbor mac
neighbor mac2
neighbor mac4
- Parameters:
cmd_op (list, str) – command output in list/multiline string.
- Returns:
output dictionary with parsed fields
- Return type:
dict
7.14. cisco parser - ospf
cisco show running-config parser for ospf section output
- class nettoolkit.facts_finder.generators.cisco._cmd_parse_ospf.OSPF(cmd_op)[source]
Bases:
objectparent object for OSPF running config parser
- Parameters:
cmd_op (list, str) – running config output, either list of multiline string
- static get_active_interfaces(vrf_op_dict, l, spl)[source]
parser function to get active interfaces
- Parameters:
vrf_op_dict (dict) – dictionary with a vrf info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_networks(vrf_op_dict, l, spl)[source]
parser function to get networks
- Parameters:
vrf_op_dict (dict) – dictionary with a vrf info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_router_id(vrf_op_dict, l, spl)[source]
parser function to get router-id details
- Parameters:
vrf_op_dict (dict) – dictionary with a vrf info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_summaries(vrf_op_dict, l, spl)[source]
parser function to get ospf area range summaries
- Parameters:
vrf_op_dict (dict) – dictionary with a vrf info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- nettoolkit.facts_finder.generators.cisco._cmd_parse_ospf.get_ospf_running(cmd_op, *args)[source]
defines set of methods executions. to get various ospf parameters.
- Parameters:
cmd_op (list, str) – running config output, either list of multiline string
- Returns:
output dictionary with parsed with ospf fields
- Return type:
dict
7.15. cisco parser - interfaces
cisco show running-config parser for interface section outputs
- class nettoolkit.facts_finder.generators.cisco._cmd_parse_running_interfaces.RunningInterfaces(cmd_op)[source]
Bases:
objectobject for interface level running config parser
- Parameters:
cmd_op (list, str) – running config output, either list of multiline string
- static get_int_channel_group(port_dict, l)[source]
parser function to update interface port channel details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- static get_int_mode_details(port_dict, l)[source]
parser function to update interface mode details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- static get_int_ospf_auth(port_dict, l)[source]
parser function to update ospf authentication details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- static get_int_udld(port_dict, l)[source]
parser function to update udld parameter details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- static get_int_vlan_details(port_dict, l)[source]
parser function to update interface vlan details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- static get_int_vrf(port_dict, l)[source]
parser function to update interface vrf details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- static get_interface_description(port_dict, l)[source]
parser function to update interface description details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- static get_interface_state(port_dict, l)[source]
parser function to update interface state details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- static get_interface_v4_helpers(port_dict, l)[source]
parser function to update ipv4 helpers details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- static get_interface_v6_helpers(port_dict, l)[source]
parser function to update ipv6 helpers details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- static get_ip_details(port_dict, l)[source]
parser function to update interface ipv4 ip address details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- static get_ipv6_details(port_dict, l)[source]
parser function to update interface ipv6 ip address details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- nettoolkit.facts_finder.generators.cisco._cmd_parse_running_interfaces.get_interfaces_running(cmd_op, *args)[source]
defines set of methods executions. to get various inteface parameters. uses RunningInterfaces in order to get all.
- Parameters:
cmd_op (list, str) – running config output, either list of multiline string
- Returns:
output dictionary with parsed with system fields
- Return type:
dict
7.16. cisco parser - prefix lists
cisco running-config - prefix list output parser
- class nettoolkit.facts_finder.generators.cisco._cmd_parse_running_prefix_list.RunningPrefixLists(cmd_op)[source]
Bases:
objectobject for running config prefix list parser
- nettoolkit.facts_finder.generators.cisco._cmd_parse_running_prefix_list.get_system_running_prefix_lists(cmd_op, *args)[source]
defines set of methods executions. to get various ip prefix-list parameters. uses RunningPrefixLists in order to get all.
- Parameters:
cmd_op (list, str) – running config output, either list of multiline string
- Returns:
output dictionary with parsed with system fields
- Return type:
dict
7.17. cisco parser - routes
cisco running-config - ip routes output parser
- class nettoolkit.facts_finder.generators.cisco._cmd_parse_running_routes.RunningRoutes(cmd_op)[source]
Bases:
objectobject for running config routes parser
- static get_route_dict(dic, l, spl)[source]
parser function to update route details
- Parameters:
dic (dict) – blank dictionary to update a route info
l (str) – line to parse
- Returns:
None
- Return type:
None
- nettoolkit.facts_finder.generators.cisco._cmd_parse_running_routes.get_administrative_dist(spl, next_hop, idx_distance)[source]
get administrative distance value from ip route command list
- Parameters:
spl (list) – ip route command splitted
next_hop (str) – next hop value
idx_distance (int) – index distance
- Returns:
value of administrative distance configured or ``
- Return type:
str
- nettoolkit.facts_finder.generators.cisco._cmd_parse_running_routes.get_multi_idx_item(item, lst)[source]
get multi indexex item from list
- Parameters:
item (str) – item
lst (list) – list of items
- Returns:
index till end of list
- Return type:
str
- nettoolkit.facts_finder.generators.cisco._cmd_parse_running_routes.get_pfx_nh_idxdist(version, spl, idx_distance)[source]
get tuple of prefix, nexthop, indexdistance for give ip route split line
- Parameters:
version (int) – ip route version
spl (list) – list of splitted ip route command
idx_distance (int) – index distance
- Returns:
_description_
- Return type:
_type_
- nettoolkit.facts_finder.generators.cisco._cmd_parse_running_routes.get_singel_idx_item(item, lst)[source]
gives next item if found item from list
- Parameters:
item (str) – item
lst (list) – list of items
- Returns:
Next index item found in list
- Return type:
str
- nettoolkit.facts_finder.generators.cisco._cmd_parse_running_routes.get_system_running_routes(cmd_op, *args)[source]
defines set of methods executions. to get various ip route parameters. uses RunningRoutes in order to get all.
- Parameters:
cmd_op (list, str) – running config output, either list of multiline string
- Returns:
output dictionary with parsed with system fields
- Return type:
dict
7.18. cisco parser - sys_info
cisco show running-config parser for system outputs
- class nettoolkit.facts_finder.generators.cisco._cmd_parse_running_system.RunningSystem(cmd_op)[source]
Bases:
objectobject for running config parser
- Parameters:
cmd_op (list, str) – running config output, either list of multiline string
- nettoolkit.facts_finder.generators.cisco._cmd_parse_running_system.get_system_running(cmd_op, *args)[source]
defines set of methods executions. to get various system parameters. uses RunningSystem in order to get all.
- Parameters:
cmd_op (list, str) – running config output, either list of multiline string
- Returns:
output dictionary with parsed with system fields
- Return type:
dict
7.19. cisco parser - vrf
cisco show running-config command parser for vrf level outputs
- class nettoolkit.facts_finder.generators.cisco._cmd_parse_running_vrfs.RunningVRFs(cmd_op)[source]
Bases:
objectobject for VRF level running config parser
- Parameters:
cmd_op (list, str) – running config output, either list of multiline string
- static get_vrf_af(port_dict, l)[source]
parser function to update vrf address-family details
- Parameters:
port_dict (dict) – dictionary with a vrf info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- static get_vrf_description(port_dict, l)[source]
parser function to update vrf description details
- Parameters:
port_dict (dict) – dictionary with a vrf info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- static get_vrf_rd(port_dict, l)[source]
parser function to update vrf rd details
- Parameters:
port_dict (dict) – dictionary with a vrf info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- static get_vrf_rt(port_dict, l)[source]
parser function to update vrf rt details
- Parameters:
port_dict (dict) – dictionary with a vrf info
l (str) – string line to parse
- Returns:
None
- Return type:
None
- nettoolkit.facts_finder.generators.cisco._cmd_parse_running_vrfs.get_vrfs_running(cmd_op, *args)[source]
defines set of methods executions. to get various vrf parameters. uses RunningVRFs in order to get all.
- Parameters:
cmd_op (list, str) – running config output, either list of multiline string
- Returns:
output dictionary with parsed with system fields
- Return type:
dict
7.20. cisco parser - version
cisco show version command output parser
- nettoolkit.facts_finder.generators.cisco._cmd_parse_version.get_version(cmd_op, *args)[source]
parser - show version command output
- Parsed Fields:
software
bootfile
serial
model
- Parameters:
cmd_op (list, str) – command output in list/multiline string.
- Returns:
output dictionary with parsed fields
- Return type:
dict