Allow any volume mode to be specified

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
Aanand Prasad 2015-06-05 09:57:00 +01:00
commit 89f6caf871
2 changed files with 27 additions and 10 deletions

View file

@ -809,12 +809,7 @@ def parse_volume_spec(volume_config):
if len(parts) == 2:
parts.append('rw')
external, internal, mode = parts
if mode not in ('rw', 'ro'):
raise ConfigError("Volume %s has invalid mode (%s), should be "
"one of: rw, ro." % (volume_config, mode))
return VolumeSpec(external, internal, mode)
return VolumeSpec(*parts)
# Ports