LOG.debug('delete called for member %s', id)
context = req.environ['cinder.context']
- LOG.audit(_('Delete backup with id: %s'), id, context=context)
+ LOG.info(_('Delete backup with id: %s'), id, context=context)
try:
self.backup_api.delete(context, id)
name = backup.get('name', None)
description = backup.get('description', None)
- LOG.audit(_("Creating backup of volume %(volume_id)s in container"
- " %(container)s"),
- {'volume_id': volume_id, 'container': container},
- context=context)
+ LOG.info(_("Creating backup of volume %(volume_id)s in container"
+ " %(container)s"),
+ {'volume_id': volume_id, 'container': container},
+ context=context)
try:
new_backup = self.backup_api.create(context, name, description,
restore = body['restore']
volume_id = restore.get('volume_id', None)
- LOG.audit(_("Restoring backup %(backup_id)s to volume %(volume_id)s"),
- {'backup_id': id, 'volume_id': volume_id},
- context=context)
+ LOG.info(_("Restoring backup %(backup_id)s to volume %(volume_id)s"),
+ {'backup_id': id, 'volume_id': volume_id},
+ context=context)
try:
new_restore = self.backup_api.restore(context,
"""Sets the specified host's ability to accept new volumes."""
context = req.environ['cinder.context']
state = "enabled" if enabled else "disabled"
- LOG.audit(_("Setting host %(host)s to %(state)s."),
- {'host': host, 'state': state})
+ LOG.info(_("Setting host %(host)s to %(state)s."),
+ {'host': host, 'state': state})
result = self.api.set_host_enabled(context,
host=host,
enabled=enabled)
name = transfer.get('name', None)
- LOG.audit(_("Creating transfer of volume %s"),
- volume_id,
- context=context)
+ LOG.info(_("Creating transfer of volume %s"),
+ volume_id,
+ context=context)
try:
new_transfer = self.transfer_api.create(context, volume_id, name)
msg = _("Incorrect request body format")
raise exc.HTTPBadRequest(explanation=msg)
- LOG.audit(_("Accepting transfer %s"), transfer_id,
- context=context)
+ LOG.info(_("Accepting transfer %s"), transfer_id,
+ context=context)
try:
accepted_transfer = self.transfer_api.accept(context, transfer_id,
"""Delete a transfer."""
context = req.environ['cinder.context']
- LOG.audit(_("Delete transfer with id: %s"), id, context=context)
+ LOG.info(_("Delete transfer with id: %s"), id, context=context)
try:
self.transfer_api.delete(context, transfer_id=id)
context = req.environ['cinder.context']
authorize(context)
- LOG.audit(_("Unmanage volume with id: %s"), id, context=context)
+ LOG.info(_("Unmanage volume with id: %s"), id, context=context)
try:
vol = self.volume_api.get(context, id)
"""
def __init__(self):
- LOG.audit(_('Initializing extension manager.'))
+ LOG.info(_('Initializing extension manager.'))
self.cls_list = CONF.osapi_volume_extension
self.extensions = {}
return
alias = ext.alias
- LOG.audit(_('Loaded extension: %s'), alias)
+ LOG.info(_('Loaded extension: %s'), alias)
if alias in self.extensions:
raise exception.Error("Found duplicate extension: %s" % alias)
"""Delete a snapshot."""
context = req.environ['cinder.context']
- LOG.audit(_("Delete snapshot with id: %s"), id, context=context)
+ LOG.info(_("Delete snapshot with id: %s"), id, context=context)
try:
snapshot = self.volume_api.get_snapshot(context, id)
force = snapshot.get('force', False)
msg = _("Create snapshot from volume %s")
- LOG.audit(msg, volume_id, context=context)
+ LOG.info(msg, volume_id, context=context)
if not utils.is_valid_boolstr(force):
msg = _("Invalid value '%s' for force. ") % force
if image_id:
d['image_id'] = image_id
- LOG.audit(_("vol=%s"), vol, context=context)
+ LOG.info(_("vol=%s"), vol, context=context)
if vol.get('volume_metadata'):
metadata = vol.get('volume_metadata')
"""Delete a volume."""
context = req.environ['cinder.context']
- LOG.audit(_("Delete volume with id: %s"), id, context=context)
+ LOG.info(_("Delete volume with id: %s"), id, context=context)
try:
volume = self.volume_api.get(context, id)
elif size is None and kwargs['source_volume'] is not None:
size = kwargs['source_volume']['size']
- LOG.audit(_("Create volume of %s GB"), size, context=context)
+ LOG.info(_("Create volume of %s GB"), size, context=context)
image_href = None
image_uuid = None
"""Delete a snapshot."""
context = req.environ['cinder.context']
- LOG.audit(_("Delete snapshot with id: %s"), id, context=context)
+ LOG.info(_("Delete snapshot with id: %s"), id, context=context)
try:
snapshot = self.volume_api.get_snapshot(context, id)
raise exc.HTTPNotFound(explanation=msg)
force = snapshot.get('force', False)
msg = _("Create snapshot from volume %s")
- LOG.audit(msg, volume_id, context=context)
+ LOG.info(msg, volume_id, context=context)
# NOTE(thingee): v2 API allows name instead of display_name
if 'name' in snapshot:
"""Delete a volume."""
context = req.environ['cinder.context']
- LOG.audit(_("Delete volume with id: %s"), id, context=context)
+ LOG.info(_("Delete volume with id: %s"), id, context=context)
try:
volume = self.volume_api.get(context, id)
elif size is None and kwargs['source_volume'] is not None:
size = kwargs['source_volume']['size']
- LOG.audit(_("Create volume of %s GB"), size, context=context)
+ LOG.info(_("Create volume of %s GB"), size, context=context)
if self.ext_mgr.is_loaded('os-image-create'):
image_href = volume.get('imageRef')
name = 'restore_backup_%s' % backup_id
description = 'auto-created_from_restore_from_backup'
- LOG.audit(_("Creating volume of %(size)s GB for restore of "
- "backup %(backup_id)s"),
- {'size': size, 'backup_id': backup_id},
- context=context)
+ LOG.info(_("Creating volume of %(size)s GB for restore of "
+ "backup %(backup_id)s"),
+ {'size': size, 'backup_id': backup_id},
+ context=context)
volume = self.volume_api.create(context, size, name, description)
volume_id = volume['id']
{'volume_size': volume['size'], 'size': size})
raise exception.InvalidVolume(reason=msg)
- LOG.audit(_("Overwriting volume %(volume_id)s with restore of "
- "backup %(backup_id)s"),
- {'volume_id': volume_id, 'backup_id': backup_id},
- context=context)
+ LOG.info(_("Overwriting volume %(volume_id)s with restore of "
+ "backup %(backup_id)s"),
+ {'volume_id': volume_id, 'backup_id': backup_id},
+ context=context)
# Setting the status here rather than setting at start and unrolling
# for each error condition, it should be a very small window
def start(self):
version_string = version.version_string()
- LOG.audit(_('Starting %(topic)s node (version %(version_string)s)'),
- {'topic': self.topic, 'version_string': version_string})
+ LOG.info(_('Starting %(topic)s node (version %(version_string)s)'),
+ {'topic': self.topic, 'version_string': version_string})
self.model_disconnected = False
self.manager.init_host()
ctxt = context.get_admin_context()