ggiesen / napalm-dellos6 Goto Github PK
View Code? Open in Web Editor NEWNAPALM Driver for Dell EMC OS6 Enterprise
License: Apache License 2.0
NAPALM Driver for Dell EMC OS6 Enterprise
License: Apache License 2.0
CLI output:
nvansswi1#show lldp remote-device detail te1/0/21
LLDP Remote Device Detail
Local Interface: Te1/0/21
Remote Identifier: 202
Chassis ID Subtype: MAC Address
Chassis ID: 00:41:D2:17:21:00
Port ID Subtype: Interface Name
Port ID: Gi1/0/1
System Name: centri-vanc3850-primary.centrilogic.com
System Description: Cisco IOS Software, Catalyst L3 Switch Software (CAT3K_CAA-UNIVERSALK9-M), Version 15.0(1)EX3, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2013 by Cisco Systems, Inc.
Compiled Mon 23-Sep-13 18:24 by pr
od_r
Port Description: GigabitEthernet1/0/1
System Capabilities Supported: bridge, router
System Capabilities Enabled: bridge, router
Management Address:
Type: IPv4
Address: 10.238.14.1
Time to Live: 91 seconds
Getter output:
'Te1/0/21': {'parent_interface': '',
'remote_chassis_id': '00:41:D2:17:21:00',
'remote_port': 'Gi1/0/1',
'remote_port_description': 'GigabitEthernet1/0/1',
'remote_system_capab': ['bridge', 'router'],
'remote_system_description': 'Cisco IOS Software, Catalyst L3 '
'Switch Software '
'(CAT3K_CAA-UNIVERSALK9-M), Version '
'15.0(1)EX3, RELEASE SOFTWARE (fc2)',
'remote_system_enable_capab': ['bridge', 'router'],
'remote_system_name': 'centri-vanc3850-primary.centrilogic.com'},
get_lldp_neighbors_detail() doesn't support more than one neighbor per interface
Need to rework loop in code to accommodate multiple LLDP neighbors per interface
sanitize_configs only supports sanitizing a few secret types:
user password
enable password
snmp community
snmp trap/inform community
RADIUS keys
Need to get more config examples so we can sanitize more types (routing protocol passwords, VRRP keys, etc).
get_ntp_peers() and get_ntp_stats() don't support non-unicast peers
The textfsm templates don't parse them because we haven't seen a configuration for them yet.
parent_interface is hard-coded to be empty.
lldp = {}
for lldp_entry in show_lldp_remote_device_all:
lldp[lldp_entry['interface']] = {}
raw_show_lldp_remote_device_detail = self._send_command("show lldp remote-device detail " + lldp_entry['interface'])
show_lldp_remote_device_detail = textfsm_extractor(
self, "show_lldp_remote-device_detail", raw_show_lldp_remote_device_detail
)
print(raw_show_lldp_remote_device_detail)
print(show_lldp_remote_device_detail)
** parent_interface = ''**
remote_chassis_id = lldp_entry['chassis_id']
remote_system_name = show_lldp_remote_device_detail[0]['host_name']
remote_port = show_lldp_remote_device_detail[0]['port_id']
remote_port_description = show_lldp_remote_device_detail[0]['port_desc']
remote_system_description = show_lldp_remote_device_detail[0]['sys_desc']
if show_lldp_remote_device_detail[0]['sys_cap_sup']:
remote_system_capab = show_lldp_remote_device_detail[0]['sys_cap_sup'].replace(" ", "").split(",")
else:
remote_system_capab = []
if show_lldp_remote_device_detail[0]['sys_cap_oper']:
remote_system_enable_capab = show_lldp_remote_device_detail[0]['sys_cap_oper'].replace(" ", "").split(",")
else:
remote_system_enable_capab = []
lldp[lldp_entry['interface']] = {
"parent_interface": parent_interface,
"remote_chassis_id": remote_chassis_id,
"remote_system_name": remote_system_name,
"remote_port": remote_port,
"remote_port_description": remote_port_description,
"remote_system_description": remote_system_description,
"remote_system_capab": remote_system_capab,
"remote_system_enable_capab": remote_system_enable_capab,
}
We don't yet support parsing 'when' for get_ntp_stats() because Last Update Time is returned as an absolute time, not a relative time. To solve this, we have to get the current system time and then calculate a relative time. This will never be perfect because the current system time is not displayed within the same command, and we will have a variable delay between executing commands ('show sntp server' and 'show clock')
CLI output:
nvansswi1#show sntp server
Server Host Address: 66.135.108.133
Server Type: IPv4
Server Stratum: 2
Server Reference Id: NTP Bits: 0x44c6efdc
Server Mode: Server
Server Maximum Entries: 8
Server Current Entries: 2
SNTP Servers
------------
Host Address: 66.135.102.133
Address Type: IPv4
Priority: 1
Version: 4
Port: 123
**Last Update Time: Jun 10 20:34:48 2020**
Last Attempt Time: Jun 10 21:07:55 2020
Last Update Status: Success
Total Unicast Requests: 183689
Failed Unicast Requests: 130
Host Address: 66.135.108.133
Address Type: IPv4
Priority: 1
Version: 4
Port: 123
**Last Update Time: Jun 10 22:09:53 2020**
Last Attempt Time: Jun 10 22:12:01 2020
Last Update Status: Success
Total Unicast Requests: 137398
Failed Unicast Requests: 130
nvansswi1#show clock
15:27:41 PDT(UTC-7:00) Jun 10 2020
Time source is SNTP
Code section:
ntp_stats = []
for server in show_sntp_stats:
if server['status'] == 'Success':
synchronized = True
else:
synchronized = False
ntp_stats.append(
{
'remote': server['server_ip'],
# Not supported
'referenceid': '',
'synchronized': synchronized,
# Not supported
'stratum': -1,
# We only support parsing unicast servers right now
'type': 'u',
** # We don't support parsing this right now
'when': '',**
# Not supported
'hostpoll': -1,
# Not supported
'reachability': -1,
# Not supported
'delay': -0.0,
# Not supported
'offset': -0.0,
# Not supported
'jitter': -0.0,
}
)
Getter was created based on the manual description (which shows the general format of the fields but no actual neighbors are displayed) and some educated guesses.
Need someone to provide some actual output with at least one reachable neighbor and one stale neighbor.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.