I've been having good luck with the API so far but ran into an issue trying to instantiate a vApp from a template, using version 1.5.1. InstantiatevAppTemplate() throws a VCloudException with the message - No access to entity \"com.vmware.vcloud.entity.vapptemplate:blahblahblah" I'm logged in as an OrganizationAdmin. So I don't believe permissions is an issue. The same user can create vApps through the Web interface with no issues.
I'm using NewvAppFromTemplate() method from teh HellovCloud example. Any help is greatly appreciated.
Anybody have any idea? I'm completely blocked by this.
Is the vApp template added to a Catalog as a Catalog Item? In order to instantiate a vApp template, it has to be added to a Catalog.
Regards,
Todor Todorov
Yes. This template is in a catalog.
Hello,
I have the same issue. Just started with VCloud. I'm using console and the Java sdk and can not fugure out what's wrong.
Through the console I can instantiate vApp from template.
Using the SDK with the same user the error is:
The code does this:
login,
find vdc,
find catalog,
find catalog by reference,
catalog.getCatalogItemReferences(),
and for paticular reference - instantiate (instantiation is from SDK examples HelloVCloud newvAppFromTemplate)
Regards,
Nikolai
Hi Nikolai_,
The problem is in the way you're obtaining the href of the vApp template from the catalog item.
Regards,
Todor Todorov
Yes, the problem was that the href was taken directly from the item.
Solution is instead of instVappTemplParams.setSource(catalogItem.getHref());
use:
ref = catalogItem.getResource().getEntity();
instVappTemplParams.setSource(ref);
Thanks,
Nikolai