-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55710/#review164807
-----------------------------------------------------------




include/mesos/master/master.proto (line 310)
<https://reviews.apache.org/r/55710/#comment236599>

    `s/agent_capabilities/capabilities/`?



include/mesos/v1/master/master.proto (line 310)
<https://reviews.apache.org/r/55710/#comment236600>

    `s/agent_capabilities/capabilities/`



src/master/http.cpp (lines 380 - 384)
<https://reviews.apache.org/r/55710/#comment236604>

    I think it makes sense to add:
    ```cpp
    static void json(
        JSON::StringWriter* writer, const SlaveInfo::Capability& capability)
    {
      writer->append(SlaveInfo::Capability::Type_Name(capability.type()));
    }
    ```
    
    then let `protobuf::slave::Capabilities` keep track of
    `std::set<SlaveInfo::Capability> capabilities`.
    
    and just do:
    ```cpp
    writer->field("capabilities", slave.capabilities.capabilities);
    ```


- Michael Park


On Feb. 7, 2017, 1:59 a.m., Jay Guo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55710/
> -----------------------------------------------------------
> 
> (Updated Feb. 7, 2017, 1:59 a.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, and Guangya Liu.
> 
> 
> Bugs: MESOS-6902
>     https://issues.apache.org/jira/browse/MESOS-6902
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Master should be able to reflect agent capabilities via  `/state`(v0)
> and `getState`(v1) endpoints.
> 
> 
> Diffs
> -----
> 
>   include/mesos/master/master.proto a2228db8902c297f137b8106a7b3d2babbc35017 
>   include/mesos/v1/master/master.proto 
> cfdca7400d98233c6320eebd8784e4f51c43ebbd 
>   src/common/protobuf_utils.cpp ed84e9ae083c2dc6cd8b49d9ce8dc624a8607b8a 
>   src/master/http.cpp d881ad6dba9ba96057988db265faf0b3013c9b05 
>   src/tests/master_tests.cpp 3b4123b49ee32c902a5d2a01fcc7026da21fdd18 
> 
> Diff: https://reviews.apache.org/r/55710/diff/
> 
> 
> Testing
> -------
> 
> make check GTEST_FILTER="MasterTest.StateEndpointAgentCapabilities"
> [       OK ] MasterTest.StateEndpointAgentCapabilities (85 ms)
> [----------] 1 test from MasterTest (94 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 1 test from 1 test case ran. (122 ms total)
> 
> make check on Ubuntu 14.04
> 
> 
> Thanks,
> 
> Jay Guo
> 
>

Reply via email to