----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/47805/#review135190 -----------------------------------------------------------
Great job! Fix these nits and we should be ready to ship. include/mesos/authorizer/acls.proto (line 271) <https://reviews.apache.org/r/47805/#comment200219> s/GetWeights/GetWeight/ since the other ACL messages are singular. Note that `get_weights` is still correct though. include/mesos/authorizer/authorizer.proto (line 85) <https://reviews.apache.org/r/47805/#comment200220> Since this action applies to a single role, and a single weight, let's do `GET_WEIGHT_WITH_ROLE` src/master/http.cpp (line 1262) <https://reviews.apache.org/r/47805/#comment200221> s/weights/weight/ since a given role only has a single weight. src/master/master.hpp (line 1058) <https://reviews.apache.org/r/47805/#comment200222> If this only takes a single role, then it should be called `authorizeGetWeight`. src/master/master.hpp (line 1068) <https://reviews.apache.org/r/47805/#comment200223> Do you need the "mesos::" here? src/master/weights_handler.cpp (line 77) <https://reviews.apache.org/r/47805/#comment200225> This is not a list of roles that have been authorized (`authorizedRoles`), but a list of authorizations of various roles, so I'd suggest renaming this `roleAuthorizations`. src/master/weights_handler.cpp (line 84) <https://reviews.apache.org/r/47805/#comment200228> Technically, this lambda should be indented to align with its fellow defer() parameter `master->self()`, or (since that looks too jagged) just indented 4 spaces in from the `.then`. Looks like our convention for the `-> Future` after is 2 spaces in from the `[=]` like you have. src/tests/dynamic_weights_tests.cpp (line 88) <https://reviews.apache.org/r/47805/#comment200230> Neat trick, but I think we're better off just specifying DEFAULT_CREDENTIAL at those call sites - Adam B On May 26, 2016, 10:45 p.m., zhou xing wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/47805/ > ----------------------------------------------------------- > > (Updated May 26, 2016, 10:45 p.m.) > > > Review request for mesos and Adam B. > > > Bugs: mesos-5335 > https://issues.apache.org/jira/browse/mesos-5335 > > > Repository: mesos > > > Description > ------- > > Add 'GET_WEIGHTS_WITH_ROLE' for the authorization of GET /weights. > > > Diffs > ----- > > docs/endpoints/master/weights.md 1e540795c5fb90c8ea957dd444b9e564e0b1ac23 > include/mesos/authorizer/acls.proto > ace9b698f46e1437911115c82324a87a0d7827fb > include/mesos/authorizer/authorizer.proto > 02d1a01d57cf34b38524f4368187878b03343537 > src/authorizer/local/authorizer.cpp > 3c7c791bde65cfcbcc4e319c9ccc487ab37d8029 > src/master/http.cpp b36b439a1fa07c52146deff2b90728f92676ade3 > src/master/master.hpp 1a875c32eddfb6d884e3d0dda7f5716ee53966c3 > src/master/weights_handler.cpp 4bc060fdb015df6658194eef92fe11b14aa15c79 > src/tests/dynamic_weights_tests.cpp > 362c59aae7b305710d5985bfec28f881be3b64b8 > > Diff: https://reviews.apache.org/r/47805/diff/ > > > Testing > ------- > > make > make check > > > Thanks, > > zhou xing > >
