#!/usr/bin/env python import ATFUtils import ATFTestEnv def probe(): """ Description: probe peer specified by Parameters: None Returns: Success: 0 Failure: 1 """ command = "gluster peer probe " servers = ATFUtils.TestEnvObj.get_servershostlist() length = len(servers) if (length == 1): ATFUtils.Logger.warning("Self Probing of Server Not Required") return 0 else: fromhost = servers.pop(0) for host in servers: command = command + host + " " status, stdin, stdout, stderr = ATFUtils.execute_command(command, host=fromhost, user='root') if (status == 1): return 1 else: return ATFUtils.parse_output(stdout, stderr)