A shortcut for generating request body for configuring quota for one role.
| 115 | |
| 116 | // A shortcut for generating request body for configuring quota for one role. |
| 117 | static string createUpdateQuotaRequestBody( |
| 118 | const QuotaConfig& config, bool force = false) |
| 119 | { |
| 120 | mesos::master::Call call; |
| 121 | call.set_type(mesos::master::Call::UPDATE_QUOTA); |
| 122 | call.mutable_update_quota()->set_force(force); |
| 123 | *call.mutable_update_quota()->mutable_quota_configs()->Add() = config; |
| 124 | |
| 125 | return stringify(JSON::protobuf(call)); |
| 126 | } |
| 127 | |
| 128 | |
| 129 | static string createUpdateQuotaRequestBody( |