Skip to main content

ISC-DHCP LDAP Schema manipulation helper

Project description

# pydhcp-ldap-schema

## By example:

import ldap import pydhcp_ldap_schema as schema

con = ldap.initialize(’ldap://localhost’) con.bind_s(‘user’, ‘pass’)

results = con.search_s(‘dc=domain,dc=com’, ldap.SCOPE_ONELEVEL, ‘(objectClass=dhcpService)’) service = schema.DHCPService.build_from_resultset(results[0])

service.attributes[‘dhcpPrimaryDN’] = [‘cn=New CN,dc=example,dc=com’] dn, old_entry = results[0] modlist = service.getModifyModlist(old_entry)

con.modify_s(dn, modlist) con.unbind_s()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydhcp-ldap-schema-0.1alpha.tar.gz (6.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page