VMware Cloud Community
bdamian
Expert
Expert

Cloud Account trigger Data Collection

Is there any way to trigger a Data Collection of a Cloud Account via API call? 

bdamian_0-1652883941541.png

I'm orchestrating the creation of projects with their own new NSX-T segments. I need the data collection in order to create the IPAM ranges in vRA.

Thanks!

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
Labels (2)
Reply
0 Kudos
6 Replies
DexG83
Enthusiast
Enthusiast

Hi,

I did that for a vRA 8.6.2 solution. I built a vRO Workflow as follows:

  1. Get Cloud Account IDs
    • run Get operation Workflow from /Library/vRealize Automation 8.x and Cloud Services/Sample Rest Operations
    • pathUri: /iaas/api/cloud-accounts-vsphere
  2. Extract the needed Cloud Account ID

  3. run Post operation Workflow from /Library/vRealize Automation 8.x and Cloud Services/Sample Rest Operations
    • pathUri: '/iaas/api/cloud-accounts/' + cloudAccountId + '/private-image-enumeration';

Regards,

Dex

Reply
0 Kudos
bdamian
Expert
Expert

This call only sync the VM templates in vCenter, not a Data Collection. 

bdamian_0-1652963633504.png

In fact, NSX-T endpoint doesn't have this option.

 

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
Reply
0 Kudos
Dan_Johnson
Enthusiast
Enthusiast

Did you manage to find a way of doing this? Looking to do the same and also unable to find a way

If you found this or any other answer useful please use of the Helpful or Correct buttons to award points ---------------------------------------------------------------------- VCP4/5/6-DCV, VCAP5.5-DCA, VCAP6-DCD, VCIX6-DCV, VCIX6-NV ---------------------------------------------------------------------- Follow me on Twitter @tattooedtechy
Reply
0 Kudos
Windspirit
Hot Shot
Hot Shot

The only way I found so far is a workaround.

 

I query the resource I want and wait till it's there.

run=true;
do {
  System.sleep(60000) //wait a minute
  jsonObj=vraOperation("GET","/iaas/api/fabric-computes/$filter=name%20eq%20'"+hostShort+"*'",null,false);
  if (jsonObj.content.length>0){
    if (jsonObj.content[0].type == "Host"){
       run=false;
    }
  }
} while (run);

 

Reply
0 Kudos
frippeisking
Contributor
Contributor

I have the same ask. Actually asked this via an VMware consultant on a project back in 2020 and I guess nothing really happened. He would send an internal informal request to look into this.

Actually the exact same usecase. Automating project creation and placing each project on a dedicated project network.
This should really be implemented in the API's.

Avoid a resource poll and potentially waiting for 10 minutes to get that new project. Not very 2023 🙂

 

 

Tags (1)
Reply
0 Kudos
bdamian
Expert
Expert

I've spoken with a VMware guy and he tells me that there was an API call to do this but now it doesn't work. So sad...

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
Reply
0 Kudos