-
1. Re: Determining vCloud Director initiating organisation at Presentation level (Started from vCD - Service Library)
iiliev Feb 27, 2019 8:28 AM (in response to JitseH)Hi,
As far as I know, context is available only during workflow execution, not during presentation execution (which happens before the workflow execution).
What API is 'Service Library' using to launch a workflow?
-
2. Re: Determining vCloud Director initiating organisation at Presentation level (Started from vCD - Service Library)
tschoergez Feb 27, 2019 8:32 AM (in response to iiliev)Yes, in 9.5 the context that contains all the tenant information is only available once the workflow has been triggered, but not yet in the presentation phase.
What exactly do you want to achieve? I guess filtering input parameters for objects that "belong" to the tenant?
Joerg
-
3. Re: Determining vCloud Director initiating organisation at Presentation level (Started from vCD - Service Library)
JitseH Feb 27, 2019 10:22 PM (in response to tschoergez)Yes, I want to filter input based on the tenant who's starting the workflow.
We now ask at the presentation layer the tenant who he is and check that later in the (executing) workflow, that's not very userfriendly and secure.
Is there another way to accomplish this goal?
Thanks in advance for your replies.
Jitse
-
4. Re: Determining vCloud Director initiating organisation at Presentation level (Started from vCD - Service Library)
JitseH Feb 28, 2019 4:49 AM (in response to iiliev)When I execute a Workflow from the Service Library I see the following requests:
Request URL: https://[VCLOUD-URL]/cloudapi/workflows/urn%3Avcloud%3AserviceItem%3A[WORKFLOW-ID]/presentation
Request Method: GET
Status Code: 200 OK
Request URL: https://[VCLOUD-URL]/cloudapi/workflows/urn%3Avcloud%3AserviceItem%3A[WORKFLOW-ID]/presentation/instances
Request Method: POST
Status Code: 200 OK
Request URL: https://[VCLOUD-URL]/cloudapi/workflows/urn:vcloud:serviceItem:[WORKFLOW-ID]/presentation/instances/[ID]
Request Method: PUT
Status Code: 200 OK
Request Method: GET
Status Code: 200 OK
In all requests I can see the Referer which is containing the tenant name:
Referer: https://[VCLOUD-URL]/tenant/[TENANT-ORGNAME]/libraries/service-items
Is it possible to collect this referer field somehow? Of some other way to collect the tenant name?
-
5. Re: Determining vCloud Director initiating organisation at Presentation level (Started from vCD - Service Library)
tschoergez Feb 28, 2019 11:23 AM (in response to JitseH)Unfortunately not in the current (9.5) version of vCD.
But we plan to add this (very important) functionality in future.
Joerg
-
6. Re: Determining vCloud Director initiating organisation at Presentation level (Started from vCD - Service Library)
JitseH Mar 6, 2019 11:50 AM (in response to tschoergez)Hi Joerg,
Thanks for your reaction.
Your reaction looks like you're close to the development team of VMware vCD.
Do you know when this feature will be introduced (date or version?)
Thanks in advance.
Kind Regards,
Jitse
-
8. Re: Determining vCloud Director initiating organisation at Presentation level (Started from vCD - Service Library)
eoinbyrne May 29, 2019 8:26 AM (in response to Sui)When the action runs it should have *some* sort of execution context.
What do you get if you do this in the body of the relevant action?
System.log("Action runs as " + Server.getRunningUser());
It would be an extremely DIRTY HACK but it might give you something useful to tie back to a tenant ID/name?
-
9. Re: Determining vCloud Director initiating organisation at Presentation level (Started from vCD - Service Library)
ukcsr Sep 9, 2019 3:59 AM (in response to eoinbyrne)It seems this challenge is still present in VCD 9.7.
I tried the System.log("Action runs as " + Server.getRunningUser()); call but this behaviour is strange. It is returning another user, I think probably the user who created the org, so cant use this to work back to get the org name (in my case)
Has anyone else worked around this yet?
-
10. Re: Determining vCloud Director initiating organisation at Presentation level (Started from vCD - Service Library)
ukcsr Sep 9, 2019 8:46 AM (in response to ukcsr)WIth the help of Joerg from VMware I have found a solution to this. You need to specify input parameters on the workflow with specific names to get this info from VCD. You can hide these fields to keep your presentation neat. The inputs are simple strings with the specific names as below:
_vcd_orgName
_vcd_userName
_vcd_orgId
_vcd_sessionToken
_vcd_isAdmin
_vcd_apiEndpoint
-
11. Re: Determining vCloud Director initiating organisation at Presentation level (Started from vCD - Service Library)
Raducanu Sep 26, 2019 1:53 AM (in response to ukcsr)See also Manage Independent Disks | vCloud Director Extensibility | Partner Experience Days
Additional to written above you also have to create a data binding to "#_vcd_orgID" (example). You can hide this fields and use them in dropdown list actions
-
12. Re: Determining vCloud Director initiating organisation at Presentation level (Started from vCD - Service Library)
avelar Oct 5, 2019 10:29 AM (in response to JitseH)I need to do something almost equal.
Could you share your workflow? May be is not exactly the same but I could start with something. I hope you could share only this workflow with the dropdown box.
I need the user (provider admin only) could select some Orgs from a Dropdown (even a multiple list).
Thank you.