本文整理汇总了Python中bug_harness.DSAdminHarness.modify_s方法的典型用法代码示例。如果您正苦于以下问题:Python DSAdminHarness.modify_s方法的具体用法?Python DSAdminHarness.modify_s怎么用?Python DSAdminHarness.modify_s使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bug_harness.DSAdminHarness
的用法示例。
在下文中一共展示了DSAdminHarness.modify_s方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: str
# 需要导入模块: from bug_harness import DSAdminHarness [as 别名]
# 或者: from bug_harness.DSAdminHarness import modify_s [as 别名]
(ldap.MOD_ADD, 'ntUserDomainId', uid)]
ds.modify_s(ent.dn, mod)
time.sleep(1)
print "Added ntuser, changing telephonenumber . . ."
mod = [(ldap.MOD_DELETE, 'telephoneNumber', telnum1),
(ldap.MOD_ADD, 'telephoneNumber', telnum2)]
ds.modify_s(ent.dn, mod)
time.sleep(1)
print "changed telephonenumber, changing description . . ."
mod = [(ldap.MOD_ADD, 'description', 'test bug471068')]
ds.modify_s(ent.dn, mod)
time.sleep(1)
print "Delete description in AD, then in DS . . ."
mod = [(ldap.MOD_DELETE, 'description', None)]
ad.modify_s(adent.dn, mod)
ds.modify_s(ent.dn, mod)
time.sleep(1)
print "Add description in AD, then in DS . . ."
mod = [(ldap.MOD_ADD, 'description', 'test bug471068')]
ad.modify_s(adent.dn, mod)
ds.modify_s(ent.dn, mod)
time.sleep(1)
print "Now compare the entries . . ."
ents = ds.search_s(suffix, scope, "(uid=%s)" % uid)
print "DS Entry: ", str(ents[0])
ents = ad.search_s(suffix, scope, "(samaccountname=%s)" % uid)
print "AD Entry: ", str(ents[0])