We have onyo get for querying the inventory for assets. We don't technically have something to query for directories.
To some extend it could be done via get since - in principle - we have the directory key for assets. So, while it's conceptually a bit awkward most directory look ups could probably be done (like, say: onyo get --keys directory --match type=laptop make=apple to get all directories containing an apple laptop).
One type of query comes to mind, that can't be done: listing directories that are empty from onyo's POV (meaning: contain no assets).
This is probably an argument for an onyo list command, but we may want to think a bit about what kind of queries may be interesting and awkward or impossible to address by get.
Note on "in principle we have the directory key":
I don't think, we've properly ensured that's actually consistently the case, since initially it was meant for onyo new only. If we want that to be queryable (and I think we do), we need to make sure it's actually always filled in.
We have
onyo get
for querying the inventory for assets. We don't technically have something to query for directories. To some extend it could be done viaget
since - in principle - we have thedirectory
key for assets. So, while it's conceptually a bit awkward most directory look ups could probably be done (like, say:onyo get --keys directory --match type=laptop make=apple
to get all directories containing an apple laptop).One type of query comes to mind, that can't be done: listing directories that are empty from onyo's POV (meaning: contain no assets).
This is probably an argument for an
onyo list
command, but we may want to think a bit about what kind of queries may be interesting and awkward or impossible to address byget
.Note on "in principle we have the
directory
key":I don't think, we've properly ensured that's actually consistently the case, since initially it was meant for
onyo new
only. If we want that to be queryable (and I think we do), we need to make sure it's actually always filled in.