.. versionadded:: 2019.2.0

    List all virtual networks within a subscription.

    CLI Example:

    .. code-block:: bash

        salt-call azurearm_network.virtual_networks_list_all

def virtual_networks_list_all(**kwargs):
    '''
    .. versionadded:: 2019.2.0

    List all virtual networks within a subscription.

    CLI Example:

    .. code-block:: bash

        salt-call azurearm_network.virtual_networks_list_all

    '''
    result = {}
    netconn = __utils__['azurearm.get_client']('network', **kwargs)
    try:
        vnets = __utils__['azurearm.paged_object_to_list'](netconn.virtual_networks.list_all())

        for vnet in vnets:
            result[vnet['name']] = vnet
    except CloudError as exc:
        __utils__['azurearm.log_cloud_error']('network', str(exc), **kwargs)
        result = {'error': str(exc)}

    return result