VMware {code} Community
Charudath
Contributor
Contributor

creating an OrgVdcNetwork with orgAdmin role

Is the only way to create OrgVdcNetwork thorugh adminVdc?

     adminVdc.createOrgVdcNetwork(orgVdcNetworkParams);

my provider recently updgraded to vcloud 5.1 and i have Org Admin role, I can create org vdc network thorugh the GUI?

How do I do that programatically using java sdk?

I am not even able to get access nor list adminVdc ?

0 Kudos
5 Replies
rkamal
VMware Employee
VMware Employee

Hi,

I don't think an Org Admin has access ot the AdminVdc helper. Were you able to construct/instantiate the AdminVdc helper.

Since the Org Admin has access to only the Vdc helper class, I think the SDK should contain a createOrgVdcNetwork() method in the Vdc helper class.

Regards,

Rajesh Kamal.

0 Kudos
Charudath
Contributor
Contributor

Rajesh,

I too thought that the SDK should contain a createOrgVdcNetwork() method in the Vdc helper class.

but its not there , do you have any work arounds to create a "new organization VDC network" though the API while having just org admin roles?

if teh vcloud GUI allows it, I am hoping that the API is there somewhere.

0 Kudos
rkamal
VMware Employee
VMware Employee

Hi,

This seems to be a bug with the SDK.

Should be fixed in the next release of the SDK.

Regards,

Rajesh Kamal.

0 Kudos
rkamal
VMware Employee
VMware Employee

Hi,

Can you try this work around and see if it works?

      OrgVdcNetworkType orgVdcNetworkParams = new OrgVdcNetworkType();
      // populate the orgVdcNetworkParams object.....
      String requestXml = JAXBUtil.marshal(new ObjectFactory().createOrgVdcNetwork(orgVdcNetworkParams));
      OrgVdcNetworkType orgVdcNetwork = SdkUtil.post(client, "https://vcloud/api/admin/vdc/uuid/networks",
                    requestXml, "application/vnd.vmware.vcloud.orgVdcNetwork+xml", SdkStatusCode.SC_CREATED);

Regards,

Rajesh Kamal.

0 Kudos
mkhand02
Contributor
Contributor

I am using 5.1, and the issue persists; is the above the only workaround?  Is this still planned to be resolved?  I would also love to see this functionality in the Vdc helper.

Thanks!

P.S. Following the above, setting just the name of the network, being org admin, I get 'This operation is denied'.

0 Kudos