|
42 | 42 | import nova.conf
|
43 | 43 | from nova import exception
|
44 | 44 | from nova.i18n import _
|
45 |
| -from nova.i18n import _LW |
46 | 45 | from nova import service_auth
|
47 | 46 |
|
48 | 47 |
|
@@ -581,21 +580,21 @@ def detach(self, context, volume_id, instance_uuid=None,
|
581 | 580 | attachment_id = attachments.get(instance_uuid, {}).\
|
582 | 581 | get('attachment_id')
|
583 | 582 | if not attachment_id:
|
584 |
| - LOG.warning(_LW("attachment_id couldn't be retrieved " |
585 |
| - "for volume %(volume_id)s with " |
586 |
| - "instance_uuid %(instance_id)s. The " |
587 |
| - "volume has the 'multiattach' flag " |
588 |
| - "enabled, without the attachment_id " |
589 |
| - "Cinder most probably cannot perform " |
590 |
| - "the detach."), |
| 583 | + LOG.warning("attachment_id couldn't be retrieved " |
| 584 | + "for volume %(volume_id)s with " |
| 585 | + "instance_uuid %(instance_id)s. The " |
| 586 | + "volume has the 'multiattach' flag " |
| 587 | + "enabled, without the attachment_id " |
| 588 | + "Cinder most probably cannot perform " |
| 589 | + "the detach.", |
591 | 590 | {'volume_id': volume_id,
|
592 | 591 | 'instance_id': instance_uuid})
|
593 | 592 | else:
|
594 |
| - LOG.warning(_LW("attachment_id couldn't be retrieved for " |
595 |
| - "volume %(volume_id)s. The volume has the " |
596 |
| - "'multiattach' flag enabled, without the " |
597 |
| - "attachment_id Cinder most probably " |
598 |
| - "cannot perform the detach."), |
| 593 | + LOG.warning("attachment_id couldn't be retrieved for " |
| 594 | + "volume %(volume_id)s. The volume has the " |
| 595 | + "'multiattach' flag enabled, without the " |
| 596 | + "attachment_id Cinder most probably " |
| 597 | + "cannot perform the detach.", |
599 | 598 | {'volume_id': volume_id})
|
600 | 599 |
|
601 | 600 | client.volumes.detach(volume_id, attachment_id)
|
|
0 commit comments