Coder Social home page Coder Social logo

ggiesen / napalm-dellos6 Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 5.0 166 KB

NAPALM Driver for Dell EMC OS6 Enterprise

License: Apache License 2.0

Python 73.91% Smarty 26.09%
ansible automation dell dell-emc devops napalm netmiko network-automation saltstack

napalm-dellos6's People

Contributors

danimo avatar deepsourcebot avatar ggiesen avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

napalm-dellos6's Issues

get_lldp_neighbors_detail() only displays the first line for remote_system_description

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'},

sanitize_configs() supports very few secret types

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_lldp_neighbors_detail() doesn't support displaying parent interface

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,
            }

get_ntp_stats() doesn't support parsing 'when'

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,
                }
            )

Need real cli output for get_ipv6_neighbors_table

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.