dell emc networking napalm integration documentation

21
Dell EMC Networking Napalm Integration Documentation Release 1.0 Dell EMC Networking Team Apr 22, 2020

Upload: others

Post on 01-Mar-2022

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Dell EMC Networking Napalm Integration Documentation

Dell EMC Networking NapalmIntegration Documentation

Release 1.0

Dell EMC Networking Team

Apr 22, 2020

Page 2: Dell EMC Networking Napalm Integration Documentation
Page 3: Dell EMC Networking Napalm Integration Documentation

Table of Contents

1 Introduction 11.1 NAPALM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Dell EMC Networking NAPALM integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Installation 32.1 Install NAPALM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 Test your setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 Dell EMC Networking OS10 NAPALM APIs 53.1 Implemented APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53.2 Missing APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

4 Provision CLOS fabric using Dell EMC Networking NAPALM APIs example 74.1 Step 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74.2 Step 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

5 Install or upgrade devices running Dell EMC Networking OS10 using NAPALM 115.1 Step 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115.2 Step 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115.3 Step 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

6 Release notes 136.1 Release 1.0.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

7 Support 157.1 Contact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

8 License 17

i

Page 4: Dell EMC Networking Napalm Integration Documentation

ii

Page 5: Dell EMC Networking Napalm Integration Documentation

CHAPTER 1

Introduction

This information explains the usage of NAPALM for deploying the configuration into Dell EMC Networking OS10switches.

1.1 NAPALM

Network automation and programmability abstraction layer with multivendor support (NAPALM) is a Python librarythat implements a set of functions to interact with different network device operating systems using a unified API.

NAPALM tries to provide a common interface and mechanisms to push configuration and retrieve state data fromnetwork devices. This method is very useful in combination with tools such as Ansible/SaltStack, which allow you tomanage a set of devices independent of their network OS.

See NAPALM for complete information.

1.2 Dell EMC Networking NAPALM integration

Dell EMC Networking OS10 switches can be managed and automated using NAPALM unified API to manipulateconfigurations or to retrieve data.

1

Page 6: Dell EMC Networking Napalm Integration Documentation

Dell EMC Networking Napalm Integration Documentation, Release 1.0

2 Chapter 1. Introduction

Page 7: Dell EMC Networking Napalm Integration Documentation

CHAPTER 2

Installation

This information contains instructions to install napalm_dellos10. Included is information on the setup environmentfor managing Dell EMC Networking OS10 switches using Python.

2.1 Install NAPALM

Install the Dell Networking OS10 NAPALM driver:

sudo apt-get install libffi-dev libssl-dev python-dev python-cffi libxslt1-dev python-→˓pippip install --upgrade pipsudo pip install --upgrade cffisudo pip install napalm-dellos10

2.2 Test your setup

Open the Python interpreter terminal using “python”:

>>> from napalm.base import get_network_driver>>> d = get_network_driver('dellos10')>>> e = d('<HOSTNAME/IP_ADDRESS>', '<USERNAME>', '<PASSWORD>', optional_args={'global_→˓delay_factor': 3})>>> e.open()>>> e.get_facts()>>> e.close()

3

Page 8: Dell EMC Networking Napalm Integration Documentation

Dell EMC Networking Napalm Integration Documentation, Release 1.0

4 Chapter 2. Installation

Page 9: Dell EMC Networking Napalm Integration Documentation

CHAPTER 3

Dell EMC Networking OS10 NAPALM APIs

NAPALM connects to the devices to manipulate configurations, or to retrieve data using APIs. See NAPALM for moreinformation about each API.

3.1 Implemented APIs

• load_merge_candidate

• compare_config

• commit_config

• discard_config

• get_facts

• get_config

• ping

• get_snmp_information

• get_interfaces

• get_route_to

• get_interfaces_ip

• get_bgp_config

• get_bgp_neighbors_detail

• get_bgp_neighbors

• get_lldp_neighbors

• get_lldp_neighbors_detail

• get_lldp_neighbors_interface_detail

5

