5429N/A#!/usr/bin/python
5429N/A
5429N/A# CDDL HEADER START
5429N/A#
5429N/A# The contents of this file are subject to the terms of the
5429N/A# Common Development and Distribution License, Version 1.0 only
5429N/A# (the "License"). You may not use this file except in compliance
5429N/A# with the License.
6982N/A#
6982N/A# You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
5429N/A# or http://forgerock.org/license/CDDLv1.0.html.
5429N/A# See the License for the specific language governing permissions
5429N/A# and limitations under the License.
6982N/A#
5429N/A# When distributing Covered Code, include this CDDL HEADER in each
6982N/A# file and include the License file at legal-notices/CDDLv1_0.txt.
6982N/A# If applicable, add the following below this CDDL HEADER, with the
6982N/A# fields enclosed by brackets "[]" replaced with your own identifying
6982N/A# information:
5429N/A# Portions Copyright [yyyy] [name of copyright owner]
5429N/A#
5429N/A# CDDL HEADER END
5429N/A#
5429N/A# Copyright 2011 ForgeRock AS.
5429N/A
5429N/Aclass person_entry:
5429N/A def __init__(self, rdn, suffix):
5429N/A self.userDn = '%s,ou=People,%s' \
5429N/A % (rdn, suffix)
5429N/A self.suffix = suffix
5429N/A self.listAttr = []
5429N/A self.listAttr.append('objectclass:top')
5429N/A self.listAttr.append('objectclass:organizationalperson')
5429N/A self.listAttr.append('objectclass:inetorgperson')
5429N/A self.listAttr.append('objectclass:person')
5429N/A def getDn(self):
5429N/A return self.userDn
5429N/A def getSuffix(self):
5429N/A return self.suffix
5429N/A def getAttrList(self):
5429N/A return self.listAttr
5429N/A def addAttr(self, attrType, attrValue):
5429N/A self.listAttr.append('%s:%s' % (attrType, attrValue))
5429N/A