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
... | ... |
@@ -806,7 +806,7 @@ function get_or_create_service { |
806 | 806 |
# Gets service id |
807 | 807 |
local service_id=$( |
808 | 808 |
# Gets service id |
809 |
- openstack service show $1 -f value -c id 2>/dev/null || |
|
809 |
+ openstack service show $2 -f value -c id 2>/dev/null || |
|
810 | 810 |
# Creates new service if not exists |
811 | 811 |
openstack service create \ |
812 | 812 |
$2 \ |