def execute(self): logger.info("Sending mail to %s" % ",".join(self.to_addrs)) cmd = "/bin/mailx" if curr_platform == SUNOS else findCmdInPath('mail') Command( 'Sending email', 'echo "%s" | %s -s "%s" %s' % (self.message, cmd, self.subject, " ".join(self.to_addrs))).run( validateAfter=True)
def __init__(self): gphome = os.getenv('GPHOME', None) + '/bin/' try: self.GP_MOUNT_AGENT = unix.findCmdInPath('gp_mount_agent', [gphome], False) except: pass try: self.POWERMT = unix.findCmdInPath('powermt', printError=False) except: pass try: self.NAVISECCLI = unix.findCmdInPath('naviseccli', printError=False) except: pass try: self.STAT = unix.findCmdInPath('stat', printError=False) except: pass try: self.INQ = unix.findCmdInPath('inq', printError=False) except: pass try: self.MOUNT = unix.findCmdInPath('mount', printError=False) except: pass
def execute(self): logger.info("Sending mail to %s" % ",".join(self.to_addrs)) cmd = "/bin/mailx" if curr_platform == SUNOS else findCmdInPath('mail') Command('Sending email', 'echo "%s" | %s -s "%s" %s' % (self.message, cmd, self.subject, " ".join(self.to_addrs))).run(validateAfter=True)