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

Method getCapacity

src/csi/v1_volume_manager.cpp:266–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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