Merge pull request #42769 from terminalmage/issue42538

Fix domainname parameter input translation
This commit is contained in:
Mike Place 2017-08-07 15:46:04 -05:00 committed by GitHub
commit bf7938fbe0
4 changed files with 8 additions and 18 deletions

View file

@ -1836,7 +1836,7 @@ def create(image,
generate one for you (it will be included in the return data).
skip_translate
This function translates Salt CLI input into the format which
This function translates Salt CLI or SLS input into the format which
docker-py_ expects. However, in the event that Salt's translation logic
fails (due to potential changes in the Docker Remote API, or to bugs in
the translation code), this argument can be used to exert granular
@ -2104,9 +2104,9 @@ def create(image,
- ``dns_search="[foo1.domain.tld, foo2.domain.tld]"``
domainname
Set custom DNS search domains
The domain name to use for the container
Example: ``domainname=domain.tld,domain2.tld``
Example: ``domainname=domain.tld``
entrypoint
Entrypoint for the container. Either a string (e.g. ``"mycmd --arg1

View file

@ -145,7 +145,7 @@ def running(name,
.. _docker-container-running-skip-translate:
skip_translate
This function translates Salt CLI input into the format which
This function translates Salt CLI or SLS input into the format which
docker-py_ expects. However, in the event that Salt's translation logic
fails (due to potential changes in the Docker Remote API, or to bugs in
the translation code), this argument can be used to exert granular
@ -677,24 +677,14 @@ def running(name,
- foo2.domain.tld
domainname
Set custom DNS search domains. Can be expressed as a comma-separated
list or a YAML list. The below two examples are equivalent:
The domain name to use for the container
.. code-block:: yaml
foo:
docker_container.running:
- image: bar/baz:latest
- dommainname: domain.tld,domain2.tld
.. code-block:: yaml
foo:
docker_container.running:
- image: bar/baz:latest
- dommainname:
- domain.tld
- domain2.tld
- dommainname: domain.tld
entrypoint
Entrypoint for the container

View file

@ -387,7 +387,7 @@ def dns(val, **kwargs):
def domainname(val, **kwargs): # pylint: disable=unused-argument
return _translate_stringlist(val)
return _translate_str(val)
def entrypoint(val, **kwargs): # pylint: disable=unused-argument

View file

@ -820,7 +820,7 @@ class TranslateInputTestCase(TestCase):
expected
)
@assert_stringlist
@assert_string
def test_domainname(self):
'''
Should be a list of strings or converted to one