From 839d6258b845fec9f4912e4c73c47840c9b39f73 Mon Sep 17 00:00:00 2001 From: Dominic Cleal Date: Fri, 31 Jan 2014 17:22:54 +0100 Subject: [PATCH] [libvirt|compute] Allow volumes to have backing volumes --- .../libvirt/models/compute/templates/volume.xml.erb | 12 ++++++++++++ lib/fog/libvirt/models/compute/volume.rb | 1 + 2 files changed, 13 insertions(+) diff --git a/lib/fog/libvirt/models/compute/templates/volume.xml.erb b/lib/fog/libvirt/models/compute/templates/volume.xml.erb index 04094d9d5..5f78e8985 100644 --- a/lib/fog/libvirt/models/compute/templates/volume.xml.erb +++ b/lib/fog/libvirt/models/compute/templates/volume.xml.erb @@ -11,4 +11,16 @@ + <% if backing_volume -%> + + <%= backing_volume.path %> + + + 0 + 0 + 0744 + + + + <% end -%> diff --git a/lib/fog/libvirt/models/compute/volume.rb b/lib/fog/libvirt/models/compute/volume.rb index f4788ae63..2b477a303 100644 --- a/lib/fog/libvirt/models/compute/volume.rb +++ b/lib/fog/libvirt/models/compute/volume.rb @@ -19,6 +19,7 @@ module Fog attribute :capacity attribute :allocation attribute :format_type + attribute :backing_volume # Can be created by passing in :xml => "" # A volume always belongs to a pool, :pool_name => ""