This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: NAPALM vlan configuration | |
hosts: nxos2 | |
gather_facts: False | |
tasks: | |
- napalm_install_config: | |
hostname: "{{ host }}" | |
username: "{{ username }}" | |
password: "{{ password }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
NewerOlder