|
...
|
...
|
@@ -852,13 +852,18 @@ function get_or_create_service {
|
|
852
|
852
|
# Usage: _get_or_create_endpoint_with_interface <service> <interface> <url> <region>
|
|
853
|
853
|
function _get_or_create_endpoint_with_interface {
|
|
854
|
854
|
local endpoint_id
|
|
|
855
|
+ # TODO(dgonzalez): The check of the region name, as done in the grep
|
|
|
856
|
+ # statement below, exists only because keystone does currently
|
|
|
857
|
+ # not allow filtering the region name when listing endpoints. If keystone
|
|
|
858
|
+ # gets support for this, the check for the region name can be removed.
|
|
|
859
|
+ # Related bug in keystone: https://bugs.launchpad.net/keystone/+bug/1482772
|
|
855
|
860
|
endpoint_id=$(openstack endpoint list \
|
|
856
|
861
|
--os-url $KEYSTONE_SERVICE_URI_V3 \
|
|
857
|
862
|
--os-identity-api-version=3 \
|
|
858
|
863
|
--service $1 \
|
|
859
|
864
|
--interface $2 \
|
|
860
|
865
|
--region $4 \
|
|
861
|
|
- -c ID -f value)
|
|
|
866
|
+ -c ID -c Region -f value | grep $4 | cut -f 1 -d " ")
|
|
862
|
867
|
if [[ -z "$endpoint_id" ]]; then
|
|
863
|
868
|
# Creates new endpoint
|
|
864
|
869
|
endpoint_id=$(openstack endpoint create \
|