Search for service by type

When you get or create service it first checks to see if an existing
service matching these parameters exists. The definition of existing is
having a service with the same name, however name is not a unique field.
Sahara for example creates two services, one with data-processing, one
with data_processing with the same sahara name.

Search for existing services by service type, not by service name.

Change-Id: I6148e2254aa3968039b0e7c178e7cabc53b6be68
This commit is contained in:
Jamie Lennox 2015-07-02 17:39:07 +10:00
parent 52844a11dd
commit aedb8b97f6

View File

@ -806,7 +806,7 @@ function get_or_create_service {
# Gets service id
local service_id=$(
# Gets service id
openstack service show $1 -f value -c id 2>/dev/null ||
openstack service show $2 -f value -c id 2>/dev/null ||
# Creates new service if not exists
openstack service create \
$2 \