I need to automate onboarding. However, the existing APIs for this looks geared towards pre 8.4 (where there were rules) and I tested the call, but Im not getting anything done.
I need to add an item to the onboarding List and execute the plan.
Any ideas?
OK. after long and hard tries ...here is how this works:
1) Get the plan link...thats the onboarding plan you allready have.
GET /relocation/onboarding/plan
-> planLink
2) get VM details
GET /iaas/api/machines
-> find VM, get name and id (needs to be reconstructed to "/resources/compute/[ID]"
3) create an onboarding deployment. Thats the ones you have in the deployment plan where VMs are assosiated to. Two options there. Eitehr use an existing Deployment or a new one.
NEW DEPLOYMENT
POST /relocation/onboarding/deployment
{planLink,[name optional]} -> take the selflink that comes back.
USE EXISTING
GET /relocation/onboarding/deployment
-> selfLink
4) add VM to Onboarding plan
POST /relocation/onboarding/resource
{planLink,deploymentLink,resourceLink,resourceName}
5) Execute onboarding plan
execute Plan
POST /relocation/api/wo/execute-plan
{planlink}
OK. after long and hard tries ...here is how this works:
1) Get the plan link...thats the onboarding plan you allready have.
GET /relocation/onboarding/plan
-> planLink
2) get VM details
GET /iaas/api/machines
-> find VM, get name and id (needs to be reconstructed to "/resources/compute/[ID]"
3) create an onboarding deployment. Thats the ones you have in the deployment plan where VMs are assosiated to. Two options there. Eitehr use an existing Deployment or a new one.
NEW DEPLOYMENT
POST /relocation/onboarding/deployment
{planLink,[name optional]} -> take the selflink that comes back.
USE EXISTING
GET /relocation/onboarding/deployment
-> selfLink
4) add VM to Onboarding plan
POST /relocation/onboarding/resource
{planLink,deploymentLink,resourceLink,resourceName}
5) Execute onboarding plan
execute Plan
POST /relocation/api/wo/execute-plan
{planlink}
Excellent description @Windspirit , thank you very much, it helped me a lot. 👍