From 914aa032f2031625512e1bcebf312fe9fff4d3fa Mon Sep 17 00:00:00 2001 From: Evgeny Antyshev Date: Mon, 6 Mar 2017 14:27:06 +0000 Subject: [PATCH] get_model method missing for Ploop image 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nova/virt/libvirt/imagebackend.py b/nova/virt/libvirt/imagebackend.py index d6105058dd..8dd227ea2a 100644 --- a/nova/virt/libvirt/imagebackend.py +++ b/nova/virt/libvirt/imagebackend.py @@ -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): -- 2.39.5