mirror of https://github.com/docker/docker-py.git
				
				
				
			Merge pull request #429 from dims/master
Devices should be separated by colon separated string
This commit is contained in:
		
						commit
						f2ba7f9b9d
					
				|  | @ -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: | ||||
|  |  | |||
|  | @ -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'}]} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue