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

Method getCapacity

src/csi/v0_volume_manager.cpp:265–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263
264
265Future<Bytes> VolumeManagerProcess::getCapacity(
266 const CSIVolume::VolumeCapability& capability,
267 const Map<string, string>& parameters)
268{
269 if (!controllerCapabilities->getCapacity) {
270 return Bytes(0);
271 }
272
273 GetCapacityRequest request;
274 *request.add_volume_capabilities() = evolve(capability);
275 *request.mutable_parameters() = parameters;
276
277 return call(CONTROLLER_SERVICE, &Client::getCapacity, std::move(request))
278 .then([](const GetCapacityResponse& response) {
279 return Bytes(response.available_capacity());
280 });
281}
282
283
284Future<VolumeInfo> VolumeManagerProcess::createVolume(

Callers

nothing calls this directly

Calls 5

BytesClass · 0.85
deferFunction · 0.85
evolveFunction · 0.70
thenMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected