Closed
Bug 396243
Opened 18 years ago
Closed 18 years ago
Allow extensions (aka plugins) to extend the WebService interface
Categories
(Bugzilla :: WebService, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.0
People
(Reporter: mkanat, Assigned: mkanat)
Details
Attachments
(1 file, 1 obsolete file)
|
4.20 KB,
patch
|
gregaryh
:
review+
|
Details | Diff | Splinter Review |
Extensions should be able to add their own modules to the WebService. For example, Testopia should be able to have Testopia.some_function.
Allowing them to extend the actual existing webservice functions is trickier, so we'll stay away from that for now.
| Assignee | ||
Comment 1•18 years ago
|
||
Okay, here we go! I've tested this, and it works. It also includes example code, which is a lot easier to understand than the documentation. :-)
| Assignee | ||
Comment 2•18 years ago
|
||
Note to self: Before checking in the example plugin, I have to modify the .cvsignore to pay attention to extensions/, and add an empty file called "disabled" to extensions/example/.
| Assignee | ||
Comment 3•18 years ago
|
||
Okay, there was POD stuff I had to fix anyway, so I just did all that "note to self" stuff right now.
Attachment #280966 -
Attachment is obsolete: true
Attachment #280967 -
Flags: review?(ghendricks)
Attachment #280966 -
Flags: review?(ghendricks)
Comment 4•18 years ago
|
||
Comment on attachment 280967 [details] [diff] [review]
v2
This will make things much easier for Testopia. Good work.
Attachment #280967 -
Flags: review?(ghendricks) → review+
| Assignee | ||
Updated•18 years ago
|
Flags: approval+
Comment 5•18 years ago
|
||
Comment on attachment 280967 [details] [diff] [review]
v2
>Index: extensions/example/code/webservice.pl
>Index: extensions/example/lib/WSExample.pm
Both files need a license.
Comment 6•18 years ago
|
||
This hook_dispatch code seems really useful. In fact, I failed to come up with something like this for the core webservice methods when I coded the original dispatch_with call. Is it possible to do use this dynamic way for the core methods, too?
| Assignee | ||
Comment 7•18 years ago
|
||
(In reply to comment #6)
> Is it possible to do use this dynamic way for the core methods, too?
It's not that dynamic, really--people still have to specify what they want in their modules and what they want to call them. I'm not exactly sure what it is that you'd like us to do, actually.
Comment 8•18 years ago
|
||
Oh well. I was under the impression that the %hook_dispatch parameter of the dispatch_with() call kinda does what the other clumsy parameters above do.
| Assignee | ||
Comment 9•18 years ago
|
||
Checking in .cvsignore;
/cvsroot/mozilla/webtools/bugzilla/.cvsignore,v <-- .cvsignore
new revision: 1.8; previous revision: 1.7
done
Checking in xmlrpc.cgi;
/cvsroot/mozilla/webtools/bugzilla/xmlrpc.cgi,v <-- xmlrpc.cgi
new revision: 1.4; previous revision: 1.3
done
Checking in Bugzilla/Hook.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Hook.pm,v <-- Hook.pm
new revision: 1.12; previous revision: 1.11
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/extensions/example/disabled,v
done
Checking in extensions/example/disabled;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/disabled,v <-- disabled
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/extensions/example/code/webservice.pl,v
done
Checking in extensions/example/code/webservice.pl;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/code/webservice.pl,v <-- webservice.pl
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/extensions/example/lib/WSExample.pm,v
done
Checking in extensions/example/lib/WSExample.pm;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/lib/WSExample.pm,v <-- WSExample.pm
initial revision: 1.1
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 10•18 years ago
|
||
And adding the license blocks:
Checking in extensions/example/code/webservice.pl;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/code/webservice.pl,v <-- webservice.pl
new revision: 1.2; previous revision: 1.1
done
Checking in extensions/example/lib/WSExample.pm;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/lib/WSExample.pm,v <-- WSExample.pm
new revision: 1.2; previous revision: 1.1
done
Comment 11•18 years ago
|
||
Max, could we have the changes in xmlrpc.cgi for 3.0 as well? The example extension is not needed, though.
| Assignee | ||
Comment 12•18 years ago
|
||
(In reply to comment #11)
> Max, could we have the changes in xmlrpc.cgi for 3.0 as well? The example
> extension is not needed, though.
Well, there's no lib/ support for extensions at all in 3.0, so I was kind of thinking we'd keep that a 3.2-only thing.
Comment 13•18 years ago
|
||
We need hooks for webservice on 3.0.x for QA (as not all wanted methods are available, and so we have to add our owns to automate some tests). As you can see at http://landfill.bugzilla.org/bugzillaqa/show_bug.cgi?id=3064, we only need the fix about xmlrpc.cgi, and this is working great (see e.g. the patch v2.2 to know why we needed it). So requesting approval for 3.0.5.
Flags: approval3.0?
| Assignee | ||
Comment 14•18 years ago
|
||
Okay, you can put this into 3.0.5, even though it's a feature enhancement...
Flags: approval3.0? → approval3.0+
Target Milestone: Bugzilla 3.2 → Bugzilla 3.0
Comment 15•18 years ago
|
||
Big thanks from the QA team. :)
3.0.4:
Checking in xmlrpc.cgi;
/cvsroot/mozilla/webtools/bugzilla/xmlrpc.cgi,v <-- xmlrpc.cgi
new revision: 1.2.2.1; previous revision: 1.2
done
Checking in Bugzilla/Hook.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Hook.pm,v <-- Hook.pm
new revision: 1.7.2.2; previous revision: 1.7.2.1
done
You need to log in
before you can comment on or make changes to this bug.
Description
•