Page 10: Dell EMC Networking Napalm Integration Documentation

Dell EMC Networking Napalm Integration Documentation, Release 1.0

• install_switch_image

• upgrade_switch_image

• get_image_status

3.2 Missing APIs

• rollback is not supported

• load_replace_candidate not supported

6 Chapter 3. Dell EMC Networking OS10 NAPALM APIs

Page 11: Dell EMC Networking Napalm Integration Documentation

CHAPTER 4

Provision CLOS fabric using Dell EMC Networking NAPALM APIsexample

This information describes how to use NAPALM to build a CLOS fabric with Dell EMC Networking OS10 switches.The sample topology is a two-tier CLOS fabric with two spines and four leafs connected as mesh. EBGP is runningbetween the two tiers.

All switches in spine have the same AS number, and each leaf switch has a unique AS number. All AS number usedare private. For application load-balancing purposes, the same prefix is advertised from multiple leaf switches anduses BGP multipath relax feature.

4.1 Step 1

Download the CLOS fabric configuration:

spine1 spine2 leaf1 leaf2 leaf3 leaf4

Copy all the downloaded configuration files in the the /root/napalm/clos_configuration directory.

4.2 Step 2

Load/merge the configuration for all the switches in the fabric.

Create a file called load_merge.py in a folder:

from napalm_base import get_network_driver

configs_dir = "/root/napalm/clos_configuration/" # add your configuration base→˓directory pathcommit_config = False # If you are happy with the changes, mark this as Truediscard_config = True # Mark as True, To delete the uploaded configuration

(continues on next page)

7

Page 12: Dell EMC Networking Napalm Integration Documentation

Dell EMC Networking Napalm Integration Documentation, Release 1.0

8 Chapter 4. Provision CLOS fabric using Dell EMC Networking NAPALM APIs example

Page 13: Dell EMC Networking Napalm Integration Documentation

Dell EMC Networking Napalm Integration Documentation, Release 1.0

(continued from previous page)

# Add your global switch credentialsdevice_creds = {

"username": "admin","password": "admin","optional_args": {

"global_delay_factor": 3}

}

# Add your Switch specific detailsfabric_details = {

"spine1": {"hostname" : "1.1.1.1","config_file": "spine1.cfg"

},"spine2": {

"hostname": "1.1.1.2","config_file": "spine2.cfg"

},"leaf1": {

"hostname": "1.1.1.3","config_file": "leaf1.cfg"

},"leaf2": {

"hostname": "1.1.1.4","config_file": "leaf2.cfg"

},"leaf3": {

"hostname": "1.1.1.5","config_file": "leaf3.cfg"

},"leaf4": {

"hostname": "1.1.1.6","config_file": "leaf4.cfg"

}}

driver = get_network_driver('dellos10')

for key, value in fabric_details.iteritems():device_ip = value.get("hostname")config_file = configs_dir + value.get("config_file")

device = driver(device_ip, **device_creds)device.open()print("{}: Started loading configuration ".format(key))device.load_merge_candidate(filename=config_file)print("Configuration difference to be applied on switch : {}".format(key))print(device.compare_config())

if commit_config:device.commit_config()print("Configuration successfully loaded into switch: {}".format(key))

if discard_config:device.discard_config()print("{}: Configuration discarded successfully".format(key))

(continues on next page)

4.2. Step 2 9

Page 14: Dell EMC Networking Napalm Integration Documentation

Dell EMC Networking Napalm Integration Documentation, Release 1.0

(continued from previous page)

device.close()

10 Chapter 4. Provision CLOS fabric using Dell EMC Networking NAPALM APIs example

Page 15: Dell EMC Networking Napalm Integration Documentation

CHAPTER 5

Install or upgrade devices running Dell EMC Networking OS10 usingNAPALM

This information explains how to use NAPALM to install or upgrade the software image on a device running DellEMC Networking OS10.

5.1 Step 1

Make sure switches are accessible through NAPALM. Open the Python interpreter terminal using “python” match theexample:

