]> xenbits.xensource.com Git - osstest/openstack-nova.git/commitdiff
get_model method missing for Ploop image
authorEvgeny Antyshev <eantyshev@virtuozzo.com>
Mon, 6 Mar 2017 14:27:06 +0000 (14:27 +0000)
committerLee Yarwood <lyarwood@redhat.com>
Mon, 20 Mar 2017 17:59:10 +0000 (17:59 +0000)
Image.get_model is called in partition injection code,
and now inject partition attempt fails unconditionally.
This patch makes use of disk/api.py inject_data failure tolerance:
it doesn't fail unless injected data is mandatory.

Closes-Bug: 1670642
Change-Id: I6c68693be818219f78d6fcda019b867066396b29
(cherry picked from commit d629d4e42c04756444a79e9ac15f3f2192c47b52)

nova/virt/libvirt/imagebackend.py

index d6105058ddf882e0e895ebf1c36a93471eb9ffd6..8dd227ea2afde0b5c55596adcd2177074bd471ab 100644 (file)
@@ -1100,6 +1100,9 @@ class Ploop(Image):
                                        target,
                                        out_format)
 
+    def get_model(self, connection):
+        return imgmodel.LocalFileImage(self.path, imgmodel.FORMAT_PLOOP)
+
 
 class Backend(object):
     def __init__(self, use_cow):