Update: July 2020 – unfortunately COVID-19 halted my VeloCloud roll out just as it was starting. It’s difficult being a retailer when you can’t have your 650 stores open for business.
In my previous post I detailed how I was setting out to programatically create 650 VeloCloud Edge profiles using VMware VeloCloud’s Orchestrator API.
I had a few hours to dedicate to the quest last weekend and I was able to complete a working Python script. It turns out I was missing an additional parameter in one of my calls that took a few hours to track down. The modulesId needs to be determined from getEdgeConfigurationStack, this appears to be a set of device specific configurations that will override the default “Profile” settings.
I now I have a working script that will build an edge configuration using a set “Profile” within the Orchestrator and then passing it a template using Jinja2 with the device name, VLANs, IPv4 addressing, etc.
Here are the updates steps I’m taking in my script;
- Step 1. Login via rest/login/enterpriseLogin (store authentication cookie)
- Step 2. Call rest/enterprise/getEnterpriseConfigurationsPolicies to get the profileId that we’ll be using for all the devices (this is the equivalent of the Profiles in the web UI)
- Step 3. Call rest/edge/edgeProvision with template passing device name along with profileId (again this is the Profiles in the web UI), result will be edgeId and activation key
- Step 4. Call rest/enterprise/getEnterpriseEdges passing edgeId to confirm
- Step 5. Call rest/edge/getEdgeConfigurationStack to get modulesId of new edge profile (this is the device specific profile for anything that is overridden from the “Profile” set in the device configuration)
- Step 6. Call rest/configuration/updateConfigurationModule with template replacing edgeId, profileId and modulesId along with IPv4 addresses, etc parse result to confirm – THE MAJORITY OF WORK IS ACCOMPLISHED IN THIS STEP
- Step 7. Logout via /rest/logout
Those are the major steps… now I need to write some accompanying code to parse a list of stores and ultimately dump all of this into a database or CSV so we can store and track the activation code for each physical device.
I will also work on publishing the code I’m using so others can follow in my footsteps… it really wasn’t that hard, it took a few days to figure out the REST API calls and then the relationships between the different ‘modules’ and then track down the missing pieces to get everything working properly.
If there’s interest in me releasing the code, drop a note below… depending on the interest, I’ll see if I can make time to clean up the code and publish it to Github.