Looking in to /usr/lib/python2.7/dist-packages/nova/api/openstack/compute/servers.py gave some insights and found that the API can take a parameter 'networks' as shown below:<br><br>curl  -X 'POST' <a href="http://1.1.1.1:8774/v2/4a8c3029619e4afbaa39f85fcd121003/servers">http://1.1.1.1:8774/v2/4a8c3029619e4afbaa39f85fcd121003/servers</a> -d '{ "server": { "flavorRef": "6", "imageRef": "dd13a38c-3e1f-49f1-afbe-c6f62cd46ffb", "name": "test4", "<b>networks</b>": [{"<b>uuid</b>": "02016649-f9a6-4623-b82f-f5a2c95d2b7a"}, {"<b>uuid</b>": "4784ed46-7f09-4e57-b279-e65529442bd5"}] } }' -H 'Accept: application/json' -H "X-Auth-Token: 7738bc36849f4b35bd4623e50b249ff3" -H 'Content-type: application/json'<br>
<br>This associated the desired networks in the order specified, exactly what I wanted.<br><br>Wish this has been documented. I'll file a documentation bug.<br><br>Regards,<br>Balu<br><br><br><div class="gmail_quote">
On Thu, Mar 21, 2013 at 9:00 PM, Balamurugan V G <span dir="ltr"><<a href="mailto:balamuruganvg@gmail.com" target="_blank">balamuruganvg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br><br>I have a Folsom 2012.2 with Quantum and trying to create the instances using the REST API as below:<br><br>curl  -X 'POST' <a href="http://1.1.1.1:8774/v2/4a8c3029619e4afbaa39f85fcd121003/servers" target="_blank">http://1.1.1.1:8774/v2/4a8c3029619e4afbaa39f85fcd121003/servers</a> -d '{ "server": { "flavorRef": "6", "imageRef": "dd13a38c-3e1f-49f1-afbe-c6f62cd46ffb", "name": "test" } }' -H 'Accept: application/json' -H "X-Auth-Token: 1b5f64418cdf4a99a79aada03621cfa9" -H 'Content-type: application/json'<br>

<br>But this assigns the instance to all networks available for the tenant. So if I have multiple networks for a tenant, how do I assign the instance to specific networks. I am referring to the documentation at <a href="http://docs.openstack.org/api/openstack-compute/2/content/CreateServers.html" target="_blank">http://docs.openstack.org/api/openstack-compute/2/content/CreateServers.html</a> but do not see anything for this. <br>

<br>I can achieve this using CLI but I need to use the REST API to achieve the same.<br><br>Is this not implemented in Folsom? If so, would it be implemented in Grizzly?<br><br>Thanks,<br>Balu<br>
</blockquote></div><br>