|
...
|
...
|
@@ -910,16 +910,11 @@ function get_or_create_service {
|
|
910
|
910
|
# Usage: _get_or_create_endpoint_with_interface <service> <interface> <url> <region>
|
|
911
|
911
|
function _get_or_create_endpoint_with_interface {
|
|
912
|
912
|
local endpoint_id
|
|
913
|
|
- # TODO(dgonzalez): The check of the region name, as done in the grep
|
|
914
|
|
- # statement below, exists only because keystone does currently
|
|
915
|
|
- # not allow filtering the region name when listing endpoints. If keystone
|
|
916
|
|
- # gets support for this, the check for the region name can be removed.
|
|
917
|
|
- # Related bug in keystone: https://bugs.launchpad.net/keystone/+bug/1482772
|
|
918
|
913
|
endpoint_id=$(openstack endpoint list \
|
|
919
|
914
|
--service $1 \
|
|
920
|
915
|
--interface $2 \
|
|
921
|
916
|
--region $4 \
|
|
922
|
|
- -c ID -c Region -f value | grep $4 | cut -f 1 -d " ")
|
|
|
917
|
+ -c ID -f value)
|
|
923
|
918
|
if [[ -z "$endpoint_id" ]]; then
|
|
924
|
919
|
# Creates new endpoint
|
|
925
|
920
|
endpoint_id=$(openstack endpoint create \
|