blob: a52b7e3870a172721a78adfd1308c307cdf3ed9f [file] [log] [blame]
Thomas Vachuska7d693f52014-10-21 19:17:57 -07001/*
Ray Milkey34c95902015-04-15 09:47:53 -07002 * Copyright 2014-2015 Open Networking Laboratory
Thomas Vachuska7d693f52014-10-21 19:17:57 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
Thomas Vachuska7d693f52014-10-21 19:17:57 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
Thomas Vachuska7d693f52014-10-21 19:17:57 -070015 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.cli.net;
tomf5c9d922014-10-03 15:22:03 -070017
Thomas Vachuska6ce73042014-10-21 10:01:49 -070018import com.fasterxml.jackson.databind.JsonNode;
19import com.fasterxml.jackson.databind.ObjectMapper;
20import com.fasterxml.jackson.databind.node.ArrayNode;
21import com.fasterxml.jackson.databind.node.ObjectNode;
tomf5c9d922014-10-03 15:22:03 -070022import org.apache.karaf.shell.commands.Command;
Brian O'Connorfe0f4b12014-10-30 21:19:02 -070023import org.apache.karaf.shell.commands.Option;
Brian O'Connorabafb502014-12-02 22:26:20 -080024import org.onosproject.cli.AbstractShellCommand;
25import org.onosproject.net.ConnectPoint;
26import org.onosproject.net.Link;
27import org.onosproject.net.NetworkResource;
28import org.onosproject.net.intent.ConnectivityIntent;
Pavlin Radoslavovaab51a32014-12-08 11:07:38 -080029import org.onosproject.net.intent.HostToHostIntent;
Brian O'Connorabafb502014-12-02 22:26:20 -080030import org.onosproject.net.intent.Intent;
31import org.onosproject.net.intent.IntentService;
32import org.onosproject.net.intent.IntentState;
33import org.onosproject.net.intent.LinkCollectionIntent;
34import org.onosproject.net.intent.MultiPointToSinglePointIntent;
35import org.onosproject.net.intent.PathIntent;
36import org.onosproject.net.intent.PointToPointIntent;
37import org.onosproject.net.intent.SinglePointToMultiPointIntent;
Thomas Vachuska6ce73042014-10-21 10:01:49 -070038
Thomas Vachuska10d4abc2014-10-21 12:47:26 -070039import java.util.List;
Thomas Vachuska6ce73042014-10-21 10:01:49 -070040import java.util.Set;
tomf5c9d922014-10-03 15:22:03 -070041
42/**
43 * Lists the inventory of intents and their states.
44 */
45@Command(scope = "onos", name = "intents",
46 description = "Lists the inventory of intents and their states")
47public class IntentsListCommand extends AbstractShellCommand {
48
Pavlin Radoslavov708e8202014-11-14 17:18:37 -080049 @Option(name = "-i", aliases = "--installable",
50 description = "Output Installable Intents",
Brian O'Connorfe0f4b12014-10-30 21:19:02 -070051 required = false, multiValued = false)
52 private boolean showInstallable = false;
53
Pavlin Radoslavov708e8202014-11-14 17:18:37 -080054 @Option(name = "-s", aliases = "--summary",
55 description = "Intents summary",
56 required = false, multiValued = false)
57 private boolean intentsSummary = false;
Brian O'Connorfe0f4b12014-10-30 21:19:02 -070058
Jonathan Hart34f1e382015-02-24 16:52:23 -080059 @Option(name = "-p", aliases = "--pending",
60 description = "Show inforamtion about pending intents",
61 required = false, multiValued = false)
62 private boolean pending = false;
63
tomf5c9d922014-10-03 15:22:03 -070064 @Override
65 protected void execute() {
66 IntentService service = get(IntentService.class);
Pavlin Radoslavov708e8202014-11-14 17:18:37 -080067
68 if (intentsSummary) {
69 IntentSummaries intentSummaries = new IntentSummaries();
70 intentSummaries.collectIntentSummary(service,
71 service.getIntents());
72 if (outputJson()) {
73 print("%s", intentSummaries.json());
74 } else {
75 intentSummaries.printSummary();
76 }
77 return;
Jonathan Hart34f1e382015-02-24 16:52:23 -080078 } else if (pending) {
Ray Milkey740c8a32015-03-17 13:41:03 -070079 if (outputJson()) {
80 print("%s", json(service, service.getPending()));
81 } else {
82 service.getPending().forEach(intent ->
83 print("id=%s, key=%s, type=%s, appId=%s",
84 intent.id(), intent.key(),
85 intent.getClass().getSimpleName(),
86 intent.appId().name())
87 );
88 }
Jonathan Hart34f1e382015-02-24 16:52:23 -080089 return;
Pavlin Radoslavov708e8202014-11-14 17:18:37 -080090 }
91
Thomas Vachuska6ce73042014-10-21 10:01:49 -070092 if (outputJson()) {
93 print("%s", json(service, service.getIntents()));
94 } else {
95 for (Intent intent : service.getIntents()) {
Ray Milkeyf9af43c2015-02-09 16:45:48 -080096 IntentState state = service.getIntentState(intent.key());
Thomas Vachuska3ea690b2014-11-29 12:39:03 -080097 if (state != null) {
Jonathan Hart189f9bf2015-02-11 19:24:28 -080098 print("id=%s, state=%s, key=%s, type=%s, appId=%s",
99 intent.id(), state, intent.key(),
100 intent.getClass().getSimpleName(),
Thomas Vachuska3ea690b2014-11-29 12:39:03 -0800101 intent.appId().name());
102 printDetails(service, intent);
103 }
Thomas Vachuska6ce73042014-10-21 10:01:49 -0700104 }
tomf5c9d922014-10-03 15:22:03 -0700105 }
106 }
107
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800108 /**
109 * Internal local class to keep track of all intent summaries.
110 */
111 private class IntentSummaries {
112 private IntentSummary summaryAll;
113 private IntentSummary summaryConnectivity;
Pavlin Radoslavovaab51a32014-12-08 11:07:38 -0800114 private IntentSummary summaryHostToHost;
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800115 private IntentSummary summaryPointToPoint;
116 private IntentSummary summaryMultiPointToSinglePoint;
117 private IntentSummary summarySinglePointToMultiPoint;
118 private IntentSummary summaryPath;
119 private IntentSummary summaryLinkCollection;
120 private IntentSummary summaryUnknownType;
121
122 /**
123 * Initializes the internal state.
124 */
125 private void init() {
126 summaryAll = new IntentSummary("All");
127 summaryConnectivity = new IntentSummary("Connectivity");
Pavlin Radoslavovaab51a32014-12-08 11:07:38 -0800128 summaryHostToHost = new IntentSummary("HostToHost");
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800129 summaryPointToPoint = new IntentSummary("PointToPoint");
130 summaryMultiPointToSinglePoint =
131 new IntentSummary("MultiPointToSinglePoint");
132 summarySinglePointToMultiPoint =
133 new IntentSummary("SinglePointToMultiPoint");
134 summaryPath = new IntentSummary("Path");
135 summaryLinkCollection = new IntentSummary("LinkCollection");
136 summaryUnknownType = new IntentSummary("UnknownType");
137 }
138
139 /**
140 * Collects summary of all intents.
141 *
142 * @param service the Intent Service to use
143 * @param intents the intents
144 */
145 private void collectIntentSummary(IntentService service,
146 Iterable<Intent> intents) {
147 init();
148
149 // Collect the summary for each intent type intents
150 for (Intent intent : intents) {
Ray Milkeyf9af43c2015-02-09 16:45:48 -0800151 IntentState intentState = service.getIntentState(intent.key());
Pavlin Radoslavovdeb8a102014-11-26 13:31:36 -0800152 if (intentState == null) {
153 continue;
154 }
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800155
156 // Update the summary for all Intents
157 summaryAll.update(intentState);
158
159 if (intent instanceof ConnectivityIntent) {
160 summaryConnectivity.update(intentState);
161 // NOTE: ConnectivityIntent is a base type Intent
162 // continue;
163 }
Pavlin Radoslavovaab51a32014-12-08 11:07:38 -0800164 if (intent instanceof HostToHostIntent) {
165 summaryHostToHost.update(intentState);
166 continue;
167 }
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800168 if (intent instanceof PointToPointIntent) {
169 summaryPointToPoint.update(intentState);
170 continue;
171 }
172 if (intent instanceof MultiPointToSinglePointIntent) {
173 summaryMultiPointToSinglePoint.update(intentState);
174 continue;
175 }
176 if (intent instanceof SinglePointToMultiPointIntent) {
177 summarySinglePointToMultiPoint.update(intentState);
178 continue;
179 }
180 if (intent instanceof PathIntent) {
181 summaryPath.update(intentState);
182 continue;
183 }
184 if (intent instanceof LinkCollectionIntent) {
185 summaryLinkCollection.update(intentState);
186 continue;
187 }
188
189 summaryUnknownType.update(intentState);
190 }
191 }
192
193 /**
194 * Gets JSON representation of all Intents summary.
195 *
196 * @return JSON representation of all Intents summary
197 */
198 ObjectNode json() {
199 ObjectMapper mapper = new ObjectMapper();
200 ObjectNode result = mapper.createObjectNode();
Ray Milkey9d810f62015-02-13 11:20:58 -0800201 result.set("connectivity", summaryConnectivity.json(mapper));
202 result.set("hostToHost", summaryHostToHost.json(mapper));
203 result.set("pointToPoint", summaryPointToPoint.json(mapper));
204 result.set("multiPointToSinglePoint",
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800205 summaryMultiPointToSinglePoint.json(mapper));
Ray Milkey9d810f62015-02-13 11:20:58 -0800206 result.set("singlePointToMultiPoint",
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800207 summarySinglePointToMultiPoint.json(mapper));
Ray Milkey9d810f62015-02-13 11:20:58 -0800208 result.set("path", summaryPath.json(mapper));
209 result.set("linkCollection", summaryLinkCollection.json(mapper));
210 result.set("unknownType", summaryUnknownType.json(mapper));
211 result.set("all", summaryAll.json(mapper));
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800212 return result;
213 }
214
215 /**
216 * Prints summary of the intents.
217 */
218 private void printSummary() {
219 summaryConnectivity.printState();
Pavlin Radoslavovaab51a32014-12-08 11:07:38 -0800220 summaryHostToHost.printState();
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800221 summaryPointToPoint.printState();
222 summaryMultiPointToSinglePoint.printState();
223 summarySinglePointToMultiPoint.printState();
224 summaryPath.printState();
225 summaryLinkCollection.printState();
226 summaryUnknownType.printState();
227 summaryAll.printState();
228 }
229
230 /**
231 * Internal local class to keep track of a single type Intent summary.
232 */
233 private class IntentSummary {
234 private final String intentType;
235 private int total = 0;
Pavlin Radoslavov67c05142014-12-02 13:04:08 -0800236 private int installReq = 0;
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800237 private int compiling = 0;
238 private int installing = 0;
239 private int installed = 0;
240 private int recompiling = 0;
Pavlin Radoslavov67c05142014-12-02 13:04:08 -0800241 private int withdrawReq = 0;
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800242 private int withdrawing = 0;
243 private int withdrawn = 0;
244 private int failed = 0;
245 private int unknownState = 0;
246
247 private static final String FORMAT_SUMMARY_LINE1 =
248 "%-23s total= %7d installed= %7d";
249 private static final String FORMAT_SUMMARY_LINE2 =
250 "%-23s withdrawn= %7d failed= %7d";
251 private static final String FORMAT_SUMMARY_LINE3 =
Pavlin Radoslavov67c05142014-12-02 13:04:08 -0800252 "%-23s installReq= %7d compiling= %7d";
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800253 private static final String FORMAT_SUMMARY_LINE4 =
254 "%-23s installing= %7d recompiling= %7d";
255 private static final String FORMAT_SUMMARY_LINE5 =
Pavlin Radoslavov67c05142014-12-02 13:04:08 -0800256 "%-23s withdrawReq= %7d withdrawing= %7d";
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800257 private static final String FORMAT_SUMMARY_LINE6 =
258 "%-23s unknownState= %7d";
259
260 /**
261 * Constructor.
262 *
263 * @param intentType the scring describing the Intent type
264 */
265 IntentSummary(String intentType) {
266 this.intentType = intentType;
267 }
268
269 /**
270 * Updates the Intent Summary.
271 *
272 * @param intentState the state of the Intent
273 */
274 void update(IntentState intentState) {
275 total++;
276 switch (intentState) {
Brian O'Connor7a71d5d2014-12-02 00:12:27 -0800277 case INSTALL_REQ:
Pavlin Radoslavov67c05142014-12-02 13:04:08 -0800278 installReq++;
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800279 break;
280 case COMPILING:
281 compiling++;
282 break;
283 case INSTALLING:
284 installing++;
285 break;
286 case INSTALLED:
287 installed++;
288 break;
289 case RECOMPILING:
290 recompiling++;
291 break;
Pavlin Radoslavov67c05142014-12-02 13:04:08 -0800292 case WITHDRAW_REQ:
293 withdrawReq++;
294 break;
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800295 case WITHDRAWING:
296 withdrawing++;
297 break;
298 case WITHDRAWN:
299 withdrawn++;
300 break;
301 case FAILED:
302 failed++;
303 break;
304 default:
305 unknownState++;
306 break;
307 }
308 }
309
310 /**
311 * Prints the Intent Summary.
312 */
313 void printState() {
314 print(FORMAT_SUMMARY_LINE1, intentType, total, installed);
315 print(FORMAT_SUMMARY_LINE2, intentType, withdrawn, failed);
Pavlin Radoslavov67c05142014-12-02 13:04:08 -0800316 print(FORMAT_SUMMARY_LINE3, intentType, installReq, compiling);
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800317 print(FORMAT_SUMMARY_LINE4, intentType, installing, recompiling);
Pavlin Radoslavov67c05142014-12-02 13:04:08 -0800318 print(FORMAT_SUMMARY_LINE5, intentType, withdrawReq, withdrawing);
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800319 if (unknownState != 0) {
320 print(FORMAT_SUMMARY_LINE6, intentType, unknownState);
321 }
322 }
323
324 /**
325 * Gets the JSON representation of the Intent Summary.
326 *
327 * @return the JSON representation of the Intent Summary
328 */
329 JsonNode json(ObjectMapper mapper) {
330 ObjectNode result = mapper.createObjectNode()
331 .put("total", total)
332 .put("installed", installed)
333 .put("failed", failed)
Pavlin Radoslavov67c05142014-12-02 13:04:08 -0800334 .put("installReq", installReq)
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800335 .put("compiling", compiling)
336 .put("installing", installing)
337 .put("recompiling", recompiling)
Pavlin Radoslavov67c05142014-12-02 13:04:08 -0800338 .put("withdrawReq", withdrawReq)
Pavlin Radoslavov708e8202014-11-14 17:18:37 -0800339 .put("withdrawing", withdrawing)
340 .put("withdrawn", withdrawn)
341 .put("unknownState", unknownState);
342
343 return result;
344 }
345 }
346 }
347
Thomas Vachuska10d4abc2014-10-21 12:47:26 -0700348 private void printDetails(IntentService service, Intent intent) {
Sho SHIMIZUd7d18002015-01-21 14:37:14 -0800349 if (!intent.resources().isEmpty()) {
Thomas Vachuska6ce73042014-10-21 10:01:49 -0700350 print(" resources=%s", intent.resources());
351 }
352 if (intent instanceof ConnectivityIntent) {
353 ConnectivityIntent ci = (ConnectivityIntent) intent;
Thomas Vachuska10d4abc2014-10-21 12:47:26 -0700354 if (!ci.selector().criteria().isEmpty()) {
355 print(" selector=%s", ci.selector().criteria());
356 }
Ray Milkey42507352015-03-20 15:16:10 -0700357 if (!ci.treatment().allInstructions().isEmpty()) {
358 print(" treatment=%s", ci.treatment().allInstructions());
Thomas Vachuska10d4abc2014-10-21 12:47:26 -0700359 }
Thomas Vachuskaedc944c2014-11-04 15:42:25 -0800360 if (ci.constraints() != null && !ci.constraints().isEmpty()) {
361 print(" constraints=%s", ci.constraints());
362 }
Thomas Vachuska6ce73042014-10-21 10:01:49 -0700363 }
364
Pavlin Radoslavovaab51a32014-12-08 11:07:38 -0800365 if (intent instanceof HostToHostIntent) {
366 HostToHostIntent pi = (HostToHostIntent) intent;
367 print(" host1=%s, host2=%s", pi.one(), pi.two());
368 } else if (intent instanceof PointToPointIntent) {
Thomas Vachuska6ce73042014-10-21 10:01:49 -0700369 PointToPointIntent pi = (PointToPointIntent) intent;
370 print(" ingress=%s, egress=%s", pi.ingressPoint(), pi.egressPoint());
371 } else if (intent instanceof MultiPointToSinglePointIntent) {
372 MultiPointToSinglePointIntent pi = (MultiPointToSinglePointIntent) intent;
373 print(" ingress=%s, egress=%s", pi.ingressPoints(), pi.egressPoint());
374 } else if (intent instanceof SinglePointToMultiPointIntent) {
375 SinglePointToMultiPointIntent pi = (SinglePointToMultiPointIntent) intent;
376 print(" ingress=%s, egress=%s", pi.ingressPoint(), pi.egressPoints());
377 } else if (intent instanceof PathIntent) {
378 PathIntent pi = (PathIntent) intent;
379 print(" path=%s, cost=%d", pi.path().links(), pi.path().cost());
380 } else if (intent instanceof LinkCollectionIntent) {
381 LinkCollectionIntent li = (LinkCollectionIntent) intent;
382 print(" links=%s", li.links());
Michele Santuari4a338072014-11-05 18:38:55 +0100383 print(" egress=%s", li.egressPoints());
Thomas Vachuska6ce73042014-10-21 10:01:49 -0700384 }
Thomas Vachuska10d4abc2014-10-21 12:47:26 -0700385
Ray Milkeyf9af43c2015-02-09 16:45:48 -0800386 List<Intent> installable = service.getInstallableIntents(intent.key());
Brian O'Connorfe0f4b12014-10-30 21:19:02 -0700387 if (showInstallable && installable != null && !installable.isEmpty()) {
Thomas Vachuska10d4abc2014-10-21 12:47:26 -0700388 print(" installable=%s", installable);
389 }
Thomas Vachuska6ce73042014-10-21 10:01:49 -0700390 }
391
392 // Produces JSON array of the specified intents.
393 private JsonNode json(IntentService service, Iterable<Intent> intents) {
394 ObjectMapper mapper = new ObjectMapper();
395 ArrayNode result = mapper.createArrayNode();
396 for (Intent intent : intents) {
397 result.add(json(service, mapper, intent));
398 }
399 return result;
400 }
401
402 private JsonNode json(IntentService service, ObjectMapper mapper, Intent intent) {
403 ObjectNode result = mapper.createObjectNode()
404 .put("id", intent.id().toString())
Thomas Vachuska6ce73042014-10-21 10:01:49 -0700405 .put("type", intent.getClass().getSimpleName())
406 .put("appId", intent.appId().name());
407
Ray Milkeyf9af43c2015-02-09 16:45:48 -0800408 IntentState state = service.getIntentState(intent.key());
Thomas Vachuska10d4abc2014-10-21 12:47:26 -0700409 if (state != null) {
410 result.put("state", state.toString());
411 }
412
Sho SHIMIZUd7d18002015-01-21 14:37:14 -0800413 if (!intent.resources().isEmpty()) {
Thomas Vachuska6ce73042014-10-21 10:01:49 -0700414 ArrayNode rnode = mapper.createArrayNode();
415 for (NetworkResource resource : intent.resources()) {
416 rnode.add(resource.toString());
417 }
418 result.set("resources", rnode);
419 }
420
421 if (intent instanceof ConnectivityIntent) {
422 ConnectivityIntent ci = (ConnectivityIntent) intent;
423 if (!ci.selector().criteria().isEmpty()) {
424 result.put("selector", ci.selector().criteria().toString());
425 }
Ray Milkey42507352015-03-20 15:16:10 -0700426 if (!ci.treatment().allInstructions().isEmpty()) {
427 result.put("treatment", ci.treatment().allInstructions().toString());
Thomas Vachuska6ce73042014-10-21 10:01:49 -0700428 }
429 }
430
431 if (intent instanceof PathIntent) {
432 PathIntent pi = (PathIntent) intent;
433 ArrayNode pnode = mapper.createArrayNode();
434 for (Link link : pi.path().links()) {
435 pnode.add(link.toString());
436 }
437 result.set("path", pnode);
Pavlin Radoslavovaab51a32014-12-08 11:07:38 -0800438 } else if (intent instanceof HostToHostIntent) {
439 HostToHostIntent pi = (HostToHostIntent) intent;
440 result.set("host1", LinksListCommand.json(mapper, pi.one()));
441 result.set("host2", LinksListCommand.json(mapper, pi.two()));
Thomas Vachuska6ce73042014-10-21 10:01:49 -0700442 } else if (intent instanceof PointToPointIntent) {
443 PointToPointIntent pi = (PointToPointIntent) intent;
444 result.set("ingress", LinksListCommand.json(mapper, pi.ingressPoint()));
445 result.set("egress", LinksListCommand.json(mapper, pi.egressPoint()));
Thomas Vachuska6ce73042014-10-21 10:01:49 -0700446 } else if (intent instanceof MultiPointToSinglePointIntent) {
447 MultiPointToSinglePointIntent pi = (MultiPointToSinglePointIntent) intent;
448 result.set("ingress", json(mapper, pi.ingressPoints()));
449 result.set("egress", LinksListCommand.json(mapper, pi.egressPoint()));
Thomas Vachuska6ce73042014-10-21 10:01:49 -0700450 } else if (intent instanceof SinglePointToMultiPointIntent) {
451 SinglePointToMultiPointIntent pi = (SinglePointToMultiPointIntent) intent;
452 result.set("ingress", LinksListCommand.json(mapper, pi.ingressPoint()));
453 result.set("egress", json(mapper, pi.egressPoints()));
Thomas Vachuska6ce73042014-10-21 10:01:49 -0700454 } else if (intent instanceof LinkCollectionIntent) {
455 LinkCollectionIntent li = (LinkCollectionIntent) intent;
456 result.set("links", LinksListCommand.json(li.links()));
457 }
458
Ray Milkeyf9af43c2015-02-09 16:45:48 -0800459 List<Intent> installable = service.getInstallableIntents(intent.key());
Thomas Vachuska10d4abc2014-10-21 12:47:26 -0700460 if (installable != null && !installable.isEmpty()) {
461 result.set("installable", json(service, installable));
462 }
Thomas Vachuska6ce73042014-10-21 10:01:49 -0700463 return result;
464 }
465
466 private JsonNode json(ObjectMapper mapper, Set<ConnectPoint> connectPoints) {
467 ArrayNode result = mapper.createArrayNode();
468 for (ConnectPoint cp : connectPoints) {
469 result.add(LinksListCommand.json(mapper, cp));
470 }
471 return result;
472 }
tomf5c9d922014-10-03 15:22:03 -0700473}