Committed by
Gerrit Code Review
[Blackbird] ONOS-1317 - JSON outpout for 'intents -p' command
Change-Id: I7722709347a5b24e83de57de8bb6124d06a58a21
Showing
1 changed file
with
10 additions
and
6 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 | - service.getPending().forEach(intent -> | 79 | + if (outputJson()) { |
80 | - print("id=%s, key=%s, type=%s, appId=%s", | 80 | + print("%s", json(service, service.getPending())); |
81 | - intent.id(), intent.key(), | 81 | + } else { |
82 | - intent.getClass().getSimpleName(), | 82 | + service.getPending().forEach(intent -> |
83 | - intent.appId().name()) | 83 | + print("id=%s, key=%s, type=%s, appId=%s", |
84 | - ); | 84 | + intent.id(), intent.key(), |
85 | + intent.getClass().getSimpleName(), | ||
86 | + intent.appId().name()) | ||
87 | + ); | ||
88 | + } | ||
85 | return; | 89 | return; |
86 | } | 90 | } |
87 | 91 | ... | ... |
-
Please register or login to post a comment