summaryrefslogtreecommitdiff
path: root/wintest/wintest.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-23 20:20:18 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-23 13:01:10 +0100
commitf6adad4d25b884ebdeccdf153d6dbbd016f5d65b (patch)
tree1b99affcd23f08677205b5b544eefa9d5474081e /wintest/wintest.py
parent3a8b67d06cf631f4d883ce40859401eb760bb0f3 (diff)
downloadsamba-f6adad4d25b884ebdeccdf153d6dbbd016f5d65b.tar.gz
wintest: tidyups and new conf variables
Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Tue Nov 23 13:01:10 CET 2010 on sn-devel-104
Diffstat (limited to 'wintest/wintest.py')
-rw-r--r--wintest/wintest.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/wintest/wintest.py b/wintest/wintest.py
index 4c93017f3b8..d7ca5fe0675 100644
--- a/wintest/wintest.py
+++ b/wintest/wintest.py
@@ -17,6 +17,10 @@ class wintest():
'''set a substitution variable'''
self.vars[varname] = value
+ def getvar(self, varname):
+ '''return a substitution variable'''
+ return self.vars[varname]
+
def setwinvars(self, vm, prefix='WIN'):
'''setup WIN_XX vars based on a vm name'''
for v in ['VM', 'HOSTNAME', 'USER', 'PASS', 'SNAPSHOT', 'BASEDN', 'REALM', 'DOMAIN']:
@@ -282,12 +286,6 @@ class wintest():
child.expect('Ethernet adapter ')
child.expect("[\w\s]+")
self.setvar("WIN_NIC", child.after)
- child.expect(['DHCP Enabled', 'Dhcp Enabled'])
- i = child.expect(['Yes', 'No'])
- if i == 0:
- self.setvar("WIN_DHCP", True)
- else:
- self.setvar("WIN_DHCP", False)
child.expect(['IPv4 Address', 'IP Address'])
child.expect('\d+.\d+.\d+.\d+')
self.setvar('WIN_IPV4_ADDRESS', child.after)
@@ -324,12 +322,10 @@ class wintest():
return False
def set_ip(self, child):
- '''fix the IP address to the same value it had when we
+ """fix the IP address to the same value it had when we
connected, but don't use DHCP, and force the DNS server to our
- DNS server. This allows DNS updates to run'''
+ DNS server. This allows DNS updates to run"""
self.get_ipconfig(child)
- if self.vars['WIN_DHCP'] is False:
- return False
child.sendline('netsh')
child.expect('netsh>')
child.sendline('offline')