RE: REST API of create_lab, suspend_lab, resume_lab, delete_lab in place


I think what you say makes sense, Kacper. I know we had brought up that point before, and I believe that it may have just gotten lost in the shuffle as we were spinning up.

Tangentially, I did mean to update the list earlier just to state that Lengyue and I were able to conduct the integration test successfully utilizing the first pass of the UI to instantiate a labs environment via the rest endpoints. A couple of new tasks and bugfixes have already fallen out of that testing session, so it was quite productive overall.

Thanks,

Mario-
 

> -----Original Message-----
> From: owner-discuss@xxxxxxxxxxxxxxxxxxxxxxx [mailto:owner-
> discuss@xxxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Kacper Kowalik
> Sent: Friday, July 17, 2015 3:27 PM
> To: discuss@xxxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: REST API of create_lab, suspend_lab, resume_lab, delete_lab in
> place
> 
> On 07/17/2015 03:05 PM, Felarca, Mario Marcaida wrote:
> > Hi Kacper,
> >
> > Thanks for the review. Some comments inline.
> >
> >>
> >> I looked at that application briefly. As far as I can tell you have a
> >> js app that spawns python shell to execute script that uses cmdline
> >> arguments to wrap around novaclient, which is yet another wrapper
> >> around native OpenStack API. Wouldn't it be simpler to just call
> >> OpenStack API directly via e.g. jQuery? There's no obligation to use
> >> Python along the way.
> >
> > We actually discussed this to some degree in the past, and then
> > actually touched on it today as well for a brief moment. I think the
> > initial move to do it this way was to try to leverage the existing
> > file and still allow for the system to be spun up via command line.
> > Additionally, as Lengyue pushes in other scripts to handle the other
> > API calls, that would also potentially allow those commands to be
> > executed via command line still.
> 
> Well, those scripts don't introduce anything beyond what e.g. nova client
> offers. You spawn a shell to run them, you can just run nova instead.
> 
> Take `delete_lab.py`[1] as an example. This script takes credentials and id as
> commandline arguments to remove vm instance. Why not call 'nova delete
> id' instead, since you're already opening subshell?
> 
> > Do you feel that is something we should continue to support? Or do you
> > feel it makes more sense to simply call the openstack endpoint
> > directly instead?
> 
> I think it's always better to keep things as simple as possible.
> 
> - Kacper
> 
> [1]
> https://bitbucket.org/nds-org/nds-
> webservice/src/tip/delete_lab.py?at=nds-27-implement-create-rest-
> endpoint
> 
> >>
> >> BTW, you can also authenticate user once to generate token, which
> >> then can be reused for each API call.
> >>
> >
> > I believe that is what we are going to push to do as the UI gets built
> > out. However for now, that aspect of things hasn't been implemented
> > yet.
> >
> > Thanks again!
> >
> > Mario-
> >
> >
> >> Cheers, Kacper
> >>
> >
> >
> >
> >>> Mario-
> >>>
> >>>
> >>>>
> >>>> Cheers, Kacper
> >>>>
> >>>>
> >>>>
> >>>>> From: owner-discuss@xxxxxxxxxxxxxxxxxxxxxxx
> >>>>> [mailto:owner-discuss@xxxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> >>>>> Lengyue Chen Sent: Friday, July 17, 2015 12:52 PM To:
> >>>>> discuss@xxxxxxxxxxxxxxxxxxxxxxx Subject: REST API of create_lab,
> >>>>> suspend_lab, resume_lab, delete_lab in place
> >>>>>
> >>>>> Hi all I have pushed the source code of create_lab, suspend_lab,
> >>>>> resume_lab, delete_lab API to the repository:
> >>>>> https://bitbucket.org/nds-org/nds-webservice/branch/nds-27-
> >> implement
> >>>>> -
> >>>> c
> >>>>> reate-rest-
> >>>> endpoint?head=16023b516887ce760cafc42e165b571d25ff2756<http
> >>>>> s://urldefense.proofpoint.com/v2/url?u=https-
> 3A__bitbucket.org_nds
> >>>>> -
> >>>>
> >>>>>
> 2Do
> >>>>> rg_nds-2Dwebservice_branch_nds-2D27-2Dimplement-2Dcreate-
> >> 2Drest-
> >>>> 2Dendp
> >>>>> oint-3Fhead-
> >>>>
> 3D16023b516887ce760cafc42e165b571d25ff2756&d=AwMFaQ&c=8hUW
> >>>>> FZcy2Z-
> >>>>
> >>
> Za5rBPlktOQ&r=JOuddKqy8U0za9sj3XnXgmDQ3RLS98xIjIwaaTaI68Q&m=WJy
> >>>>>
> >>>>
> >>
> vbWO6jIZaMN1ZcvsaZ6OTrcKvq3WsGQiimSELTCM&s=s2qpeU8tvpZ6GQWaG
> >>>> YZdZOzevZU
> >>>>> NdQ5sRjHDBRWLLE0&e=> They are pretty alpha quality at this point
> >>>>> and I am working on optimizing them. Email any issues in your
> >>>>> trial. Thanks. Best Zeo
> >>>>>
> >>>>
> >>>
> >>
> >
> 



Other Mailing lists | Author Index | Date Index | Subject Index | Thread Index