vault: figure out the story around instances
rohany opened this issue · 2 comments
Instances can be in two states:
- stored in Vault
- not (yet) stored in Vault
Currently, operations like add-meta
and list-meta
operate only on instances in state 2. However, it seems like we would want to allow for operations(#14, #12) on instances in state 1.
The first issue is the need to logically group commands that operate on instances in different states.
The second issue is about communication of ID's back to the end user. Current commands like get-latest
and query
currently return directories that contain instance data. This is useful when the user wants to then perform an operation on the data, like reading or writing from it via a script. However, we want to return just the instance ID in the case that the user wants to use another vault command to operate on the instance.
We want to reserve the right of constructing instance directories ourselves, as we don't want to have the user construct these. I'm hacking on having a flag to each of the commands that return directories to maybe return instances, but this doesn't seem right.
Since the commands that we're interested in (add-meta
, list-meta
) operate on either instances or directories, we could have those take in a flag of instance-id|directory
, and base our actions there.
An example of how to make such a kind
enum can be seen in the instances
branch.