> On June 21, 2016, 11:10 p.m., Vinod Kone wrote: > > src/slave/http.cpp, line 660 > > <https://reviews.apache.org/r/49015/diff/2/?file=1426268#file1426268line660> > > > > hmm. looks like this is not reusing any code from `_containers()`. can > > you extract the common code from `_containers` (e.g., authz) into > > `__containers()` and re-use that here. similar to what we did with > > `getTasks()`. > > Jay Guo wrote: > I thought of reusing common logic however returned value (JSON for > `_containers` and v1Response for `getContainers`) is assembled along with the > workflow. Unless we define a common data structure and evolve it according to > request type (v1 call or containers endpoint). Do you think it makes sense to > jsonify v1response for `_containers`?
And I think it's better to migrate containers endpoint to leverage jsonify first and see how we could reuse the logic. I'll investigate it. - Jay ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/49015/#review138955 ----------------------------------------------------------- On June 22, 2016, 8:02 a.m., Jay Guo wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/49015/ > ----------------------------------------------------------- > > (Updated June 22, 2016, 8:02 a.m.) > > > Review request for mesos, Anand Mazumdar, haosdent huang, and Vinod Kone. > > > Bugs: MESOS-5518 > https://issues.apache.org/jira/browse/MESOS-5518 > > > Repository: mesos > > > Description > ------- > > Implemented GET_CONTAINERS Call in v1 Agent API. > > > Diffs > ----- > > include/mesos/agent/agent.proto 8f5267367857f45dc5c9ab064b183c9c8f1703e9 > include/mesos/v1/agent/agent.proto 91fb55db004733c3c5bb42acc32f1afedbc208bb > src/slave/http.cpp 22b5930a7af336a749af4b6b50254f60433ecea5 > src/slave/slave.hpp 58ff2bfac6918d989ab36b67cf6ba2f3657c8356 > src/tests/api_tests.cpp bf1a294f1fc3c8659c31115beee3876d4d0a45e2 > > Diff: https://reviews.apache.org/r/49015/diff/ > > > Testing > ------- > > make check on Ubuntu 14.04 & OSX > > > Thanks, > > Jay Guo > >