[openstack-dev] [neutron][api] GET call with huge argument list

Shraddha Pandhe spandhe.openstack at gmail.com
Wed Jan 20 00:36:21 UTC 2016


Hi Doug,

What would be the reason for such timeout? Based on my current test, it
doesn't take more than few hundreds of milliseconds to return.

What I am trying to do is,

I have a Neutron extension that returns IP usage per subnet per network. It
needs to support:

1. Return usage info for all networks (default if no filters specified)
2. Return usage info for one network id
3. Return usage info for several network ids. This can go up to 1000
network ids.

I have added similar comments to the existing implementation currently
being reviewed: https://review.openstack.org/#/c/212955/16




On Tue, Jan 19, 2016 at 4:14 PM, Doug Wiegley <dougwig at parksidesoftware.com>
wrote:

> It would have to be a POST, but even that will start to have timeout
> issues. An API which requires that kind of input is kind of a bad idea.
> Perhaps you could describe what you’re trying to do?
>
> Thanks,
> doug
>
> On Jan 19, 2016, at 4:59 PM, Shraddha Pandhe <spandhe.openstack at gmail.com>
> wrote:
>
> Hi folks,
>
>
> I am writing a Neutron extension which needs to take 1000s of network-ids
> as argument for filtering. The CURL call is as follows:
>
> curl -i -X GET '
> http://hostname:port/neutron/v2.0/extension_name.json?net-id=fffecbd1-0f6d-4f02-aee7-ca62094830f5&net-id=fffeee07-4f94-4cff-bf8e-a2aa7be59e2e'
> -H "User-Agent: python-neutronclient" -H "Accept: application/json" -H
> "X-Auth-Token: cccccccccccccccccccccccccccccccc"
>
>
> The list of net-ids can go up to 1000s. The problem is, with such large
> url, I get the "Request URI too long" error. I don't want to update this
> limit as proxies can have their own limits.
>
> What options do I have to send 1000s of network IDs?
>
> 1. -d '{}' is not a recommended option for GET call and wsgi Controller
> drops the data part when routing the request.
>
> 2. Use POST instead of GET? I will need to write the get_<resource> logic
> inside create_resource logic for this to work. Its a hack, but complies
> with HTTP standard.
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160119/0fb6d5ec/attachment.html>


More information about the OpenStack-dev mailing list