Skip to content
Browse files

Simpler interface btw renderer and config objects - #build_into_manif…

…est method
  • Loading branch information...
1 parent f80ce0e commit ad8f63c98bccf12e0e463052fc50a45efc6eed85 @drnic drnic committed
View
7 lib/bosh-cloudfoundry/config/dea_config.rb
@@ -46,6 +46,13 @@ def save
@system_config.save
end
+ def build_into_manifest(manifest)
+ add_core_jobs_to_manifest(manifest)
+ add_resource_pools_to_manifest(manifest)
+ add_jobs_to_manifest(manifest)
+ merge_manifest_properties(manifest)
+ end
+
# Adds additional cf-release jobs into the core server (the core job in the manifest)
def add_core_jobs_to_manifest(manifest)
if dea_server_count == 0
View
7 lib/bosh-cloudfoundry/config/service_config.rb
@@ -89,6 +89,13 @@ def provider
@provider ||= Bosh::CloudFoundry::Providers.for_bosh_provider_name(system_config)
end
+ def build_into_manifest(manifest)
+ add_core_jobs_to_manifest(manifest)
+ add_resource_pools_to_manifest(manifest)
+ add_jobs_to_manifest(manifest)
+ merge_manifest_properties(manifest)
+ end
+
# Adds "redis_gateway" to colocated "core" job
def add_core_jobs_to_manifest(manifest)
if any_service_nodes?
View
17 lib/bosh-cloudfoundry/system_deployment_manifest_renderer.rb
@@ -40,20 +40,9 @@ def perform
system_config.security_group
)
- dea_config.add_core_jobs_to_manifest(manifest)
- dea_config.add_resource_pools_to_manifest(manifest)
- dea_config.add_jobs_to_manifest(manifest)
- dea_config.merge_manifest_properties(manifest)
-
- postgresql_service_config.add_core_jobs_to_manifest(manifest)
- postgresql_service_config.add_resource_pools_to_manifest(manifest)
- postgresql_service_config.add_jobs_to_manifest(manifest)
- postgresql_service_config.merge_manifest_properties(manifest)
-
- redis_service_config.add_core_jobs_to_manifest(manifest)
- redis_service_config.add_resource_pools_to_manifest(manifest)
- redis_service_config.add_jobs_to_manifest(manifest)
- redis_service_config.merge_manifest_properties(manifest)
+ dea_config.build_into_manifest(manifest)
+ postgresql_service_config.build_into_manifest(manifest)
+ redis_service_config.build_into_manifest(manifest)
chdir system_config.system_dir do
mkdir_p("deployments")

0 comments on commit ad8f63c

Please sign in to comment.
Something went wrong with that request. Please try again.