diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-11-30 11:58:05 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-12-01 16:09:58 +1100 |
commit | 86c3c427456431d49529a358e3f754b1fa812b6e (patch) | |
tree | b50f6a91ed4998a4955ada6d6669d33df0d376e4 /wintest | |
parent | 7ecf6b245113ada9d1c572b059e61db2b61e23cd (diff) | |
download | samba-86c3c427456431d49529a358e3f754b1fa812b6e.tar.gz samba-86c3c427456431d49529a358e3f754b1fa812b6e.tar.bz2 samba-86c3c427456431d49529a358e3f754b1fa812b6e.zip |
wintest Set WIN_LCREALM and WIN_BASEDN automatically
Also this uppper cases WIN_REALM, to avoid this being sensitive based
on the configuration file.
Andrew Bartlett
Diffstat (limited to 'wintest')
-rw-r--r-- | wintest/wintest.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/wintest/wintest.py b/wintest/wintest.py index dce2ac874a..910297ed4b 100644 --- a/wintest/wintest.py +++ b/wintest/wintest.py @@ -26,13 +26,19 @@ class wintest(): 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', 'IP']: + for v in ['VM', 'HOSTNAME', 'USER', 'PASS', 'SNAPSHOT', 'REALM', 'DOMAIN', 'IP']: vname = '%s_%s' % (vm, v) if vname in self.vars: self.setvar("%s_%s" % (prefix,v), self.substitute("${%s}" % vname)) else: self.vars.pop("%s_%s" % (prefix,v), None) + if self.getvar("WIN_REALM"): + self.setvar("WIN_REALM", self.getvar("WIN_REALM").upper()) + self.setvar("WIN_LCREALM", self.getvar("WIN_REALM").lower()) + dnsdomain = self.getvar("WIN_REALM") + self.setvar("WIN_BASEDN", "DC=" + dnsdomain.replace(".", ",DC=")) + def info(self, msg): '''print some information''' if not self.list_mode: |