Updated the "intents -s" Intents CLI summary command to print
the intents in the new WITHDRAW_REQ state: "withdrawReq". Also, renamed "submitted" to "installReq" in the CLI output to reflect the state renaming. Change-Id: Ic75179a203ad05a44fae4e43b350835a640e8fb7
Showing
1 changed file
with
12 additions
and
7 deletions
| ... | @@ -206,11 +206,12 @@ public class IntentsListCommand extends AbstractShellCommand { | ... | @@ -206,11 +206,12 @@ public class IntentsListCommand extends AbstractShellCommand { |
| 206 | private class IntentSummary { | 206 | private class IntentSummary { |
| 207 | private final String intentType; | 207 | private final String intentType; |
| 208 | private int total = 0; | 208 | private int total = 0; |
| 209 | - private int submitted = 0; | 209 | + private int installReq = 0; |
| 210 | private int compiling = 0; | 210 | private int compiling = 0; |
| 211 | private int installing = 0; | 211 | private int installing = 0; |
| 212 | private int installed = 0; | 212 | private int installed = 0; |
| 213 | private int recompiling = 0; | 213 | private int recompiling = 0; |
| 214 | + private int withdrawReq = 0; | ||
| 214 | private int withdrawing = 0; | 215 | private int withdrawing = 0; |
| 215 | private int withdrawn = 0; | 216 | private int withdrawn = 0; |
| 216 | private int failed = 0; | 217 | private int failed = 0; |
| ... | @@ -221,11 +222,11 @@ public class IntentsListCommand extends AbstractShellCommand { | ... | @@ -221,11 +222,11 @@ public class IntentsListCommand extends AbstractShellCommand { |
| 221 | private static final String FORMAT_SUMMARY_LINE2 = | 222 | private static final String FORMAT_SUMMARY_LINE2 = |
| 222 | "%-23s withdrawn= %7d failed= %7d"; | 223 | "%-23s withdrawn= %7d failed= %7d"; |
| 223 | private static final String FORMAT_SUMMARY_LINE3 = | 224 | private static final String FORMAT_SUMMARY_LINE3 = |
| 224 | - "%-23s submitted= %7d compiling= %7d"; | 225 | + "%-23s installReq= %7d compiling= %7d"; |
| 225 | private static final String FORMAT_SUMMARY_LINE4 = | 226 | private static final String FORMAT_SUMMARY_LINE4 = |
| 226 | "%-23s installing= %7d recompiling= %7d"; | 227 | "%-23s installing= %7d recompiling= %7d"; |
| 227 | private static final String FORMAT_SUMMARY_LINE5 = | 228 | private static final String FORMAT_SUMMARY_LINE5 = |
| 228 | - "%-23s withdrawing= %7d"; | 229 | + "%-23s withdrawReq= %7d withdrawing= %7d"; |
| 229 | private static final String FORMAT_SUMMARY_LINE6 = | 230 | private static final String FORMAT_SUMMARY_LINE6 = |
| 230 | "%-23s unknownState= %7d"; | 231 | "%-23s unknownState= %7d"; |
| 231 | 232 | ||
| ... | @@ -247,7 +248,7 @@ public class IntentsListCommand extends AbstractShellCommand { | ... | @@ -247,7 +248,7 @@ public class IntentsListCommand extends AbstractShellCommand { |
| 247 | total++; | 248 | total++; |
| 248 | switch (intentState) { | 249 | switch (intentState) { |
| 249 | case INSTALL_REQ: | 250 | case INSTALL_REQ: |
| 250 | - submitted++; | 251 | + installReq++; |
| 251 | break; | 252 | break; |
| 252 | case COMPILING: | 253 | case COMPILING: |
| 253 | compiling++; | 254 | compiling++; |
| ... | @@ -261,6 +262,9 @@ public class IntentsListCommand extends AbstractShellCommand { | ... | @@ -261,6 +262,9 @@ public class IntentsListCommand extends AbstractShellCommand { |
| 261 | case RECOMPILING: | 262 | case RECOMPILING: |
| 262 | recompiling++; | 263 | recompiling++; |
| 263 | break; | 264 | break; |
| 265 | + case WITHDRAW_REQ: | ||
| 266 | + withdrawReq++; | ||
| 267 | + break; | ||
| 264 | case WITHDRAWING: | 268 | case WITHDRAWING: |
| 265 | withdrawing++; | 269 | withdrawing++; |
| 266 | break; | 270 | break; |
| ... | @@ -282,9 +286,9 @@ public class IntentsListCommand extends AbstractShellCommand { | ... | @@ -282,9 +286,9 @@ public class IntentsListCommand extends AbstractShellCommand { |
| 282 | void printState() { | 286 | void printState() { |
| 283 | print(FORMAT_SUMMARY_LINE1, intentType, total, installed); | 287 | print(FORMAT_SUMMARY_LINE1, intentType, total, installed); |
| 284 | print(FORMAT_SUMMARY_LINE2, intentType, withdrawn, failed); | 288 | print(FORMAT_SUMMARY_LINE2, intentType, withdrawn, failed); |
| 285 | - print(FORMAT_SUMMARY_LINE3, intentType, submitted, compiling); | 289 | + print(FORMAT_SUMMARY_LINE3, intentType, installReq, compiling); |
| 286 | print(FORMAT_SUMMARY_LINE4, intentType, installing, recompiling); | 290 | print(FORMAT_SUMMARY_LINE4, intentType, installing, recompiling); |
| 287 | - print(FORMAT_SUMMARY_LINE5, intentType, withdrawing); | 291 | + print(FORMAT_SUMMARY_LINE5, intentType, withdrawReq, withdrawing); |
| 288 | if (unknownState != 0) { | 292 | if (unknownState != 0) { |
| 289 | print(FORMAT_SUMMARY_LINE6, intentType, unknownState); | 293 | print(FORMAT_SUMMARY_LINE6, intentType, unknownState); |
| 290 | } | 294 | } |
| ... | @@ -300,10 +304,11 @@ public class IntentsListCommand extends AbstractShellCommand { | ... | @@ -300,10 +304,11 @@ public class IntentsListCommand extends AbstractShellCommand { |
| 300 | .put("total", total) | 304 | .put("total", total) |
| 301 | .put("installed", installed) | 305 | .put("installed", installed) |
| 302 | .put("failed", failed) | 306 | .put("failed", failed) |
| 303 | - .put("submitted", submitted) | 307 | + .put("installReq", installReq) |
| 304 | .put("compiling", compiling) | 308 | .put("compiling", compiling) |
| 305 | .put("installing", installing) | 309 | .put("installing", installing) |
| 306 | .put("recompiling", recompiling) | 310 | .put("recompiling", recompiling) |
| 311 | + .put("withdrawReq", withdrawReq) | ||
| 307 | .put("withdrawing", withdrawing) | 312 | .put("withdrawing", withdrawing) |
| 308 | .put("withdrawn", withdrawn) | 313 | .put("withdrawn", withdrawn) |
| 309 | .put("unknownState", unknownState); | 314 | .put("unknownState", unknownState); | ... | ... |
-
Please register or login to post a comment