Getting Started
Important Moderation Notice
This community is currently under full moderation, meaning all posts will be reviewed before appearing in the community. Please expect a brief delay—there is no need to post multiple times. If your post is rejected, you will receive an email outlining the reason(s). We have implemented full moderation to control spam. Thank you for your patience and participation.
Top Liked Posts
-
By Vee4By Siva4By Vee2/* */By Maksym1By Maksym1
Inventory Collection using Python
in AutomationHere is an example script from Versa GitLab which can help to create inventory using python automation :
Reachability using port 9182 to Director is required from the host where the script will be executed. Script will collect all IP address information, and create CSV file. It will contain Device Name, Device Hardware Type, Device Serial Number, Device Location information and summary columns for all VRRP IP addresses and all IP addresses from VOS interfaces in two separate columns (Public IPs and Private IPs) which also includes DHCP assigned IPs to VOS as a client. Additionally, VOS has a capability to detect Public IP address for the WAN interface and this information is kept in additional column.
Lastly, it will create number of columns per each enabled interface which depends on how many interfaces are UP on the VOS. For each device and respective interface it will contain assigned IP address.
Above information is collected from real time Monitor view in Versa Director, therefore device should be reachable from Director in order to get its inventory details.
Once script is executed, additional log file called inventory.json will be created where Administrator can see more details for every device which was queried by the script.
In order to use the script, Administrator should have python version 3 installed with pip. To run it, you should specify IP address or FQDN of your Versa Director, username, password and a Tenant (Organization) name.
Hope it helps! Happy coding!