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

Method isAllocatableTo

src/v1/resources.cpp:1210–1220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1208
1209
1210bool Resources::isAllocatableTo(
1211 const Resource& resource,
1212 const std::string& role)
1213{
1214 CHECK(!resource.has_role()) << resource;
1215 CHECK(!resource.has_reservation()) << resource;
1216
1217 return isUnreserved(resource) ||
1218 role == reservationRole(resource) ||
1219 roles::isStrictSubroleOf(role, reservationRole(resource));
1220}
1221
1222
1223bool Resources::isUnreserved(const Resource& resource)

Callers

nothing calls this directly

Calls 1

isStrictSubroleOfFunction · 0.85

Tested by

no test coverage detected