Apache Mesos
Namespaces | Classes | Functions
mesos::internal::master::quota Namespace Reference

Namespaces

 validation
 

Classes

class  RemoveQuota
 Removes quota for a role. More...
 
class  UpdateQuota
 Sets quota for a role. More...
 

Functions

mesos::quota::QuotaInfo createQuotaInfo (const mesos::quota::QuotaRequest &request)
 Creates a QuotaInfo protobuf from the QuotaRequest protobuf. More...
 
Option< Errorvalidate (const mesos::quota::QuotaRequest &request)
 A QuotaRequest is valid if the following conditions are met: More...
 

Function Documentation

mesos::quota::QuotaInfo mesos::internal::master::quota::createQuotaInfo ( const mesos::quota::QuotaRequest &  request)

Creates a QuotaInfo protobuf from the QuotaRequest protobuf.

Option<Error> mesos::internal::master::quota::validate ( const mesos::quota::QuotaRequest &  request)

A QuotaRequest is valid if the following conditions are met:

(1) The request has a valid non-"*" role.

(2) The guarantee and limit contain only valid non-revocable scalar resources without reservations, disk info, and only 1 entry for each resource name.

(3) If both guarantee and limit are set for a particular resource, then guarantee <= limit for that resource.

TODO(bmahler): Remove the old validation function in favor of this one. This requires some new logic outside of this function to prevent users from setting limit explicitly in the old API and setting the limit implicitly for users of the old API before calling into this.