aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/vppapigen/JSON.py
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2018-02-09 13:39:22 +0100
committerMarek Gradzki <mgradzki@cisco.com>2018-02-09 20:13:18 +0100
commitd05b926dc2971552edca2ad510fb7437698c4aad (patch)
treebb0ec653ac53698d6f15f2b5da5a8c0849c0c33b /src/tools/vppapigen/JSON.py
parent2a8652701d0ce7185c60cc05e407950e87a6c150 (diff)
vppapigen: simplify JSON format for services
Use "services": { "foo_request": { "reply": "foo_request_reply" }, "foo_dump": { "reply": "foo_details", "stream": true } }, instead of: "services": [ { "foo_request": { "reply": "foo_request_reply" } }, { "foo_dump": { "reply": "foo_details", "stream": true } } ], Change-Id: I1d8e6bb4d41541b7f7f63242935f2ed4467fc52b Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'src/tools/vppapigen/JSON.py')
-rw-r--r--src/tools/vppapigen/JSON.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/vppapigen/JSON.py b/src/tools/vppapigen/JSON.py
index d1f47ebc560..73bff76cbb7 100644
--- a/src/tools/vppapigen/JSON.py
+++ b/src/tools/vppapigen/JSON.py
@@ -15,14 +15,14 @@ def walk_enums(s):
def walk_services(s):
- r = []
+ r = {}
for e in s:
d = {'reply': e.reply}
if e.stream:
d['stream'] = True
if e.events:
d['events'] = e.events
- r.append({e.caller: d})
+ r[e.caller] = d
return r