default things to template, more option on if branch
This commit is contained in:
parent
c67ea4703f
commit
945d03dc67
|
@ -81,10 +81,6 @@ class SwiftIdentityContext(OSContextGenerator):
|
||||||
def __call__(self):
|
def __call__(self):
|
||||||
bind_port = config('bind-port')
|
bind_port = config('bind-port')
|
||||||
workers = config('workers')
|
workers = config('workers')
|
||||||
log_name = 'swift'
|
|
||||||
log_facility = 'LOG_LOCAL0'
|
|
||||||
log_level = 'INFO'
|
|
||||||
log_address = '/dev/log'
|
|
||||||
if workers == 0:
|
if workers == 0:
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
workers = multiprocessing.cpu_count()
|
workers = multiprocessing.cpu_count()
|
||||||
|
@ -108,10 +104,9 @@ class SwiftIdentityContext(OSContextGenerator):
|
||||||
}
|
}
|
||||||
|
|
||||||
if config('debug'):
|
if config('debug'):
|
||||||
ctxt['log_name'] = log_name
|
ctxt['log_level'] = 'DEBUG'
|
||||||
ctxt['log_facility'] = log_facility
|
else:
|
||||||
ctxt['log_level'] = log_level
|
ctxt['log_level'] = 'INFO'
|
||||||
ctxt['log_address'] = log_address
|
|
||||||
|
|
||||||
# Instead of duplicating code lets use charm-helpers to set signing_dir
|
# Instead of duplicating code lets use charm-helpers to set signing_dir
|
||||||
# TODO(hopem): refactor this context handler to use charm-helpers
|
# TODO(hopem): refactor this context handler to use charm-helpers
|
||||||
|
|
|
@ -3,10 +3,10 @@ bind_port = {{ bind_port }}
|
||||||
workers = {{ workers }}
|
workers = {{ workers }}
|
||||||
user = swift
|
user = swift
|
||||||
bind_ip = {{ bind_host }}
|
bind_ip = {{ bind_host }}
|
||||||
log_name = {{ log_name }}
|
log_name = swift
|
||||||
log_facility = {{ log_facility }}
|
log_facility = LOG_LOCAL0
|
||||||
log_level = {{ log_level }}
|
log_level = {{ log_level }}
|
||||||
log_address = {{ log_address }}
|
log_address = /dev/log
|
||||||
log_headers = {{ log_headers }}
|
log_headers = {{ log_headers }}
|
||||||
|
|
||||||
{% if ssl %}
|
{% if ssl %}
|
||||||
|
|
Loading…
Reference in New Issue