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

Method GetCapacity

src/examples/test_csi_plugin.cpp:740–758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

738
739
740Status TestCSIPlugin::GetCapacity(
741 ServerContext* context,
742 const csi::v0::GetCapacityRequest* request,
743 csi::v0::GetCapacityResponse* response)
744{
745 LOG(INFO) << request->GetDescriptor()->name() << " '" << *request << "'";
746
747 Try<Bytes, StatusError> result = getCapacity(
748 mesos::csi::v0::devolve(request->volume_capabilities()),
749 request->parameters());
750
751 if (result.isError()) {
752 return result.error().status;
753 }
754
755 response->set_available_capacity(result->bytes());
756
757 return Status::OK;
758}
759
760
761Status TestCSIPlugin::ControllerGetCapabilities(

Callers

nothing calls this directly

Calls 6

errorMethod · 0.65
devolveFunction · 0.50
nameMethod · 0.45
parametersMethod · 0.45
isErrorMethod · 0.45
bytesMethod · 0.45

Tested by

no test coverage detected