Ray Milkey
Committed by Gerrit Code Review

[Blackbird] ONOS-1317 - JSON outpout for 'intents -p' command

Change-Id: I7722709347a5b24e83de57de8bb6124d06a58a21
......@@ -76,12 +76,16 @@ public class IntentsListCommand extends AbstractShellCommand {
}
return;
} else if (pending) {
service.getPending().forEach(intent ->
print("id=%s, key=%s, type=%s, appId=%s",
intent.id(), intent.key(),
intent.getClass().getSimpleName(),
intent.appId().name())
);
if (outputJson()) {
print("%s", json(service, service.getPending()));
} else {
service.getPending().forEach(intent ->
print("id=%s, key=%s, type=%s, appId=%s",
intent.id(), intent.key(),
intent.getClass().getSimpleName(),
intent.appId().name())
);
}
return;
}
......