#!/usr/bin/env python import ATFUtils def setup(): """ Description: * Setup SSH Connections to all Servers * Setup SSH Connection to all Clients * Cleanup Glusterd on all Servers * Cleanup Glusterd on all Clients * Stop Glusterd on all Servers * Stop Glusterd on all Clients * Start Glusterd on all Servers * Start Glusterd on all Clients * Peer Probe from a Server to Other Servers Returns: Success: 0 ( If all the Setup Phases are Successful) Failure: 1 ( If any of the Setup Phase is unsuccessful) """ if ATFUtils.sshservers(): return 1 if ATFUtils.sshclients(): return 1 if ATFUtils.cleanupserversglusterd(): return 1 if ATFUtils.cleanupclientsglusterd(): return 1 if ATFUtils.stopserversglusterd(): return 1 if ATFUtils.stopclientsglusterd(): return 1 if ATFUtils.startserversglusterd(): return 1 if ATFUtils.startclientsglusterd(): return 1 if ATFUtils.peerprobe(): return 1 return 0