Help bring source code into compliance with the
Cinder Style Commandments:
https://github.com/openstack/cinder/blob/master/HACKING.rst
This change covers all affected source in the
cinder api module, specifically:
cinder/api/contrib/volume_actions.py
Partially fixes: bug #
1190758
Change-Id: I2134e69b70a5a5132847168f60b4d192bdf0b536
if instance_uuid and host_name:
msg = _("Invalid request to attach volume to an "
"instance %(instance_uuid)s and a "
- "host %(host_name)s simultaneously") % (locals())
+ "host %(host_name)s simultaneously") % {
+ 'instance_uuid': instance_uuid,
+ 'host_name': host_name,
+ }
raise webob.exc.HTTPBadRequest(explanation=msg)
elif instance_uuid is None and host_name is None:
msg = _("Invalid request to attach volume to an invalid target")