implement --cat

This commit is contained in:
Jonathan Shook 2023-12-09 17:17:13 -06:00
parent aad06bed09
commit c23878a0e6

View File

@ -84,6 +84,7 @@ public class NBCLIOptions {
private static final String COMPILE_SCRIPT = "--compile-script"; private static final String COMPILE_SCRIPT = "--compile-script";
private static final String SCRIPT_FILE = "--script-file"; private static final String SCRIPT_FILE = "--script-file";
private static final String COPY = "--copy"; private static final String COPY = "--copy";
private static final String CAT = "--cat";
private static final String SHOW_STACKTRACES = "--show-stacktraces"; private static final String SHOW_STACKTRACES = "--show-stacktraces";
private static final String EXPERIMENTAL = "--experimental"; private static final String EXPERIMENTAL = "--experimental";
private static final String MATURITY = "--maturity"; private static final String MATURITY = "--maturity";
@ -199,6 +200,7 @@ public class NBCLIOptions {
private boolean wantsConsoleMetrics = true; private boolean wantsConsoleMetrics = true;
private String annotateLabelSpec = ""; private String annotateLabelSpec = "";
private String metricsLabelSpec = ""; private String metricsLabelSpec = "";
private String wantsToCatResource ="";
public boolean wantsLoggedMetrics() { public boolean wantsLoggedMetrics() {
return this.wantsConsoleMetrics; return this.wantsConsoleMetrics;
@ -264,6 +266,10 @@ public class NBCLIOptions {
return this.labels; return this.labels;
} }
public boolean wantsToCatResource() {
return this.wantsToCatResource!=null && !this.wantsToCatResource.isEmpty();
}
public enum Mode { public enum Mode {
ParseGlobalsOnly, ParseGlobalsOnly,
ParseAllOptions ParseAllOptions
@ -629,6 +635,10 @@ public class NBCLIOptions {
arglist.removeFirst(); arglist.removeFirst();
this.wantsToCopyWorkload = this.readWordOrThrow(arglist, "workload to copy"); this.wantsToCopyWorkload = this.readWordOrThrow(arglist, "workload to copy");
break; break;
case NBCLIOptions.CAT:
arglist.removeFirst();
this.wantsToCatResource = this.readWordOrThrow(arglist, "workload to cat");
break;
default: default:
nonincludes.addLast(arglist.removeFirst()); nonincludes.addLast(arglist.removeFirst());
} }
@ -887,6 +897,11 @@ public class NBCLIOptions {
return this.wantsToCopyWorkload; return this.wantsToCopyWorkload;
} }
public String wantsToCatResourceNamed() {
return this.wantsToCatResource;
}
public boolean wantsWorkloadsList() { public boolean wantsWorkloadsList() {
return this.wantsWorkloadsList; return this.wantsWorkloadsList;
} }