Move v1-v2 config normalization to separate function.

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2016-01-11 15:53:28 -08:00
parent c32991a8d4
commit 46a474ecd9
1 changed files with 4 additions and 0 deletions

View File

@ -504,6 +504,10 @@ def finalize_service(service_config):
if 'restart' in service_dict:
service_dict['restart'] = parse_restart_spec(service_dict['restart'])
return normalize_v1_service_format(service_dict)
def normalize_v1_service_format(service_dict):
if 'log_driver' in service_dict or 'log_opt' in service_dict:
if 'logging' not in service_dict:
service_dict['logging'] = {}