def _obtainCommands(self): """Obtain a command from the up-most server given a list of platforms and exelist. Returns the client response object.""" # Send a run request with our arch+binaries req = u'<?xml version="1.0"?>\n' req += u"<worker-request>\n" req += u"<worker-arch-capabilities>\n" for platform in self.remainingPlatforms: req += platform.printXML() req += "\n" req += self.exelist.printPartialXML() req += u"\n</worker-arch-capabilities>" # Append optional project specifics req += u"\n<worker-requirements>\n" if "project" in self.opts: req += u' <option key="project" value="%s"/>\n' % self.opts["project"] req += u"</worker-requirements>\n" req += u"</worker-request>\n" log.debug("request string is: %s" % req) runreq_clnt = WorkerMessage() resp = runreq_clnt.workerRequest(self.id, req) # print "Got %s"%(resp.read(len(resp))) return resp
def _obtainCommands(self): """Obtain a command from the up-most server given a list of platforms and exelist. Returns the client response object.""" # Send a run request with our arch+binaries req = u'<?xml version="1.0"?>\n' req += u'<worker-request>\n' req += u'<worker-arch-capabilities>\n' for platform in self.remainingPlatforms: req += platform.printXML() req += '\n' req += self.exelist.printPartialXML() req += u'\n</worker-arch-capabilities>' #Append optional project specifics req += u'\n<worker-requirements>\n' if "project" in self.opts: req += u' <option key="project" value="%s"/>\n' % self.opts[ 'project'] req += u'</worker-requirements>\n' req += u'</worker-request>\n' log.debug('request string is: %s' % req) runreq_clnt = WorkerMessage() resp = runreq_clnt.workerRequest(self.id, req) #print "Got %s"%(resp.read(len(resp))) return resp