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

feat: query all host inventories #873

Closed connorsmith256 closed 10 months ago

connorsmith256 commented 11 months ago

Feature or Problem

This converts the host inventory command to a host inventories (hosts inventory? 🧐 ) command, i.e.

wash get inventory

and

wash get inventories

will both return inventories for all hosts.

This preserves existing behavior where if a host ID is specified, the inventory for only that host is returned

Related Issues

Resolves https://github.com/wasmCloud/wash/issues/872

Release Information

Next

Consumer Impact

@jordan-rash is slightly happier

Testing

Built on platform(s)

Tested on platform(s)

Unit Test(s)

Acceptance or Integration

Manual Verification

Tested e2e:

wash get inventories

  Host Inventory (NACNKE4ZQNNUXR5DVMBNIOTF5LX7M632KMMIJ5A75TWQZFAHHUL6QUW4)

  hostcore.arch                         aarch64
  hostcore.os                           macos
  hostcore.osfamily                     unix

  No actors found

  No providers found

  Host Inventory (NAZ346FBNLT3J2JUR4C6FYVGBQKHVEU5RJ67HNHVXN4OFSQG37IESEPQ)

  hostcore.os                           macos
  hostcore.osfamily                     unix
  hostcore.arch                         aarch64

  No actors found

  No providers found
wash get inventory -o json

{
  "inventories": [
    {
      "actors": [],
      "host_id": "NACNKE4ZQNNUXR5DVMBNIOTF5LX7M632KMMIJ5A75TWQZFAHHUL6QUW4",
      "labels": {
        "hostcore.arch": "aarch64",
        "hostcore.os": "macos",
        "hostcore.osfamily": "unix"
      },
      "providers": []
    },
    {
      "actors": [],
      "host_id": "NAZ346FBNLT3J2JUR4C6FYVGBQKHVEU5RJ67HNHVXN4OFSQG37IESEPQ",
      "labels": {
        "hostcore.arch": "aarch64",
        "hostcore.os": "macos",
        "hostcore.osfamily": "unix"
      },
      "providers": []
    }
  ],
  "success": true
}