]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
list: Implement listAllStoragePools for test driver
authorOsier Yang <jyang@redhat.com>
Tue, 4 Sep 2012 15:16:28 +0000 (23:16 +0800)
committerOsier Yang <jyang@redhat.com>
Thu, 6 Sep 2012 14:03:59 +0000 (22:03 +0800)
src/test/test_driver.c: Implement listAllStoragePools

src/test/test_driver.c

index aa4418a151e7dfd384fbe84458bda9b895df2bfb..de9db7a3cda38ea44dca4aeab39d1bb9ae8ad27f 100644 (file)
@@ -3944,6 +3944,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)
 {
@@ -5662,6 +5678,7 @@ static virStorageDriver testStorageDriver = {
     .listPools = testStorageListPools, /* 0.5.0 */
     .numOfDefinedPools = testStorageNumDefinedPools, /* 0.5.0 */
     .listDefinedPools = testStorageListDefinedPools, /* 0.5.0 */
+    .listAllPools = testStorageListAllPools, /* 0.10.2 */
     .findPoolSources = testStorageFindPoolSources, /* 0.5.0 */
     .poolLookupByName = testStoragePoolLookupByName, /* 0.5.0 */
     .poolLookupByUUID = testStoragePoolLookupByUUID, /* 0.5.0 */