Skip to content

introduce user.* namespace for custom jail config properties #524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion iocage/Config/Jail/JailConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ def _key_is_mac_config(self, key: str, explicit: bool=False) -> bool:
return True
return (fragments[0] in self["interfaces"].keys()) is True

def _is_user_property(self, key: str) -> bool:
return key.startswith("user.") is True

def _is_known_property(self, key: str) -> bool:
key_is_default = key in self.host.defaults.config.keys()
key_is_setter = f"_set_{key}" in dict.__dir__(self)
Expand All @@ -93,7 +96,8 @@ def _is_known_property(self, key: str) -> bool:
key_is_default,
key_is_setter,
key_is_special,
self._key_is_mac_config(key)
self._key_is_mac_config(key),
self._is_user_property(key)
]) is True

def __setitem__(
Expand Down