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

Method create

src/slave/csi_server.cpp:502–529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500
501
502Try<Owned<CSIServer>> CSIServer::create(
503 const Flags& flags,
504 const process::http::URL& agentUrl,
505 SecretGenerator* secretGenerator,
506 SecretResolver* secretResolver)
507{
508 if (!strings::contains(flags.isolation, "volume/csi")) {
509 return Error("Missing required isolator 'volume/csi'");
510 }
511
512 if (flags.csi_plugin_config_dir.isNone() ||
513 flags.csi_plugin_config_dir->empty()) {
514 return Error("Missing required '--csi_plugin_config_dir' flag");
515 }
516
517 if (!os::exists(flags.csi_plugin_config_dir.get())) {
518 return Error(
519 "The CSI plugin configuration directory '" +
520 flags.csi_plugin_config_dir.get() + "' does not exist");
521 }
522
523 return new CSIServer(
524 agentUrl,
525 slave::paths::getCsiRootDir(flags.work_dir),
526 flags.csi_plugin_config_dir.get(),
527 secretGenerator,
528 secretResolver);
529}
530
531
532Future<Nothing> CSIServer::start(const SlaveID& agentId)

Callers

nothing calls this directly

Calls 7

getCsiRootDirFunction · 0.85
containsFunction · 0.50
ErrorFunction · 0.50
existsFunction · 0.50
isNoneMethod · 0.45
emptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected