Permalink
Browse files

parse properties correctly for backup_manager

Change-Id: Ib4e0e724be5fa624b8ea268eafc6fafbfa4fab7b
  • Loading branch information...
1 parent ea15b2e commit f35a6f01ab2377d37a05e77b74322464c22fbb5c @EagleChen EagleChen committed Jan 25, 2013
@@ -27,6 +27,6 @@ rotation:
postgresql:
version: "9.0"
token: <%= properties.postgresql_gateway.token %>
-root: <%= properties.service_backup && properties.service_backup.mount_point ? properties.service_backup.mount_point : "/var/vcap/services_backup" %>
-wakeup_interval: <%= properties.service_backup_manager ? properties.service_backup_manager.rotation_interval_secs : 43200 %>
-enable: <%= properties.service_backup_manager && properties.service_backup && properties.service_backup.nfs_server ? properties.service_backup_manager.enable : "false" %>
+root: <%= properties.service_backup && properties.service_backup.mount_point || "/var/vcap/services_backup" %>
+wakeup_interval: <%= properties.service_backup_manager && properties.service_backup_manager.rotation_interval_secs || 43200 %>
+enable: <%= properties.service_backup_manager && properties.service_backup && properties.service_backup.nfs_server && properties.service_backup_manager.enable || "false" %>
@@ -19,9 +19,9 @@ logging:
syslog: vcap.job_manager
<% end %>
job_cleanup:
- max_days: <%= max_days ? max_days : 7 %>
-wakeup_interval: <%= interval ? interval : 43200 %>
-enable: <%= enable ? enable : "false" %>
+ max_days: <%= max_days || 7 %>
+wakeup_interval: <%= interval || 43200 %>
+enable: <%= enable || "false" %>
services_redis:
host: <%= lifecycle.resque.host %>
port: <%= lifecycle.resque.port %>
@@ -14,8 +14,8 @@ logging:
<% end %>
cleanup:
- max_days: <%= properties.service_snapshot_manager ? properties.service_snapshot_manager.cleanup_max_days : 7 %>
- greedy_mark: <%= properties.service_snapshot_manager ? properties.service_snapshot_manager.cleanup_greedy_mark : "false"%>
+ max_days: <%= properties.service_snapshot_manager && properties.service_snapshot_manager.cleanup_max_days || 7 %>
+ greedy_mark: <%= properties.service_snapshot_manager && properties.service_snapshot_manager.cleanup_greedy_mark || "false" %>
cloud_controller_uri: <%= properties.cc.srv_api_uri %>
services:
mongodb:
@@ -30,6 +30,6 @@ cleanup:
postgresql:
version: "9.0"
token: <%= properties.postgresql_gateway.token %>
-root: <%= properties.service_lifecycle && properties.service_lifecycle.mount_point ? properties.service_lifecycle.mount_point : "/var/vcap/services_snapshot" %>
-wakeup_interval: <%= properties.service_snapshot_manager ? properties.service_snapshot_manager.cleanup_interval_secs : 43200 %>
-enable: <%= properties.service_snapshot_manager && properties.service_lifecycle && properties.service_lifecycle.nfs_server ? properties.service_snapshot_manager.enable : "false" %>
+root: <%= properties.service_lifecycle && properties.service_lifecycle.mount_point || "/var/vcap/services_snapshot" %>
+wakeup_interval: <%= properties.service_snapshot_manager && properties.service_snapshot_manager.cleanup_interval_secs || 43200 %>
+enable: <%= properties.service_snapshot_manager && properties.service_lifecycle && properties.service_lifecycle.nfs_server && properties.service_snapshot_manager.enable || "false" %>

0 comments on commit f35a6f0

Please sign in to comment.