Example #1
0
    def do(self, workflow_dict):
        try:

            for host in workflow_dict['target_hosts']:
                cs_host_attr = CS_HostAttr.objects.get(host=host)

                script = test_bash_script_error()
                script += build_uncomment_skip_slave_script()

                script = build_context_script({}, script)

                output = {}
                LOG.info(script)
                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:
                    raise Exception(str(output))

            return True
        except Exception:
            traceback = full_stack()

            workflow_dict['exceptions']['error_codes'].append(DBAAS_0020)
            workflow_dict['exceptions']['traceback'].append(traceback)

            return False
 def do(self):
     if not self.is_valid:
         return
     script = build_uncomment_skip_slave_script()
     # self.run_script(script)
     self.host.ssh.run_script(script)
 def script(self):
     return build_uncomment_skip_slave_script()
Example #4
0
 def do(self):
     if not self.is_valid:
         return
     script = build_uncomment_skip_slave_script()
     self.run_script(script)
Example #5
0
 def script(self):
     return build_uncomment_skip_slave_script()