Skip to content

Instantly share code, notes, and snippets.

@drnic
Forked from kushmerick/gist:5820810
Last active December 18, 2015 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drnic/5824112 to your computer and use it in GitHub Desktop.
Save drnic/5824112 to your computer and use it in GitHub Desktop.
diff --git a/jobs/mysql_gateway/templates/mysql_gateway.yml.erb b/jobs/mysql_gateway/templates/mysql_gateway.yml.erb
index 82c41f3..8aa1059 100644
--- a/jobs/mysql_gateway/templates/mysql_gateway.yml.erb
+++ b/jobs/mysql_gateway/templates/mysql_gateway.yml.erb
@@ -19,6 +19,7 @@ nats_props = properties.send(nats_props_name)
nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
lifecycle = properties.service_lifecycle
cc_api_version = gateway.cc_api_version || "v1"
+unique_id = 'foobar_mysql_uniq'
%>
index: <%= spec.index %>
mbus: <%= nats %>
@@ -29,14 +30,21 @@ service:
name: mysql
version: "5.1"
description: 'MySQL database'
+ unique_id: '<%= unique_id %>'
+ logo_url: 'fake-logo_url'
+ blurb: 'fake-blurb'
+ provider_name: 'fake-provider-name'
plans:
<% if plan_enabled %>
<% for plan in plan_mgmt.fields.each %>
<% plan_description = plan_mgmt.send(plan.to_sym).description || "#{plan} plan" %>
<% plan_free_flag = plan_mgmt.send(plan.to_sym).free %>
+ <% plan_unique_id = "#{plan}_#{unique_id}" %>
<%= "'#{plan}':" %>
description: <%= "'#{plan_description}'" %>
free: <%= !plan_free_flag.nil? && plan_free_flag.to_s || "true" %>
+ unique_id: '<%= plan_unique_id %>'
+ extra: ''
<% end %>
<% else %>
"free":
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment