> On 十二月 8, 2016, 7:59 p.m., Benjamin Mahler wrote:
> > src/master/http.cpp, lines 210-211
> > <https://reviews.apache.org/r/54529/diff/1/?file=1579754#file1579754line210>
> >
> > In the case of a multi-role framework with two roles ("role1", "role2")
> > the json here would display:
> >
> > ```
> > {
> > "role": "*",
> > "roles": ["role1", "role2"]
> > }
> > ```
> >
> > For multi-role frameworks we must show:
> >
> > ```
> > {
> > // No "role"
> > "roles": ["role1", "role2"]
> > }
> > ```
> >
> > For single-role frameworks, we could show either of these:
> >
> > ```
> > {
> > "role": "role",
> > "roles": ["role"]
> > }
> >
> > {
> > "role: "role"
> > }
> > ```
> >
> > The first option would allow tooling to unconditionally look for
> > "roles", but the second mirrors what's happening in the protobufs. I'm
> > inclined to just mirror the protobufs.
For single-role frameworks, why want to show both `role` and `roles` as an
option? I think only showing `role` is good enough, as showing `roles` may make
someone confused: I did not use multi-role framework, why `roles` here?
```
{
"role: "role"
}
```
- Guangya
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54529/#review158557
-----------------------------------------------------------
On 十二月 8, 2016, 2:21 p.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54529/
> -----------------------------------------------------------
>
> (Updated 十二月 8, 2016, 2:21 p.m.)
>
>
> Review request for mesos, Benjamin Mahler, Jay Guo, and Guangya Liu.
>
>
> Bugs: MESOS-6749
> https://issues.apache.org/jira/browse/MESOS-6749
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Exposed framework roles in master and agent endpoints.
>
>
> Diffs
> -----
>
> src/master/http.cpp d410c2f725206a9879a3026adff305c7aed2e98f
> src/slave/http.cpp 580a90b5547dd26ac5d26e0fd2fc1471a382f62d
>
> Diff: https://reviews.apache.org/r/54529/diff/
>
>
> Testing
> -------
>
> `make check` (OS X), checked on various Linux flavors in internal CI.
>
>
> Thanks,
>
> Benjamin Bannier
>
>