[virt-tools-list] [PATCH] storage: copy allocation and capacity also on cross-pool clones

Cole Robinson crobinso at redhat.com
Fri Apr 10 14:19:56 UTC 2015


On 04/10/2015 07:24 AM, Giuseppe Scrivano wrote:
> Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1210265
> 
> Signed-off-by: Giuseppe Scrivano <gscrivan at redhat.com>
> ---
>  tests/clone-xml/cross-pool-disks-out.xml | 4 ++--
>  virtinst/storage.py                      | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/clone-xml/cross-pool-disks-out.xml b/tests/clone-xml/cross-pool-disks-out.xml
> index 8eb3acb..260f321 100644
> --- a/tests/clone-xml/cross-pool-disks-out.xml
> +++ b/tests/clone-xml/cross-pool-disks-out.xml
> @@ -1,7 +1,7 @@
>  <volume>
>    <name>new1.img</name>
> -  <capacity>1073</capacity>
> -  <allocation>1073</allocation>
> +  <capacity>1000000</capacity>
> +  <allocation>50000</allocation>
>    <target>
>      <format type="qcow2"/>
>      <features>
> diff --git a/virtinst/storage.py b/virtinst/storage.py
> index 607a3fd..6028e4b 100644
> --- a/virtinst/storage.py
> +++ b/virtinst/storage.py
> @@ -619,11 +619,11 @@ class StorageVolume(_StorageObject):
>                                   parsexml=self._input_vol.XMLDesc(0))
>  
>          self.format = parsevol.format
> +        self.capacity = parsevol.capacity
> +        self.allocation = parsevol.allocation
>          if only_format:
>              return
>          self.pool = self._input_vol.storagePoolLookupByVolume()
> -        self.capacity = parsevol.capacity
> -        self.allocation = parsevol.allocation
>  
>  
>      ##########################
> 

ACK

- Cole




More information about the virt-tools-list mailing list