This vRealize Network Insight Python SDK example script adds all data sources that are listed in the CSV you specify. This script requires the vRNI Python SDK, which is available here: https://github.com/vmware/network-insight-sdk-python Example CSV: DataSourceType,IP,fqdn,Username,Password,CSPRefreshToken,NickName,CentralCliEnabled,IPFixEnabled,SwitchType,ParentvCenter,IsVMC,snmp version,snmp community string,snmp username,snmp password,snmp auth type,snmp privacy type,ProxyIP VCenterDataSource,192.168.0.10,,administrator@vsphere.local,MyPassword,,vcenter,,,,,,,,,,,,192.168.0.5 NSXVManagerDataSource,,nsxv.lab,admin,MyPassword,,nsxv,TRUE,FALSE,,192.168.0.10,,,,,,,,192.168.0.5 NSXTManagerDataSource,192.168.0.12,,audit,MyPassword,,nsxt,,,,192.168.0.10,,,,,,,,192.168.0.5 PanFirewallDataSource,192.168.0.13,,admin,MyPassword,,panorama firewall,,,,,,,,,,,,192.168.0.5 CiscoSwitchDataSource,192.168.0.14,,admin,MyPassword,,NEXUS 5K,,,NEXUS 5K,,,v3,,admin,MyPassword,MD5,NO PRIV,192.168.0.5 VCenterDataSource,192.168.0.15,,cloudadmin@vmc.local,MyPassword,,vmc,,,,,TRUE,,,,,,,192.168.0.5 PolicyManagerDataSource,192.168.0.16,,,,LongString,policy manager,TRUE,FALSE,,192.168.0.10,,,,,,,,192.168.0.5 # python datasource addition.py --help usage: datasource addition.py [-h] [--deployment type DEPLOYMENT TYPE] [--platform ip PLATFORM IP] [--username USERNAME] [--password PASSWORD] [--domain type DOMAIN TYPE] [--domain value DOMAIN VALUE] [--get vidm client id] [--vidm token VIDM TOKEN] [--api token API TOKEN] [--data sources csv DATA SOURCES CSV] Run Public APIs on vRNI Platform optional arguments: -h, --help show this help message and exit --deployment type DEPLOYMENT TYPE Setup deployment type: onprem or niaas --platform ip PLATFORM IP IP address of vRNI platform
datasource_addition.py