本文整理汇总了Python中samba.unix2nttime函数的典型用法代码示例。如果您正苦于以下问题:Python unix2nttime函数的具体用法?Python unix2nttime怎么用?Python unix2nttime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了unix2nttime函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, url, setup_dir=""):
self.url = url
self._connect_to_mysql()
self.nttime = samba.unix2nttime(int(time.time()))
self.ou_id = None # initialized on add_server() method
self.replica_id = 1
self.global_count = 1 # folder_id for public folders
self._change_number = None
self.migration_app = 'openchangedb'
开发者ID:ThHirsch,项目名称:openchange,代码行数:9,代码来源:mailbox.py
示例2: __init__
def __init__(self, url, setup_dir=""):
self.url = url
self.schema = os.path.join(setup_dir, self.OPENCHANGEDB_SCHEMA)
self._connect_to_mysql()
self.nttime = samba.unix2nttime(int(time.time()))
self.ou_id = None # initialized on add_server() method
self.replica_id = 1
self.global_count = 1 # folder_id for public folders
self._change_number = None
开发者ID:bencer,项目名称:openchange,代码行数:9,代码来源:mailbox.py
示例3: set_attribute_replmetadata_version
def set_attribute_replmetadata_version(self, dn, att, value,
addifnotexist=False):
res = self.search(expression="distinguishedName=%s" % dn,
scope=ldb.SCOPE_SUBTREE,
controls=["search_options:1:2"],
attrs=["replPropertyMetaData"])
if len(res) == 0:
return None
repl = ndr_unpack(drsblobs.replPropertyMetaDataBlob,
str(res[0]["replPropertyMetaData"]))
ctr = repl.ctr
now = samba.unix2nttime(int(time.time()))
found = False
if len(self.hash_oid_name.keys()) == 0:
self._populate_oid_attid()
for o in ctr.array:
# Search for Description
att_oid = self.get_oid_from_attid(o.attid)
if self.hash_oid_name.has_key(att_oid) and\
att.lower() == self.hash_oid_name[att_oid].lower():
found = True
seq = self.sequence_number(ldb.SEQ_NEXT)
o.version = value
o.originating_change_time = now
o.originating_invocation_id = misc.GUID(self.get_invocation_id())
o.originating_usn = seq
o.local_usn = seq
if not found and addifnotexist and len(ctr.array) >0:
o2 = drsblobs.replPropertyMetaData1()
o2.attid = 589914
att_oid = self.get_oid_from_attid(o2.attid)
seq = self.sequence_number(ldb.SEQ_NEXT)
o2.version = value
o2.originating_change_time = now
o2.originating_invocation_id = misc.GUID(self.get_invocation_id())
o2.originating_usn = seq
o2.local_usn = seq
found = True
tab = ctr.array
tab.append(o2)
ctr.count = ctr.count + 1
ctr.array = tab
if found :
replBlob = ndr_pack(repl)
msg = ldb.Message()
msg.dn = res[0].dn
msg["replPropertyMetaData"] = ldb.MessageElement(replBlob,
ldb.FLAG_MOD_REPLACE,
"replPropertyMetaData")
self.modify(msg, ["local_oid:1.3.6.1.4.1.7165.4.3.14:0"])
开发者ID:Distrotech,项目名称:samba,代码行数:53,代码来源:samdb.py
注:本文中的samba.unix2nttime函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论