The VS Code Terminal can be used, either with Windows (REST APIs) or WSL Ubuntu (pyATS), to create a Python virtual environment and run Business Ready.
The following instructions are based on Windows WSL2 and Ubuntu however any flavour of Linux will work with possibly slightly different commands.
$ 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 buisnessready
(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")
Individual Learn / Show Functions - You can run individual learn or show commands as well if you are looking for something specific
>>> 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")
Individual Learn / Show Functions - You can run individual learn or show commands as well if you are looking for something specific
>>> 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")
Individual REST APIs - You can run individual REST API as well if you are looking for something specific
>>> import businessready
>>> businessready.DNAC_{{ REST API }}("url","username","password")
>>> import businessready
>>> businessready.Meraki_all("url","Dashboard Token")
Individual REST APIs - You can run individual REST API as well if you are looking for something specific
>>> import businessready
>>> businessready.Meraki_{{ REST API }}("url","Dashboard Token")
- In Development
- In Development
If you have more than one device you want to transform Business Ready can handle multiple devices in a variety of ways
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'])