I'm trying to automate the provisioning of a network for a new Org VDC.
In the VCD UI, I would go into a Tenant Org VDC, then open that in the tenant portal. From there, click on Networks, then New. The dialog box opens, I select 'Current Organizaton Virtual Data Center', then Network Type 'Imported' and 'NSX-T logical Switch'. I select the logical switch I created for my customer, ie. MikesWidget-LAN, give it a name and description and a gateway CIDR, then a static IP pool, and that's it.
Using Postman, I know that I have to use the /api/admin/vdc/{orgVdcID}/networks call.
Documentation here: https://developer.vmware.com/apis/1703/doc/operations/POST-CreateOrgVdcNetwork.html
and input parameters here: https://developer.vmware.com/apis/1703/doc//types/OrgVdcNetworkType.html
According to the documentation, only the ProviderInfo and the VimPortGroupRef are mandatory, but I just can't make this call work. The documenation in this case is just too vague. When it's looking for the VimPortGroupRef, VimServerRef, I assume it's looking for the Virtual Center we have connected? I have the MoRef for the network segment from vCenter, but it's giving me an error 403.
Anyway, short version, does anybody have this particular call working and would be willing to share their parameters for the body and header with me?
Thanks!
Mike
Okay, so for reference in case anybody else is stuck with this, I was able to accomplish the task with the 'new' API:
POST /cloudapi/1.0.0/orgVdcNetworks
Normal Headers, ie. accept, x-cloud-authorization and Content-Type
Body: