diff options
author | Joffrey F <f.joffrey@gmail.com> | 2014-12-17 11:32:58 -0800 |
---|---|---|
committer | Joffrey F <f.joffrey@gmail.com> | 2014-12-17 11:32:58 -0800 |
commit | f2ba7f9b9d41ec82b83213bae73c0a154938ce82 (patch) | |
tree | b2d911a720dce8e636f76f862ab5570368794837 | |
parent | ae4f883c918be4ca25fecac0cc5e03f9eab4d266 (diff) | |
parent | 3a51d3fe0b0977c58c0d0d400a64389f1ce33421 (diff) | |
download | docker-py-f2ba7f9b9d41ec82b83213bae73c0a154938ce82.tar.gz |
Merge pull request #429 from dims/master
Devices should be separated by colon separated string
-rw-r--r-- | docker/utils/utils.py | 2 | ||||
-rw-r--r-- | tests/test.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/docker/utils/utils.py b/docker/utils/utils.py index 7f12c6e..a4d5341 100644 --- a/docker/utils/utils.py +++ b/docker/utils/utils.py @@ -248,7 +248,7 @@ def parse_host(addr): def parse_devices(devices): device_list = [] for device in devices: - device_mapping = device.split(",") + device_mapping = device.split(":") if device_mapping: path_on_host = device_mapping[0] if len(device_mapping) > 1: diff --git a/tests/test.py b/tests/test.py index fc14977..e4f658d 100644 --- a/tests/test.py +++ b/tests/test.py @@ -959,11 +959,11 @@ class DockerClientTest(Cleanup, unittest.TestCase): json.loads(args[1]['data']), {"PublishAllPorts": False, "Privileged": False, "Devices": [{'CgroupPermissions': 'rwm', - 'PathInContainer': '/dev/sda:/dev/xvda:rwm', - 'PathOnHost': '/dev/sda:/dev/xvda:rwm'}, + 'PathInContainer': '/dev/xvda', + 'PathOnHost': '/dev/sda'}, {'CgroupPermissions': 'rwm', - 'PathInContainer': '/dev/sdb:/dev/xvdb', - 'PathOnHost': '/dev/sdb:/dev/xvdb'}, + 'PathInContainer': '/dev/xvdb', + 'PathOnHost': '/dev/sdb'}, {'CgroupPermissions': 'rwm', 'PathInContainer': '/dev/sdc', 'PathOnHost': '/dev/sdc'}]} |