$ python3 -V Python 3.9.10
$ sudo apt install python3-venv $ python3 -m venv demo $ source demo/bin/activate (demo)$
(demo)$ pip install pyats[full]
(demo)$ pip install businessready
C:\>python3 -m venv demo C:\>demo\Scripts\activate (demo) C:\>
(demo) C:\>pip install businessready
(demo)$ python3 >>> import businessready
(demo) C:\>python3 >>> import businessready
>>> import businessready >>> businessready.IOS_all("hostname","username","password","IP / DNS Address")
>>> import businessready >>> businessready.IOS_learn_all("hostname","username","password","IP / DNS Address")
>>> import businessready >>> businessready.IOS_show_all("hostname","username","password","IP / DNS Address")
>>> import businessready >>> businessready.IOS_learn_{{ function }}("hostname","username","password","IP / DNS Address") >>> businessready.IOS_show_{{ show command }}("hostname","username","password","IP / DNS Address")
>>> import businessready >>> businessready.NXOS_all("hostname","username","password","IP / DNS Address")
>>> import businessready >>> businessready.NXOS_learn_all("hostname","username","password","IP / DNS Address")
>>> import businessready >>> businessready.NXOS_show_all("hostname","username","password","IP / DNS Address")
>>> import businessready >>> businessready.NXOS_learn_{{ function }}("hostname","username","password","IP / DNS Address") >>> businessready.NXOS_show_{{ show command }}("hostname","username","password","IP / DNS Address")
>>> import businessready >>> businessready.DNAC_all("url","username","password")
>>> import businessready >>> businessready.DNAC_{{ REST API }}("url","username","password")
>>> import businessready >>> businessready.Meraki_all("url","Dashboard Token")
>>> import businessready >>> businessready.Meraki_{{ REST API }}("url","Dashboard Token")
import businessready device01_info = ["dist-rtr01", "cisco", "cisco", "10.10.20.175"] device02_info = ["dist-rtr02", "cisco", "cisco", "10.10.20.176"] device_list = [device01_info, device02_info] for device in device_list: businessready.NXOS_learn_all(*device)
import businessready import yaml with open('testbed.yml') as info: info_dict = yaml.safe_load(info) for device in info_dict['devices']: if info_dict['devices'][device]['os'] == "iosxe": businessready.IOS_learn_all(device,info_dict['devices'][device]['credentials']['default']['username'],info_dict['devices'][device]['credentials']['default']['password'],info_dict['devices'][device]['connections']['cli']['ip']) elif info_dict['devices'][device]['os'] == "nxos": businessready.NXOS_learn_all(device,info_dict['devices'][device]['credentials']['default']['username'],info_dict['devices'][device]['credentials']['default']['password'],info_dict['devices'][device]['connections']['cli']['ip'])
import businessready import csv with open('spreadsheet.csv') as info: for line in csv.DictReader(info): info_dict = line print(info_dict) if info_dict['os'] == "iosxe": businessready.IOS_all(info_dict['hostname'],info_dict['username'],info_dict['password'],info_dict['ip']) elif info_dict['os'] == "nxos": businessready.NXOS_all(info_dict['hostname'],info_dict['username'],info_dict['password'],info_dict['ip'])
Owner
Contributors
Categories
Products
Catalyst CenterpyATSNX-OSIOS XEIdentity Services Engine (ISE)MerakiProgramming Languages
JinjaLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community