'List network security groups.
:param resource_group: List security groups in a specific resource
group.
:type resource_group: ``str``
:return: A list of network security groups.
:rtype: ``list`` of :class:`.AzureNetworkSecurityGroup`'

def ex_list_network_security_groups(self, resource_group):

    action = ('/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkSecurityGroups' % (self.subscription_id, resource_group))
    r = self.connection.request(action, params={'api-version': '2015-06-15'})
    return [AzureNetworkSecurityGroup(net['id'], net['name'], net['location'], net['properties']) for net in r.object['value']]
