Skip to content

Commit

Permalink
Address Daniel's comments to return error when external volume is set…
Browse files Browse the repository at this point in the history
… in loader code.

Signed-off-by: Liping Xue <[email protected]>

Address Daniel's comments to return error when external volume is set in loader code.
Signed-off-by: Liping Xue <[email protected]>

Remove the case that specifying external volume name in full-example.yml.
  • Loading branch information
lipingxue committed Jul 12, 2017
1 parent 04c81ed commit 5d0dc47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 0 additions & 5 deletions cli/compose/loader/full-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,3 @@ volumes:
# can be referred to within this file as "external-volume"
external: true

other-external-volume:
# Specifies that a pre-existing volume called "my-cool-volume"
# can be referred to within this file as "other-external-volume"
external:
name: my-cool-volume
2 changes: 2 additions & 0 deletions cli/compose/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ func LoadVolumes(source map[string]interface{}) (map[string]types.VolumeConfig,
if volume.External.Name == "" {
volume.External.Name = name
volumes[name] = volume
} else {
return nil, externalVolumeError(name, "name")
}
}
}
Expand Down

0 comments on commit 5d0dc47

Please sign in to comment.