In my last post, I documented the HCX installation workflow for VCD based clouds. In this post, I am going to show how to do the same via API.
Once HCX Cloud Manager has been deployed and boots up, you can make use of the below API to integrate VCD into HCX.
1: Import VCD Certificate
1 2 3 4 5 6 7 |
Method: POST URL: https://<hcx-cloud-fqdn>:9443/api/admin/certificates Headers: Accept: application/json Request Payload: Body: form-data, Key:url, value: 'https://vcd01.vstellar.local' |
Response Output
2: Configure VCD
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
Method: POST URL: https://<hcx-cloud-fqdn>:9443/api/admin/global/config/vcd/ Headers: Accept: application/json, Content-Type: application/json Request Payload: { "data":{ "items":[ { "config":{ "url":"https://vcd01.vstellar.local", "userName":"admin@system", "password":"VMware1!", "systemPrefix":"vcd", "uiEndPoint":"https://vcd01.vstellar.local", "publicUrlBase":"https://vcd01.vstellar.local", "systemExchange":"systemExchange" } } ] } } |
3: Retrieve VCD Settings
1 2 3 4 5 |
Method: GET URL: https://<hcx-cloud-fqdn>:9443/api/admin/global/config/vcd Headers: Accept: application/json |
Response Output: Above API calls return VCD UUID in response
4: Verify VCD Inventory Sync Status
1 2 3 4 5 6 7 |
Method: GET URL: https://<hcx-cloud-fqdn>:9443/api/admin/global/config/vcd/<vcd-uuid>/status Auth: Basic Headers: Accept: application/json |
Response Output
1 2 3 4 |
{ "status": "OK", "lastInventorySyncTime": "1609568233000" } |
Note: If you need to modify VCD details post configuration, you can make use of the PUT API call for the same.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
Method: PUT URL: https://<hcx-cloud-fqdn>:9443/api/admin/global/config/vcd/bf0dd784-aea6-4fad-ba8e-363670c7c8ea Headers: Accept: application/json, Content-Type: application/json Request Payload: { "data":{ "items":[ { "config":{ "userName":"admin@system", "url":"https://vcd01.vstellar.local", "systemPrefix":"vcd", "uiEndPoint":"https://vcd01.vstellar.local", "publicUrlBase":"https://vcd01.vstellar.local", "systemExchange":"systemExchange", "password":"Vk13YXJlMSE=", "delegateAuthToVCD":false, "UUID":"bf0dd784-aea6-4fad-ba8e-363670c7c8ea" } } ] } } |
I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing 🙂