<div dir="ltr">I tend to agree with Doug and Ryan's stance. If you need to pass 1000s of network-id on a single request you're probably not doing things right on the client side.<div>As Ryan suggested you can try and split the request in multiple requests with acceptable URI lenght and send them in parallel; this will add some overhead, but should work flawlessly.</div><div><br></div><div>Once tags will be implemented you will be able to leverage those to simplify your queries.</div><div><br></div><div>Regarding GET requests with plenty of parameters, this discussion came up on the mailing list a while ago [1]. A good proposal was made in that thread but never formalised as an API-wg guideline; you consider submitting a patch to the API-wg too.</div><div>Note however that Neutron won't be able to support it out of the box considering its WSGI framework completely ignores request bodies on GET requests.</div><div><br></div><div>Salvatore</div><div><br></div><div>[1] <a href="http://lists.openstack.org/pipermail/openstack-dev/2015-November/078243.html">http://lists.openstack.org/pipermail/openstack-dev/2015-November/078243.html</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 20 January 2016 at 12:33, Ryan Brown <span dir="ltr"><<a href="mailto:rybrown@redhat.com" target="_blank">rybrown@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So having a URI too long error is, in this case, likely an indication that you're requesting too many things at once.<br>
<br>
You could:<br>
1. Request 100 at a time in parallel<br>
2. Find a query that would give you all those networks & page through the reply<br>
3. Page through all the user's networks and filter client-side<br>
<br>
How is the user supposed to be assembling this giant UUID list? I'd think it would be easier for them to specify a query (e.g. "get usage data for all my production subnets" or something).<div><div class="h5"><br>
<br>
On 01/19/2016 06:59 PM, Shraddha Pandhe wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi folks,<br>
<br>
<br>
I am writing a Neutron extension which needs to take 1000s of<br>
network-ids as argument for filtering. The CURL call is as follows:<br>
<br>
curl -i -X GET<br>
'http://hostname:port/neutron/v2.0/extension_name.json?net-id=fffecbd1-0f6d-4f02-aee7-ca62094830f5&net-id=fffeee07-4f94-4cff-bf8e-a2aa7be59e2e'<br>
-H "User-Agent: python-neutronclient" -H "Accept: application/json" -H<br>
"X-Auth-Token: cccccccccccccccccccccccccccccccc"<br>
<br>
<br>
The list of net-ids can go up to 1000s. The problem is, with such large<br>
url, I get the "Request URI too long" error. I don't want to update this<br>
limit as proxies can have their own limits.<br>
<br>
What options do I have to send 1000s of network IDs?<br>
<br>
1. -d '{}' is not a recommended option for GET call and wsgi Controller<br>
drops the data part when routing the request.<br>
<br>
2. Use POST instead of GET? I will need to write the get_<resource><br>
logic inside create_resource logic for this to work. Its a hack, but<br>
complies with HTTP standard.<br>
<br>
<br>
<br></div></div><span class="">
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
</span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Ryan Brown / Senior Software Engineer, Openstack / Red Hat, Inc.</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br></div>