Fix invalid help parameters 97/6397/11
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>
Sun, 30 Jul 2017 19:15:06 +0000 (00:45 +0530)
committersubhash kumar singh <subhash.kumar.singh@huawei.com>
Fri, 4 Aug 2017 10:17:47 +0000 (15:47 +0530)
commite45e668a4f6bdeca4ddc4071c4f37822792d65ed
tree3d0d24e02a96e56ef4c68bbfdad539ced6b6bab0
parent31439b63b92b8124588a6262e1d9d0a89cdd46e9
Fix invalid help parameters

Introduce new section "default_parameter" to add "include" and
"exclude" parameter from defalut parameter list.

Following is a example for the parameter section to use it:

xyz.yaml:

...
default_parameters:
      include:
        - parameter1
        - parameter2
        ...

      exclude:
        - parameter3
        - parameter4
        ...

parameters:

  - parameter5
   ....
   ....

Issue-Id: CLI-20
Change-Id: I99fd91a130739f2007fdd85a23c76d4e1b30c542
Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
20 files changed:
framework/src/main/java/org/onap/cli/fw/OnapCommand.java
framework/src/main/java/org/onap/cli/fw/ad/OnapAuthClient.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 [new file with mode: 0644]
framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidSchema.java
framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java
framework/src/main/resources/onap.properties
framework/src/main/resources/schema-refresh.yaml
framework/src/main/resources/schema-validate.yaml
framework/src/test/java/org/onap/cli/fw/cmd/OnapSchemaRefreshCommandTest.java
framework/src/test/java/org/onap/cli/fw/defaultParameter/TestDefaultParameterSection.java [new file with mode: 0644]
framework/src/test/resources/onap.properties
framework/src/test/resources/sample-test-exclude-param.yaml [new file with mode: 0644]
framework/src/test/resources/sample-test-import-def-param-false.yaml [new file with mode: 0644]
framework/src/test/resources/sample-test-include-exclude.yaml [new file with mode: 0644]
framework/src/test/resources/sample-test-include-param.yaml [new file with mode: 0644]
framework/src/test/resources/sample-test-invalid-default-parameter.yaml [new file with mode: 0644]
framework/src/test/resources/sample-test-invalid-default-params-not-exist.yaml [new file with mode: 0644]
main/src/test/java/org/onap/cli/main/OnapCliMainTest.java