Re: [PATCH 4/7] list: Implement listAllNetworks for network driver

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

 



On 09/04/2012 11:55 AM, Osier Yang wrote:
> src/network/bridge_driver.c: Implement listAllNetworks.
> ---
>  src/network/bridge_driver.c |   17 +++++++++++++++++
>  1 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
> index 53eebed..73ad43f 100644
> --- a/src/network/bridge_driver.c
> +++ b/src/network/bridge_driver.c
> @@ -2263,6 +2263,22 @@ static int networkListDefinedNetworks(virConnectPtr conn, char **const names, in
>      return -1;
>  }
>  
> +static int
> +networkListAllNetworks(virConnectPtr conn,
> +                       virNetworkPtr **nets,
> +                       unsigned int flags)
> +{
> +    struct network_driver *driver = conn->networkPrivateData;
> +    int ret = -1;
> +
> +    virCheckFlags(VIR_CONNECT_LIST_NETWORKS_FILTERS_ALL, -1);
> +
> +    networkDriverLock(driver);
> +    ret = virNetworkList(conn, driver->networks, nets, flags);
> +    networkDriverUnlock(driver);
> +
> +    return ret;
> +}
>  
>  static int networkIsActive(virNetworkPtr net)
>  {
> @@ -2793,6 +2809,7 @@ static virNetworkDriver networkDriver = {
>      .listNetworks = networkListNetworks, /* 0.2.0 */
>      .numOfDefinedNetworks = networkNumDefinedNetworks, /* 0.2.0 */
>      .listDefinedNetworks = networkListDefinedNetworks, /* 0.2.0 */
> +    .listAllNetworks = networkListAllNetworks, /* 0.10.0 */

version number again. Otherwise ACK.


>      .networkLookupByUUID = networkLookupByUUID, /* 0.2.0 */
>      .networkLookupByName = networkLookupByName, /* 0.2.0 */
>      .networkCreateXML = networkCreate, /* 0.2.0 */

--
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]