>>> from napalm_base import get_network_driver>>> d = get_network_driver('dellos10')>>> e = d('<HOSTNAME/IP_ADDRESS>', '<USERNAME>', '<PASSWORD>', optional_args={'global_→˓delay_factor': 3})>>> e.open()>>> e.get_facts()>>> e.close()

5.2 Step 2

Upload the image to install to any TFTP/FTP/SCP/SFTP/HTTP server.

5.3 Step 3

Install or upgrade the image on the switch. Example image file path is /root/PKGS_OS10-Enterprise-10.4.0E.R2.30-installer-x86_64.bin.

SCP server details are below, Server IP: 1.1.1.1 credentials: username: my_username, password:my_password image file path: /root/PKGS_OS10-Enterprise-10.4.0E.R2.30-installer-x86_64.bin

11

Page 16: Dell EMC Networking Napalm Integration Documentation

Dell EMC Networking Napalm Integration Documentation, Release 1.0

Example image_file_url:

image_file_url="scp://my_username:[email protected]/root/PKGS_OS10-Enterprise-10.4.0E.R2.30-installer-x86_64.bin"

To install the switch image, create a file called image_upgrade.py in a folder:

from napalm_base import get_network_driver

# Add your global switch credentialsdevice_creds = {

"username": "admin","password": "admin","optional_args": {

"global_delay_factor": 3}

}

image_file_url="scp://my_username:[email protected]/root/PKGS_OS10-Enterprise-10.4.→˓0E.R2.30-installer-x86_64.bin"

driver = get_network_driver('dellos10')

device = driver("1.1.1.1", **device_creds)device.open()print("Switch image install started...")device.install_switch_image(image_file_url=image_file_url)# get the switch status using belowdevice.get_image_status()

device.close()

Note: image_file_url format for TFTP/FTP/SCP/SFTP/HTTP server are below

• ftp: Install from remote FTP server (ftp://userid:passwd@hostip/filepath)

• http: Install from remote HTTP (http://hostip/filepath)

• image: Install from image directory (image://filepath)

• scp: Install from remote SCP server (scp://userid:passwd@hostip/filepath)

• sftp: Install from remote SFTP server (sftp://userid:passwd@hostip/filepath)

• tftp: Install from remote TFTP server (tftp://hostip/filepath)

• usb: Install from USB directory (usb://filepath)

12 Chapter 5. Install or upgrade devices running Dell EMC Networking OS10 using NAPALM

Page 17: Dell EMC Networking Napalm Integration Documentation

CHAPTER 6

Release notes

This information contains the release notes for Dell EMC Networking OS10 support.

6.1 Release 1.0.0

Initial NAPALM support for Dell EMC Networking OS10 switches.

New modules:

• load_merge_candidate

• compare_config

• commit_config

• discard_config

• get_facts

• get_config

• ping

• get_snmp_information

• get_interfaces

• get_route_to

• get_interfaces_ip

• get_bgp_config

• get_bgp_neighbors_detail

• get_bgp_neighbors

• get_lldp_neighbors

• get_lldp_neighbors_detail

13

Page 18: Dell EMC Networking Napalm Integration Documentation

Dell EMC Networking Napalm Integration Documentation, Release 1.0

• get_lldp_neighbors_interface_detail

• install_switch_image

• upgrade_switch_image

• get_image_status

14 Chapter 6. Release notes

Page 19: Dell EMC Networking Napalm Integration Documentation

CHAPTER 7

Support

You can submit issues for Dell EMC Networking OS10 Napalm driver at NAPALM dellos10 Github Issues.

7.1 Contact

You can send general comments and feedback to [email protected].

15

Page 20: Dell EMC Networking Napalm Integration Documentation

Dell EMC Networking Napalm Integration Documentation, Release 1.0

16 Chapter 7. Support

Page 21: Dell EMC Networking Napalm Integration Documentation

CHAPTER 8

License

(c) 2018 Dell Inc. or its subsidiaries. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance withthe License. You may obtain a copy of the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an“AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See theLicense for the specific language governing permissions and limitations under the License.

17