diff options
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-nova/Make-rbd.libvirt_info-parent-class-compatible.patch')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-nova/Make-rbd.libvirt_info-parent-class-compatible.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova/Make-rbd.libvirt_info-parent-class-compatible.patch b/meta-openstack/recipes-devtools/python/python-nova/Make-rbd.libvirt_info-parent-class-compatible.patch new file mode 100644 index 0000000..542abf5 --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-nova/Make-rbd.libvirt_info-parent-class-compatible.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | Make rbd.libvirt_info parent class compatible | ||
| 2 | |||
| 3 | commit 7a34be0ec0cd0cb9555fe64ff6c486faae1ae91d from | ||
| 4 | https://github.com/openstack/nova | ||
| 5 | |||
| 6 | Rbd.libvirt_info function definition misses hypervisor_version argument added in change: | ||
| 7 | https://review.openstack.org/32379 | ||
| 8 | |||
| 9 | Closes-Bug: #1233188 | ||
| 10 | Change-Id: Ib68d743e783af0f6d82d2ba180869ee642e86050 | ||
| 11 | |||
| 12 | diff --git a/nova/tests/virt/libvirt/test_imagebackend.py b/nova/tests/virt/libvirt/test_imagebackend.py | ||
| 13 | index 2455ec8..5bfa94d 100644 | ||
| 14 | --- a/nova/tests/virt/libvirt/test_imagebackend.py | ||
| 15 | +++ b/nova/tests/virt/libvirt/test_imagebackend.py | ||
| 16 | @@ -20,6 +20,8 @@ import os | ||
| 17 | import fixtures | ||
| 18 | from oslo.config import cfg | ||
| 19 | |||
| 20 | +from inspect import getargspec | ||
| 21 | + | ||
| 22 | from nova import exception | ||
| 23 | from nova.openstack.common import uuidutils | ||
| 24 | from nova import test | ||
| 25 | @@ -630,6 +632,10 @@ class RbdTestCase(_ImageTestCase, test.NoDBTestCase): | ||
| 26 | |||
| 27 | self.assertEqual(fake_processutils.fake_execute_get_log(), []) | ||
| 28 | |||
| 29 | + def test_parent_compatible(self): | ||
| 30 | + self.assertEqual(getargspec(imagebackend.Image.libvirt_info), | ||
| 31 | + getargspec(self.image_class.libvirt_info)) | ||
| 32 | + | ||
| 33 | |||
| 34 | class BackendTestCase(test.NoDBTestCase): | ||
| 35 | INSTANCE = {'name': 'fake-instance', | ||
| 36 | diff --git a/nova/virt/libvirt/imagebackend.py b/nova/virt/libvirt/imagebackend.py | ||
| 37 | index e900789..51872cf 100644 | ||
| 38 | --- a/nova/virt/libvirt/imagebackend.py | ||
| 39 | +++ b/nova/virt/libvirt/imagebackend.py | ||
| 40 | @@ -482,7 +482,7 @@ class Rbd(Image): | ||
| 41 | return hosts, ports | ||
| 42 | |||
| 43 | def libvirt_info(self, disk_bus, disk_dev, device_type, cache_mode, | ||
| 44 | - extra_specs): | ||
| 45 | + extra_specs, hypervisor_version): | ||
| 46 | """Get `LibvirtConfigGuestDisk` filled for this image. | ||
| 47 | |||
| 48 | :disk_dev: Disk bus device name | ||
