Switch to _cap_ver_req and add cpu_set to create_containers

reviewable/pr18780/r1
Daniel Kerwin 10 years ago
parent a8bc50a11f
commit a702dbd29a

@ -537,6 +537,7 @@ class DockerManager(object):
'pid': ((1, 0, 0), '1.17'),
'log_driver': ((1, 2, 0), '1.18'),
'host_config': ((0, 7, 0), '1.15'),
'cpu_set': ((0, 6, 0), '1.14'),
# Clientside only
'insecure_registry': ((0, 5, 0), '0.0')
}
@ -559,7 +560,7 @@ class DockerManager(object):
elif 2 <= len(parts) <= 3:
# default to read-write
ro = False
# with supplied bind mode
# with supplied bind mode
if len(parts) == 3:
if parts[2] not in ['ro', 'rw']:
self.module.fail_json(msg='bind mode needs to either be "ro" or "rw"')
@ -1356,6 +1357,8 @@ class DockerManager(object):
'name': self.module.params.get('name'),
'stdin_open': self.module.params.get('stdin_open'),
'tty': self.module.params.get('tty'),
'cpuset': self.module.params.get('cpu_set'),
'host_config': self.create_host_config(),
}
if self.ensure_capability('host_config', fail=False):

Loading…
Cancel
Save