Pages

Wednesday, June 7, 2023

Automating the creation of Azure Calculator estimates with Selenium and Python (more than just VM resources)

As a follow-up to my previous post in April:

Automating the creation of Azure Calculator estimates with Selenium and Python
http://terenceluk.blogspot.com/2023/04/automating-creation-of-azure-calculator.html

I was recently pulled into an opportunity where a colleague who led it was no longer available and the Azure build of materials provided to the team had different types of components that were not limited to virtual machines. My colleague indicated that he could not find the estimate saved in his profile’s Azure calculator, which meant we had to recreate it. Since I had just created the Python script that uses Selenium to create a virtual machine-only Azure estimate with an Excel spreadsheet containing an inventory, I went ahead and wrote another similar script that created an estimate by reading an Excel file and adding each row’s:

  1. Product
  2. Custom Label
  3. Region

The estimate would still require a bit of work to complete but this at least helped me save a bit of time.

The following is a screenshot of what the inventory Excel spreadsheet would look like:

image

Here is the link to Python script at my GitHub repo: https://github.com/terenceluk/Azure/blob/main/Azure%20Calculator/Azure-Calculator-Product-Only.py

For more information on how to setup Python and Selenium, please refer to my earlier post provided at the beginning of this write up.

No comments: