Try<Owned<VolumeManager>> VolumeManager::create( const http::URL& agentUrl, const string& rootDir, const CSIPluginInfo& info, const hashset<Service>& services, const string& containerPrefix, const Option<string>& authToken, Metrics* metrics) { if (services.empty()) { return Error( "Must specify at least one service for CSI plugin type '" + info.type() + "' and name '" + info.name() + "'"); } return new v0::VolumeManager( agentUrl, rootDir, info, services, containerPrefix, authToken, Runtime(), metrics); }
bool operator==(const CSIPluginInfo& left, const CSIPluginInfo& right) { // Order of containers is important. if (left.containers_size() != right.containers_size()) { return false; } for (int i = 0; i < left.containers_size(); i++) { if (left.containers(i) != right.containers(i)) { return false; } } return left.type() == right.type() && left.name() == right.name(); }