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

Function createUpdateQuotaRequestBody

src/tests/master_quota_tests.cpp:117–126  ·  view source on GitHub ↗

A shortcut for generating request body for configuring quota for one role.

Source from the content-addressed store, hash-verified

115
116// A shortcut for generating request body for configuring quota for one role.
117static 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
129static string createUpdateQuotaRequestBody(

Callers 1

TEST_FFunction · 0.85

Calls 2

protobufFunction · 0.85
stringifyFunction · 0.50

Tested by

no test coverage detected