MCPcopy Create free account
hub / github.com/apache/mesos / frameworks

Method frameworks

src/master/http.cpp:1223–1255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1221
1222
1223Future<Response> Master::Http::frameworks(
1224 const Request& request,
1225 const Option<Principal>& principal) const
1226{
1227 // TODO(greggomann): Remove this check once the `Principal` type is used in
1228 // `ReservationInfo`, `DiskInfo`, and within the master's `principals` map.
1229 // See MESOS-7202.
1230 if (principal.isSome() && principal->value.isNone()) {
1231 return Forbidden(
1232 "The request's authenticated principal contains claims, but no value "
1233 "string. The master currently requires that principals have a value");
1234 }
1235
1236 // When current master is not the leader, redirect to the leading master.
1237 if (!master->elected()) {
1238 return redirect(request);
1239 }
1240
1241 return ObjectApprovers::create(
1242 master->authorizer,
1243 principal,
1244 {VIEW_FRAMEWORK, VIEW_TASK, VIEW_EXECUTOR})
1245 .then(defer(
1246 master->self(),
1247 [this, request, principal](const Owned<ObjectApprovers>& approvers) {
1248 return deferBatchedRequest(
1249 &Master::ReadOnlyHandler::frameworks,
1250 principal,
1251 ContentType::JSON,
1252 request.url.query,
1253 approvers);
1254 }));
1255}
1256
1257
1258mesos::master::Response::GetFrameworks::Framework model(

Callers 12

TESTFunction · 0.45
TEST_PFunction · 0.45
foreachpairFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
initializeMethod · 0.45
___reregisterSlaveMethod · 0.45
foreachFunction · 0.45

Calls 9

ForbiddenClass · 0.85
redirectFunction · 0.85
deferFunction · 0.85
electedMethod · 0.80
createFunction · 0.50
isSomeMethod · 0.45
isNoneMethod · 0.45
thenMethod · 0.45
selfMethod · 0.45

Tested by 6

TESTFunction · 0.36
TEST_PFunction · 0.36
foreachpairFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36