Can we create an option list for Azure Subnets, I created an option list for Networks using Morpheus API but it fetches only the VNET not all the subnets residing into it.
The following translation script and request script can be used to fetch the subnets. To fetch only azure subnets you will need to specify the ‘ProvionTypeId’ which in my case was 2 for Azure.
//Transalation Script
for(var x=0;x < data.length; x++) {
var isSubnet = data[x].value.includes("subnet");
if (isSubnet){//Only show subnets
results.push({name: data[x].name,value:data[x].id});
}
}
//Request Script
results.siteId = 1; //Group ID
results.zoneId = 3; // Cloud ID
provisionTypeId=2; //ProvionTypeId 2 = Azure