import netmiko

devices = [
    {'device_type': 'cisco_ios', 'ip': '172.16.31.10', 'username': 'pyclass', 'password': '<PASSWORD>'},
    {'device_type': 'cisco_ios', 'ip': '172.16.17.32', 'username': 'pyclass', 'password': '<PASSWORD>'},
]

for device in devices:
    connect = netmiko.ConnectHandler(**device)

    # print out the prompt so the user can see we're on the correct device
    print connect.find_prompt()

    connect.send_config_from_file('ios_config.txt')

    print connect.send_command('show run | i logging')
