diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-05-25 14:06:55 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-05-25 14:06:55 +0000 |
| commit | e1528ee7fca4f7d77e3808090c10bd304c79fc57 (patch) | |
| tree | 8380f11a9fafecba187961b5b2212a214f409082 | |
| parent | 09526751a85535b3c4ebf7e062b0da10d1d1a99f (diff) | |
| parent | 0f45cb3269af212604005c038f46e4ca8f16f14a (diff) | |
| download | nova-e1528ee7fca4f7d77e3808090c10bd304c79fc57.tar.gz nova-e1528ee7fca4f7d77e3808090c10bd304c79fc57.tar.xz nova-e1528ee7fca4f7d77e3808090c10bd304c79fc57.zip | |
Merge "Remove locals() usage from nova.virt.libvirt.utils."
| -rwxr-xr-x | nova/virt/libvirt/utils.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/nova/virt/libvirt/utils.py b/nova/virt/libvirt/utils.py index 07ab44769..6853ed1e8 100755 --- a/nova/virt/libvirt/utils.py +++ b/nova/virt/libvirt/utils.py @@ -224,7 +224,11 @@ def create_lvm_image(vg, lv, size, sparse=False): raise RuntimeError(_('Insufficient Space on Volume Group %(vg)s.' ' Only %(free_space)db available,' ' but %(size)db required' - ' by volume %(lv)s.') % locals()) + ' by volume %(lv)s.') % + {'vg': vg, + 'free_space': free_space, + 'size': size, + 'lv': lv}) if sparse: preallocated_space = 64 * 1024 * 1024 @@ -234,7 +238,11 @@ def create_lvm_image(vg, lv, size, sparse=False): ' to hold sparse volume %(lv)s.' ' Virtual volume size is %(size)db,' ' but free space on volume group is' - ' only %(free_space)db.') % locals()) + ' only %(free_space)db.'), + {'vg': vg, + 'free_space': free_space, + 'size': size, + 'lv': lv}) cmd = ('lvcreate', '-L', '%db' % preallocated_space, '--virtualsize', '%db' % size, '-n', lv, vg) |
