Kaydet (Commit) 7417bc2c authored tarafından Aanand Prasad's avatar Aanand Prasad

Don't support tmpfs in API version < 1.22

Signed-off-by: 's avatarAanand Prasad <aanand.prasad@gmail.com>
üst 4ffa1be8
......@@ -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(
......
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