[libvirt] [PATCH python] Fix bugs in nwfilter binding APIs

Daniel P. Berrangé posted 1 patch 5 years, 10 months ago
Failed in applying to current master (apply log)
generator.py  | 5 ++++-
sanitytest.py | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
[libvirt] [PATCH python] Fix bugs in nwfilter binding APIs
Posted by Daniel P. Berrangé 5 years, 10 months ago
We did not correctly mangle the API names in two cases, and we also
forgot to specialize the lookup method name in the sanity test.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 generator.py  | 5 ++++-
 sanitytest.py | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/generator.py b/generator.py
index ae0e45c..bd7ff11 100755
--- a/generator.py
+++ b/generator.py
@@ -1127,7 +1127,10 @@ def nameFixup(name, classe, type, file):
         func = func[0:1].lower() + func[1:]
     elif name[0:27] == "virNWFilterBindingCreateXML":
         func = name[3:]
-        func = func[0:1].lower() + func[1:]
+        func = func[0:3].lower() + func[3:]
+    elif name[0:24] == "virNWFilterBindingLookup":
+        func = name[3:]
+        func = func[0:3].lower() + func[3:]
     elif name[0:24] == "virNWFilterBindingDefine":
         func = name[3:]
         func = func[0:3].lower() + func[3:]
diff --git a/sanitytest.py b/sanitytest.py
index d5c23dc..68dde6b 100644
--- a/sanitytest.py
+++ b/sanitytest.py
@@ -260,7 +260,7 @@ for name in sorted(basicklassmap):
                 "LookupByUUIDString", "LookupByVolume" "LookupByName",
                 "LookupByID", "LookupByName", "LookupByKey", "LookupByPath",
                 "LookupByMACString", "LookupByUsage", "LookupByVolume",
-                "LookupByTargetPath","LookupSCSIHostByWWN",
+                "LookupByTargetPath","LookupSCSIHostByWWN", "LookupByPortDev",
                 "Restore", "RestoreFlags",
                 "SaveImageDefineXML", "SaveImageGetXMLDesc", "DefineXMLFlags"]:
         if klass != "virDomain":
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH python] Fix bugs in nwfilter binding APIs
Posted by Michal Privoznik 5 years, 10 months ago
On 06/28/2018 01:30 PM, Daniel P. Berrangé wrote:
> We did not correctly mangle the API names in two cases, and we also
> forgot to specialize the lookup method name in the sanity test.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  generator.py  | 5 ++++-
>  sanitytest.py | 2 +-
>  2 files changed, 5 insertions(+), 2 deletions(-)

ACK and safe for freeze.

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list