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

Method isAllocatableTo

src/common/resources.cpp:1190–1200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1188
1189
1190bool Resources::isAllocatableTo(
1191 const Resource& resource,
1192 const std::string& role)
1193{
1194 CHECK(!resource.has_role()) << resource;
1195 CHECK(!resource.has_reservation()) << resource;
1196
1197 return isUnreserved(resource) ||
1198 role == reservationRole(resource) ||
1199 roles::isStrictSubroleOf(role, reservationRole(resource));
1200}
1201
1202
1203bool Resources::isUnreserved(const Resource& resource)

Callers

nothing calls this directly

Calls 1

isStrictSubroleOfFunction · 0.85

Tested by

no test coverage detected