Thanks for the work so far guys! We have ~24 hours before we cut RC2. So
lets wrap up as many operator API calls as possible.

On Tue, Jun 7, 2016 at 9:45 AM, haosdent <[email protected]> wrote:

> Awesome! Let me post a patch for this shortly.
>
> On Wed, Jun 8, 2016 at 12:39 AM, Vinod Kone <[email protected]> wrote:
>
>> Yes, seems ok to change the return type of *all *the RPC handlers to
>>
>> http::Response to make it more flexible.
>>
>> On Tue, Jun 7, 2016 at 12:30 PM, Zhou Z Xing <[email protected]> wrote:
>>
>> > yes, the same question
>> >
>> > For some of the APIs, in addition to 'BadRequest', 'Forbidden' is also
>> > required.
>> >
>> > Thanks & Best Wishes,
>> >
>> > Tom Xing(邢舟)
>> > Emerging Technology Institute, IBM China Software Development Lab
>> > ----------------------
>> > IBM China Software Development Laboratory (CSDL)
>> > Notes ID:Zhou Z Xing/China/IBM
>> > Phone :86-10-82450442
>> > e-Mail :[email protected]
>> > Address :Building No.28, ZhongGuanCun Software Park, No.8 Dong Bei Wang
>> > West Road, Haidian District, Beijing, P.R.China 100193
>> > 地址 :中国北京市海淀区东北旺西路8号 中关村软件园28号楼 100193
>> >
>> >
>> > [image: Inactive hide details for haosdent ---2016-06-07 上午
>> > 08:43:46---Currently, almost our v1 Operator API return value type is
>> v]haosdent
>> > ---2016-06-07 上午 08:43:46---Currently, almost our v1 Operator API return
>> > value type is v1::master::Response.
>> >
>> > From: haosdent <[email protected]>
>> > To: dev <[email protected]>
>> > Cc: Vinod Kone <[email protected]>, Abhishek Dasgupta <
>> > [email protected]>, Jay JN Guo/China/IBM@IBMCN, Zhou Z
>> > Xing/China/IBM@IBMCN, Qian AZ Zhang/China/IBM@IBMCN, Yong Feng <
>> > [email protected]>, Anand Mazumdar <[email protected]>, Shuai Lin <
>> > [email protected]>
>> > Date: 2016-06-07 上午 08:43
>> > Subject: [HTTP API] Questions about v1 Operator API return value type
>> > ------------------------------
>> >
>> >
>> >
>> > Currently, almost our v1 Operator API return value type
>> > is v1::master::Response.
>> > Now we validation `Call` by `validation::master::call::validate(call,
>> > principal)` and return `BadRequest` if it could not pass.
>> > In some cases, we need to validate the `Call` with other parameters. For
>> > example,
>> >
>> > ```
>> >   Option<Error> validate = validation::operation::validate(
>> >       operation.create(), slave->checkpointedResources, principal);
>> > ```
>> >
>> > 1. Could we delegate this validation into the implementation of API? If
>> > delegate the validation to API, the return type would be
>> > `process::http::Response` because of `BadRequest` could not convert to
>> > `v1::master::Response`.
>> >
>> > 2. And for keep consistent, should we change existing RPC handlers'
>> return
>> > type to `v1::master::Response` as well?
>> >
>> > --
>> > Best Regards,
>> > Haosdent Huang
>> >
>> >
>> >
>>
>
>
>
> --
> Best Regards,
> Haosdent Huang
>

Reply via email to