vppapigen: require service definition for singleton messages 76/10976/3
authorMarek Gradzki <mgradzki@cisco.com>
Tue, 6 Mar 2018 10:42:36 +0000 (11:42 +0100)
committerOle Trøan <otroan@employees.org>
Tue, 6 Mar 2018 12:54:57 +0000 (12:54 +0000)
Change-Id: Ie7b1c5e50588f65657c3c0900e5914ea82ebb50f
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
src/tools/vppapigen/vppapigen.py

index 57e5e3a..e6237a7 100755 (executable)
@@ -601,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
@@ -634,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