Hey all,
I posted a discussion yesterday that included this question as well. But as i was able to figure out all other parts and this is the one that I can't figure out I posted a new discussion.
Hope thats ok
every single time I call cloud client with parameters from UI (even in same session) it keeps logging in (even though it says persistent). example:
(the parts in RED are messing up my output (can't parse the result after it) and it's unnecessary. are there any switches or any ways I get the results without cloudclient loggin in every time and desplaying java.version?
cloudclient.bat vra catalog list --format JSON
java.version
CloudClient is logging in vRealize Automation with persisted session
vRA 7.0 login: [ACTIVE], session: [ACTIVE], sessionKey=[default], user=[me], server=[https://myserver], tenant=[vsphere.local]
CloudClient is logging in IaaS with persisted session
IaaS Model Manager login: [ACTIVE], session: [ACTIVE], sessionKey=[default], user=[me], server=[myserver]
CloudClient is logging in vRealize Orchestrator with persisted session
VCO login: [ACTIVE], session: [ACTIVE], sessionKey=[default], user=[administrator@vsphere.local], server=[myserver]
[ {
"callbacks" : null,
invoke the same command again: Any way to skip the whole red output???
cloudclient.bat vra catalog list --format JSON
java.version
CloudClient is logging in vRealize Automation with persisted session
vRA 7.0 login: [ACTIVE], session: [ACTIVE], sessionKey=[default], user=[me], server=[https://myserver], tenant=[vsphere.local]
CloudClient is logging in IaaS with persisted session
IaaS Model Manager login: [ACTIVE], session: [ACTIVE], sessionKey=[default], user=[me], server=[myserver]
CloudClient is logging in vRealize Orchestrator with persisted session
VCO login: [ACTIVE], session: [ACTIVE], sessionKey=[default], user=[administrator@vsphere.local], server=[myserver]
[ {
"callbacks" : null,
Thanks for any help!
kalli
update: opened a case with VMware and in CloudClient 4.2 there's now a change (not documented in release-ntoes).
If you enable suppress.status.messages (set it to true) in cloudclient.config file is %UserPATH%\.cloudclient folder it now works as well for those nasty log in messages.
So for example if I do now:
"cloudclient vra content list --format JSON" in commandhsell I only get the output I want 😄
it still logs in every time delaying the command by 20 seconds, but hey. at least I can now use it in scripting
old (4.1 and earlier)
cloudclient.bat vra machines detail --id $machineName --format JSON --export $exportPath
#output result to file (like I said ... awkward)
$machineDetail=(Get-Content -path $exportPath) | convertfrom-json
#check for a specific property
$PropertyValue=$machineDetail.properties | ?{$_.name -eq $propertyName} | Select-Object -expandProperty value
in 4.2 possible (because it only outputs JSON no other logging!)
$machineList = cloudclient.bat vra machines detail --id $machineName --format JSON
#YAY!!!!
$machineDetail=$machineList | convertfrom-json
#check for a specific property value
$PropertyValue=$machineDetail.properties | ?{$_.name -eq $propertyName} | Select-Object -expandProperty value
i found in the ChangeLog file that there was a parameter added in 3.3 Provide option "suppress.status.messages" in cloudclient.config to hide all status messages in auto-login mode.
checking the logfile I also found where this cloudclient.config file is %UserPATH%\.cloudclient folder
and yes, most logs are suppressed now. I deleted my cloudclient.properties and it is now going as such (a lot better!!!!!!! java version and server disappearde, but still it keeps logging in *sigh*)
it says persitent, but it's everything but?! what am I doing wrong?
cloudclient.bat vra catalog list
CloudClient is logging in vRealize Automation with persisted session
CloudClient is logging in IaaS with persisted session
CloudClient is logging in vRealize Orchestrator with persisted session
+--------------------------------------+-----------------------------+--------------------------------------+--------------------------------+--------------------------+-----------+
| id | organization.subtenantLabel | organization.subtenantRef | name | catalogItemTypeRef.label | status |
+--------------------------------------+-----------------------------+--------------------------------------+--------------------------------+--------------------------+-----------+
...
if I repeat that command in same shell: log in again ...
update: opened a case with VMware and in CloudClient 4.2 there's now a change (not documented in release-ntoes).
If you enable suppress.status.messages (set it to true) in cloudclient.config file is %UserPATH%\.cloudclient folder it now works as well for those nasty log in messages.
So for example if I do now:
"cloudclient vra content list --format JSON" in commandhsell I only get the output I want 😄
it still logs in every time delaying the command by 20 seconds, but hey. at least I can now use it in scripting
old (4.1 and earlier)
cloudclient.bat vra machines detail --id $machineName --format JSON --export $exportPath
#output result to file (like I said ... awkward)
$machineDetail=(Get-Content -path $exportPath) | convertfrom-json
#check for a specific property
$PropertyValue=$machineDetail.properties | ?{$_.name -eq $propertyName} | Select-Object -expandProperty value
in 4.2 possible (because it only outputs JSON no other logging!)
$machineList = cloudclient.bat vra machines detail --id $machineName --format JSON
#YAY!!!!
$machineDetail=$machineList | convertfrom-json
#check for a specific property value
$PropertyValue=$machineDetail.properties | ?{$_.name -eq $propertyName} | Select-Object -expandProperty value