def update_quotas(neutron, project_id, network_quotas):
    """
    Updates the networking quotas for a given project
    :param neutron: the Neutron client
    :param project_id: the project's ID that requires quota updates
    :param network_quotas: an object of type NetworkQuotas containing the
                           values to update
    :return:
    """
    update_body = dict()
    update_body['security_group'] = network_quotas.security_group
    update_body['security_group_rule'] = network_quotas.security_group_rule
    update_body['floatingip'] = network_quotas.floatingip
    update_body['network'] = network_quotas.network
    update_body['port'] = network_quotas.port
    update_body['router'] = network_quotas.router
    update_body['subnet'] = network_quotas.subnet

    return neutron.update_quota(project_id, {'quota': update_body})