diff options
author | Andrew Shadura <andrewsh@debian.org> | 2018-04-25 14:33:27 +0200 |
---|---|---|
committer | Andrew Shadura <andrewsh@debian.org> | 2018-04-25 14:33:27 +0200 |
commit | b50a7a9f6a102709eacd1335c00a1e0d0b259b8e (patch) | |
tree | 481b20200ab0c34e1f0d829d8b4b8d17dceaadcd /reconfigure/items | |
parent | 2989b4c027b3230b1778e3777d2cce53c89808d9 (diff) |
New upstream version 0.1.81+git20171214.2b8729a8
Diffstat (limited to 'reconfigure/items')
-rw-r--r-- | reconfigure/items/bound.py | 3 | ||||
-rw-r--r-- | reconfigure/items/netatalk.py | 4 | ||||
-rw-r--r-- | reconfigure/items/samba.py | 7 |
3 files changed, 10 insertions, 4 deletions
diff --git a/reconfigure/items/bound.py b/reconfigure/items/bound.py index fed73f4..7570fe7 100644 --- a/reconfigure/items/bound.py +++ b/reconfigure/items/bound.py @@ -144,6 +144,7 @@ class BoundData (object): if node is None: node = self.template(**kwargs) self._node = node + self.bind_attribute('_extra_content', '_extra_content') def template(self, **kwargs): """ @@ -157,6 +158,8 @@ class BoundData (object): res_dict = {} for attr_key in self.__class__.__dict__: if attr_key in self.__class__._bound: + if attr_key == '_extra_content': + continue attr_value = getattr(self, attr_key) if isinstance(attr_value, BoundData): res_dict[attr_key] = attr_value.to_dict() diff --git a/reconfigure/items/netatalk.py b/reconfigure/items/netatalk.py index 7989220..ed7d282 100644 --- a/reconfigure/items/netatalk.py +++ b/reconfigure/items/netatalk.py @@ -12,8 +12,8 @@ class GlobalData (BoundData): class ShareData (BoundData): - fields = ['path', 'appledouble', 'valid users', 'cnid scheme', 'ea', 'password', 'file perm', 'directory perm'] - defaults = ['', 'ea', '', 'dbd', 'none', '', '', ''] + fields = ['path', 'appledouble', 'valid users', 'cnid scheme', 'ea', 'password', 'file perm', 'directory perm', 'rolist', 'rwlist'] + defaults = ['', 'ea', '', 'dbd', 'none', '', '', '', '', ''] def template(self): return Node( diff --git a/reconfigure/items/samba.py b/reconfigure/items/samba.py index 3288b2e..d691adc 100644 --- a/reconfigure/items/samba.py +++ b/reconfigure/items/samba.py @@ -58,8 +58,11 @@ GlobalData.bind_property('security', 'security', default='user') ShareData.bind_name('name') for f, d in zip(ShareData.fields, ShareData.default_values): if d not in [True, False]: - ShareData.bind_property(f, f.replace(' ', '_'), default=d) + ShareData.bind_property( + f, f.replace(' ', '_'), default=d, default_remove=[d] + ) else: ShareData.bind_property( f, f.replace(' ', '_'), default=d, - getter=yn_getter, setter=yn_setter) + getter=yn_getter, setter=yn_setter + ) |