summaryrefslogtreecommitdiff
path: root/reconfigure/items/group.py
diff options
context:
space:
mode:
authorAndrew Shadura <andrew@shadura.me>2015-08-20 15:58:26 +0200
committerAndrew Shadura <andrew@shadura.me>2015-08-20 15:58:26 +0200
commitff1408420159488a106492ccd11dd234967029b6 (patch)
tree473420cee1c5229a427ec4cafead1aa6c0a26800 /reconfigure/items/group.py
Imported Upstream version 0.1.29
Diffstat (limited to 'reconfigure/items/group.py')
-rw-r--r--reconfigure/items/group.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/reconfigure/items/group.py b/reconfigure/items/group.py
new file mode 100644
index 0000000..f95b28a
--- /dev/null
+++ b/reconfigure/items/group.py
@@ -0,0 +1,15 @@
+from reconfigure.items.bound import BoundData
+
+
+class GroupsData (BoundData):
+ pass
+
+
+class GroupData (BoundData):
+ fields = ['name', 'password', 'gid', 'users']
+
+
+GroupsData.bind_collection('groups', item_class=GroupData)
+for i in range(0, len(GroupData.fields)):
+ path = lambda i: lambda x: x.children[i]
+ GroupData.bind_property('value', GroupData.fields[i], path=path(i))