final String SP = searchPattern; //NOSONAR
- for (File file: new File(getBasePath()).listFiles(/*new FilenameFilter() {
- @Override
- public boolean accept(File dir, String name) {
- return name.matches(SP);
- }
- }*/)) {
+ for (File file: new File(getBasePath()).listFiles()) {
try (JsonReader jsonReader = new JsonReader(new FileReader(file))){
artifacts.add(gson.fromJson(jsonReader, Artifact.class));
} catch (Exception e) { // NOSONAR
single = new OnapCommandProfileStore();
}
- //single.load();
return single;
}
OnapCommandParamEntity[] list = gson.fromJson(jsonReader,
OnapCommandParamEntity[].class);
params.addAll(Arrays.asList(list));
-// } else {
-// throw new OnapCommandProfileNotFound(profileName);
} catch (Exception e) { // NOSONAR
throw new OnapCommandProfileLoadFailed(e);
}
result = blockingStub.withDeadlineAfter(timeout, TimeUnit.MILLISECONDS).invoke(input);
} catch (StatusRuntimeException e) {
logger.warn("RPC failed: {}", e.getStatus());
- //Status{code=DEADLINE_EXCEEDED}
throw new OpenInterfaceGrpcTimeoutExecption(e.getMessage());
}
logger.info("Output: {}", result);
result = blockingStub.withDeadlineAfter(timeout, TimeUnit.MILLISECONDS).remoteCli(args);
} catch (StatusRuntimeException e) {
logger.warn("RPC failed: {}", e.getStatus());
- //Status{code=DEADLINE_EXCEEDED}
throw new OpenInterfaceGrpcTimeoutExecption(e.getMessage());
}
outputValue = pr.getError();
} else {
- //remove ${tmp: and closing }
+ //remove $(tmp: and closing )
String tmpName = this.output.substring(7, this.output.length()-1);
String tmpFile = tmpFiles.get("tmp:" + tmpName);
if (tmpFile != null) {
}
Map<String, List<String>> results = OnapCommandHttpUtils.populateOutputs(this.getResultMap(), output);
- //results = OnapCommandUtils.populateOutputsFromInputParameters(results, this.getParametersMap());
for (OnapCommandResultAttribute attr : this.getResult().getRecords()) {
attr.setValues(results.get(attr.getName()));