Hello,
Is it possible to create Network Profiles in vRA 7 using VRO Workflow?
If not, is there any other mechanism like REST API?
Thanks,
Pankaj
Hi Pankaj,
Yes it is possible - via the IaaS plugin. I have a package that implements network profile import from resource elements(json content).
If you give me an email I can send you the package - it contains import and export logic.
You can use the export to create the json files and see the expected format.
Regards,
Petya
Hello Petya,
Great. Appreciate a lot.
Please send the files to chhabra.pankaj@gmail.com.
Thanks,
Regards,
Pankaj
i'm trying to accomplish this in a educational environment for my last year internship,
would i be possible to share this great piece of worklfow with me?
regards Thomas
Can i have the the package too? Thanks. hojohn269@msn.com.
Hey Pankaj,
If you decide to go the REST API trek (which I've done in the past and is straightforward), this may be useful to you:
Working with Network Profile API Use Cases
Credit goes to VMware on the documentation. Just need to create the bearer token up front with the necessary creds and hopefully you'll be good to go.
Hello All,
Is it possible to get Workflow code or package ?
I see that Petya shared package with all of you.
So if you can please send the package to daniel.krawiec@indevops.com
Thank You in advance.
Kind Regards
Daniel
In vRA 7.x you can easily do that using the REST plugin of the CAFE endpoint)
Here is the code I created.
var restClient = vcacCafeTenantAdmin.createRestClient("com.vmware.csp.core.cafe.catalog.api");
var restContent = {"@type":"ExternalNetworkProfile","name":"" + profileName + "","description":"Imported from Infoblox by vRO","isHidden":false,"definedRanges":[{"name":"" + profileName + "-Range01","description":"","beginIPv4Address":"" + beginIPv4Address + "","endIPv4Address":endIPv4Address,"state":"UNALLOCATED"}],"profileType":"EXTERNAL","IPAMEndpointId":null,"subnetMask":netmask,"gatewayAddress":gateway,"primaryDnsAddress":primaryDnsAddress,"secondaryDnsAddress":secondaryDnsAddress,"dnsSuffix":dnsSuffix,"dnsSearchSuffix":dnsSuffix,"primaryWinsAddress":null,"secondaryWinsAddress":null};
var requestResult = restClient.post("../../iaas-proxy-provider/api/network/profiles/", restContent);
var requestStatus = requestResult.getStatus();if (requestStatus == "201") {
System.log(" - vRA Network Profile created successfully");
}
else {
System.error(" - Current status is : " + requestStatus );
throw " - An error occured during network profile creation";
}
Inputs details :
- vcacCafeTenantAdmin (vCACCAFE:VCACHost)
- profileName (string)
- beginIPv4Address (string)
- endIPv4Address (string)
- netmask (string)
- gateway (string)
- primaryDnsAddress (string)
- secondaryDnsAddress (string)
- dnsSuffix (string)