-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40424/
-----------------------------------------------------------
(Updated Nov. 25, 2015, 8:38 a.m.)
Review request for mesos, Adam B, Guangya Liu, Qian Zhang, and Jian Qiu.
Bugs: MESOS-3791
https://issues.apache.org/jira/browse/MESOS-3791
Repository: mesos
Description
-------
In this ticket, we will enhance the existing
HTTP endpoint to query roles as outlined in
the dynamic role design Doc.
Diffs (updated)
-----
include/mesos/role/role.proto PRE-CREATION
src/CMakeLists.txt cfe9d26c45ba42852fd1af958549954e7b04d448
src/Makefile.am a57e46d06c8c26a32a9444be4f0e1269d775f8b0
src/master/http.cpp 6c647808a48879cbc176ffe7586c7e9b41bcf4c8
src/master/master.hpp e5e0ed01a56d869cc535687c8dbb6b99f6295b66
src/master/role_handler.cpp PRE-CREATION
Diff: https://reviews.apache.org/r/40424/diff/
Testing
-------
Test results:
$ curl http://127.0.0.1:5050/roles
{"status":[{"infos":{"name":"*","weight":1.0}},{"infos":{"name":"aa","weight":1.0}},{"framework_id":[{"value":"f1e1af59-9468-4f
f0-8fb4-96825d86b6d7-0142"}],"infos":{"name":"bb","weight":1.0},"resources":[{"name":"cpus","role":"bb","scalar":{"value":5.0},
"type":"SCALAR"},{"name":"mem","role":"bb","scalar":{"value":640.0},"type":"SCALAR"}]},{"infos":{"name":"cc","weight":1.0}}]}
$ curl http://127.0.0.1:5050/roles/aa
{"status":[{"framework_id":[{"value":"f1e1af59-9468-4ff0-8fb4-96825d86b6d7-0305"}],"infos":{"name":"bb","weight":1.0},"resource
s":[{"name":"cpus","role":"bb","scalar":{"value":5.0},"type":"SCALAR"},{"name":"mem","role":"bb","scalar":{"value":640.0},"type
":"SCALAR"}]}]}
$ curl http://127.0.0.1:5050/roles/dd
The specified role [dd] does not exist!
Thanks,
Yong Qiao Wang