bsdci / libioc

A Python library to manage jails with ioc{age,ell}
https://bsd.ci/libioc
Other
38 stars 11 forks source link

Unable to list with custom properties #707

Closed urosgruber closed 5 years ago

urosgruber commented 5 years ago

ioc list -o id,user.account have trouble with user defined properties, might be that . is an issue

root # ioc list -o id,user.account
The config property 'user.account' is unknown
igalic commented 5 years ago

nah, this looks like a regression

gronke commented 5 years ago

Before libioc became strict about properties, all unknown properties were returned as None. The problem of being strict here is that user.account is only known to Jails that have it set.

For commands such as set an create the strictness could be overridden (to be able to set in first place). The best option here seems to extend this behavior to the list command, but returning None (printed as -) instead. The cleaner solution, to introduce an undefined state, is some future goal (because there is more use for that), but as a first step I suggest to just return None to the list command.

igalic commented 5 years ago

The cleaner solution, to introduce an undefined state,

finally, someone who appreciates the finge design of the JavaScript programming language.

gronke commented 5 years ago

711 has resolved this issue.