Update to new zuul-gearman protocol.

* Use non-Jenkins terminology "manager" rather than "master".
* Use name+number as the identifier for both stopping builds and
  descriptions.
* Expect 'url' parameter instead of 'full_url'.

Change-Id: I1fe9851556618fc6d6deb8906e3f2ee41725c3ad
Reviewed-on: https://review.openstack.org/31726
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index 6babdc0..9a4819a 100644
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -515,9 +515,10 @@
 
     def run(self):
         data = {
-            'full_url': 'https://server/job/%s/%s/' % (self.name, self.number),
+            'url': 'https://server/job/%s/%s/' % (self.name, self.number),
+            'name': self.name,
             'number': self.number,
-            'master': self.worker.worker_id,
+            'manager': self.worker.worker_id,
             }
 
         self.job.sendWorkData(json.dumps(data))
@@ -594,9 +595,11 @@
 
     def handleStop(self, job, name):
         self.log.debug("handle stop")
-        unique = job.arguments
+        parameters = json.loads(job.arguments)
+        name = parameters['name']
+        number = parameters['number']
         for build in self.running_builds:
-            if build.unique == unique:
+            if build.name == name and build.number == number:
                 build.aborted = True
                 build.release()
                 job.sendWorkComplete()
@@ -606,15 +609,16 @@
     def handleSetDescription(self, job, name):
         self.log.debug("handle set description")
         parameters = json.loads(job.arguments)
-        unique = parameters['unique_id']
+        name = parameters['name']
+        number = parameters['number']
         descr = parameters['html_description']
         for build in self.running_builds:
-            if build.unique == unique:
+            if build.name == name and build.number == number:
                 build.description = descr
                 job.sendWorkComplete()
                 return
         for build in self.build_history:
-            if build.uuid == unique:
+            if build.name == name and build.number == number:
                 build.description = descr
                 job.sendWorkComplete()
                 return