Committed by
Gerrit Code Review
[Blackbird] ONOS-1317 - JSON outpout for 'intents -p' command
Change-Id: I7722709347a5b24e83de57de8bb6124d06a58a21
Showing
1 changed file
with
4 additions
and
0 deletions
... | @@ -76,12 +76,16 @@ public class IntentsListCommand extends AbstractShellCommand { | ... | @@ -76,12 +76,16 @@ public class IntentsListCommand extends AbstractShellCommand { |
76 | } | 76 | } |
77 | return; | 77 | return; |
78 | } else if (pending) { | 78 | } else if (pending) { |
79 | + if (outputJson()) { | ||
80 | + print("%s", json(service, service.getPending())); | ||
81 | + } else { | ||
79 | service.getPending().forEach(intent -> | 82 | service.getPending().forEach(intent -> |
80 | print("id=%s, key=%s, type=%s, appId=%s", | 83 | print("id=%s, key=%s, type=%s, appId=%s", |
81 | intent.id(), intent.key(), | 84 | intent.id(), intent.key(), |
82 | intent.getClass().getSimpleName(), | 85 | intent.getClass().getSimpleName(), |
83 | intent.appId().name()) | 86 | intent.appId().name()) |
84 | ); | 87 | ); |
88 | + } | ||
85 | return; | 89 | return; |
86 | } | 90 | } |
87 | 91 | ... | ... |
-
Please register or login to post a comment