wasmCloud / wash

WAsmcloud SHell - the comprehensive command-line tool for wasmCloud development
https://wasmcloud.com
Apache License 2.0
148 stars 58 forks source link

[FEATURE] `wash get inventory` defaults to all host #872

Closed jordan-rash closed 10 months ago

jordan-rash commented 11 months ago

Im my dreams last night, I envisioned a world where I could see all my deployments in a single simple command

Current behavior

└─❯ wash get hosts

  Host ID                                                    Uptime (seconds)  
  NAA2BG6AEPYOL4DNB2W5MVSWTXHAA7PTG6WWL6EWDCXXTIDDGRZD36Y6   845972            
  NAMSIYRPJBE2PRPUOX4GDDFMUZD5Q2MNLN2AVNFR4U7KM3RFFK5AEYOK   845838            
  NCDIZNH7I4U5XNDNGCY53ONU735XSZC7244WULOWRYKOX2LNOOSXCA2E   845681            

└─❯ wash get inventory

No host id provided and more than one host is available. Please specify a host id.

Desired behavior

IF no host id is provided [wash get inventory vs wash get inventory <host-id>], it would be dope if all the inventories were shown (within some TTL)

└─❯ wash get hosts

  Host ID                                                    Uptime (seconds)  
  NAA2BG6AEPYOL4DNB2W5MVSWTXHAA7PTG6WWL6EWDCXXTIDDGRZD36Y6   845972            
  NAMSIYRPJBE2PRPUOX4GDDFMUZD5Q2MNLN2AVNFR4U7KM3RFFK5AEYOK   845838            
  NCDIZNH7I4U5XNDNGCY53ONU735XSZC7244WULOWRYKOX2LNOOSXCA2E   845681            

└─❯ wash get inventory

<ALL THE INVENTORYS GO HERE>

Gifts

Since I am in a giving mood, you can just paste this into the code base and 💥 , all done

wash get hosts -o json | jq -r '.hosts[] | .id' | while read line; do wash get inventory $line; done

jordan-rash commented 11 months ago

Also, shameless plug for whoever picks this up.... #613 would be super trill dope too!