serialization: use the same inflection as sdbus++
When generating code sdbus++ uses python inflection to normalize names.
Use the sdbus++ module that does this when we generate the code that
calls methods in code generated by sdbus++. This avoids build failures
like:
gen_serialization.hpp:22:68: error: ‘const class
sdbusplus::xyz::openbmc_project::Example::server::Iface2’ has no member
named ‘example_Property4’; did you mean ‘exampleProperty4’?
Change-Id: I4b6dbb1f977465ea176f27d021ed2633ae40c37b
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/pimgen.py b/pimgen.py
index 7c9ee53..c7ed933 100755
--- a/pimgen.py
+++ b/pimgen.py
@@ -41,16 +41,13 @@
def __init__(self, dict):
self.dict = dict
- def properties(self, interface):
- return self.dict[interface]
-
def interfaces(self):
return self.dict.keys()
def names(self, interface):
names = []
if self.dict[interface]:
- names = [x["name"] for x in self.dict[interface]]
+ names = [NamedElement(name=x["name"]) for x in self.dict[interface]]
return names