mirror of
https://github.com/samba-team/samba.git
synced 2025-09-21 21:44:21 +03:00
s4-upgradeprovision: clean up, reformating and update docs
This commit is contained in:
committed by
Matthieu Patou
parent
20233cdf53
commit
9a18e07b4f
@@ -1109,8 +1109,8 @@ def update_partition(ref_samdb, samdb, basedn, names, schema, provisionUSNs, pre
|
|||||||
:param basedn: String value of the DN of the partition
|
:param basedn: String value of the DN of the partition
|
||||||
:param names: List of key provision parameters
|
:param names: List of key provision parameters
|
||||||
:param schema: A Schema object
|
:param schema: A Schema object
|
||||||
:param provisionUSNs: The USNs modified by provision/upgradeprovision
|
:param provisionUSNs: A dictionnary with range of USN modified during provision
|
||||||
last time
|
or upgradeprovision. Ranges are grouped by invocationID.
|
||||||
:param prereloadfunc: A function that must be executed just before the reload
|
:param prereloadfunc: A function that must be executed just before the reload
|
||||||
of the schema
|
of the schema
|
||||||
"""
|
"""
|
||||||
@@ -1309,7 +1309,6 @@ def removeProvisionUSN(samdb):
|
|||||||
attrs = [samba.provision.LAST_PROVISION_USN_ATTRIBUTE, "dn"]
|
attrs = [samba.provision.LAST_PROVISION_USN_ATTRIBUTE, "dn"]
|
||||||
entry = samdb.search(expression="dn=@PROVISION", base = "",
|
entry = samdb.search(expression="dn=@PROVISION", base = "",
|
||||||
scope=SCOPE_SUBTREE,
|
scope=SCOPE_SUBTREE,
|
||||||
controls=["search_options:1:2"],
|
|
||||||
attrs=attrs)
|
attrs=attrs)
|
||||||
empty = Message()
|
empty = Message()
|
||||||
empty.dn = entry[0].dn
|
empty.dn = entry[0].dn
|
||||||
@@ -1379,7 +1378,7 @@ def update_privilege(ref_private_path, cur_private_path):
|
|||||||
os.path.join(cur_private_path, "privilege.ldb"))
|
os.path.join(cur_private_path, "privilege.ldb"))
|
||||||
|
|
||||||
|
|
||||||
def update_samdb(ref_samdb, samdb, names, highestUSN, schema, prereloadfunc):
|
def update_samdb(ref_samdb, samdb, names, provisionUSNs, schema, prereloadfunc):
|
||||||
"""Upgrade the SAM DB contents for all the provision partitions
|
"""Upgrade the SAM DB contents for all the provision partitions
|
||||||
|
|
||||||
:param ref_sambdb: An LDB object conntected to the sam.ldb of the reference
|
:param ref_sambdb: An LDB object conntected to the sam.ldb of the reference
|
||||||
@@ -1387,8 +1386,8 @@ def update_samdb(ref_samdb, samdb, names, highestUSN, schema, prereloadfunc):
|
|||||||
:param samdb: An LDB object connected to the sam.ldb of the update
|
:param samdb: An LDB object connected to the sam.ldb of the update
|
||||||
provision
|
provision
|
||||||
:param names: List of key provision parameters
|
:param names: List of key provision parameters
|
||||||
:param highestUSN: The highest USN modified by provision/upgradeprovision
|
:param provisionUSNs: A dictionnary with range of USN modified during provision
|
||||||
last time
|
or upgradeprovision. Ranges are grouped by invocationID.
|
||||||
:param schema: A Schema object that represent the schema of the provision
|
:param schema: A Schema object that represent the schema of the provision
|
||||||
:param prereloadfunc: A function that must be executed just before the reload
|
:param prereloadfunc: A function that must be executed just before the reload
|
||||||
of the schema
|
of the schema
|
||||||
@@ -1396,7 +1395,7 @@ def update_samdb(ref_samdb, samdb, names, highestUSN, schema, prereloadfunc):
|
|||||||
|
|
||||||
message(SIMPLE, "Starting update of samdb")
|
message(SIMPLE, "Starting update of samdb")
|
||||||
ret = update_partition(ref_samdb, samdb, str(names.rootdn), names,
|
ret = update_partition(ref_samdb, samdb, str(names.rootdn), names,
|
||||||
schema, highestUSN, prereloadfunc)
|
schema, provisionUSNs, prereloadfunc)
|
||||||
if ret:
|
if ret:
|
||||||
message(SIMPLE, "Update of samdb finished")
|
message(SIMPLE, "Update of samdb finished")
|
||||||
return 1
|
return 1
|
||||||
|
Reference in New Issue
Block a user