Add logging when initializing a volume.

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2016-02-10 16:49:50 -08:00
parent 830a9fc118
commit e225f12551
1 changed files with 12 additions and 6 deletions

View File

@ -64,12 +64,13 @@ class ProjectVolumes(object):
config_volumes = config_data.volumes or {}
volumes = {
vol_name: Volume(
client=client,
project=name,
name=vol_name,
driver=data.get('driver'),
driver_opts=data.get('driver_opts'),
external_name=data.get('external_name'))
client=client,
project=name,
name=vol_name,
driver=data.get('driver'),
driver_opts=data.get('driver_opts'),
external_name=data.get('external_name')
)
for vol_name, data in config_volumes.items()
}
return cls(volumes)
@ -96,6 +97,11 @@ class ProjectVolumes(object):
)
)
continue
log.info(
'Creating volume "{0}" with {1} driver'.format(
volume.full_name, volume.driver or 'default'
)
)
volume.create()
except NotFound:
raise ConfigurationError(