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

Function isStoragePool

src/tests/storage_local_resource_provider_tests.cpp:536–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534// is a RAW disk resource with a profile but no source ID.
535template <typename Resource>
536static bool isStoragePool(const Resource& r, const string& profile)
537{
538 return r.has_disk() &&
539 r.disk().has_source() &&
540 r.disk().source().type() == Resource::DiskInfo::Source::RAW &&
541 r.disk().source().has_vendor() &&
542 r.disk().source().vendor() == TEST_CSI_VENDOR &&
543 !r.disk().source().has_id() &&
544 r.disk().source().has_profile() &&
545 r.disk().source().profile() == profile;
546}
547
548
549// Tests whether a resource is a MOUNT disk of a given profile but not a

Callers 2

foreachFunction · 0.85
TEST_PFunction · 0.85

Calls 2

typeMethod · 0.80
diskMethod · 0.45

Tested by

no test coverage detected