| 534 | // is a RAW disk resource with a profile but no source ID. |
| 535 | template <typename Resource> |
| 536 | static 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 |