VMware Cloud Community
Goran75
Contributor
Contributor
Jump to solution

Server.findForType() doesnt work as expected

Hi to all,

I have problem with finding vApps using Server.findForType() method.

Lets start from the beginning...

Goal is to produce some workflows which would be called from outside using SOAP (SOAP is unfortunately mandatory). Portal which will call worlflows is under development of another people.

They have specified some number of input and output parameters which workflows should accept and provide.

I have testing environment with vCenter, Orchestrator and Director and everything works fine.

SOAP host is created in Orchestrator using build it workflow (configuration attached - SOAP_Host_Configuration.rtf).

I am using SOAP UI to test portal > Orchestrator communication.

I am able to call workflows using SOAP UI.

I am trying to produce simple workflow which powers on vApp using string as input parameter and which would return same data as output parameter - vApp UUID, ID, href or anything which be considered as vApp unique mark.

Output of SOAP UI of my vApp is attached (SOAP_UI_vApp_Info.txt).

If I try to use Server.findForType() it works only if I specify like this:

Server.findForType("vCloud:VApp" ,"8265a03471add63d97f36c52e86fba8cebade2a3ca7bfcb4cb58cdff9ae9f8c////https://172.16.140.215/api/vApp/vapp-c7b33a3e-2174-465d-a4f2-0fa9663dc75d");

and it is not working if if specify like this

Server.findForType("vCloud:VApp" ,"urn:vcloud:vapp:c7b33a3e-2174-465d-a4f2-0fa9663dc75d");

In that case I get error:

[2014-08-10 21:49:35.911] [I] Server error : ch.dunes.model.sdk.SDKFinderException: Unable to perform operation 'find('VApp', 'urn:vcloud:vapp:c7b33a3e-2174-465d-a4f2-0fa9663dc75d')' on plugin 'vCloud'

  

Problem is that data "8265a03471add63d97f36c52e86fba8cebade2a3ca7bfcb4cb58cdff9ae9f8c////https://172.16.140.215/api/vApp/vapp-c7b33a3e-2174-465d-a4f2-0fa9663dc75d" cannot be retrieved afterwords and be used as a vApp unique identifier - vapp.dunesId doesnt return anything.

I am using:

vCenter 5.5.0 1623101

vCO 5.5.1. 1617127

vCloud Director 5.5.1 1753992

vCloud Director Plugin 5.5.0.1894135

vCenter Plugin 5.5.2.1869849

Thank you for help.

Goran

0 Kudos
1 Solution

Accepted Solutions
alazarov
Contributor
Contributor
Jump to solution

Sure, no problem. I've found even a better way to retrieve it by ID directly.

Ex:

vapp = host.getEntityById("VApp", "urn:vcloud:vapp:65a4db36-8efa-4512-afb5-7d663c13e2be");

Regards,

Aleks

View solution in original post

0 Kudos
4 Replies
alazarov
Contributor
Contributor
Jump to solution

Hi Goran,

Try with instance of VclHost and use the getEntityByReference(finderType, VclReference) method.

Regards,

Aleks

0 Kudos
Goran75
Contributor
Contributor
Jump to solution

Hi Aleks,

than you very much for answer.

Can you, please, push me a little more? I dont know to write this script..

Can you give me example according my data?

Thank you

Goran

0 Kudos
alazarov
Contributor
Contributor
Jump to solution

Sure, no problem. I've found even a better way to retrieve it by ID directly.

Ex:

vapp = host.getEntityById("VApp", "urn:vcloud:vapp:65a4db36-8efa-4512-afb5-7d663c13e2be");

Regards,

Aleks

0 Kudos
Goran75
Contributor
Contributor
Jump to solution

O , Yes, this works.

Thank you Aleks very much

0 Kudos