Kaydet (Commit) e7307e58 authored tarafından Joffrey F's avatar Joffrey F

Merge branch 'service-create-placement-preferences' of…

Merge branch 'service-create-placement-preferences' of https://github.com/knackworks/docker-py into knackworks-service-create-placement-preferences
......@@ -321,10 +321,15 @@ def _get_create_service_kwargs(func_name, kwargs):
if 'container_labels' in kwargs:
container_spec_kwargs['labels'] = kwargs.pop('container_labels')
placement = {}
if 'constraints' in kwargs:
task_template_kwargs['placement'] = {
'Constraints': kwargs.pop('constraints')
}
placement['Constraints'] = kwargs.pop('constraints')
if 'preferences' in kwargs:
placement['Preferences'] = kwargs.pop('preferences')
task_template_kwargs['placement'] = placement
if 'log_driver' in kwargs:
task_template_kwargs['log_driver'] = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment