| 567 | // persistent volume. A BLOCK disk has both profile and source ID set. |
| 568 | template <typename Resource> |
| 569 | static 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 |