mirror of https://github.com/docker/docker-py.git
Don't support tmpfs in API version < 1.22
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
4ffa1be825
commit
7417bc2cce
|
@ -781,6 +781,8 @@ def create_host_config(binds=None, port_bindings=None, lxc_conf=None,
|
|||
host_config['CpuPeriod'] = cpu_period
|
||||
|
||||
if tmpfs:
|
||||
if version_lt(version, '1.22'):
|
||||
raise host_config_version_error('tmpfs', '1.22')
|
||||
host_config["Tmpfs"] = convert_tmpfs_mounts(tmpfs)
|
||||
|
||||
return host_config
|
||||
|
|
|
@ -1016,6 +1016,7 @@ class CreateContainerTest(DockerClientTest):
|
|||
}
|
||||
}}'''))
|
||||
|
||||
@requires_api_version('1.22')
|
||||
def test_create_container_with_tmpfs_list(self):
|
||||
|
||||
self.client.create_container(
|
||||
|
@ -1044,6 +1045,7 @@ class CreateContainerTest(DockerClientTest):
|
|||
DEFAULT_TIMEOUT_SECONDS
|
||||
)
|
||||
|
||||
@requires_api_version('1.22')
|
||||
def test_create_container_with_tmpfs_dict(self):
|
||||
|
||||
self.client.create_container(
|
||||
|
|
Loading…
Reference in New Issue