if type(s) == type(""):
v = re.sub(r"\$\{([\w:]+)\}", self.lookupHelper, s)
if boolean:
- if string.lower(v[0]) in ("1", "y", "t"):
+ if string.lower(v[0]) in ("1", "y", "t", "e"):
return True
- if string.lower(v[0]) in ("0", "n", "f"):
+ if string.lower(v[0]) in ("0", "n", "f", "d"):
return False
if string.lower(v) == "on":
return True
host.bootNics = [host.listSecondaryNICs("NPRI")[0]]
# If we're multipathed, we'll need to create the local SR after installation, if not then the installer can set it up for us
if len(iScsiBootNets) > 1:
- xenrt.TEC().config.setVariable(["HOST_CONFIGS",host.getName(),"OPTION_ROOT_MPATH"],"enabled")
+ xenrt.TEC().config.setVariable(["HOST_CONFIGS",host.getName(),"OPTION_ROOT_MPATH"],"yes")
xenrt.TEC().config.setVariable(["HOST_CONFIGS",host.getName(),"LOCAL_SR_POST_INSTALL"],"yes")
else:
xenrt.TEC().config.setVariable(["HOST_CONFIGS",host.getName(),"OPTION_ROOT_MPATH"],"")
# # Enable SSH into the installer to aid debug if installations fail
# pxecfg.mbootArgsModule1Add("sshpassword=%s" % self.password)
- optionRootMpath = self.lookup("OPTION_ROOT_MPATH", None)
+ optionRootMpath = self.lookup("OPTION_ROOT_MPATH", False, boolean=True)
- if optionRootMpath != None and len(optionRootMpath) > 0:
- pxecfg.mbootArgsModule1Add("device_mapper_multipath=%s" % optionRootMpath)
+ if optionRootMpath:
+ pxecfg.mbootArgsModule1Add("device_mapper_multipath=enabled")
# Set up PXE for installer boot
pxefile = pxe.writeOut(self.machine)
if xenrt.TEC().lookup("HOST_POST_INSTALL_REBOOT", False, boolean=True):
self.reboot()
- optionRootMpath = self.lookup("OPTION_ROOT_MPATH", None)
- if optionRootMpath != None and len(optionRootMpath) > 0:
+ optionRootMpath = self.lookup("OPTION_ROOT_MPATH", False, boolean=True)
+ if optionRootMpath:
# Check to ensure that there is a multipath topology if we did multipath boot.
if not len(self.getMultipathInfo()) > 0 :
raise xenrt.XRTFailure("There is no multipath topology found with multipath boot")
xenrt.TEC().warning("Using installer user extra Dom0 boot args %s"
% (dom0_extra_args_user))
- optionRootMpath = self.lookup("OPTION_ROOT_MPATH", None)
+ optionRootMpath = self.lookup("OPTION_ROOT_MPATH", False, boolean=True)
- if optionRootMpath != None and len(optionRootMpath) > 0:
+ if optionRootMpath:
pxecfg.mbootArgsModule1Add("device_mapper_multipath=%s" % optionRootMpath)
# Set up PXE for installer boot
# # Enable SSH into the installer to aid debug if installations fail
# pxecfg.mbootArgsModule1Add("sshpassword=%s" % self.host.password)
- optionRootMpath = self.host.lookup("OPTION_ROOT_MPATH", None)
+ optionRootMpath = self.host.lookup("OPTION_ROOT_MPATH", False, boolean=True)
- if optionRootMpath != None and len(optionRootMpath) > 0:
- pxecfg.mbootArgsModule1Add("device_mapper_multipath=%s" % optionRootMpath)
+ if optionRootMpath:
+ pxecfg.mbootArgsModule1Add("device_mapper_multipath=enabled")
# Set up PXE for installer boot
pxefile = pxe.writeOut(self.host.machine)