

def do(self, workflow_dict):
    try:
        option = 'start'
        for host in workflow_dict['hosts']:
            LOG.info('{} monit on host {}'.format(option, host))
            cs_host_attr = CS_HostAttr.objects.get(host=host)
            script = test_bash_script_error()
            script += monit_script(option)
            LOG.info(script)
            output = {
                
            }
            return_code = exec_remote_command(server=host.address, username=cs_host_attr.vm_user, password=cs_host_attr.vm_password, command=script, output=output)
            LOG.info(output)
            if (return_code != 0):
                LOG.error('Error monit')
                LOG.error(str(output))
        return True
    except Exception:
        traceback = full_stack()
        workflow_dict['exceptions']['error_codes'].append(DBAAS_0002)
        workflow_dict['exceptions']['traceback'].append(traceback)
        return False

dataset/ETHPy150Open globocom/database-as-a-service/dbaas/workflow/steps/util/deploy/start_monit.py StartMonit.do/original