[Libguestfs] [PATCH] v2v: -o rhv-upload: fix the phony ovirtsdk4 module

Richard W.M. Jones rjones at redhat.com
Mon Aug 12 19:44:21 UTC 2019


On Mon, Aug 12, 2019 at 04:30:17PM +0200, Pino Toscano wrote:
> - add a no-op Connection.close(), as it called explicitly in the
>   close() callback of the nbdkit plugin (rhv-upload-plugin.py)
> - fix the types of the 'id' variables, which are strings
> ---
>  v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/__init__.py | 3 +++
>  v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py    | 4 ++--
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/__init__.py b/v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/__init__.py
> index cc4224ccd..2ceb07c0c 100644
> --- a/v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/__init__.py
> +++ b/v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/__init__.py
> @@ -35,6 +35,9 @@ class Connection(object):
>      ):
>          pass
>  
> +    def close(self):
> +        pass
> +
>      def system_service(self):
>          return SystemService()
>  
> diff --git a/v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py b/v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py
> index 9b3f557ee..60ba541cd 100644
> --- a/v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py
> +++ b/v2v/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py
> @@ -73,7 +73,7 @@ class Disk(object):
>      ):
>          pass
>  
> -    id = 123
> +    id = "123"
>      status = DiskStatus.OK
>  
>  class ImageTransferPhase(Enum):
> @@ -104,7 +104,7 @@ class ImageTransfer(object):
>      ):
>          pass
>  
> -    id = 456
> +    id = "456"
>      phase = ImageTransferPhase.TRANSFERRING
>      transfer_url = "http://localhost:" + str(imageio_port) + "/"

Looks good.  The module works for me as it is, but I guess
these are improvements, so ACK.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW




More information about the Libguestfs mailing list