← Back to team overview

cloud-init-dev team mailing list archive

Re: [Merge] ~smoser/cloud-init:fix/cii-kvmimage-preserve-original into cloud-init:master

 


Diff comments:

> diff --git a/tests/cloud_tests/images/nocloudkvm.py b/tests/cloud_tests/images/nocloudkvm.py
> index 1e7962c..8678b07 100644
> --- a/tests/cloud_tests/images/nocloudkvm.py
> +++ b/tests/cloud_tests/images/nocloudkvm.py
> @@ -21,7 +25,13 @@ class NoCloudKVMImage(base.Image):
>          @param img_path: path to the image
>          """
>          self.modified = False
> -        self._img_path = img_path
> +        self._workd = tempfile.mkdtemp(prefix='NoCloudKVMImage')

I'm confused.  If we're not going to create an image, then what's the need for a mkdir in /tmp and a qemu-img create with backing ?

> +        self._orig_img_path = orig_img_path
> +        self._img_path = os.path.join(self._workd,
> +                                      os.path.basename(self._orig_img_path))
> +
> +        c_util.subp(['qemu-img', 'create', '-f', 'qcow2',
> +                    '-b', orig_img_path, self._img_path])
>  
>          super(NoCloudKVMImage, self).__init__(platform, config)
>  


-- 
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/334147
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:fix/cii-kvmimage-preserve-original into cloud-init:master.


References