bsdci / libioc

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

allow to get only user set jail configuration #145

Open gronke opened 7 years ago

gronke commented 7 years ago

ioc get or ioc list print a mix of user provided defaults. It's important to differentiate between:

Suggestion

Print all user defined properties

ioc get all --user <JAIL_GLOB>

Print all user defined defaults

ioc get all --user default
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/49759092-allow-to-get-only-user-set-jail-configuration?utm_campaign=plugin&utm_content=tracker%2F70027116&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F70027116&utm_medium=issues&utm_source=github).
igalic commented 7 years ago

this has always been the case

in puppet-jail, i used Set subtraction to figure out what's actually been changed. providing a way to out of ioc would be very convenient

gronke commented 7 years ago

@igalic we do even better than diffing: we know which settings are coming from the user and which are not.

Otherwise if the default is False and our user setting is False we would not recognize this to be explicitly set by the user.