Allow any volume mode to be specified
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
6ca781416e
commit
89f6caf871
2 changed files with 27 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue