Bug 681969 - [RFE] Support Rest API for bkr.client.commands
Summary: [RFE] Support Rest API for bkr.client.commands
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Beaker
Classification: Retired
Component: web UI
Version: 0.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: ---
Assignee: Raymond Mancy
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 681964
TreeView+ depends on / blocked
 
Reported: 2011-03-03 18:21 UTC by Bill Peck
Modified: 2014-12-08 01:08 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-26 00:33:08 UTC


Attachments (Terms of Use)

Description Bill Peck 2011-03-03 18:21:03 UTC
Description of problem:
Currently we use kobo for 99% of command line communication to the Scheduler,  This bug is to investigate if moving to Rest(JSON) interface would be faster and simpler.

Currently Every method has to be duplicated in TG to support xmlrpc.  Rest(Json) support is built into TG and would not require separate methods.

Could kobo be extended to support Rest(Json) as well as xmlrpc?

Comment 1 Raymond Mancy 2011-03-17 22:52:27 UTC
(In reply to comment #0)
> Description of problem:
> Currently we use kobo for 99% of command line communication to the Scheduler, 
> This bug is to investigate if moving to Rest(JSON) interface would be faster
> and simpler.
> 
> Currently Every method has to be duplicated in TG to support xmlrpc. 

If it has to be duplicated it's possibly because we aren't doing it right in the first place.
i.e we should have methods that just return the data needed, and the controllers can dress the data as they like.

> Rest(Json) support is built into TG and would not require separate methods.

I'm not too clear on this. We would still need to structure our controllers and methods properly to support REST. And yes, TG can expose the methods as JSON for us.

> 
> Could kobo be extended to support Rest(Json) as well as xmlrpc?

Comment 2 Bill Peck 2011-03-18 01:49:18 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > Description of problem:
> > Currently we use kobo for 99% of command line communication to the Scheduler, 
> > This bug is to investigate if moving to Rest(JSON) interface would be faster
> > and simpler.
> > 
> > Currently Every method has to be duplicated in TG to support xmlrpc. 
> 
> If it has to be duplicated it's possibly because we aren't doing it right in
> the first place.
> i.e we should have methods that just return the data needed, and the
> controllers can dress the data as they like.
> 
> > Rest(Json) support is built into TG and would not require separate methods.
> 
> I'm not too clear on this. We would still need to structure our controllers and
> methods properly to support REST. And yes, TG can expose the methods as JSON
> for us.

I could be wrong but I thought it was as simple as adding 

@expose(“json”)

to any of the existing templates.

> 
> > 
> > Could kobo be extended to support Rest(Json) as well as xmlrpc?

Comment 3 Raymond Mancy 2011-03-18 02:29:49 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > (In reply to comment #0)
> > > Description of problem:
> > > Currently we use kobo for 99% of command line communication to the Scheduler, 
> > > This bug is to investigate if moving to Rest(JSON) interface would be faster
> > > and simpler.
> > > 
> > > Currently Every method has to be duplicated in TG to support xmlrpc. 
> > 
> > If it has to be duplicated it's possibly because we aren't doing it right in
> > the first place.
> > i.e we should have methods that just return the data needed, and the
> > controllers can dress the data as they like.
> > 
> > > Rest(Json) support is built into TG and would not require separate methods.
> > 
> > I'm not too clear on this. We would still need to structure our controllers and
> > methods properly to support REST. And yes, TG can expose the methods as JSON
> > for us.
> 
> I could be wrong but I thought it was as simple as adding 
> 
> @expose(“json”)
> 

I think that's right, except you can only (and you would only want to) serialize a restricted set of data types. So you couldn't @expose("json")  bkr.server.model:Root.new()

> to any of the existing templates.
> 
> > 
> > > 
> > > Could kobo be extended to support Rest(Json) as well as xmlrpc?

Comment 4 Raymond Mancy 2012-09-26 00:33:08 UTC
AFAIK we no longer care about this.


Note You need to log in before you can comment on or make changes to this bug.