1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-31 20:22:15 +03:00

KCC: shift ReplInfo, MAX_DWORD from kcc.kcc_utils to kcc.graph

They are only used in graph.py.

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:
Douglas Bagnall
2015-05-05 11:12:30 +12:00
committed by Andrew Bartlett
parent a6b7a9abc3
commit 004a9ba6b1
2 changed files with 29 additions and 24 deletions

View File

@ -2111,19 +2111,9 @@ class KCCFailedObject(object):
self.dns_name = dns_name
class ReplInfo(object):
def __init__(self):
self.cost = 0
self.interval = 0
self.options = 0
self.schedule = None
##################################################
# Global Functions and Variables
##################################################
MAX_DWORD = 2 ** 32 - 1
def get_dsa_config_rep(dsa):
# Find configuration NC replica for the DSA
@ -2140,18 +2130,6 @@ def sort_dsa_by_guid(dsa1, dsa2):
return cmp(ndr_pack(dsa1.dsa_guid), ndr_pack(dsa2.dsa_guid))
def total_schedule(schedule):
if schedule is None:
return 84 * 8 # 84 bytes = 84 * 8 bits
total = 0
for byte in schedule:
while byte != 0:
total += byte & 1
byte >>= 1
return total
def new_connection_schedule():
"""Create a default schedule for an NTDSConnection or Sitelink. This
is packed differently from the repltimes schedule used elsewhere