当前位置: 首页>>代码示例>>Python>>正文


Python ldif.LDIFParser类代码示例

本文整理汇总了Python中ldif.LDIFParser的典型用法代码示例。如果您正苦于以下问题:Python LDIFParser类的具体用法?Python LDIFParser怎么用?Python LDIFParser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了LDIFParser类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self,input,output,root,ns1,ns2,outputdir='.'):
    LDIFParser.__init__(self,input)
    rantoday = open('.rantoday', 'r')
    try:
        serial = rantoday.readline()
        print serial
        if serial != '': 
            serial = int(serial) 
        else: 
            serial = 0
        serialNum = serial + 1
        rantoday.close()
        rantoday = open('.rantoday', 'w+')
        rantoday.write(str(serialNum))
        print serialNum
        rantoday.close()
    except IOError:
        exit("couldn't read local directory, to create a .rantoday file to help counting the reruns to get the serial to increase")
    self.serial = serialNum       
    self.writer = LDIFWriter(output)
    self.megaArray = {}
    self.cnamed = []
    self.valueInEntries = []
    self.megaTree = {}
    self.subDomainRecords = {}
    self.root = root
    self.ns1 = ns1
    self.ns2 = ns2
    self.zoneSubDirectory = outputdir
    self.megaWeirdArray= {}
    self.zoneArray = {}
    self.zoneArray = {}
    self.managedZones = {}
    self.exempted = {2: ['co.uk', 'org.ua', 'com.ar']}
开发者ID:GuillaumeFromage,项目名称:ldif2zones,代码行数:34,代码来源:ldif2zone.py

示例2: __init__

 def __init__(self, input, output):
     LDIFParser.__init__(self, input)
     self.targetDN = None
     self.targetAttr = None
     self.targetEntry = None
     self.DNs = []
     self.lastDN = None
     self.lastEntry = None
开发者ID:GluuFederation,项目名称:community-edition-setup,代码行数:8,代码来源:import23.py

示例3: __init__

 def __init__(self, input_fd):
     LDIFParser.__init__(self, input_fd)
     self.DNs = []
     self.entries = {}
     self.inumOrg = None
     self.inumOrg_dn = None
     self.inumApllience = None
     self.inumApllience_dn = None
开发者ID:GluuFederation,项目名称:community-edition-setup,代码行数:8,代码来源:remove_inum.py

示例4: __init__

  def __init__(self, input, vipGroups, debug=False):

    self.vipGroups = {}
    for g in vipGroups:
      self.vipGroups[g] = []

    self.debug = debug
    LDIFParser.__init__(self, input)
开发者ID:pamapa,项目名称:python-fritzbox,代码行数:8,代码来源:LDIF.py

示例5: __init__

 def __init__(self, infile=None, outfile=None):
     if infile:
         self._if = open(infile, "r")
     else:
         self._if = sys.stdin
     if outfile:
         self._of = open(outfile, "w")
     else:
         self._of = sys.stdout
     LDIFParser.__init__(self, self._if)
开发者ID:syakesaba,项目名称:john,代码行数:10,代码来源:ldif2john.py

示例6: __init__

 def __init__(self, input, output, settings, clients_ldif=None, editor=None):
     LDIFParser.__init__(self, input)
     self.domains = {}
     self.domains_lookup = (
         clients_ldif.domains_lookup if clients_ldif else None
     )
     self.editor = editor
     self.a_record_ips = set([])
     self.a_record_hosts = {}
     self.server = Server(settings.couchdb_uri)
     self.db = self.server.get_db(settings.couchdb_db)
开发者ID:yvess,项目名称:desk,代码行数:11,代码来源:importer.py

示例7: __init__

 def __init__(self, input, output, keep_dn=False):
     LDIFParser.__init__(self, input)
     self.keep_dn = keep_dn
     self.targetDN = None
     self.targetAttr = None
     self.targetEntry = None
     self.DNs = []
     self.lastDN = None
     self.lastEntry = None
     self.entries = []
     self.dn_entry = []
开发者ID:GluuFederation,项目名称:community-edition-setup,代码行数:11,代码来源:export3031.py

示例8: __init__

    def __init__(self, ldif_fil, ldif_entries):
        """
        `ldif_fil`: The file-like object from which to read ldif
        entries.

        `ldif_entries`: the queue into which to dump the entries as
        DnEntry namedtuples.
        """
        LDIFParser.__init__(self, ldif_fil)
        self.ldif_entries = ldif_entries
        self.sort_enforcer = SortEnforcer()
开发者ID:Bitlancer,项目名称:strings-datasync,代码行数:11,代码来源:ldiff.py

示例9: __init__

	def __init__(self, input_name, replacement_table=None):

		replacement_table = replacement_table if replacement_table else {}

		# we must keep this one handy because the LDIFParser
		# will not access it immediately, and it must stay open.
		self.stringio = cStringIO.StringIO()

		with open('%s/schemas/%s.ldif'
				% ('/usr/share/licorn', input_name), 'rb') as ldapf:

			data = ldapf.read()
			for key, value in replacement_table.iteritems():
				data = data.replace(key, value)

			self.stringio.write(data)
			self.stringio.seek(0)

		LDIFParser.__init__(self, self.stringio)

		#print '%s/schemas/%s.ldif' % (
		#	os.path.dirname(__file__),input_name)

		self.ldap_data = []
开发者ID:Licorn,项目名称:licorn,代码行数:24,代码来源:ldaputils.py

示例10: __init__

 def __init__(self,input,output):
     LDIFParser.__init__(self,input)
     self.writer = LDIFWriter(output)
开发者ID:GluuFederation,项目名称:community-edition-setup,代码行数:3,代码来源:update_config.py

示例11: __init__

 def __init__(self, input, output, password):
     LDIFParser.__init__(self, input)
     self.writer = LDIFWriter(output)
     self.password = password
开发者ID:chenjie4255,项目名称:active-directory-to-openldap,代码行数:4,代码来源:add-default-user-password.py

示例12: __init__

 def __init__(self, input, output):
     LDIFParser.__init__(self, input)
     self.writer = OpenLdapSchemaWriter(output)
开发者ID:chenjie4255,项目名称:active-directory-to-openldap,代码行数:3,代码来源:ad-schema-to-open-ldap.py

示例13: __init__

 def __init__(self, descriptor):
     self.users = {}
     LDIFParser.__init__(self, descriptor)
开发者ID:eaudeweb,项目名称:naaya.edw.circaimport,代码行数:3,代码来源:ldif_extract.py

示例14: __init__

 def __init__(self, input):
     LDIFParser.__init__(self, input)
     self.objectclasses = {}
     self.attributes = {}
开发者ID:Anikynetix,项目名称:community-edition-setup,代码行数:4,代码来源:genSchemaMarkdown.py

示例15: parseAttrTypeandValue

 def parseAttrTypeandValue(self):
     return LDIFParser._parseAttrTypeandValue(self)
开发者ID:GluuFederation,项目名称:community-edition-setup,代码行数:2,代码来源:export3031.py


注:本文中的ldif.LDIFParser类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。