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