simplify endpoints used in devstack
The proliferation of internal/admin endpoints is mostly legacy and based on some specific deployment patterns. These are not used by everyone, and for the devstack case aren't really that useful. We should simplify our service catalog down to the minimum we need for development. Change-Id: Ided7a65c81b3a0b56f0184847fc82e17c29a771e
This commit is contained in:
parent
6bd3561e9d
commit
11eb2017ef
@ -992,7 +992,7 @@ function _get_or_create_endpoint_with_interface {
|
||||
}
|
||||
|
||||
# Gets or creates endpoint
|
||||
# Usage: get_or_create_endpoint <service> <region> <publicurl> <adminurl> <internalurl>
|
||||
# Usage: get_or_create_endpoint <service> <region> <publicurl> [adminurl] [internalurl]
|
||||
function get_or_create_endpoint {
|
||||
# NOTE(jamielennnox): when converting to v3 endpoint creation we go from
|
||||
# creating one endpoint with multiple urls to multiple endpoints each with
|
||||
@ -1004,9 +1004,13 @@ function get_or_create_endpoint {
|
||||
# endpoints they need.
|
||||
local public_id
|
||||
public_id=$(_get_or_create_endpoint_with_interface $1 public $3 $2)
|
||||
# only create admin/internal urls if provided content for them
|
||||
if [[ -n "$4" ]]; then
|
||||
_get_or_create_endpoint_with_interface $1 admin $4 $2
|
||||
fi
|
||||
if [[ -n "$5" ]]; then
|
||||
_get_or_create_endpoint_with_interface $1 internal $5 $2
|
||||
|
||||
fi
|
||||
# return the public id to indicate success, and this is the endpoint most likely wanted
|
||||
echo $public_id
|
||||
}
|
||||
|
@ -395,24 +395,18 @@ function create_cinder_accounts {
|
||||
get_or_create_endpoint \
|
||||
"volume" \
|
||||
"$REGION_NAME" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(project_id)s" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(project_id)s" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(project_id)s"
|
||||
|
||||
get_or_create_service "cinderv2" "volumev2" "Cinder Volume Service V2"
|
||||
get_or_create_endpoint \
|
||||
"volumev2" \
|
||||
"$REGION_NAME" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v2/\$(project_id)s" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v2/\$(project_id)s" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v2/\$(project_id)s"
|
||||
|
||||
get_or_create_service "cinderv3" "volumev3" "Cinder Volume Service V3"
|
||||
get_or_create_endpoint \
|
||||
"volumev3" \
|
||||
"$REGION_NAME" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v3/\$(project_id)s" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v3/\$(project_id)s" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v3/\$(project_id)s"
|
||||
|
||||
configure_cinder_internal_tenant
|
||||
|
@ -314,8 +314,6 @@ function create_glance_accounts {
|
||||
get_or_create_endpoint \
|
||||
"image" \
|
||||
"$REGION_NAME" \
|
||||
"$GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT" \
|
||||
"$GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT" \
|
||||
"$GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT"
|
||||
|
||||
# Note(frickler): Crude workaround for https://bugs.launchpad.net/glance-store/+bug/1620999
|
||||
@ -331,8 +329,6 @@ function create_glance_accounts {
|
||||
|
||||
get_or_create_endpoint "artifact" \
|
||||
"$REGION_NAME" \
|
||||
"$GLANCE_SERVICE_PROTOCOL://$GLANCE_GLARE_HOSTPORT" \
|
||||
"$GLANCE_SERVICE_PROTOCOL://$GLANCE_GLARE_HOSTPORT" \
|
||||
"$GLANCE_SERVICE_PROTOCOL://$GLANCE_GLARE_HOSTPORT"
|
||||
fi
|
||||
}
|
||||
|
@ -330,8 +330,6 @@ function create_neutron_accounts_new {
|
||||
"network" "Neutron Service")
|
||||
get_or_create_endpoint $neutron_service \
|
||||
"$REGION_NAME" \
|
||||
"$NEUTRON_SERVICE_PROTOCOL://$NEUTRON_SERVICE_HOST:$NEUTRON_SERVICE_PORT/" \
|
||||
"$NEUTRON_SERVICE_PROTOCOL://$NEUTRON_SERVICE_HOST:$NEUTRON_SERVICE_PORT/" \
|
||||
"$NEUTRON_SERVICE_PROTOCOL://$NEUTRON_SERVICE_HOST:$NEUTRON_SERVICE_PORT/"
|
||||
fi
|
||||
}
|
||||
|
@ -410,8 +410,6 @@ function create_mutnauq_accounts {
|
||||
get_or_create_endpoint \
|
||||
"network" \
|
||||
"$REGION_NAME" \
|
||||
"$Q_PROTOCOL://$SERVICE_HOST:$Q_PORT/" \
|
||||
"$Q_PROTOCOL://$SERVICE_HOST:$Q_PORT/" \
|
||||
"$Q_PROTOCOL://$SERVICE_HOST:$Q_PORT/"
|
||||
fi
|
||||
}
|
||||
|
4
lib/nova
4
lib/nova
@ -407,16 +407,12 @@ function create_nova_accounts {
|
||||
get_or_create_endpoint \
|
||||
"compute_legacy" \
|
||||
"$REGION_NAME" \
|
||||
"$nova_api_url/v2/\$(project_id)s" \
|
||||
"$nova_api_url/v2/\$(project_id)s" \
|
||||
"$nova_api_url/v2/\$(project_id)s"
|
||||
|
||||
get_or_create_service "nova" "compute" "Nova Compute Service"
|
||||
get_or_create_endpoint \
|
||||
"compute" \
|
||||
"$REGION_NAME" \
|
||||
"$nova_api_url/v2.1" \
|
||||
"$nova_api_url/v2.1" \
|
||||
"$nova_api_url/v2.1"
|
||||
fi
|
||||
|
||||
|
@ -132,8 +132,6 @@ function create_placement_accounts {
|
||||
get_or_create_endpoint \
|
||||
"placement" \
|
||||
"$REGION_NAME" \
|
||||
"$placement_api_url" \
|
||||
"$placement_api_url" \
|
||||
"$placement_api_url"
|
||||
}
|
||||
|
||||
|
@ -636,8 +636,7 @@ function create_swift_accounts {
|
||||
"object-store" \
|
||||
"$REGION_NAME" \
|
||||
"$SWIFT_SERVICE_PROTOCOL://$SERVICE_HOST:$SWIFT_DEFAULT_BIND_PORT/v1/AUTH_\$(project_id)s" \
|
||||
"$SWIFT_SERVICE_PROTOCOL://$SERVICE_HOST:$SWIFT_DEFAULT_BIND_PORT" \
|
||||
"$SWIFT_SERVICE_PROTOCOL://$SERVICE_HOST:$SWIFT_DEFAULT_BIND_PORT/v1/AUTH_\$(project_id)s"
|
||||
"$SWIFT_SERVICE_PROTOCOL://$SERVICE_HOST:$SWIFT_DEFAULT_BIND_PORT"
|
||||
|
||||
local swift_project_test1
|
||||
swift_project_test1=$(get_or_create_project swiftprojecttest1 default)
|
||||
|
Loading…
Reference in New Issue
Block a user