<p dir="ltr">On Mar 20, 2013 7:54 AM, "Wainer, Gabriel (Brazil R&D-ECL)" <<a href="mailto:gabriel.wainer@hp.com">gabriel.wainer@hp.com</a>> wrote:<br>
><br>
> Hello, I'm tinkering with keystone regions and having two endpoints for a service, I would like to choose one of them by its region. For example when running nova boot I want to choose the endpoint from “regionX”  set in keystone to be used.<br>

><br>
>  <br>
><br>
> I’m trying with devstack, and when running nova boot, the result is ambiguous endpoints as expected:<br>
><br>
>  <br>
><br>
> stack@wubuntu:/opt/stack/horizon/openstack_dashboard$ nova boot region2vm --image 2fc0af8a-3beb-438f-8816-0fa683f7db20 --flavor 1 <br>
><br>
> Found more than one valid endpoint. Use a more restrictive filter<br>
><br>
>  <br>
><br>
> ERROR: AmbiguousEndpoints: [{u'adminURL': u'<a href="http://172.16.101.239:8774/v2/be431c86da3a4417b628fcde4fa15086">http://172.16.101.239:8774/v2/be431c86da3a4417b628fcde4fa15086</a>', u'region': u'RegionOne', u'id': u'4bebd32c639845199028c794d30eee06', 'serviceName': u'nova', u'internalURL': u'<a href="http://172.16.101.239:8774/v2/be431c86da3a4417b628fcde4fa15086">http://172.16.101.239:8774/v2/be431c86da3a4417b628fcde4fa15086</a>', u'publicURL': u'<a href="http://172.16.101.239:8774/v2/be431c86da3a4417b628fcde4fa15086'">http://172.16.101.239:8774/v2/be431c86da3a4417b628fcde4fa15086'</a>}, {u'adminURL': u'<a href="http://172.16.103.231:8774/v2/admin">http://172.16.103.231:8774/v2/admin</a>', u'region': u'RegionTwo', u'id': u'3234d759d4054067b78c456adc658c2f', 'serviceName': u'nova', u'internalURL': u'<a href="http://172.16.103.231:8774/v2/admin">http://172.16.103.231:8774/v2/admin</a>', u'publicURL': u'<a href="http://172.16.103.231:8774/v2/admin'">http://172.16.103.231:8774/v2/admin'</a>}]<br>

><br>
>  <br>
><br>
> We can see the two endpoints for the service. But if I try to select the endpoint by region, the argument is not recognized:<br>
><br>
>  <br>
><br>
> stack@wubuntu:/opt/stack/horizon/openstack_dashboard$ nova boot region2vm --image 2fc0af8a-3beb-438f-8816-0fa683f7db20 --flavor 1 --os-region-name RegionTwo<br>
><br>
> usage: nova [--version] [--debug] [--os-cache] [--timings]<br>
><br>
>             [--os-username <auth-user-name>] [--os-password <auth-password>]<br>
><br>
>             [--os-tenant-name <auth-tenant-name>] [--os-auth-url <auth-url>]<br>
><br>
>             [--os-region-name <region-name>] [--os-auth-system <auth-system>]<br>
><br>
>             [--service-type <service-type>] [--service-name <service-name>]<br>
><br>
>             [--volume-service-name <volume-service-name>]<br>
><br>
>             [--endpoint-type <endpoint-type>]<br>
><br>
>             [--os-compute-api-version <compute-api-ver>] [--insecure]<br>
><br>
>             [--bypass-url <bypass-url>]<br>
><br>
>             <subcommand> ...<br>
><br>
> error: unrecognized arguments: --os-region-name RegionTwo<br>
><br>
> Try 'nova help ' for more information.<br>
><br>
>  <br>
><br>
>  <br>
><br>
> So, can I use the --os-region-name as some sort of endpoint selector?<br>
><br>
>  <br>
><br>
>  <br>
><br>
> Any help is appreciated,<br>
><br>
> Thanks in advance,<br>
><br>
>  <br>
><br>
> Gabriel Wainer.<br>
><br>
>  <br>
><br>
>  <br>
><br>
><br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
></p>
<p dir="ltr">Gabriel,</p>
<p dir="ltr">That should work as long as you put the '--os-region-name' before 'boot'. </p>
<p dir="ltr">Nate</p>