Populate default param based on no-auth 91/6491/15
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>
Tue, 1 Aug 2017 14:26:00 +0000 (19:56 +0530)
committerKanagaraj Manickam <kanagaraj.manickam@huawei.com>
Thu, 10 Aug 2017 05:33:38 +0000 (05:33 +0000)
commit2741f49b3b5e92c5c31f44133fd458c4f15b5479
treee232e671e11d664787802144532407cae3e08d06
parent4e2d92bc6c5ae4499f8a583f9b80a1a9172e0c17
Populate default param based on no-auth

Based on no-auth customise the default parameter for onap-command.

e.g. If "no-auth = true" then command should not add default parameter
"onap-username, onap-password, msb-url and no-auth".

Issue-Id: CLI-22
Change-Id: Ic9228feb1deb7e6f24eb9b9f0c8f15fd45364e94
Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
21 files changed:
framework/src/main/java/org/onap/cli/fw/OnapCommand.java
framework/src/main/java/org/onap/cli/fw/conf/Constants.java
framework/src/main/java/org/onap/cli/fw/conf/OnapCommandConfg.java
framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidDefaultParameter.java
framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java
framework/src/main/resources/default_input_parameters.yaml
framework/src/main/resources/onap.properties
framework/src/main/resources/schema-refresh.yaml
framework/src/test/java/org/onap/cli/fw/OnapCommandRegistrarTest.java
framework/src/test/java/org/onap/cli/fw/TestCommandValidate.java [new file with mode: 0644]
framework/src/test/java/org/onap/cli/fw/defaultParameter/TestDefaultParameterSection.java
framework/src/test/java/org/onap/cli/fw/input/OnapCommandParameterTest.java
framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java
framework/src/test/resources/onap.properties
framework/src/test/resources/sample-test-exclude-param.yaml
framework/src/test/resources/sample-test-include-exclude.yaml
framework/src/test/resources/sample-test-include-param.yaml
framework/src/test/resources/sample-test-invalid-exclude-noauth.yaml [new file with mode: 0644]
framework/src/test/resources/sample-test-invalid-include-noauth.yaml [new file with mode: 0644]
framework/src/test/resources/sample-test-schema-auth-required.yaml [new file with mode: 0644]
main/src/test/java/org/onap/cli/main/OnapCliMainTest.java