diff options
author | Kanagaraj Manickam <kanagaraj.manickam@huawei.com> | 2017-10-26 14:52:45 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-10-26 14:52:45 +0000 |
commit | 5090b19cde7127ff532d422a7b18e16e2d374da2 (patch) | |
tree | c32d42c8c37e52ce9f3368ba048ed397d5a30470 /main/src | |
parent | 9d1818327ce7aeb2839fec218c99e5cd89d77b9d (diff) | |
parent | 3993f730f33d81a6a1ae50eccca9ab926702ec30 (diff) |
Merge changes I3bc55b53,Iff6d1f16,I19bdb8a1,Ia90bd215,I84533921
* changes:
Remove the stale samples for cloud commands
Add samples for cloud-delete
Add samples for cloud-list
Add samples for cloud-create command
Fix the sample file name align with schema
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/main/java/org/onap/cli/main/OnapCli.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main/src/main/java/org/onap/cli/main/OnapCli.java b/main/src/main/java/org/onap/cli/main/OnapCli.java index 0ed27ea1..4cc2132d 100644 --- a/main/src/main/java/org/onap/cli/main/OnapCli.java +++ b/main/src/main/java/org/onap/cli/main/OnapCli.java @@ -363,7 +363,7 @@ public class OnapCli { this.print(result.print()); this.exitSuccessfully(); - generateSmapleYaml(result); + generateSmapleYaml(cmd); } catch (Exception e) { this.print(cmd.getResult().getDebugInfo()); if (e instanceof OnapCommandWarning) { @@ -376,13 +376,13 @@ public class OnapCli { } } - private void generateSmapleYaml(OnapCommandResult result) throws OnapCommandException { + private void generateSmapleYaml(OnapCommand cmd) throws OnapCommandException { if (OnapCommandConfg.isSampleGenerateEnabled() && this.getExitCode() == OnapCliConstants.EXIT_SUCCESS) { try { - SampleYamlGenerator.generateSampleYaml(args, result.print(), + SampleYamlGenerator.generateSampleYaml(args, cmd.getResult().print(), OnapCommandRegistrar.getRegistrar().getEnabledProductVersion(), - OnapCommandConfg.getSampleGenerateTargetFolder(), - result.isDebug()); + OnapCommandConfg.getSampleGenerateTargetFolder() + "/" + cmd.getSchemaName().replaceAll(".yaml", "") + "-sample.yaml", + cmd.getResult().isDebug()); } catch (IOException error) { throw new OnapCommandInvalidSample(args.get(0), error); } |