----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32150/#review82045 -----------------------------------------------------------
Ship it! src/master/master.cpp <https://reviews.apache.org/r/32150/#comment132680> Why use a tmp variable here? Could you combine with validation below: ``` Option<Error> error = validation::operation::validate( operation.reserve(), framework->info.role(), (framework->info.has_principal() ? framework->info.principal() : Option<string>::none())); ``` src/master/validation.cpp <https://reviews.apache.org/r/32150/#comment132682> This fits into the above line? src/master/validation.cpp <https://reviews.apache.org/r/32150/#comment132683> No snake_case please:) Also, instead of using a boolean, can you pass an Option<string> principal as you did in `validate(reserve)`? src/tests/master_validation_tests.cpp <https://reviews.apache.org/r/32150/#comment132685> One extra blank line here please. - Jie Yu On April 28, 2015, 10:43 p.m., Michael Park wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/32150/ > ----------------------------------------------------------- > > (Updated April 28, 2015, 10:43 p.m.) > > > Review request for mesos, Alexander Rukletsov, Ben Mahler, and Jie Yu. > > > Bugs: MESOS-2139 > https://issues.apache.org/jira/browse/MESOS-2139 > > > Repository: mesos > > > Description > ------- > > Handled reservation operations in `Master::_accept`. > > Added `validate` functions in `src/master/validation.{hpp,cpp}`. > > > Diffs > ----- > > src/master/master.cpp d42a6f321c88ec5d0418264bdda39d083ff54a7e > src/master/validation.hpp 2d7416c053f82d6316542fa9c35b0e7bc605abec > src/master/validation.cpp dc25995bf57397d42fcde458414f0402d19bf792 > src/tests/master_validation_tests.cpp > 4f2ad58c3ae0f611fb476c4d91a37dd6a5541395 > > Diff: https://reviews.apache.org/r/32150/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Michael Park > >
