summaryrefslogtreecommitdiff
path: root/reconfigure/items/passwd.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/passwd.py
parent1e93e1498efdfd85a599a7e831f4a3a55f78aa75 (diff)
Imported Upstream version 0.1.74+git49a20890
Diffstat (limited to 'reconfigure/items/passwd.py')
-rw-r--r--reconfigure/items/passwd.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/reconfigure/items/passwd.py b/reconfigure/items/passwd.py
index 147bc8a..6943300 100644
--- a/reconfigure/items/passwd.py
+++ b/reconfigure/items/passwd.py
@@ -1,3 +1,4 @@
+from reconfigure.nodes import Node, PropertyNode
from reconfigure.items.bound import BoundData
@@ -8,6 +9,17 @@ class PasswdData (BoundData):
class UserData (BoundData):
fields = ['name', 'password', 'uid', 'gid', 'comment', 'home', 'shell']
+ def template(self):
+ return Node(
+ 'line',
+ *[
+ Node('token', children=[
+ PropertyNode('value', '')
+ ])
+ for x in UserData.fields
+ ]
+ )
+
PasswdData.bind_collection('users', item_class=UserData)
for i in range(0, len(UserData.fields)):