psyinfra / onyo

text-based inventory system on top of git
ISC License
3 stars 5 forks source link

design template matching system #22

Closed aqw closed 8 months ago

aqw commented 2 years ago
aqw commented 2 years ago

Perhaps of use: https://docs.python-cerberus.org/en/stable/usage.html

YAML and JSON are close enough that we can piggy-back on the (much larger) JSON ecosystem. https://docs.python-cerberus.org/en/stable/schemas.html#serialization

TobiasKadelka commented 2 years ago

From the #7 about designing onyo fsck:

As soon as the template system is designed/implemented, onyo fsck needs a functionality to verify the correctness of templates, when:

TobiasKadelka commented 2 years ago

To keep this issue up to date: In #92 I ignored all the things above!

The current behaviour is this: onyo new --template laptop shelf creates a new asset in the folder "shelf", it opens the current dialog from onyo new and asks for fields (including reserved characters), which are specified in the template file .onyo/templates/laptop (which is YAML). The flag expects the name of a file in that folder.

aqw commented 8 months ago

I think this can be closed now. Templates are specified by the user explicitly for a long time now, and I see no compelling reason to change that.