Skip to content

Instantly share code, notes, and snippets.

View ktbyers's full-sized avatar

Kirk Byers ktbyers

View GitHub Profile
---
- name: NAPALM vlan configuration
hosts: nxos2
gather_facts: False
tasks:
- napalm_install_config:
hostname: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
#!/usr/bin/env python
'''
Write a Python program that creates a list. One of the elements of the list
should be a dictionary with at least two keys. Write this list out to a file
using both YAML and JSON formats. The YAML file should be in the expanded form.
'''
import yaml
import json
#!/usr/bin/env python
from netmiko import ConnectHandler
from getpass import getpass
ip_addr = raw_input("Enter IP Address: ")
device = {
'device_type': 'cisco_ios',
'ip': ip_addr,
'username': 'admin',
#!/usr/bin/env python
from getpass import getpass
from pprint import pprint as pp
from napalm import get_network_driver
#from napalm_base import get_network_driver
#import napalm_ios
from netmiko import ConnectHandler