self.vars = {}
self.list_mode = False
self.vms = None
- os.putenv('PYTHONUNBUFFERED', '1')
+ os.environ['PYTHONUNBUFFERED'] = '1'
self.parser = optparse.OptionParser("wintest")
def check_prerequesites(self):
def set_vms(self, vms):
'''set a list of VMs to test'''
if vms is not None:
- self.vms = vms.split(',')
+ self.vms = []
+ for vm in vms.split(','):
+ vm = vm.upper()
+ self.vms.append(vm)
def skip(self, step):
'''return True if we should skip a step'''
def putenv(self, key, value):
'''putenv with substitution'''
- os.putenv(key, self.substitute(value))
+ os.environ[key] = self.substitute(value)
def chdir(self, dir):
'''chdir with substitution'''
self.rndc_cmd("flush")
def restart_bind(self, kerberos_support=False, include=None):
- self.configure_bind(keberos_support=kerberos_support, include=include)
+ self.configure_bind(kerberos_support=kerberos_support, include=include)
self.stop_bind()
self.start_bind()
return True
def set_noexpire(self, child, username):
- '''Ensure this user's password does not expire'''
+ """Ensure this user's password does not expire"""
child.sendline('wmic useraccount where name="%s" set PasswordExpires=FALSE' % username)
child.expect("update successful")
child.expect("C:")
if i != 0:
self.info("Firewall disable failed - ignoring")
child.expect("C:")
-
+
def set_dns(self, child):
child.sendline('netsh interface ip set dns "${WIN_NIC}" static ${INTERFACE_IP} primary')
i = child.expect(['C:', pexpect.EOF, pexpect.TIMEOUT], timeout=5)