Permalink
Browse files

Can restrict supported services via SystemConfig#available_services a…

…rray
  • Loading branch information...
1 parent b9511cc commit f80ce0e2e73aa6e63285c792eedffbe862cc31d8 @drnic drnic committed Mar 10, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/bosh-cloudfoundry/config/system_config.rb
@@ -64,6 +64,7 @@ def self.create_config_accessor(attr)
:admin_emails, # e.g. ['drnic@starkandwayne.com']
:dea, # e.g. { "count" => 2, "flavor" => "m1.large" }
:security_group, # e.g. "cloudfoundry-production"
+ :available_services, # e.g. ['redis']; restricts supported_services; default - all supported service
:system_initialized, # e.g. true / false
].each { |attr| create_config_accessor(attr) }
@@ -86,6 +87,12 @@ def setup_services
end
def supported_services
+ if available_services.is_a?(Array) && available_services.first.is_a?(String)
+ available_services
+ end
+ if available_services
+ puts "IGNORING 'available_services' configuration: must be an array of service names"
+ end
@services.keys
end

0 comments on commit f80ce0e

Please sign in to comment.