+ return self.parent.hosts.items()
+
+
+class UserHandler(Handler):
+
+ def __init__(self, parent):
+ self.parent = parent
+
+ @handler('Adds a user')
+ def add(self, user, password):
+ if user in self.parent.users:
+ raise UserAlreadyExistsError(user)
+ self.parent.users[user] = crypt.crypt(password,'BA')
+
+ @handler('Deletes a user')
+ def delete(self, user):
+ if not user in self.parent.users:
+ raise UserNotFound(user)
+ del self.parent.users[user]