Hey all,
i can pull information I'm interested in using the interactive cloud client. Example: I want a custom property of a machine I deployed. Log in and manually type one command after another. But how can I use this in a script?
manual procedure as example
Find deployment: vra deployment list
+--------------------------------------+-----------------------+--------+--------------------------------------+-----------------------------------+
| name | resourceTypeRef.label | status | id | owners[*].ref |
+--------------------------------------+-----------------------+--------+--------------------------------------+-----------------------------------+
| DEMO-L4-2Nodes-79867318 | Deployment | ACTIVE | 08480bcb-e3ee-4a63-98b4-3668ed623caf | "myemail@address " |
Find the component machines: vra deployment component list --id DEMO-L4-2Nodes-79867318
CloudClient>vra deployment component list --id DEMO-L4-2Nodes-79867318
+----------------+---------------------------------------+--------+--------------------------------------+---------------------------------+
| name | catalogResource.resourceTypeRef.label | status | catalogResource.id | owner |
+----------------+---------------------------------------+--------+--------------------------------------+---------------------------------+
| AAAA-RDSHWB463 | Virtual Machine | On | 019625c4-bdca-4ca8-88bc-4c74ed4c6438 | myemail@address |
| AAAA-RDSHWB464 | Virtual Machine | On | f9374c50-8cde-474b-8f3f-850afae10361 | myemail@address |
+----------------+---------------------------------------+--------+--------------------------------------+---------------------------------+
Then query the component machine: vra machines detail --id SXRSHWB464to find custom properties.
I can find ALL info using cloud client, but how can I do this in a single script?
if I run it in commandshell as such:
cloudclient.bat vra deployment list
cloudclient.bat vra deployment component list --id xxx
then
a) every single time I invoke it the command logs in to vra, iaas and vco ?! so thats 5 times in a short script. not only bad but causes huge delays
b) how do you parse the output? its a really nice table view, but how do i reasonably easy get the data from "vra deployment list", find my item and shove it into the next command?
cloud client not the right tool for it, stick to (direct) Rest API?
Thanks for any help
Kalli