mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
KCC: improve docstring for kcc.graph.combine_repl_info()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
4376f1aa1d
commit
9af0a067f0
@ -71,6 +71,19 @@ def convert_schedule_to_repltimes(schedule):
|
||||
|
||||
# Returns true if schedule intersect
|
||||
def combine_repl_info(info_a, info_b, info_c):
|
||||
"""Set a replInfo to be the intersection of two others
|
||||
|
||||
If there is any overlap in the replication times specified by the
|
||||
first two parameters, the third replInfo parameter is set up with
|
||||
that overlap, and True is returned. If there is no overlap, the
|
||||
third parameter is unchanged and False is returned.
|
||||
|
||||
:param info_a: An input replInfo object
|
||||
:param info_b: An input replInfo object
|
||||
:param info_c: The result replInfo, set to the intersection of A and B
|
||||
if the intersection is non-empty.
|
||||
:return: True if info_c allows any replication at all, otherwise False
|
||||
"""
|
||||
info_c.interval = max(info_a.interval, info_b.interval)
|
||||
info_c.options = info_a.options & info_b.options
|
||||
|
||||
|
Reference in New Issue
Block a user