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

Function isBlockDisk

src/tests/storage_local_resource_provider_tests.cpp:569–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

567// persistent volume. A BLOCK disk has both profile and source ID set.
568template <typename Resource>
569static bool isBlockDisk(const Resource& r, const string& profile)
570{
571 return r.has_disk() &&
572 r.disk().has_source() &&
573 r.disk().source().type() == Resource::DiskInfo::Source::BLOCK &&
574 r.disk().source().has_vendor() &&
575 r.disk().source().vendor() == TEST_CSI_VENDOR &&
576 r.disk().source().has_id() &&
577 r.disk().source().has_profile() &&
578 r.disk().source().profile() == profile &&
579 !r.disk().has_persistence();
580}
581
582
583// Tests whether a resource is a preprovisioned volume. A preprovisioned volume

Callers

nothing calls this directly

Calls 2

typeMethod · 0.80
diskMethod · 0.45

Tested by

no test coverage detected