[libvirt] [PATCH 08/50] list: Implement listAllStoragePools for test driver

Osier Yang jyang at redhat.com
Thu Jul 19 16:40:39 UTC 2012


src/test/test_driver.c: Implement listAllStoragePools
---
 src/test/test_driver.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 0207dc6..8aee142 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -3941,6 +3941,22 @@ no_memory:
     return -1;
 }
 
+static int
+testStorageListAllPools(virConnectPtr conn,
+                        virStoragePoolPtr **pools,
+                        unsigned int flags)
+{
+    testConnPtr privconn = conn->privateData;
+    int ret = -1;
+
+    virCheckFlags(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ALL, -1);
+
+    testDriverLock(privconn);
+    ret = virStoragePoolList(conn, privconn->pools, pools, flags);
+    testDriverUnlock(privconn);
+
+    return ret;
+}
 
 static int testStoragePoolIsActive(virStoragePoolPtr pool)
 {
@@ -5659,6 +5675,7 @@ static virStorageDriver testStorageDriver = {
     .listPools = testStorageListPools, /* 0.5.0 */
     .numOfDefinedPools = testStorageNumDefinedPools, /* 0.5.0 */
     .listDefinedPools = testStorageListDefinedPools, /* 0.5.0 */
+    .listAllPools = testStorageListAllPools, /* 0.9.14 */
     .findPoolSources = testStorageFindPoolSources, /* 0.5.0 */
     .poolLookupByName = testStoragePoolLookupByName, /* 0.5.0 */
     .poolLookupByUUID = testStoragePoolLookupByUUID, /* 0.5.0 */
-- 
1.7.7.3




More information about the libvir-list mailing list