𝗙𝗼𝗿 𝗖𝗼𝗺𝗽𝗹𝗲𝘁𝗲 𝗣𝘆𝘁𝗵𝗼𝗻 𝗙𝗼𝗿 𝗡𝗲𝘁𝘄𝗼𝗿𝗸 𝗘𝗻𝗴𝗶𝗻𝗲𝗲𝗿𝘀 𝗖𝗼𝘂𝗿𝘀𝗲:
𝗘𝗻𝗿𝗼𝗹𝗹 𝗳𝗼𝗿 𝗯𝗲𝗹𝗼𝘄 𝗨𝗱𝗲𝗺𝘆 𝗖𝗹𝗮𝘀𝘀: 𝟐𝟎𝟐𝟐 𝐕𝐞𝐫𝐬𝐢𝐨𝐧
𝑫𝒊𝒔𝒄𝒐𝒖𝒏𝒕𝒆𝒅 𝑹𝒆𝒇𝒆𝒓𝒓𝒂𝒍 𝑳𝒊𝒏𝒌:
https://www.udemy.com/course/python-f... Cisco configuration management using NAPALM python library. Example how to compare commit replace rollback and discard configuration changes in devices.
from napalm import get_network_driver
driver = get_network_driver('ios')
device = driver('192.168.67.47', 'admin', 'admin')
device.open()
device.load_replace_candidate(filename='30_cisco_backup')
print (device.compare_config())
if len(device.compare_config()) 0:
choice = input("\nWould you like to Replace the Configuration file? [yN]: ")
if choice == 'y':
print('Committing ...')
device.commit_config()
choice = input("\nWould you like to Rollback to previous config? [yN]: ")
if choice == 'y':
print('Rollback config is in progress ...')
device.rollback()
else:
print('Discarding ...')
device.discard_config()
else:
print ('No difference')
device.close()
print('Done.')
На этой странице сайта вы можете посмотреть видео онлайн Python NAPALM example Cisco configuration replace rollback compare commit | Part 34| длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь NetworkEvolution 17 Май 2019, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 4,142 раз и оно понравилось 37 зрителям. Приятного просмотра!