7.21. juniper parser - arp
juniper arp table command output parser
- nettoolkit.facts_finder.generators.juniper._cmd_parse_arp_table.get_arp_table(cmd_op, *args)[source]
parser - show arp command output
- Parsed Fields:
port/interface
ip
mac, mac2, mac4
dns
vlan
- Parameters:
cmd_op (list, str) – command output in list/multiline string.
- Returns:
output dictionary with parsed fields
- Return type:
dict
7.22. juniper parser - hardware
juniper show chassis hardware command output parser
- class nettoolkit.facts_finder.generators.juniper._cmd_parse_chassis_hardware.JuniperChassisHardware(output)[source]
Bases:
objectread the show chassis hardware output from juniper and returns port type(sfp)
- Parameters:
output (list) – show chassis hardware output in list
- nettoolkit.facts_finder.generators.juniper._cmd_parse_chassis_hardware.get_chassis_hardware(cmd_op, *args)[source]
parser - show chassis hardware command output
- Parsed Fields:
port/interface
port_type
- Parameters:
cmd_op (list, str) – command output in list/multiline string.
- Returns:
output dictionary with parsed fields
- Return type:
dict
- nettoolkit.facts_finder.generators.juniper._cmd_parse_chassis_hardware.get_chassis_serial(cmd_op, *args)[source]
parser - show chassis hardware command output
- Parsed Fields:
device chassis serial number
- Parameters:
cmd_op (list, str) – command output in list/multiline string.
- Returns:
output dictionary with parsed fields
- Return type:
dict
7.23. juniper parser - if description
juniper interface description command output parser
- nettoolkit.facts_finder.generators.juniper._cmd_parse_int_description.get_int_description(cmd_op, *args)[source]
parser - show interfaces description 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.24. juniper parser - lldp
juniper lldp neighbour command output parser
- nettoolkit.facts_finder.generators.juniper._cmd_parse_lldp.get_lldp_neighbour(cmd_op, *args, dsr=True)[source]
parser - show lldp neighbor command output
- Parsed Fields:
port/interface
neighbor hostname
neighbor interface
- 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.25. juniper parser - bgp
juniper bgp protocol routing instances parsing from set config
- class nettoolkit.facts_finder.generators.juniper._cmd_parse_running_bgp.RunningIntanceBGP(cmd_op)[source]
Bases:
Runningobject for instance level config parser
- Parameters:
cmd_op (list, str) – config output, either list of multiline string
- bgp_grp_info()[source]
update the bgp group detail - description, peer group, peer ip, auth-key, vrf, peer as
- bgp_nbr_info()[source]
update the bgp neighbor detail - description, peer group, peer ip, auth-key, vrf, peer as
- static get_bgp_grp_info(port_dict, l, spl, proto_idx)[source]
parser function to update bgp group detail - description, peer group, peer ip, auth-key, vrf, peer as
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
proto_idx (int) – index value from where protocol bgp starts in provided list
- Returns:
None
- Return type:
None
- static get_bgp_nbr_info(port_dict, l, spl, proto_idx)[source]
parser function to update bgp neighbor detail - description, peer group, peer ip, auth-key, vrf, peer as
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
proto_idx (int) – index value from where protocol bgp starts in provided list
- Returns:
None
- Return type:
None
- nettoolkit.facts_finder.generators.juniper._cmd_parse_running_bgp.get_instances_bgps(cmd_op, *args)[source]
defines set of methods executions. to get various instance parameters. uses RunningIntanceBGP 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.26. juniper parser - interfaces
juniper interface from config command output parser
- class nettoolkit.facts_finder.generators.juniper._cmd_parse_running_interfaces.RunningInterfaces(cmd_op)[source]
Bases:
Runningobject for interface level config parser
- Parameters:
cmd_op (list, str) – config output, either list or multiline string
- static get_int_description(port_dict, l, spl, p)[source]
parser function to update interface description details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- get_int_filter(port_dict, l, spl, p)[source]
parser function to update interface type details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- get_int_vlan_details(port_dict, l, spl, p)[source]
parser function to update interface vlan details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_interface_channel_grp(port_dict, l, spl, p)[source]
parser function to update interface port channel details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_interface_mode(port_dict, l, spl, p)[source]
parser function to update interface port mode trunk/access details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_ip_details(port_dict, l, spl, p)[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
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_ipv6_details(port_dict, l, spl, p)[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
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_ospf_authentication_details(port_dict, l, spl, ospf_idx)[source]
parser function to update interface ospf authentication details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
ospf_idx (int) – index value from where ospf information starting on set commands list
- Returns:
None
- Return type:
None
- int_dot_zero_merge_to_parent1()[source]
merges the value of two keys for parent and parent unit 0 configs
- int_to_int_number()[source]
creates an arbirary unique number for each interface on interface types
- interface_read(func)[source]
directive function to get the various interface level output
- Parameters:
func (method) – method to be executed on interface config line
- Returns:
parsed output dictionary
- Return type:
dict
- nettoolkit.facts_finder.generators.juniper._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
- nettoolkit.facts_finder.generators.juniper._cmd_parse_running_interfaces.get_logical_port_number(port)[source]
physical interface - logical interface number calculator.
- Parameters:
port (str) – string lateral for various types of juniper interface/port
- Returns:
a logical port number assign to port value (sequencial)
- Return type:
int
- nettoolkit.facts_finder.generators.juniper._cmd_parse_running_interfaces.get_physical_port_number(port)[source]
physical interface - interface number calculator.
- Parameters:
port (str) – string lateral for various types of juniper interface/port
- Returns:
a number assign to port value (sequencial)
- Return type:
int
- nettoolkit.facts_finder.generators.juniper._cmd_parse_running_interfaces.set_of_voice_vlans(set_cmd_op)[source]
get the set of voice vlans configured in provided set commands configuration.
- Parameters:
set_cmd_op (list) – set command output
- Returns:
set of voice vlans found in output
- Return type:
set
7.27. juniper parser - ospf
juniper ospf parsing from set config
- class nettoolkit.facts_finder.generators.juniper._cmd_parse_running_ospf.RunningOSPF(cmd_op)[source]
Bases:
Runningobject for ospf level config parser
- Parameters:
cmd_op (list, str) – config output, either list or multiline string
- static get_interface_type(vrf_op_dict, l, spl)[source]
parser function to get ospf interface type
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_ospf_authentication(vrf_op_dict, l, spl)[source]
parser function to get ospf authentication parameters
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_passive_interfaces(vrf_op_dict, l, spl)[source]
parser function to get passive interfaces
- Parameters:
port_dict (dict) – dictionary with a port 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:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- nettoolkit.facts_finder.generators.juniper._cmd_parse_running_ospf.get_instances_ospfs(cmd_op, *args)[source]
defines set of methods executions. to get various instance of ospf parameters. uses RunningOSPF 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.28. juniper parser - routes
juniper routes parsing from set config
- class nettoolkit.facts_finder.generators.juniper._cmd_parse_running_routes.RunningRoutes(cmd_op)[source]
Bases:
Runningobject for routes level config parser
- static get_route_dict(dic, l, vrf_spl_sect, route_spl_sect, v)[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.juniper._cmd_parse_running_routes.get_system_running_routes(cmd_op, *args)[source]
defines set of methods executions. to get various instance of 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.29. juniper parser - bgp instances
juniper routing instances parsing from set config
- class nettoolkit.facts_finder.generators.juniper._cmd_parse_running_routing_instances.RunningIntances(cmd_op)[source]
Bases:
Runningobject for instance level config parser
- Parameters:
cmd_op (list, str) – config output, either list of multiline string
- static get_vrf_description(port_dict, l, spl)[source]
parser function to update vrf description details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_vrf_route_target(port_dict, l, spl)[source]
parser function to update vrf route target details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- nettoolkit.facts_finder.generators.juniper._cmd_parse_running_routing_instances.get_instances_running(cmd_op, *args)[source]
defines set of methods executions. to get various instance parameters. uses RunningIntances 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.30. juniper parser - system
juniper system config parser from set config
- class nettoolkit.facts_finder.generators.juniper._cmd_parse_running_system.RunningSystem(cmd_op)[source]
Bases:
Runningobject for system level config parser
- Parameters:
cmd_op (list, str) – config output, either list of multiline string
- club_list_items(key)[source]
concatenate items with carriage return character for the provided key in system_dict dictionary. general implementation.
- Parameters:
key (str) – key for which items to be concatenate.
- static get_banner(op_dict, l, spl)[source]
parser function to update system banner details
- Parameters:
op_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_gtac_servers(op_dict, l, spl)[source]
parser function to update system gtac servers details
- Parameters:
op_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_hostname(op_dict, l, spl)[source]
parser function to update system hostname details
- Parameters:
port_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_mgmt_ip(op_dict, l, spl)[source]
parser function to update system management ip details
- Parameters:
op_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_nameservers(op_dict, l, spl)[source]
parser function to update system name servers details
- Parameters:
op_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_ntp_servers(op_dict, l, spl)[source]
parser function to update system ntp servers details
- Parameters:
op_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_syslog_servers(op_dict, l, spl)[source]
parser function to update system syslog servers details
- Parameters:
op_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- static get_system_as_number(op_dict, l, spl)[source]
parser function to update system as details
- Parameters:
op_dict (dict) – dictionary with a port info
l (str) – string line to parse
spl (list) – splitted line to parse
- Returns:
None
- Return type:
None
- nettoolkit.facts_finder.generators.juniper._cmd_parse_running_system.get_running_system(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.31. juniper parser - configuration
juniper set config initiator - parent
7.32. juniper parser - version
juniper show version command output parser
- nettoolkit.facts_finder.generators.juniper._cmd_parse_version.get_version(cmd_op, *args)[source]
parser - show version command output
- Parsed Fields:
version
model
- Parameters:
cmd_op (list, str) – command output in list/multiline string.
- Returns:
output dictionary with parsed fields
- Return type:
dict