Ic @sdZddkZddkZddkTddklZeiiZhZxKe D]@Z e e Z e e doe ee itj oq>Xq>Wq'Wn |i}|S(sf Returns a list of OIDs of all available schema elements of a given schema element class. (RRtgetattrRtAttributeError( Rtschema_element_classtschema_element_filterstavail_setresulttse_keyR!tfktfv((s:/usr/lib64/python2.6/site-packages/ldap/schema/subentry.pytlistallJs     c Cs|i||}d}tiihg|6}x|D]}g||} |i|i| | } y|| i |WqqXqWqSW|S(sm Returns a ldap.cidict.cidict dictionary representing the tree structure of the schema elements. t_N(R.( R-R R tget_objRt __class__tsupRtgetR( RR&R'R(ttop_nodettreeR!tse_oidtse_objtstsup_oid((s:/usr/lib64/python2.6/site-packages/ldap/schema/subentry.pyR4_s& cCs0|iddi}|i|i||S(s# Get an OID by name or OID t;i(tsplittstripRR2(RRt nameoroidR5((s:/usr/lib64/python2.6/site-packages/ldap/schema/subentry.pytgetoidscCs|i||i||}yt||}Wntj o d}nX|djo*|io |i||id|}n|S(s Get a possibly inherited attribute specified by name of a schema element specified by nameoroid. Returns None if class attribute is not set at all. Raises KeyError if no schema element is found by nameoroid. iN(RR=R$R%RR1tget_inheritedattr(RRR<RR!R)((s:/usr/lib64/python2.6/site-packages/ldap/schema/subentry.pyR>s  cCs#|i|i|i|||S(s- Get a schema element by name or OID (RR2R=(RRR<tdefault((s:/usr/lib64/python2.6/site-packages/ldap/schema/subentry.pyR/sc Csddk}|pg}|i|i|i|i||}|oDt|do4x1|D]%}t|||i|||qbWn|S(st Get a schema element by name or OID with all class attributes set including inherited class attributes iNR1(tcopyRR2R=RtsetattrR>(RRR<t inheritedR@R!tclass_attr_name((s:/usr/lib64/python2.6/site-packages/ldap/schema/subentry.pytget_inheritedobjs  +'cCsJ|it|}y|it|}Wntj odSX|iSdS(sF Get the syntax of an attribute type specified by name or OID N(R=t AttributeTypeRDRRtsyntax(RR<tat_oidtat_obj((s:/usr/lib64/python2.6/site-packages/ldap/schema/subentry.pyt get_syntaxs c Cs|itddgfg}h}xK|D]C}|it|d}|o!|idjod||iR/RDRIRURYRt(((s:/usr/lib64/python2.6/site-packages/ldap/schema/subentry.pyRs         ic Cs|i}|idp |idp|idoddk}|i|}ti|i|}ti|_|i |i pd|i pd|i |i }|djo d}n9|idjo t}n |i}|i|d|}|i~nZddk}ddk} |i|} | i| dd } | i| id \}}|djotii|} nd} || fS( s Fetches a parsed schema entry by uri. If uri is a LDAP URL the LDAP server is queried directly. Otherwise uri is assumed to point to a LDIF file which is loaded with urllib. sldap:sldaps:sldapi:iNttattrst max_entriesii(R;t startswithtldapurltLDAPUrlR t initializet initializeUrltVERSION3tprotocol_versiont simple_bind_stwhotcredtsearch_subschemasubentry_stdnRRxR tread_subschemasubentry_stunbind_sturllibtldifturlopentLDIFRecordListtparset all_recordsRZR( turit trace_levelR{tldap_urlRptsubschemasubentry_dntsubschemasubentry_entryt schema_attrsRRt ldif_filet ldif_parsertparsed_sub_schema((s:/usr/lib64/python2.6/site-packages/ldap/schema/subentry.pyturlfetchs4 0  $       (t__doc__t ldap.cidictR t ldap.schematldap.schema.modelsRR RRtdirt_nametevalRdRRRR RR(((s:/usr/lib64/python2.6/site-packages/ldap/schema/subentry.pyts     g