if connect.to_be_modified:
logger.info("TO BE MODIFIED:\n%s" % connect)
- # Peform deletion from our tables but perform
+ # Perform deletion from our tables but perform
# no database modification
dsa.commit_connections(self.samdb, ro=True)
else:
# IF (same-site) OR (no-value) OR (type-ip)
#
# because IP should be the primary transport mechanism
- # (even in inter-site) and the absense of the transportType
+ # (even in inter-site) and the absence of the transportType
# attribute should always imply IP no matter if its multi-site
#
# NOTE MS-TECH INCORRECT:
if text:
logger.info("TO BE MODIFIED:\n%s" % text)
- # Peform deletion from our tables but perform
+ # Perform deletion from our tables but perform
# no database modification
n_rep.commit_repsFrom(self.samdb, ro=True)
else:
if rt.to_be_deleted:
logger.info("REMOVING REPS-TO: %s" % rt)
- # Peform deletion from our tables but perform
+ # Perform deletion from our tables but perform
# no database modification
n_rep.commit_repsTo(self.samdb, ro=True)
else:
# XXX This loop and the previous one differ only in whether
# the replica is partial or not. here we only accept partial
# (because we're partial); before we only accepted full. Order
- # doen't matter (the list is sorted a few lines down) so these
+ # doesn't matter (the list is sorted a few lines down) so these
# loops could easily be merged. Or this could be a helper
# function.
"""Import relevant objects and attributes from an LDIF file.
The point of this function is to allow a programmer/debugger to
- import an LDIF file with non-security relevent information that
+ import an LDIF file with non-security relevant information that
was previously extracted from a DC database. The LDIF file is used
to create a temporary abbreviated database. The KCC algorithm can
then run against this abbreviated database for debug or test
"""Save KCC relevant details to an ldif file
The point of this function is to allow a programmer/debugger to
- extract an LDIF file with non-security relevent information from
+ extract an LDIF file with non-security relevant information from
a DC database. The LDIF file can then be used to "import" via
the import_ldif() function this file into a temporary abbreviated
database. The KCC algorithm can then run against this abbreviated
def set_repltimes_from_schedule(self, schedule):
"""Convert the schedule and calculate duration
- :param schdule: the schedule to convert
+ :param schedule: the schedule to convert
"""
self.schedule = convert_schedule_to_repltimes(schedule)
self.duration = total_schedule(self.schedule)
# the same for all nTDSDSAs in the forest. That
# leaves the default domain NC remaining which
# may be different for each nTDSDSAs (and thus
- # we don't compare agains this samdb's default
+ # we don't compare against this samdb's default
# basedn
elif attr == "hasMasterNCs":
self.rep_present_criteria_one = True
# Our response will contain a number of elements including
# the dn of the dsa as well as elements for each
# attribute (e.g. hasMasterNCs). Each of these elements
- # is a dictonary list which we retrieve the keys for and
+ # is a dictionary list which we retrieve the keys for and
# then iterate over them
for k in res[0].keys():
if k == "dn":
deleted
:param samdb: database to commit DSA connection list to
- :param ro: if (true) then peform internal operations but
+ :param ro: if (true) then perform internal operations but
do not write to the database (readonly)
"""
delconn = []
if sched is not None:
connect.schedule = sched
else:
- # Create schedule. Attribute valuse set according to MS-TECH
- # intrasite connection creation document
+ # Create schedule. Attribute value set according to MS-TECH
+ # intra-site connection creation document
connect.schedule = new_connection_schedule()
self.add_connection(dnstr, connect)
return
# First verify we don't have this entry to ensure nothing
- # is programatically amiss
+ # is programmatically amiss
found = False
try:
msg = samdb.search(base=self.dnstr, scope=ldb.SCOPE_BASE)
return
# First verify we have this entry to ensure nothing
- # is programatically amiss
+ # is programmatically amiss
try:
# we don't use the search result, but it tests the status
# of self.dnstr in the database.
# so it appears we have to turn f into the same interval
#
# interSiteTopologyFailover (if set) appears to be in minutes
- # so we'll need to convert to senconds and then 100 nanosecond
+ # so we'll need to convert to seconds and then 100 nanosecond
# intervals
# XXX [MS-ADTS] 6.2.2.3.1 says it is seconds, not minutes.
#
def ldif_to_samdb(dburl, lp, ldif_file, forced_local_dsa=None):
- """Routine to import all objects and attributes that are relevent
+ """Routine to import all objects and attributes that are relevant
to the KCC algorithms from a previously exported LDIF file.
The point of this function is to allow a programmer/debugger to
- import an LDIF file with non-security relevent information that
+ import an LDIF file with non-security relevant information that
was previously extracted from a DC database. The LDIF file is used
to create a temporary abbreviated database. The KCC algorithm can
then run against this abbreviated database for debug or test
def samdb_to_ldif_file(samdb, dburl, lp, creds, ldif_file):
- """Routine to extract all objects and attributes that are relevent
+ """Routine to extract all objects and attributes that are relevant
to the KCC algorithms from a DC database.
The point of this function is to allow a programmer/debugger to
- extract an LDIF file with non-security relevent information from
+ extract an LDIF file with non-security relevant information from
a DC database. The LDIF file can then be used to "import" via
the import_ldif() function this file into a temporary abbreviated
database. The KCC algorithm can then run against this abbreviated
if k in ncattrs:
for value in res_msg[k]:
# Some of these have binary DNs so
- # use dsdb_Dn to split out relevent parts
+ # use dsdb_Dn to split out relevant parts
dsdn = dsdb_Dn(samdb, value.decode('utf8'))
dnstr = str(dsdn.dn)
if dnstr not in nclist: