diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-06-27 10:39:16 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-06-27 10:39:16 -0400 |
commit | 94d90ae60a82bc3ec104ed558627f896a1082e33 (patch) | |
tree | 4e00e7febf7c41b1a48abca18eb8a185dca75eb9 /src/lib/Bcfg2/Server/Plugin/__init__.py | |
parent | bd8e639ad56422893e67c74a3b8dae3f27f92276 (diff) | |
download | bcfg2-94d90ae60a82bc3ec104ed558627f896a1082e33.tar.gz bcfg2-94d90ae60a82bc3ec104ed558627f896a1082e33.tar.bz2 bcfg2-94d90ae60a82bc3ec104ed558627f896a1082e33.zip |
Options: migrated plugins to new options parser
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugin/__init__.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugin/__init__.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin/__init__.py b/src/lib/Bcfg2/Server/Plugin/__init__.py index ed1282ba0..0c7d111f3 100644 --- a/src/lib/Bcfg2/Server/Plugin/__init__.py +++ b/src/lib/Bcfg2/Server/Plugin/__init__.py @@ -14,6 +14,7 @@ documentation it's not necessary to use the submodules. E.g., you can import os import sys +import Bcfg2.Options sys.path.append(os.path.dirname(__file__)) # pylint: disable=W0401 @@ -21,3 +22,31 @@ from Bcfg2.Server.Plugin.base import * from Bcfg2.Server.Plugin.interfaces import * from Bcfg2.Server.Plugin.helpers import * from Bcfg2.Server.Plugin.exceptions import * + + +class _OptionContainer(object): + options = [ + Bcfg2.Options.Common.default_paranoid, + Bcfg2.Options.Option( + cf=('mdata', 'owner'), dest="default_owner", default='root', + help='Default Path owner'), + Bcfg2.Options.Option( + cf=('mdata', 'group'), dest="default_group", default='root', + help='Default Path group'), + Bcfg2.Options.Option( + cf=('mdata', 'important'), dest="default_important", + default='false', choices=['true', 'false'], + help='Default Path priority (importance)'), + Bcfg2.Options.Option( + cf=('mdata', 'mode'), dest="default_mode", default='644', + help='Default mode for Path'), + Bcfg2.Options.Option( + cf=('mdata', 'secontext'), dest="default_secontext", + default='__default__', help='Default SELinux context'), + Bcfg2.Options.Option( + cf=('mdata', 'sensitive'), dest="default_sensitive", + default='false', + help='Default Path sensitivity setting')] + + +Bcfg2.Options.get_parser().add_component(_OptionContainer) |