X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Ftools%2Fvppapigen%2Fvppapigen.py;h=e6237a753f977811edd28e1c0fa83bfd9f9160f1;hb=07dce1e11de9872b5c9695e8cbbf89a2bcb3f63d;hp=a1bb0e184df7f4b500629cdc8df0dfd8410f131e;hpb=fc70e3a89f7a5a8913eac3d89ace578f9d1a7c11;p=vpp.git diff --git a/src/tools/vppapigen/vppapigen.py b/src/tools/vppapigen/vppapigen.py index a1bb0e184df..e6237a753f9 100755 --- a/src/tools/vppapigen/vppapigen.py +++ b/src/tools/vppapigen/vppapigen.py @@ -574,6 +574,7 @@ class VPPAPI(object): msgs = {d.name: d for d in s['defines']} svcs = {s.caller: s for s in s['services']} + replies = {s.reply: s for s in s['services']} seen_services = {} for service in svcs: @@ -584,6 +585,9 @@ class VPPAPI(object): raise ValueError('Service definition refers to unknown message' ' definition in reply: {}' .format(svcs[service].reply)) + if service in replies: + raise ValueError('Service definition refers to message' + ' marked as reply: {}'.format(service)) for event in svcs[service].events: if event not in msgs: raise ValueError('Service definition refers to unknown ' @@ -597,10 +601,6 @@ class VPPAPI(object): continue if msgs[d].singular is True: continue - #if d.endswith('_counters'): - # continue - #if d.endswith('_event'): - # continue if d.endswith('_reply'): if d[:-6] in svcs: continue @@ -630,9 +630,8 @@ class VPPAPI(object): if d+'_reply' in msgs: s['services'].append(Service(d, d+'_reply')) else: - self.logger.warning('{} missing reply message ({})' - .format(d, d+'_reply')) - s['services'].append(Service(d, None)) + raise ValueError('{} missing reply message ({}) or service definition' + .format(d, d+'_reply')) return s