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

Function getReservationRole

src/master/authorization.cpp:116–123  ·  view source on GitHub ↗

Returns effective reservation role of resource for the purpose of authorizing an operation; that is, the the role of the most refined reservation if the resource is reserved. NOTE: If the resource is not reserved, the default role '*' is returned; this is needed to handle authorization of invalid operations and could be avoided if we were able to guarantee that authorization Objects for invalid o

Source from the content-addressed store, hash-verified

114// NOTE: If the resource is not in the post-reservation-refinement
115// format, this function will crash the program.
116string getReservationRole(const Resource& resource)
117{
118 CHECK(!resource.has_role()) << resource;
119 CHECK(!resource.has_reservation()) << resource;
120
121 return Resources::isReserved(resource)
122 ? Resources::reservationRole(resource) : "*";
123}
124
125
126void ActionObject::pushUnreserveActionObjects(

Callers 5

foreachFunction · 0.85
growVolumeMethod · 0.85
shrinkVolumeMethod · 0.85
createDiskMethod · 0.85
destroyDiskMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected