Pino Toscano
2019-Aug-12 14:30 UTC
[Libguestfs] [PATCH] v2v: -o rhv-upload: fix the phony ovirtsdk4 module
- 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) + "/" -- 2.21.0
Richard W.M. Jones
2019-Aug-12 19:44 UTC
Re: [Libguestfs] [PATCH] v2v: -o rhv-upload: fix the phony ovirtsdk4 module
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
Maybe Matching Threads
- [PATCH] v2v: -o rhv-upload: adapt phony ovirtsdk4 module to recent changes
- [PATCH] v2v: -o rhv-upload: check whether the cluster exists
- [PATCH v2 0/3] v2v: -o rhv-upload: Add a test.
- [PATCH 0/3] v2v: -o rhv-upload: Add a test.
- [v2v PATCH 0/6] Various Python pycodestyle fixes