return self.nc_type == NCType.config
def identify_by_basedn(self, samdb):
- """Given an NC object, identify what type is is thru
+ """Given an NC object, identify what type it is thru
the samdb basedn strings and NC sid value
"""
# Invoke loader to initialize guid and more
return text
def __setattr__(self, item, value):
- """Set an attribute and chyange update flag.
+ """Set an attribute and change update flag.
Be aware that setting any RepsFromTo attribute will set the
drsuapi.DRSUAPI_DRS_UPDATE_ADDRESS update flag.
# Work out the set of names we will likely have an A record on by
# default. This is by default all the partitions of type
- # domainDNS. By finding the canocial name of all the partitions,
+ # domainDNS. By finding the canonical name of all the partitions,
# we find the likely candidates. We only remove the record if it
# matches the IP that was used by the dnsHostName. This avoids us
- # needing to look a the dns_update_list file from in the demote
+ # needing to look at a dns_update_list file from in the demote
# script.
def dns_name_from_dn(dn):
server_dn = None
- # Allow the name to be a the nTDS-DSA GUID
+ # Allow the name to be an nTDS-DSA GUID
try:
ntds_guid = uuid.UUID(hex=dc_name)
ntds_dn = "<GUID=%s>" % ntds_guid
if kerberos_state is None:
kerberos_state = template.get_kerberos_state()
- # get a copy of the global creds or a the passed in creds
+ # get a copy of the global creds or the passed in creds
c = Credentials()
c.set_username(username)
c.set_password(userpass)
creds = credentials.Credentials()
if lp is None:
# guess Credentials parameters here. Otherwise workstation
- # and domain fields are NULL and gencache code segfalts
+ # and domain fields are NULL and gencache code segfaults
lp = param.LoadParm()
creds.guess(lp)
creds.set_username(env_get_var_value(env_username))
def get_env_dir(key):
"""A helper to pull a directory name from the environment, used in
some tests that optionally write e.g. fuzz seeds into a directory
- named in an environment valiable.
+ named in an environment variable.
"""
dir = os.environ.get(key)
if dir is None:
# Take an ldap expression and an equivalent python expression.
# Run and time the ldap expression and compare the result to the python
- # expression run over the a list of ldap_object dicts.
+ # expression run over a list of ldap_object dicts.
def assertLDAPQuery(self, ldap_expr, ou_dn, py_expr, ldap_objects):
# run (and time) the LDAP search expression over the DB
r.wType = dnsp.DNS_TYPE_TOMBSTONE
# r.dwTimeStamp is a 32 bit value in hours, and r.data is an
# NTTIME (100 nanosecond intervals), both in the 1601 epoch. A
- # tombstome will have both, but expiration calculations use
+ # tombstone will have both, but expiration calculations use
# the r.data NTTIME EntombedTime timestamp (see [MS-DNSP]).
r.dwTimeStamp = epoch_hours
if epoch_nttime is None:
timestamp3 = self.get_unique_txt_record(name, txt3).dwTimeStamp
timestamp1 = self.get_unique_txt_record(name, txt1).dwTimeStamp
- # Here, although there is no record frm which to get the zero
+ # Here, although there is no record from which to get the zero
# timestamp, record 4 does it anyway.
self.assert_timestamps_equal(timestamp1, longer_ago)
self.assert_timestamps_equal(timestamp2, n_days_ago)