Re: [PATCH 24/49] list: Implement listAllNetworks for test driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/20/2012 10:25 AM, Osier Yang wrote:
> src/test/test_driver.c: Implement listAllNetworks.
> ---
>  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 9b528f2..ed8cd47 100644
> --- a/src/test/test_driver.c
> +++ b/src/test/test_driver.c
> @@ -3037,6 +3037,22 @@ no_memory:
>      return -1;
>  }
>  
> +static int
> +testNetworkListAllNetworks(virConnectPtr conn,
> +                           virNetworkPtr **nets,
> +                           unsigned int flags)
> +{
> +    testConnPtr privconn = conn->privateData;
> +    int ret = -1;

Same comment as the bridge driver about initializing *nets, otherwise ACK.

> +
> +    virCheckFlags(VIR_CONNECT_LIST_NETWORKS_FILTERS_ALL, -1);
> +
> +    testDriverLock(privconn);
> +    ret = virNetworkList(conn, privconn->networks, nets, flags);
> +    testDriverUnlock(privconn);
> +
> +    return ret;
> +}
>  
>  static int testNetworkIsActive(virNetworkPtr net)
>  {
> @@ -5696,6 +5712,7 @@ static virNetworkDriver testNetworkDriver = {
>      .listNetworks = testListNetworks, /* 0.3.2 */
>      .numOfDefinedNetworks = testNumDefinedNetworks, /* 0.3.2 */
>      .listDefinedNetworks = testListDefinedNetworks, /* 0.3.2 */
> +    .listAllNetworks = testNetworkListAllNetworks, /* 0.9.14 */
>      .networkLookupByUUID = testLookupNetworkByUUID, /* 0.3.2 */
>      .networkLookupByName = testLookupNetworkByName, /* 0.3.2 */
>      .networkCreateXML = testNetworkCreate, /* 0.3.2 */

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]