VMware Cloud Community
Harj1234
Contributor
Contributor

vra8.2 onboarding resources via api

I have a requirement to onboard vms using the api. I have created the onboarding plan successfully and I can also create a deployment but when I add a resource to the plan or the deployment, I see a error "Cannot read property 'id' of undefined" in the Machines tab. 

To onboard a resource, I am using the POST call to "/relocation/onboarding/resource".  The call runs successfully. in the "resourceLink" parameter, I am putting the link that I get via the iaas api eg "iaas/api/machines/3c4f2770-b794-3392-9d94-31b66e6e1604". I can not figure out what I am missing. any pointers are appreciated

0 Kudos
1 Reply
emacintosh
Hot Shot
Hot Shot

We have a need to onboard one-off VMs during certain XaaS items, so just one at a time.  I think the Onboarding functionality has changed since we implemented this, so I don't want to lead you down the wrong path.  Or in general, there may be a better way to handle.  

But this is what our approach looks like, which is still working 8.4 even though I think the concept of a Rule is deprecated?

  1. Create the Plan (/relocation/onboarding/plan)
  2. Create the Rule - need the plan link (/relocation/onboarding/task/create-rule)
  3. Run the Plan - need the plan link (/relocation/api/wo/execute-plan)
  4. Delete the Rule - need the rule link (/relocation/onboarding/task/delete-rule)
  5. Delete the Plan - need the plan id (/relocation/onboarding/plan/<planId>)

 

0 Kudos