def network_security_groups_list_all(**kwargs):  # pylint: disable=invalid-name
    '''
    .. versionadded:: 2019.2.0

    List all network security groups within a subscription.

    CLI Example:

    .. code-block:: bash

        salt-call azurearm_network.network_security_groups_list_all

    '''
    result = {}
    netconn = __utils__['azurearm.get_client']('network', **kwargs)
    try:
        secgroups = __utils__['azurearm.paged_object_to_list'](
            netconn.network_security_groups.list_all()
        )
        for secgroup in secgroups:
            result[secgroup['name']] = secgroup
    except CloudError as exc:
        __utils__['azurearm.log_cloud_error']('network', str(exc), **kwargs)
        result = {'error': str(exc)}

    return result