'Stops a backend.'

def BackendsStop(self):

    if (len(self.args) != 1):
        self.parser.error('Expected    a    single    <backend>    argument.')
    backend = self.args[0]
    appyaml = self._ParseAppInfoFromYaml(self.basepath)
    BackendsStatusUpdate(appyaml.runtime, self.error_fh)
    rpcserver = self._GetRpcServer()
    response = rpcserver.Send('/api/backends/stop', app_id=appyaml.application, backend=backend)
    print >>self.out_fh, response
