> On March 21, 2016, 9:03 a.m., Adam B wrote: > > Good start, but you're missing a few things. Are these coming in subsequent > > patches? > > - Authentication for GET requests > > - Tests for GETs > > - Documentation updates > > Yongqiao Wang wrote: > I will add a separated patch for GET requet test.
I have posted a separated patch for authentication test of /weight GET request: https://reviews.apache.org/r/45203/ - Yongqiao ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44512/#review124512 ----------------------------------------------------------- On March 22, 2016, 10:02 a.m., Yongqiao Wang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/44512/ > ----------------------------------------------------------- > > (Updated March 22, 2016, 10:02 a.m.) > > > Review request for mesos and Adam B. > > > Bugs: MESOS-4316 > https://issues.apache.org/jira/browse/MESOS-4316 > > > Repository: mesos > > > Description > ------- > > Support to get weights info by /weights. > > > Diffs > ----- > > docs/weights.md a94251340d5193c9474b2e5e85328d62fe4edd8f > src/master/http.cpp bfea8fa811c24d37b2d7a8109728e1f40217e02f > src/master/master.hpp 124d43931a5c8a00ee0aaa604feb1761795209f2 > src/master/weights_handler.cpp c9a1b0d9adbeb1e165999cdbb4f295b24f10b18f > > Diff: https://reviews.apache.org/r/44512/diff/ > > > Testing > ------- > > make && make check. > > $ (./mesos-master.sh --ip=127.0.0.1 --work_dir=/tmp/mesos-master > --authenticate_http --credentials=/opt/credentials.json >> > /tmp/mesos-master.log 2>&1 &) > > $ curl --user framework1:secret_string1 http://localhost:5050/weights | > python -mjson.tool > [] > > $ curl --user framework1:secret_string1 --data > "[{\"weight\":1.8,\"role\":\"role1\"},{\"weight\":1.0,\"role\":\"role2\"},{\"weight\":3.4,\"role\":\"role3\"}]" > -X PUT http://127.0.0.1:5050/weights > > $ curl --user framework1:secret_string1 http://localhost:5050/weights | > python -mjson.tool > [ > { > "role": "role3", > "weight": 3.4 > }, > { > "role": "role2", > "weight": 1.0 > }, > { > "role": "role1", > "weight": 1.8 > } > ] > > > Thanks, > > Yongqiao Wang > >