summaryrefslogtreecommitdiff
path: root/reconfigure/items/group.py
diff options
context:
space:
mode:
authorAndrew Shadura <andrew@shadura.me>2015-08-20 16:04:48 +0200
committerAndrew Shadura <andrew@shadura.me>2015-08-20 16:04:48 +0200
commit2989b4c027b3230b1778e3777d2cce53c89808d9 (patch)
treeeaae33622a6ced0a09a5610d79ab9d54e77a5a9f /reconfigure/items/group.py
parent1e93e1498efdfd85a599a7e831f4a3a55f78aa75 (diff)
Imported Upstream version 0.1.74+git49a20890
Diffstat (limited to 'reconfigure/items/group.py')
-rw-r--r--reconfigure/items/group.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/reconfigure/items/group.py b/reconfigure/items/group.py
index f95b28a..107bc64 100644
--- a/reconfigure/items/group.py
+++ b/reconfigure/items/group.py
@@ -1,3 +1,4 @@
+from reconfigure.nodes import Node, PropertyNode
from reconfigure.items.bound import BoundData
@@ -8,6 +9,17 @@ class GroupsData (BoundData):
class GroupData (BoundData):
fields = ['name', 'password', 'gid', 'users']
+ def template(self):
+ return Node(
+ 'line',
+ *[
+ Node('token', children=[
+ PropertyNode('value', '')
+ ])
+ for x in GroupData.fields
+ ]
+ )
+
GroupsData.bind_collection('groups', item_class=GroupData)
for i in range(0, len(GroupData.fields)):