summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deployment/zip/installer/cli-init.sh33
-rw-r--r--deployment/zip/pom.xml20
-rw-r--r--deployment/zip/src/main/release/conf/log4j.properties9
-rw-r--r--deployment/zip/src/main/release/conf/open-cli.properties (renamed from framework/src/test/resources/open-cli.properties)26
-rw-r--r--framework/pom.xml34
-rw-r--r--framework/src/main/java/org/onap/cli/fw/cmd/OnapCommand.java (renamed from framework/src/main/java/org/onap/cli/fw/OnapCommand.java)79
-rw-r--r--framework/src/main/java/org/onap/cli/fw/cmd/OnapCommandType.java (renamed from framework/src/main/java/org/onap/cli/fw/cmd/CommandType.java)4
-rw-r--r--framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaRefreshCommand.java11
-rw-r--r--framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommand.java13
-rw-r--r--framework/src/main/java/org/onap/cli/fw/conf/OnapCommandConfg.java139
-rw-r--r--framework/src/main/java/org/onap/cli/fw/conf/OnapCommandConfig.java71
-rw-r--r--framework/src/main/java/org/onap/cli/fw/conf/OnapCommandConstants.java (renamed from framework/src/main/java/org/onap/cli/fw/conf/Constants.java)100
-rw-r--r--framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidRegistration.java2
-rw-r--r--framework/src/main/java/org/onap/cli/fw/info/OnapCommandInfo.java8
-rw-r--r--framework/src/main/java/org/onap/cli/fw/input/OnapCommandParameter.java57
-rw-r--r--framework/src/main/java/org/onap/cli/fw/input/OnapCommandParameterType.java (renamed from framework/src/main/java/org/onap/cli/fw/input/ParameterType.java)4
-rw-r--r--framework/src/main/java/org/onap/cli/fw/input/cache/OnapCommandParamEntity.java (renamed from framework/src/main/java/org/onap/cli/fw/input/cache/Param.java)2
-rw-r--r--framework/src/main/java/org/onap/cli/fw/input/cache/OnapCommandParameterCache.java62
-rw-r--r--framework/src/main/java/org/onap/cli/fw/output/OnapCommandPrintDirection.java (renamed from framework/src/main/java/org/onap/cli/fw/output/PrintDirection.java)4
-rw-r--r--framework/src/main/java/org/onap/cli/fw/output/OnapCommandResult.java30
-rw-r--r--framework/src/main/java/org/onap/cli/fw/output/OnapCommandResultAttribute.java8
-rw-r--r--framework/src/main/java/org/onap/cli/fw/output/OnapCommandResultType.java (renamed from framework/src/main/java/org/onap/cli/fw/output/ResultType.java)8
-rw-r--r--framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java8
-rw-r--r--framework/src/main/java/org/onap/cli/fw/registrar/OnapCommandRegistrar.java (renamed from framework/src/main/java/org/onap/cli/fw/OnapCommandRegistrar.java)59
-rw-r--r--framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchema.java (renamed from framework/src/main/java/org/onap/cli/fw/OnapCommandSchema.java)2
-rw-r--r--framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaInfo.java (renamed from framework/src/main/java/org/onap/cli/fw/utils/SchemaInfo.java)18
-rw-r--r--framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java (renamed from framework/src/main/java/org/onap/cli/fw/utils/OnapCommandSchemaLoaderUtils.java)358
-rw-r--r--framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java95
-rw-r--r--framework/src/main/java/org/onap/cli/fw/utils/OnapCommandHelperUtils.java26
-rw-r--r--framework/src/main/java/org/onap/cli/fw/utils/OnapCommandProfileUtils.java72
-rw-r--r--framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java444
-rw-r--r--framework/src/main/resources/META-INF/services/org.onap.cli.fw.OnapCommand6
-rw-r--r--framework/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand2
-rw-r--r--framework/src/main/resources/log4j.properties2
-rw-r--r--framework/src/main/resources/open-cli.properties29
-rw-r--r--framework/src/test/java/org/onap/cli/cmd/sample/OnapCommandSample.java4
-rw-r--r--framework/src/test/java/org/onap/cli/cmd/sample/OnapCommandSampleTest.java69
-rw-r--r--framework/src/test/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommandTest.java3
-rw-r--r--framework/src/test/java/org/onap/cli/fw/conf/OnapCommandConfgTest.java22
-rw-r--r--framework/src/test/java/org/onap/cli/fw/error/OnapCommandErrorTest.java54
-rw-r--r--framework/src/test/java/org/onap/cli/fw/input/OnapCommandParameterTest.java16
-rw-r--r--framework/src/test/java/org/onap/cli/fw/input/ParameterTypeTest.java22
-rw-r--r--framework/src/test/java/org/onap/cli/fw/output/OnapCommandResultAttributeScopeTest.java6
-rw-r--r--framework/src/test/java/org/onap/cli/fw/output/OnapCommandResultTest.java44
-rw-r--r--framework/src/test/java/org/onap/cli/fw/output/PrintDirectionTest.java6
-rw-r--r--framework/src/test/java/org/onap/cli/fw/output/ResultTypeTest.java10
-rw-r--r--framework/src/test/java/org/onap/cli/fw/output/print/OnapCommandPrintTest.java10
-rw-r--r--framework/src/test/java/org/onap/cli/fw/registrar/OnapCommandRegistrarTest.java (renamed from framework/src/test/java/org/onap/cli/fw/OnapCommandRegistrarTest.java)15
-rw-r--r--framework/src/test/java/org/onap/cli/fw/schema/ValidateSchemaTest.java39
-rw-r--r--framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java214
-rw-r--r--framework/src/test/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand (renamed from framework/src/test/resources/META-INF/services/org.onap.cli.fw.OnapCommand)0
-rw-r--r--main/sample-test-schema-sample.yaml16
-rw-r--r--main/src/main/java/org/onap/cli/main/OnapCli.java28
-rw-r--r--main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java53
-rw-r--r--main/src/test/java/org/onap/cli/main/OnapCliMainTest.java49
-rw-r--r--main/src/test/java/org/onap/cli/main/OnapCommandSampleTest.java4
-rw-r--r--main/src/test/java/org/onap/cli/main/utils/OnapCliUtilsTest.java140
-rw-r--r--main/src/test/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand (renamed from main/src/test/resources/META-INF/services/org.onap.cli.fw.OnapCommand)0
-rw-r--r--main/src/test/resources/open-cli-schema/sample-create-schema.yaml73
-rw-r--r--main/src/test/resources/open-cli-schema/sample-test-schema.yaml (renamed from main/src/test/resources/sample-test-schema.yaml)0
-rw-r--r--plugins/onap-amsterdam/features/so/pom.xml41
-rw-r--r--plugins/openecomp/features/aai/pom.xml41
-rw-r--r--pom.xml3
-rw-r--r--products/onap-amsterdam/auth/pom.xml (renamed from plugins/onap-amsterdam/auth/pom.xml)6
-rw-r--r--products/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLoginCommandAmesterdam.java (renamed from plugins/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLoginCommandAmesterdam.java)4
-rw-r--r--products/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLogoutCommandAmesterdam.java (renamed from plugins/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLogoutCommandAmesterdam.java)4
-rw-r--r--products/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapSdcBasicAuthLoginCommandAmesterdam.java (renamed from plugins/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapSdcBasicAuthLoginCommandAmesterdam.java)4
-rw-r--r--products/onap-amsterdam/auth/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand (renamed from plugins/onap-amsterdam/auth/src/main/resources/META-INF/services/org.onap.cli.fw.OnapCommand)0
-rw-r--r--products/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-login-onap-1-1.yaml (renamed from plugins/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-login-onap-1-1.yaml)0
-rw-r--r--products/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-login-onap-sdc-1-1.yaml (renamed from plugins/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-login-onap-sdc-1-1.yaml)0
-rw-r--r--products/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-logout-onap-1-1.yaml (renamed from plugins/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-logout-onap-1-1.yaml)0
-rw-r--r--products/onap-amsterdam/catalog/pom.xml (renamed from plugins/onap-amsterdam/catalog/pom.xml)6
-rw-r--r--products/onap-amsterdam/catalog/src/main/resources/open-cli-schema/catalog-onap-1_1.yaml (renamed from plugins/onap-amsterdam/catalog/src/main/resources/open-cli-schema/catalog-onap-1_1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/pom.xml (renamed from plugins/onap-amsterdam/features/msb/pom.xml)6
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-delete-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-delete-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-show-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-show-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-delete-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-delete-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-show-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-show-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-delete-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-delete-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-delete-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-delete-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-delete-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-delete-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-show-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-show-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/service-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/service-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/vf-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/vf-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/vf-show-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/vf-show-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-delete-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-delete-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-delete-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-delete-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-delete-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-delete-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-delete-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-delete-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-delete-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-delete-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-delete-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-delete-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-delete-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-delete-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-show-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-show-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-show-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-show-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-delete-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-delete-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-delete-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-delete-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-show-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-show-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-show-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-show-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-delete-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-delete-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-delete-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-delete-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-delete-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-delete-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-delete-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-delete-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-show-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-show-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-show-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-show-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/service-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/service-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/service-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/service-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-show-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-show-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-show-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-show-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-delete-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-delete-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-delete-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-delete-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-delete-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-delete-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-delete-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-delete-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-create-sample-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-create-sample-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-delete-sample-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-delete-sample-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-list-sample-1.1.yaml (renamed from plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-list-sample-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/msb/pom.xml41
-rw-r--r--products/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-create-schema.yaml (renamed from plugins/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-create-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-delete-schema.yaml (renamed from plugins/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-delete-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-list-schema.yaml (renamed from plugins/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-list-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-show-schema.yaml (renamed from plugins/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-show-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-create-schema-moco.json (renamed from plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-create-schema-moco.json)0
-rw-r--r--products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-create-schema-sample.yaml (renamed from plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-create-schema-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-delete-schema-moco.json (renamed from plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-delete-schema-moco.json)0
-rw-r--r--products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-delete-schema-sample.yaml (renamed from plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-delete-schema-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-list-schema-moco.json (renamed from plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-list-schema-moco.json)0
-rw-r--r--products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-list-schema-sample.yaml (renamed from plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-list-schema-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-show-schema-moco.json (renamed from plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-show-schema-moco.json)0
-rw-r--r--products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-show-schema-sample.yaml (renamed from plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-show-schema-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/pom.xml (renamed from plugins/onap-amsterdam/features/pom.xml)14
-rw-r--r--products/onap-amsterdam/features/sdc/pom.xml (renamed from plugins/onap-amsterdam/features/sdc/pom.xml)6
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-add-vf-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-add-vf-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-approve-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-approve-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-complete-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-complete-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-request-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-request-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-start-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-start-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-checkin-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-checkin-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-checkout-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-checkout-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-distribute-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-distribute-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-revert-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-revert-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service2vf-model-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service2vf-model-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-complete-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-complete-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-request-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-request-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-start-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-start-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-checkin-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-checkin-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf2vfmodule-model-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf2vfmodule-model-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-entitlement-pool-create-schema.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-entitlement-pool-create-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-entitlement-pool-show-schema.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-entitlement-pool-show-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-group-create-schema.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-group-create-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-group-show-schema.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-group-show-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-model-create-schema.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-model-create-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-model-show-schema.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-model-show-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-checkin-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-checkin-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-checkout-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-checkout-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-revert-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-revert-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-submit-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-submit-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-add-artifact-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-add-artifact-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkin-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkin-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkout-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkout-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-package-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-package-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-revert-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-revert-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-show-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-show-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-submit-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-submit-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-validate-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-validate-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-add-vf-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-add-vf-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-add-vf-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-add-vf-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-complete-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-complete-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-complete-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-complete-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-request-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-request-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-request-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-request-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-start-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-start-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-start-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-start-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-checkin-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-checkin-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-checkin-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-checkin-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-distribute-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-distribute-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-distribute-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-distribute-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service2vf-model-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service2vf-model-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service2vf-model-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service2vf-model-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-complete-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-complete-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-complete-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-complete-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-request-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-request-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-request-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-request-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-start-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-start-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-start-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-start-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-checkin-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-checkin-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-checkin-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-checkin-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf2vfmodule-model-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf2vfmodule-model-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf2vfmodule-model-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf2vfmodule-model-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-entitlement-pool-create-schema.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-entitlement-pool-create-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-entitlement-pool-show-schema.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-entitlement-pool-show-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-group-create-schema.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-group-create-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-group-show-schema.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-group-show-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-model-create-schema.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-model-create-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-model-show-schema.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-model-show-schema.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkin-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkin-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkin-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkin-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkout-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkout-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkout-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkout-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-revert-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-revert-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-revert-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-revert-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-submit-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-submit-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-submit-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-submit-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-package-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-package-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-package-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-package-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-revert-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-revert-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-revert-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-revert-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-upload-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-upload-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-validate-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-validate-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-validate-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-validate-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/so/pom.xml (renamed from plugins/onap-amsterdam/features/aai/pom.xml)6
-rw-r--r--products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/service-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/service-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/service-delete-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/service-delete-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-delete-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-delete-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-module-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-module-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-module-delete-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-module-delete-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vfmodule-create-schema-1.1.yaml (renamed from plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vfmodule-create-schema-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-sample-1.1.yaml (renamed from plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-sample-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-delete-sample-1.1.yaml (renamed from plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-delete-sample-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-create-schema-1.1-moco.json (renamed from plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-create-schema-1.1-moco.json)0
-rw-r--r--products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-create-schema-1.1-sample.yaml (renamed from plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-create-schema-1.1-sample.yaml)0
-rw-r--r--products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-module-create-sample-1.1.yaml (renamed from plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-module-create-sample-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-module-delete-sample-1.1.yaml (renamed from plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-module-delete-sample-1.1.yaml)0
-rw-r--r--products/onap-amsterdam/pom.xml (renamed from plugins/onap-amsterdam/pom.xml)16
-rw-r--r--products/openecomp/auth/pom.xml (renamed from plugins/openecomp/auth/pom.xml)7
-rw-r--r--products/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLoginCommand.java (renamed from plugins/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLoginCommand.java)4
-rw-r--r--products/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLogoutCommand.java (renamed from plugins/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLogoutCommand.java)4
-rw-r--r--products/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapSdcBasicAuthLoginCommand.java (renamed from plugins/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapSdcBasicAuthLoginCommand.java)4
-rw-r--r--products/openecomp/auth/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand (renamed from plugins/openecomp/auth/src/main/resources/META-INF/services/org.onap.cli.fw.OnapCommand)4
-rw-r--r--products/openecomp/auth/src/main/resources/open-cli-schema/basic-login-onap-1-0.yaml (renamed from plugins/openecomp/auth/src/main/resources/open-cli-schema/basic-login-onap-1-0.yaml)0
-rw-r--r--products/openecomp/auth/src/main/resources/open-cli-schema/basic-login-onap-sdc-1-0.yaml (renamed from plugins/openecomp/auth/src/main/resources/open-cli-schema/basic-login-onap-sdc-1-0.yaml)0
-rw-r--r--products/openecomp/auth/src/main/resources/open-cli-schema/basic-logout-onap-1-0.yaml (renamed from plugins/openecomp/auth/src/main/resources/open-cli-schema/basic-logout-onap-1-0.yaml)0
-rw-r--r--products/openecomp/catalog/pom.xml (renamed from plugins/openecomp/catalog/pom.xml)6
-rw-r--r--products/openecomp/catalog/src/main/resources/open-cli-schema/catalog-onap-1-0.yaml (renamed from plugins/openecomp/catalog/src/main/resources/open-cli-schema/catalog-onap-1-0.yaml)0
-rw-r--r--products/openecomp/features/aai/pom.xml41
-rw-r--r--products/openecomp/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-list-schema.yaml (renamed from plugins/openecomp/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-list-schema.yaml)0
-rw-r--r--products/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-create-schema.yaml (renamed from plugins/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-create-schema.yaml)0
-rw-r--r--products/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema.yaml (renamed from plugins/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema.yaml)0
-rw-r--r--products/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema.yaml (renamed from plugins/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema.yaml)0
-rw-r--r--products/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-show-schema.yaml (renamed from plugins/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-show-schema.yaml)0
-rw-r--r--products/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-create-schema.yaml (renamed from plugins/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-create-schema.yaml)0
-rw-r--r--products/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-delete-schema.yaml (renamed from plugins/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-delete-schema.yaml)0
-rw-r--r--products/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-list-schema.yaml (renamed from plugins/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-list-schema.yaml)0
-rw-r--r--products/openecomp/features/aai/src/main/resources/open-cli-schema/subscription/subscription-create-schema.yaml (renamed from plugins/openecomp/features/aai/src/main/resources/open-cli-schema/subscription/subscription-create-schema.yaml)0
-rw-r--r--products/openecomp/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema.yaml (renamed from plugins/openecomp/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema.yaml)0
-rw-r--r--products/openecomp/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-sample-1.0.yaml (renamed from plugins/openecomp/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-sample-1.0.yaml)0
-rw-r--r--products/openecomp/features/pom.xml (renamed from plugins/openecomp/features/pom.xml)14
-rw-r--r--products/openecomp/features/sdc/pom.xml (renamed from plugins/openecomp/features/sdc/pom.xml)6
-rw-r--r--products/openecomp/features/sdc/src/main/resources/open-cli-schema/license-models/license-model-create-schema.yaml (renamed from plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/license-models/license-model-create-schema.yaml)0
-rw-r--r--products/openecomp/features/sdc/src/main/resources/open-cli-schema/license-models/license-model-show-schema.yaml (renamed from plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/license-models/license-model-show-schema.yaml)0
-rw-r--r--products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkin-schema.yaml (renamed from plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkin-schema.yaml)0
-rw-r--r--products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkout-schema.yaml (renamed from plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkout-schema.yaml)0
-rw-r--r--products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema.yaml (renamed from plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema.yaml)0
-rw-r--r--products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema.yaml (renamed from plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema.yaml)0
-rw-r--r--products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-show-schema.yaml (renamed from plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-show-schema.yaml)0
-rw-r--r--products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-submit-schema.yaml (renamed from plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-submit-schema.yaml)0
-rw-r--r--products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-upload-schema.yaml (renamed from plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-upload-schema.yaml)0
-rw-r--r--products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-sample.yaml (renamed from plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-sample.yaml)0
-rw-r--r--products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-sample.yaml (renamed from plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-sample.yaml)0
-rw-r--r--products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-sample.yaml (renamed from plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-sample.yaml)0
-rw-r--r--products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-sample.yaml (renamed from plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-sample.yaml)0
-rw-r--r--products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-sample.yaml (renamed from plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-sample.yaml)0
-rw-r--r--products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-sample.yaml (renamed from plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-sample.yaml)0
-rw-r--r--products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-upload-sample.yaml (renamed from plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-upload-sample.yaml)0
-rw-r--r--products/openecomp/pom.xml (renamed from plugins/openecomp/pom.xml)13
-rw-r--r--products/pom.xml (renamed from plugins/pom.xml)21
-rw-r--r--products/sample/pom.xml (renamed from plugins/sample/pom.xml)6
-rw-r--r--products/sample/src/main/java/org/onap/cli/sample/OnapHelloWorldCommand.java (renamed from plugins/sample/src/main/java/org/onap/cli/sample/OnapHelloWorldCommand.java)5
-rw-r--r--products/sample/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand (renamed from plugins/sample/src/main/resources/META-INF/services/org.onap.cli.fw.OnapCommand)0
-rw-r--r--products/sample/src/main/resources/open-cli-schema/hello-world-http.yaml (renamed from plugins/sample/src/main/resources/open-cli-schema/hello-world-http.yaml)0
-rw-r--r--products/sample/src/main/resources/open-cli-schema/hello-world.yaml (renamed from plugins/sample/src/main/resources/open-cli-schema/hello-world.yaml)0
-rw-r--r--profiles/http/pom.xml71
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/auth/OnapCommandHttpAuthClient.java (renamed from framework/src/main/java/org/onap/cli/fw/ad/OnapAuthClient.java)45
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/auth/OnapCommandHttpService.java (renamed from framework/src/main/java/org/onap/cli/fw/ad/OnapService.java)14
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/cmd/BasicAuthLoginCommand.java (renamed from framework/src/main/java/org/onap/cli/fw/cmd/BasicAuthLoginCommand.java)12
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/cmd/BasicAuthLogoutCommand.java (renamed from framework/src/main/java/org/onap/cli/fw/cmd/BasicAuthLogoutCommand.java)4
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/cmd/CatalogCommand.java (renamed from framework/src/main/java/org/onap/cli/fw/cmd/CatalogCommand.java)4
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java (renamed from framework/src/main/java/org/onap/cli/fw/cmd/OnapHttpCommand.java)62
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/conf/OnapCommandHttpConstants.java90
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/connect/HttpInput.java (renamed from framework/src/main/java/org/onap/cli/fw/http/HttpInput.java)2
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/connect/HttpResult.java (renamed from framework/src/main/java/org/onap/cli/fw/http/HttpResult.java)2
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java (renamed from framework/src/main/java/org/onap/cli/fw/http/OnapHttpConnection.java)22
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandFailedMocoGenerate.java (renamed from framework/src/main/java/org/onap/cli/fw/error/OnapCommandFailedMocoGenerate.java)4
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandHttpFailure.java (renamed from framework/src/main/java/org/onap/cli/fw/error/OnapCommandHttpFailure.java)4
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandHttpHeaderNotFound.java (renamed from framework/src/main/java/org/onap/cli/fw/error/OnapCommandHttpHeaderNotFound.java)4
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandHttpInvalidResponseBody.java (renamed from framework/src/main/java/org/onap/cli/fw/error/OnapCommandHttpInvalidResponseBody.java)4
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandHttpInvalidResultMap.java (renamed from framework/src/main/java/org/onap/cli/fw/error/OnapCommandHttpInvalidResultMap.java)4
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandLoginFailed.java (renamed from framework/src/main/java/org/onap/cli/fw/error/OnapCommandLoginFailed.java)4
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandLogoutFailed.java (renamed from framework/src/main/java/org/onap/cli/fw/error/OnapCommandLogoutFailed.java)4
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandServiceNotFound.java (renamed from framework/src/main/java/org/onap/cli/fw/error/OnapCommandServiceNotFound.java)4
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java427
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java233
-rw-r--r--profiles/http/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand4
-rw-r--r--profiles/http/src/main/resources/open-cli-http.properties18
-rw-r--r--profiles/http/src/main/resources/open-cli-schema/http/basic-login.yaml (renamed from framework/src/main/resources/open-cli-schema/http/basic-login.yaml)0
-rw-r--r--profiles/http/src/main/resources/open-cli-schema/http/basic-logout.yaml (renamed from framework/src/main/resources/open-cli-schema/http/basic-logout.yaml)0
-rw-r--r--profiles/http/src/main/resources/open-cli-schema/http/catalog.yaml (renamed from framework/src/main/resources/open-cli-schema/http/catalog.yaml)0
-rw-r--r--profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml (renamed from framework/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml)0
-rw-r--r--profiles/http/src/test/java/org/onap/cli/fw/cmd/OnapHttpCommandTest.java (renamed from framework/src/test/java/org/onap/cli/fw/cmd/OnapHttpCommandTest.java)23
-rw-r--r--profiles/http/src/test/java/org/onap/cli/fw/http/HttpInputOutputTest.java (renamed from framework/src/test/java/org/onap/cli/fw/http/HttpInputOutputTest.java)2
-rw-r--r--profiles/http/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java (renamed from framework/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java)5
-rw-r--r--profiles/http/src/test/java/org/onap/cli/fw/http/auth/OnapAuthClientCommandBasedTest.java (renamed from framework/src/test/java/org/onap/cli/fw/ad/OnapAuthClientCommandBasedTest.java)45
-rw-r--r--profiles/http/src/test/java/org/onap/cli/fw/http/auth/OnapServiceTest.java (renamed from framework/src/test/java/org/onap/cli/fw/ad/OnapServiceTest.java)8
-rw-r--r--profiles/http/src/test/java/org/onap/cli/fw/http/error/OnapCommandErrorTest.java84
-rw-r--r--profiles/http/src/test/java/org/onap/cli/fw/http/schema/ValidateSchemaTest.java (renamed from framework/src/test/java/org/onap/cli/fw/utils/OpenCommandRegistrarTest.java)34
-rw-r--r--profiles/http/src/test/java/org/onap/cli/fw/http/utils/OnapCommandUtilsTest.java139
-rw-r--r--profiles/http/src/test/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand0
-rw-r--r--profiles/http/src/test/resources/open-cli-schema/sample-test1-schema-http.yaml (renamed from framework/src/test/resources/open-cli-schema/sample-test1-schema-http.yaml)0
-rw-r--r--profiles/http/src/test/resources/open-cli-schema/testauth-login.yaml (renamed from framework/src/test/resources/open-cli-schema/testauth-login.yaml)0
-rw-r--r--profiles/http/src/test/resources/open-cli-schema/testauth-logout.yaml (renamed from framework/src/test/resources/open-cli-schema/testauth-logout.yaml)0
-rw-r--r--profiles/http/src/test/resources/open-cli.properties31
-rw-r--r--profiles/http/src/test/resources/sample-test-schema-auth-required.yaml (renamed from framework/src/test/resources/sample-test-schema-auth-required.yaml)0
-rw-r--r--profiles/http/src/test/resources/sample-test-schema-http.yaml (renamed from framework/src/test/resources/sample-test-schema-http.yaml)0
-rw-r--r--profiles/http/src/test/resources/sample-test-schema-no-auth-no-catalog.yaml (renamed from framework/src/test/resources/sample-test-schema-no-auth-no-catalog.yaml)0
-rw-r--r--profiles/http/src/test/resources/sample-test-schema-no-auth-yes-catalog.yaml (renamed from framework/src/test/resources/sample-test-schema-no-auth-yes-catalog.yaml)0
-rw-r--r--profiles/http/src/test/resources/sample-test-schema-swagger.yaml (renamed from framework/src/test/resources/sample-test-schema-swagger.yaml)0
-rw-r--r--profiles/http/src/test/resources/sample-test-schema-yes-auth-no-catalog.yaml (renamed from framework/src/test/resources/sample-test-schema-yes-auth-no-catalog.yaml)0
-rw-r--r--profiles/http/src/test/resources/sample-test-schema-yes-auth-with-additional-params-no-catalog.yaml (renamed from framework/src/test/resources/sample-test-schema-yes-auth-with-additional-params-no-catalog.yaml)0
-rw-r--r--profiles/http/src/test/resources/sample-test-schema-yes-auth-yes-catalog.yaml (renamed from framework/src/test/resources/sample-test-schema-yes-auth-yes-catalog.yaml)0
-rw-r--r--profiles/http/src/test/resources/schema-validate-http.yaml (renamed from framework/src/test/resources/schema-validate-http.yaml)0
-rw-r--r--profiles/pom.xml102
-rw-r--r--validate/validation/pom.xml14
-rw-r--r--validate/validation/src/test/java/org/onap/cli/moco/OnapCommandHttpMocoServer.java2
-rw-r--r--validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java8
-rw-r--r--validate/validation/src/test/resources/open-cli.properties31
431 files changed, 2306 insertions, 2339 deletions
diff --git a/deployment/zip/installer/cli-init.sh b/deployment/zip/installer/cli-init.sh
deleted file mode 100644
index 59d078ec..00000000
--- a/deployment/zip/installer/cli-init.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-
-#*******************************************************************************
-# Copyright 2017 Huawei Technologies Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#*******************************************************************************
-
-export OPEN_CLI_HOME=/opt/oclip
-export OPEN_CLI_PRODUCT_IN_USE=open-cli
-
-cd $OPEN_CLI_HOME
-
-if [ ! -d ./data ]; then mkdir ./data; fi
-if [ ! -d ./open-cli-schema ]; then mkdir ./open-cli-schema; fi
-
-chmod +x ./bin/oclip.sh
-
-#Make oclip available in path
-ln ./bin/oclip.sh /usr/bin/oclip
-
-#Print the version
-oclip -v \ No newline at end of file
diff --git a/deployment/zip/pom.xml b/deployment/zip/pom.xml
index 8c2ecfca..46f7df02 100644
--- a/deployment/zip/pom.xml
+++ b/deployment/zip/pom.xml
@@ -75,10 +75,10 @@
}
ant.copy(todir: "${deployUnzip}") {
- fileset(file: "${basedir}/installer/cli-init.sh")
+ fileset(file: "${basedir}/installer/install.sh")
}
- ant.chmod(file: "${deployUnzip}/bin/onap.sh", perm: "ugo+x")
- ant.chmod(file: "${deployUnzip}/cli-init.sh", perm: "ugo+x")
+ ant.chmod(file: "${deployUnzip}/bin/oclip.sh", perm: "ugo+x")
+ ant.chmod(file: "${deployUnzip}/install.sh", perm: "ugo+x")
ant.copy(todir:
"${deployUnzip}/lib") {
@@ -87,18 +87,20 @@
fileset(dir:
"${project.build.directory}/../../../main/target/lib/")
fileset(dir:
- "${project.build.directory}/../../../plugins/target/lib/")
+ "${project.build.directory}/../../../products/target/lib/")
+ fileset(dir:
+ "${project.build.directory}/../../../profiles/target/lib/")
}
ant.copy(todir:
"${deployUnzip}/conf") {
fileset(file:
- "${project.build.directory}/../../../framework/src/main/resources/open-cli.properties")
+ "${basedir}/src/main/release/conf/open-cli.properties")
}
ant.copy(todir:
"${deployUnzip}/conf") {
fileset(file:
- "${project.build.directory}/../../../framework/src/main/resources/log4j.properties")
+ "${basedir}/src/main/release/conf/log4j.properties")
}
ant.copy(todir:
@@ -107,12 +109,6 @@
"${project.build.directory}/../../../README.md")
}
- ant.copy(todir:
- "${deployUnzip}") {
- fileset(file:
- "${project.build.directory}/../installer/install.sh")
- }
-
ant.zip(destfile:
"${deployFolder}/${outfileName}") {
zipfileset(dir: "${deployUnzip}", excludes: "**/*.sh")
diff --git a/deployment/zip/src/main/release/conf/log4j.properties b/deployment/zip/src/main/release/conf/log4j.properties
new file mode 100644
index 00000000..f117ef6e
--- /dev/null
+++ b/deployment/zip/src/main/release/conf/log4j.properties
@@ -0,0 +1,9 @@
+log4j.rootLogger=ERROR, file
+
+# Redirect log messages to a log file, support file rolling.
+log4j.appender.file=org.apache.log4j.RollingFileAppender
+log4j.appender.file.File=${OPEN_CLI_HOME}/logs/oclip.log
+log4j.appender.file.MaxFileSize=5MB
+log4j.appender.file.MaxBackupIndex=10
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
diff --git a/framework/src/test/resources/open-cli.properties b/deployment/zip/src/main/release/conf/open-cli.properties
index 23ba7800..026b1f13 100644
--- a/framework/src/test/resources/open-cli.properties
+++ b/deployment/zip/src/main/release/conf/open-cli.properties
@@ -1,9 +1,8 @@
-cli.ignore_auth=false
-cli.http.api_key_use_cookies=true
-cli.discover_always=true
cli.product_name=open-cli
cli.version=1.0
+cli.discover_always=false
+
#schema validation
cli.schema.top_level_params_list=open_cli_schema_version,name,description,parameters,results,http,info
cli.schema.top_level_mandatory_list=open_cli_schema_version
@@ -17,23 +16,16 @@ cli.schema.input_params_mandatory_list=name,description,type
cli.schema.result_params_list=name,description,scope,type,is_secured, default_value
cli.schema.result_params_mandatory_list=name, description, type, scope
-#http
-cli.schema.http_sections=request,service,success_codes,result_map,sample_response
-cli.schema.http_mandatory_sections=request, success_codes
-
-cli.schema.http_request_params=uri,method,body,headers,queries,multipart_entity_name
-cli.schema.http_request_mandatory_params=uri,method
-
-cli.schema.service_params_list=name,version,auth,mode
-cli.schema.service_params_mandatory_list=auth,mode
-
-cli.schema.http_methods=post,get,delete,put,head
-
cli.schema.boolean_values=true,false
-cli.schema.auth_values=none,basic
-cli.schema.mode_values=direct,catalog
cli.command.type=cmd,auth,catalog
+# moco properties
+cli.sample.gen.enable=false
+cli.sample.gen.target=.
+
# mrkanag Move this to db, once exteranl command registration is supported in place of discovery
cli.schema.type.supported=http
+#other properties to load (it should be hanled when plugins are made as externally register-able
+#when command plugin management support is enabled in oclip
+cli.plugins-prps=open-cli-http.properties \ No newline at end of file
diff --git a/framework/pom.xml b/framework/pom.xml
index 231d804b..acf82f45 100644
--- a/framework/pom.xml
+++ b/framework/pom.xml
@@ -39,7 +39,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>1.6.1</version>
+ <version>1.7.16</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
@@ -52,31 +52,11 @@
<version>1.3.2</version>
</dependency>
<dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>4.3.5</version>
- </dependency>
- <dependency>
- <groupId>com.jayway.jsonpath</groupId>
- <artifactId>json-path</artifactId>
- <version>2.2.0</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <version>2.6.3</version>
- </dependency>
- <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.1.0.RELEASE</version>
</dependency>
<dependency>
- <groupId>org.onap.cli</groupId>
- <artifactId>cli-sample-mock-generator</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
@@ -95,10 +75,14 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpmime</artifactId>
- <version>4.0.1</version>
- <scope>compile</scope>
+ <groupId>com.jayway.jsonpath</groupId>
+ <artifactId>json-path</artifactId>
+ <version>2.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>2.6.3</version>
</dependency>
</dependencies>
</project>
diff --git a/framework/src/main/java/org/onap/cli/fw/OnapCommand.java b/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommand.java
index d931aaf3..4b7fe976 100644
--- a/framework/src/main/java/org/onap/cli/fw/OnapCommand.java
+++ b/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommand.java
@@ -14,33 +14,26 @@
* limitations under the License.
*/
-package org.onap.cli.fw;
+package org.onap.cli.fw.cmd;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
-import org.onap.cli.fw.conf.Constants;
+import org.onap.cli.fw.conf.OnapCommandConstants;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandHelpFailed;
-import org.onap.cli.fw.error.OnapCommandInvalidParameterType;
-import org.onap.cli.fw.error.OnapCommandInvalidPrintDirection;
-import org.onap.cli.fw.error.OnapCommandInvalidResultAttributeScope;
-import org.onap.cli.fw.error.OnapCommandInvalidSchema;
-import org.onap.cli.fw.error.OnapCommandInvalidSchemaVersion;
import org.onap.cli.fw.error.OnapCommandNotInitialized;
-import org.onap.cli.fw.error.OnapCommandParameterNameConflict;
-import org.onap.cli.fw.error.OnapCommandParameterOptionConflict;
-import org.onap.cli.fw.error.OnapCommandRegistrationFailed;
-import org.onap.cli.fw.error.OnapCommandSchemaNotFound;
import org.onap.cli.fw.info.OnapCommandInfo;
import org.onap.cli.fw.input.OnapCommandParameter;
import org.onap.cli.fw.output.OnapCommandResult;
import org.onap.cli.fw.output.OnapCommandResultAttribute;
import org.onap.cli.fw.output.OnapCommandResultAttributeScope;
-import org.onap.cli.fw.output.ResultType;
+import org.onap.cli.fw.output.OnapCommandResultType;
+import org.onap.cli.fw.schema.OnapCommandSchemaLoader;
import org.onap.cli.fw.utils.OnapCommandHelperUtils;
-import org.onap.cli.fw.utils.OnapCommandSchemaLoaderUtils;
import org.onap.cli.fw.utils.OnapCommandUtils;
/**
@@ -57,19 +50,16 @@ public abstract class OnapCommand {
private OnapCommandInfo info = new OnapCommandInfo();
- private List<OnapCommandParameter> cmdParameters = new ArrayList<>();
+ private Set<OnapCommandParameter> cmdParameters = new HashSet<>();
private OnapCommandResult cmdResult = new OnapCommandResult();
protected boolean isInitialzied = false;
public String getSchemaVersion() {
- return Constants.OPEN_CLI_SCHEMA_VERSION_VALUE_1_0;
+ return OnapCommandConstants.OPEN_CLI_SCHEMA_VERSION_VALUE_1_0;
}
- /**
- * Oclip command description, defined by derived command.
- */
public String getDescription() {
return this.cmdDescription;
}
@@ -78,9 +68,6 @@ public abstract class OnapCommand {
this.cmdDescription = description;
}
- /*
- * Oclip command name like user-create, ns-list, etc , defined by derived command
- */
public String getName() {
return this.cmdName;
}
@@ -97,27 +84,18 @@ public abstract class OnapCommand {
this.info = info;
}
- public void setParameters(List<OnapCommandParameter> parameters) {
+ public void setParameters(Set<OnapCommandParameter> parameters) {
this.cmdParameters = parameters;
}
- /*
- * Oclip command input parameters, defined by derived command
- */
- public List<OnapCommandParameter> getParameters() {
+ public Set<OnapCommandParameter> getParameters() {
return this.cmdParameters;
}
- /*
- * Oclip command input parameters, defined by derived command
- */
public Map<String, OnapCommandParameter> getParametersMap() {
return OnapCommandUtils.getInputMap(this.getParameters());
}
- /*
- * Oclip command output results, defined by derived command
- */
public OnapCommandResult getResult() {
return this.cmdResult;
}
@@ -137,24 +115,7 @@ public abstract class OnapCommand {
/**
* Initialize this command from command schema and assumes schema is already validated.
*
- * @throws OnapCommandRegistrationFailed
- * Command Registration Exception
- * @throws OnapCommandInvalidResultAttributeScope
- * InvalidResultAttribute Exception
- * @throws OnapCommandInvalidPrintDirection
- * InvalidPrintDirection Exception
- * @throws OnapCommandInvalidParameterType
- * InvalidParameterType Exception
- * @throws OnapCommandSchemaNotFound
- * SchemaNotFound Exception
- * @throws OnapCommandInvalidSchema
- * InvalidSchema Exception
- * @throws OnapCommandParameterOptionConflict
- * ParameterOptionConflict Exception
- * @throws OnapCommandParameterNameConflict
- * ParameterNameConflict Exception
- * @throws OnapCommandInvalidSchemaVersion
- * InvalidSchemaVersion Exception
+ * @throws OnapCommandException
*
* @return List of error strings
*/
@@ -165,7 +126,7 @@ public abstract class OnapCommand {
public List<String> initializeSchema(String schema, boolean validate) throws OnapCommandException {
this.setSchemaName(schema);
- List<String> errors = OnapCommandSchemaLoaderUtils.loadSchema(this, schema, true, validate);
+ List<String> errors = OnapCommandSchemaLoader.loadSchema(this, schema, true, validate);
errors.addAll(this.initializeProfileSchema());
this.isInitialzied = true;
@@ -204,17 +165,17 @@ public abstract class OnapCommand {
Map<String, OnapCommandParameter> paramMap = this.getParametersMap();
// -h or --help is always higher precedence !, user can set this value to get help message
- if (Constants.BOOLEAN_TRUE.equals(paramMap.get(Constants.DEFAULT_PARAMETER_HELP).getValue())) {
+ if (OnapCommandConstants.BOOLEAN_TRUE.equals(paramMap.get(OnapCommandConstants.DEFAULT_PARAMETER_HELP).getValue())) {
OnapCommandResult result = new OnapCommandResult();
- result.setType(ResultType.TEXT);
+ result.setType(OnapCommandResultType.TEXT);
result.setOutput(this.printHelp());
return result;
}
// -v or --version is next higher precedence !, user can set this value to get help message
- if (Constants.BOOLEAN_TRUE.equals(paramMap.get(Constants.DEFAULT_PARAMETER_VERSION).getValue())) {
+ if (OnapCommandConstants.BOOLEAN_TRUE.equals(paramMap.get(OnapCommandConstants.DEFAULT_PARAMETER_VERSION).getValue())) {
OnapCommandResult result = new OnapCommandResult();
- result.setType(ResultType.TEXT);
+ result.setType(OnapCommandResultType.TEXT);
result.setOutput(this.printVersion());
return result;
}
@@ -224,17 +185,17 @@ public abstract class OnapCommand {
// -f or --format
this.cmdResult.setType(
- ResultType.get(paramMap.get(Constants.DEFAULT_PARAMETER_OUTPUT_FORMAT).getValue().toString()));
- if (Constants.BOOLEAN_TRUE.equals(paramMap.get(Constants.DEFAULT_PARAMETER_OUTPUT_ATTR_LONG).getValue())) {
+ OnapCommandResultType.get(paramMap.get(OnapCommandConstants.DEFAULT_PARAMETER_OUTPUT_FORMAT).getValue().toString()));
+ if (OnapCommandConstants.BOOLEAN_TRUE.equals(paramMap.get(OnapCommandConstants.DEFAULT_PARAMETER_OUTPUT_ATTR_LONG).getValue())) {
this.cmdResult.setScope(OnapCommandResultAttributeScope.LONG);
}
// --no-title
- if (Constants.BOOLEAN_TRUE.equals(paramMap.get(Constants.DEFAULT_PARAMETER_OUTPUT_NO_TITLE).getValue())) {
+ if (OnapCommandConstants.BOOLEAN_TRUE.equals(paramMap.get(OnapCommandConstants.DEFAULT_PARAMETER_OUTPUT_NO_TITLE).getValue())) {
this.cmdResult.setIncludeTitle(false);
}
// --debug
- if (Constants.BOOLEAN_TRUE.equals(paramMap.get(Constants.DEFAULT_PARAMETER_DEBUG).getValue())) {
+ if (OnapCommandConstants.BOOLEAN_TRUE.equals(paramMap.get(OnapCommandConstants.DEFAULT_PARAMETER_DEBUG).getValue())) {
this.cmdResult.setDebug(true);
}
diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/CommandType.java b/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommandType.java
index baaf7e12..e874a14e 100644
--- a/framework/src/main/java/org/onap/cli/fw/cmd/CommandType.java
+++ b/framework/src/main/java/org/onap/cli/fw/cmd/OnapCommandType.java
@@ -23,7 +23,7 @@ import org.onap.cli.fw.error.OnapCommandInvalidParameterType;
* Command type supported by Oclip CLI.
*
*/
-public enum CommandType {
+public enum OnapCommandType {
AUTH,
CATALOG,
@@ -38,7 +38,7 @@ public enum CommandType {
* @throws OnapCommandInvalidParameterType
* exception
*/
- public static CommandType get(String name) throws OnapCommandInvalidCommandType {
+ public static OnapCommandType get(String name) throws OnapCommandInvalidCommandType {
if (AUTH.name().equalsIgnoreCase(name)) {
return AUTH;
} else if (CATALOG.name().equalsIgnoreCase(name)) {
diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaRefreshCommand.java b/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaRefreshCommand.java
index 40d8eee5..2458a141 100644
--- a/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaRefreshCommand.java
+++ b/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaRefreshCommand.java
@@ -18,11 +18,10 @@ package org.onap.cli.fw.cmd;
import java.util.List;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.OnapCommandSchema;
import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.schema.OnapCommandSchema;
+import org.onap.cli.fw.schema.OnapCommandSchemaInfo;
import org.onap.cli.fw.utils.OnapCommandDiscoveryUtils;
-import org.onap.cli.fw.utils.SchemaInfo;
/**
* Refresh external schema.
@@ -34,13 +33,13 @@ public class OnapSchemaRefreshCommand extends OnapCommand {
@Override
protected void run() throws OnapCommandException {
- List<SchemaInfo> schemas = OnapCommandDiscoveryUtils.discoverOrLoadSchemas(true);
+ List<OnapCommandSchemaInfo> schemas = OnapCommandDiscoveryUtils.discoverOrLoadSchemas(true);
int i = 0;
- for (SchemaInfo schema : schemas) {
+ for (OnapCommandSchemaInfo schema : schemas) {
if (schema.isIgnore()) {
continue;
}
-
+
i++;
this.getResult().getRecordsMap().get("sr.no").getValues().add(String.valueOf(i));
this.getResult().getRecordsMap().get("command").getValues().add(schema.getCmdName());
diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommand.java b/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommand.java
index ff3f1c98..8448276b 100644
--- a/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommand.java
+++ b/framework/src/main/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommand.java
@@ -20,14 +20,13 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.OnapCommandRegistrar;
-import org.onap.cli.fw.OnapCommandSchema;
-import org.onap.cli.fw.conf.Constants;
+import org.onap.cli.fw.conf.OnapCommandConstants;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.input.OnapCommandParameter;
+import org.onap.cli.fw.registrar.OnapCommandRegistrar;
+import org.onap.cli.fw.schema.OnapCommandSchema;
+import org.onap.cli.fw.schema.OnapCommandSchemaLoader;
import org.onap.cli.fw.utils.OnapCommandDiscoveryUtils;
-import org.onap.cli.fw.utils.OnapCommandSchemaLoaderUtils;
/**
* Validate schema command.
@@ -52,10 +51,10 @@ public class OnapSchemaValidateCommand extends OnapCommand {
String ocsVersion = String.valueOf(versionParam.getValue());
String type = OnapCommandDiscoveryUtils.identitySchemaProfileType(
- OnapCommandSchemaLoaderUtils.validateSchemaVersion(location, ocsVersion));
+ OnapCommandSchemaLoader.validateSchemaVersion(location, ocsVersion));
OnapCommand cmd = null;
- if (type.equals(Constants.BASIC_SCHEMA_PROFILE)) {
+ if (type.equals(OnapCommandConstants.BASIC_SCHEMA_PROFILE)) {
cmd = new OnapCommand() {
@Override
protected void run() throws OnapCommandException {
diff --git a/framework/src/main/java/org/onap/cli/fw/conf/OnapCommandConfg.java b/framework/src/main/java/org/onap/cli/fw/conf/OnapCommandConfg.java
deleted file mode 100644
index 19e7b48b..00000000
--- a/framework/src/main/java/org/onap/cli/fw/conf/OnapCommandConfg.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright 2017 Huawei Technologies Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.onap.cli.fw.conf;
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.UUID;
-import java.util.stream.Collectors;
-
-/**
- * Oclip command constants.
- *
- */
-public final class OnapCommandConfg {
-
- private static Properties prps = new Properties();
-
- /**
- * Private constructor.
- */
- private OnapCommandConfg() {
-
- }
-
- static {
- try {
- prps.load(OnapCommandConfg.class.getClassLoader().getResourceAsStream(Constants.CONF));
- } catch (IOException e) {
- throw new RuntimeException(e); // NOSONAR
- }
- }
-
- /**
- * is auth service ignored.
- *
- * @return boolean
- */
- public static boolean isAuthIgnored() {
- if ("true".equals(prps.getProperty(Constants.OPEN_IGNORE_AUTH))) {
- return true;
- }
-
- return false;
- }
-
- /**
- * is discovery should do every time.
- *
- * @return boolean
- */
- public static boolean isDiscoverAlways() {
- if ("true".equals(prps.getProperty(Constants.DISCOVER_ALWAYS))) {
- return true;
- }
-
- return false;
- }
-
- public static String getVersion() {
- return prps.getProperty(Constants.OPEN_CLI_VERSION);
- }
-
- public static String getEnabledProductVersion() {
- String version = System.getenv(Constants.OPEN_OPEN_CLI_PRODUCT_IN_USE_ENV_NAME);
- if (version == null) {
- version = prps.getProperty(Constants.OPEN_CLI_PRODUCT_NAME);
- }
- return version;
- }
-
- /**
- * checks if cookies based auth.
- *
- * @return boolean
- */
- public static boolean isCookiesBasedAuth() {
- if ("true".equals(prps.getProperty(Constants.HTTP_API_KEY_USE_COOKIES))) {
- return true;
- }
-
- return false;
- }
-
- public static String getProductName() {
- return prps.getProperty(Constants.OPEN_CLI_PRODUCT_NAME);
- }
-
- private static Map<String, String> getHeaderValues(String headerKey, Map<String, String> paramMap) {
- Map<String, String> mapHeaders = new HashMap<String, String> ();
- if (prps.containsKey(headerKey)) {
- Arrays.stream(prps.getProperty(headerKey) // NOSONAR
- .split(",")).map(String::trim).forEach(header -> {
- String headerName = prps.getProperty(headerKey+ "." + header);
- String headerValue = prps.getProperty(headerKey + "." + header + ".value", null);
- if (headerValue != null) {
- headerValue = headerValue.replaceAll("uuid", UUID.randomUUID().toString());
- if (headerValue.contains("${")) {
- String param = headerValue.substring(headerValue.indexOf("${")+2 ,headerValue.indexOf("}"));
- String pattern = "${"+param+"}";
- headerValue = headerValue.replace(pattern, paramMap.getOrDefault(param, param));
- }
- }
- mapHeaders.put(headerName, headerValue);
- });
- }
- return mapHeaders;
- }
-
- //mrkanag move this utils class
- public static List<String> getSchemaAttrInfo(String key) {
- return Arrays.stream(prps.getProperty(key).split(",")).map(String::trim).collect(Collectors.toList()); // NOSONAR
- }
-
- public static String getSampleGenerateTargetFolder() {
- return prps.getProperty(Constants.SAMPLE_GEN_TARGET_FOLDER, ".");
- }
-
- public static boolean isSampleGenerateEnabled() {
- return "true".equals(prps.getProperty(Constants.SAMPLE_GEN_ENABLED));
- }
-}
diff --git a/framework/src/main/java/org/onap/cli/fw/conf/OnapCommandConfig.java b/framework/src/main/java/org/onap/cli/fw/conf/OnapCommandConfig.java
new file mode 100644
index 00000000..079a4410
--- /dev/null
+++ b/framework/src/main/java/org/onap/cli/fw/conf/OnapCommandConfig.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2017 Huawei Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.cli.fw.conf;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+import java.util.stream.Collectors;
+
+/**
+ * Oclip command constants.
+ *
+ */
+public final class OnapCommandConfig {
+
+ private static Properties prps = new Properties();
+
+ /**
+ * Private constructor.
+ */
+ private OnapCommandConfig() {
+
+ }
+
+ static {
+ loadProperties(prps, OnapCommandConstants.CONF);
+ for (String prpFile: getCommaSeparatedList(OnapCommandConstants.OPEN_CLI_PLUGIN_PRPS)) {
+ addProperties(prpFile);
+ }
+ }
+
+ private static void loadProperties(Properties prps, String fileName) {
+ try {
+ prps.load(OnapCommandConfig.class.getClassLoader().getResourceAsStream(fileName));
+ } catch (Exception e) { // NOSONAR
+ throw new RuntimeException(e); // NOSONAR
+ }
+ }
+
+ private static void addProperties(String fileName) {
+ Properties ps = new Properties();
+ loadProperties(ps, fileName);
+
+ for (Object key: ps.keySet()) {
+ prps.put(key, ps.get(key));
+ }
+ }
+
+ public static String getPropertyValue(String propertyName) {
+ return prps.getProperty(propertyName);
+ }
+
+ public static List<String> getCommaSeparatedList(String key) {
+ return Arrays.stream(getPropertyValue(key).split(",")).map(String::trim).collect(Collectors.toList()); // NOSONAR
+ }
+}
diff --git a/framework/src/main/java/org/onap/cli/fw/conf/Constants.java b/framework/src/main/java/org/onap/cli/fw/conf/OnapCommandConstants.java
index 4c7581b7..6f911c29 100644
--- a/framework/src/main/java/org/onap/cli/fw/conf/Constants.java
+++ b/framework/src/main/java/org/onap/cli/fw/conf/OnapCommandConstants.java
@@ -17,17 +17,14 @@
package org.onap.cli.fw.conf;
/**
- * Constants.
+ * OnapCommandHttpConstants.
*
*/
-public class Constants {
+public class OnapCommandConstants {
//config
public static final String CONF = "open-cli.properties";
- public static final String OPEN_IGNORE_AUTH = "cli.ignore_auth";
public static final String OPEN_CLI_VERSION = "cli.version";
- public static final String HTTP_API_KEY_USE_COOKIES = "cli.http.api_key_use_cookies";
-
public static final String TOP_LEVEL_PARAMS_LIST = "cli.schema.top_level_params_list";
public static final String TOP_LEVEL_MANDATORY_LIST = "cli.schema.top_level_mandatory_list";
public static final String SERVICE_PARAMS_LIST = "cli.schema.service_params_list";
@@ -38,35 +35,23 @@ public class Constants {
public static final String INPUT_PARAMS_MANDATORY_LIST = "cli.schema.input_params_mandatory_list";
public static final String RESULT_PARAMS_LIST = "cli.schema.result_params_list";
public static final String RESULT_PARAMS_MANDATORY_LIST = "cli.schema.result_params_mandatory_list";
- public static final String HTTP_SECTIONS = "cli.schema.http_sections";
- public static final String HTTP_MANDATORY_SECTIONS = "cli.schema.http_mandatory_sections";
- public static final String HTTP_REQUEST_PARAMS = "cli.schema.http_request_params";
- public static final String HTTP_REQUEST_MANDATORY_PARAMS = "cli.schema.http_request_mandatory_params";
- public static final String HTTP_METHODS = "cli.schema.http_methods";
public static final String BOOLEAN_VALUE = "cli.schema.boolean_values";
- public static final String AUTH_VALUES = "cli.schema.auth_values";
- public static final String MODE_VALUES = "cli.schema.mode_values";
+
public static final String COMMAND_TYPE_VALUES = "cli.command.type";
public static final String SCHEMA_TYPES_SUPPORTED = "cli.schema.type.supported";
- //http connection
- public static final String SSLCONTEST_TLS = "TLSV1.2";
- public static final String APPLICATION_JSON = "application/json";
-
public static final String OPEN_CLI_PRODUCT_NAME = "cli.product_name";
+ public static final String OPEN_CLI_PLUGIN_PRPS = "cli.plugins-prps";
//schema
public static final String OPEN_CLI_SCHEMA_VERSION = "open_cli_schema_version";
public static final String OPEN_CLI_SCHEMA_VERSION_VALUE_1_0 = "1.0";
-
public static final String NAME = "name";
-
public static final String DESCRIPTION = "description";
//Info
public static final String INFO = "info";
-
public static final String INFO_PRODUCT = "product";
- public static final String OPEN_OPEN_CLI_PRODUCT_IN_USE_ENV_NAME = "OPEN_CLI_PRODUCT_IN_USE";
+ public static final String OPEN_CLI_PRODUCT_IN_USE_ENV_NAME = "OPEN_CLI_PRODUCT_IN_USE";
public static final String INFO_SERVICE = "service";
public static final String INFO_TYPE = "type";
@@ -94,18 +79,12 @@ public class Constants {
public static final String PARAMETER_TYPE_MAP = "map";
public static final String DEFAULT_PARAMETER_FILE_NAME = "default_input_parameters.yaml";
- public static final String DEFAULT_PARAMETER_HTTP_FILE_NAME = "default_input_parameters_http.yaml";
-
- public static final String DEAFULT_PARAMETER_USERNAME = "host-username";
- public static final String DEAFULT_PARAMETER_PASSWORD = "host-password";
- public static final String DEAFULT_PARAMETER_HOST_URL = "host-url";
public static final String DEFAULT_PARAMETER_HELP = "help";
public static final String DEFAULT_PARAMETER_VERSION = "version";
public static final String DEFAULT_PARAMETER_DEBUG = "debug";
public static final String DEFAULT_PARAMETER_OUTPUT_FORMAT = "format";
public static final String DEFAULT_PARAMETER_OUTPUT_ATTR_LONG = "long";
public static final String DEFAULT_PARAMETER_OUTPUT_NO_TITLE = "no-title";
- public static final String DEFAULT_PARAMETER_NO_AUTH = "no-auth";
//results
public static final String RESULTS = "results";
@@ -124,6 +103,7 @@ public class Constants {
public static final String PORTRAINT_COLUMN_NAME_PROPERTY = "property";
public static final String PORTRAINT_COLUMN_NAME_VALUE = "value";
+ //discovery
public static final String SCHEMA_DIRECTORY = "open-cli-schema";
public static final String YAML_PATTERN = "/**/*.yaml";
public static final String JSON_PATTERN = "/**/*.json";
@@ -136,50 +116,6 @@ public class Constants {
//normal
public static final String BASIC_SCHEMA_PROFILE = "basic";
- public static final String HTTP_SCHEMA_PROFILE = "http";
-
- //http
- public static final String HTTP = "http";
-
- public static final String SERVICE = "service";
- public static final String VERSION = "version";
- public static final String BASE_PATH = "base_path";
- public static final String AUTH = "auth";
- public static final String AUTH_NONE = "none";
- public static final String AUTH_BASIC = "basic";
- public static final String MODE = "mode";
- public static final String MODE_DIRECT = "direct";
- public static final String MODE_CATALOG = "catalog";
-
- public static final String REQUEST = "request";
- public static final String URI = "uri";
- public static final String BODY = "body";
-
- public static final String METHOD_TYPE = "method";
- public static final String POST = "post";
- public static final String GET = "get";
- public static final String DELETE = "delete";
- public static final String PUT = "put";
- public static final String HEAD = "delete";
-
- public static final String HEADERS = "headers";
- public static final String QUERIES = "queries";
- public static final String COOKIES = "cookies";
-
- public static final String SUCCESS_CODES = "success_codes";
-
- public static final String RESULT_MAP = "result_map";
-
- public static final String SAMPLE_RESPONSE = "sample_response";
-
- //swagger
- public static final String EXECUTOR = "exec";
-
- public static final String API = "api";
- public static final String CLIENT = "client";
- public static final String ENTITY = "entity";
- public static final String METHOD = "method";
- public static final String MULTIPART_ENTITY_NAME = "multipart_entity_name";
public static final String EXCEPTION = "exception";
public static final String BOOLEAN_TRUE = "true";
public static final String BOOLEAN_FALSE = "false";
@@ -189,37 +125,21 @@ public class Constants {
public static final String SCHEMA_FILE_EMPTY = "The schema file cann't be null or empty";
public static final String SCHEMA_FILE_WRONG_EXTN = "Schema file should be '.yaml' extension";
public static final String SCHEMA_FILE_NOT_EXIST = "Schema file doesn't exist";
- public static final String HTTP_SECTION_EMPTY = "Http Section cann't be null or empty";
- public static final String HTTP_BODY_SECTION_EMPTY = "http body section under 'request:' cann't be null or empty";
- public static final String HTTP_BODY_FAILED_PARSING = "The http body json is failed to parse";
- public static final String HTTP_BODY_JSON_EMPTY = "The http body json cann't be null or empty";
- public static final String HTTP_SUCCESS_CODE_INVALID = "Invalid http success code.";
- public static final String HTTP_SAMPLE_RESPONSE_EMPTY = "Sample response cann't be null or empty";
- public static final String HTTP_SAMPLE_RESPONSE_FAILED_PARSING = "The http Sample response json is failed to parse.";
public static final String USE_DIRECTIVE = "use";
- public static final String SAMPLE_GEN_ENABLED = "cli.sample.gen.enable";
- public static final String SAMPLE_GEN_TARGET_FOLDER = "cli.sample.gen.target";
-
public static final String SPL_ENTRY_UUID = "uuid";
public static final String SPL_ENTRY_ENV = "env:";
- //auth plugin
- public static final String AUTH_SERVICE_AUTHORIZATION = "Authorization";
-
- //catalog plugin
- public static final String CATALOG_SERVICE_NAME = "catalog-service-name";
- public static final String CATALOG_SERVICE_VERSION = "catalog-service-version";
- public static final String CATALOG_SERVICE_BASE_PATH = "catalog-service-base-path";
- public static final String CATALOG_SERVICE_HOST_URL = "catalog-service-host-url";
-
public static final String VERSION_INFO = "version.info";
public static final String VERSION_INFO_PLACE_HOLDER_VERSION = "__VERSION__";
public static final String VERSION_INFO_PLACE_HOLDER_AVL_PRD_VER = "__AVAILABLE_PRODUCT_VERSIONS__";
public static final String VERSION_INFO_PLACE_HOLDER_ENB_PRD_VER = "__ENABLED_PRODUCT_VERSIONS__";
- private Constants() {
+ public static final String SAMPLE_GEN_ENABLED = "cli.sample.gen.enable";
+ public static final String SAMPLE_GEN_TARGET_FOLDER = "cli.sample.gen.target";
+
+ private OnapCommandConstants() {
}
}
diff --git a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidRegistration.java b/framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidRegistration.java
index db4c8e6a..1c90e9a0 100644
--- a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidRegistration.java
+++ b/framework/src/main/java/org/onap/cli/fw/error/OnapCommandInvalidRegistration.java
@@ -16,7 +16,7 @@
package org.onap.cli.fw.error;
-import org.onap.cli.fw.OnapCommand;
+import org.onap.cli.fw.cmd.OnapCommand;
/**
* Command class invalid.
diff --git a/framework/src/main/java/org/onap/cli/fw/info/OnapCommandInfo.java b/framework/src/main/java/org/onap/cli/fw/info/OnapCommandInfo.java
index c52965f9..1496bcbb 100644
--- a/framework/src/main/java/org/onap/cli/fw/info/OnapCommandInfo.java
+++ b/framework/src/main/java/org/onap/cli/fw/info/OnapCommandInfo.java
@@ -16,7 +16,7 @@
package org.onap.cli.fw.info;
-import org.onap.cli.fw.cmd.CommandType;
+import org.onap.cli.fw.cmd.OnapCommandType;
/**
* Oclip Command info like product version, service, contact, etc.
@@ -29,7 +29,7 @@ public class OnapCommandInfo {
private String author;
- private CommandType type = CommandType.CMD;
+ private OnapCommandType type = OnapCommandType.CMD;
private boolean ignore = false;
@@ -57,11 +57,11 @@ public class OnapCommandInfo {
this.author = email;
}
- public CommandType getCommandType() {
+ public OnapCommandType getCommandType() {
return type;
}
- public void setCommandType(CommandType type) {
+ public void setCommandType(OnapCommandType type) {
this.type = type;
}
diff --git a/framework/src/main/java/org/onap/cli/fw/input/OnapCommandParameter.java b/framework/src/main/java/org/onap/cli/fw/input/OnapCommandParameter.java
index ac2e8521..4b21ed4f 100644
--- a/framework/src/main/java/org/onap/cli/fw/input/OnapCommandParameter.java
+++ b/framework/src/main/java/org/onap/cli/fw/input/OnapCommandParameter.java
@@ -58,7 +58,7 @@ public class OnapCommandParameter {
/*
* Parameter type such as int, json, yaml, string, etc
*/
- private ParameterType parameterType;
+ private OnapCommandParameterType parameterType;
/*
* Default value
@@ -130,18 +130,18 @@ public class OnapCommandParameter {
this.longOption = longOption;
}
- public ParameterType getParameterType() {
+ public OnapCommandParameterType getParameterType() {
return parameterType;
}
- public void setParameterType(ParameterType parameterType) {
+ public void setParameterType(OnapCommandParameterType parameterType) {
this.parameterType = parameterType;
if (this.defaultValue.isEmpty()) {
- if (this.getParameterType().equals(ParameterType.BOOL)) {
+ if (this.getParameterType().equals(OnapCommandParameterType.BOOL)) {
// For bool type always the default param is false
this.defaultValue = "false";
- } else if (this.getParameterType().equals(ParameterType.UUID)) {
+ } else if (this.getParameterType().equals(OnapCommandParameterType.UUID)) {
this.defaultValue = UUID.randomUUID().toString();
}
}
@@ -197,10 +197,10 @@ public class OnapCommandParameter {
public void setValue(Object value) throws OnapCommandInvalidParameterValue {
this.rawValue = value;
- if (ParameterType.URL.equals(parameterType) && !value.toString().isEmpty() && !value.toString().startsWith("http")
+ if (OnapCommandParameterType.URL.equals(parameterType) && !value.toString().isEmpty() && !value.toString().startsWith("http")
&& !value.toString().startsWith("/")) {
this.value = "/" + value;
- } else if (ParameterType.ARRAY.equals(parameterType)) {
+ } else if (OnapCommandParameterType.ARRAY.equals(parameterType)) {
if (!(value instanceof List)) {
throw new OnapCommandInvalidParameterValue(this.getName());
}
@@ -212,7 +212,7 @@ public class OnapCommandParameter {
} catch (JsonProcessingException e) {
throw new OnapCommandInvalidParameterValue(this.getName(), e);
}
- } else if (ParameterType.MAP.equals(parameterType)) {
+ } else if (OnapCommandParameterType.MAP.equals(parameterType)) {
if (!(value instanceof Map)) {
throw new OnapCommandInvalidParameterValue(this.getName());
}
@@ -275,13 +275,50 @@ public class OnapCommandParameter {
throw new OnapCommandParameterMissing(this.getName());
}
- if (!this.isOptional() && ParameterType.BINARY.equals(parameterType)) {
+ if (!this.isOptional() && OnapCommandParameterType.BINARY.equals(parameterType)) {
File file = new File(value.toString());
if (!file.isFile()) {
throw new OnapCommandInvalidParameterValue(this.getName());
}
}
- // (mrkanag) validate for type supported ParameterType using constraints
+ // (mrkanag) validate for type supported OnapCommandParameterType using constraints
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((cmdName == null) ? 0 : cmdName.hashCode());
+ result = prime * result + ((longOption == null) ? 0 : longOption.hashCode());
+ result = prime * result + ((shortOption == null) ? 0 : shortOption.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ OnapCommandParameter other = (OnapCommandParameter) obj;
+ if (cmdName == null) {
+ if (other.cmdName != null)
+ return false;
+ } else if (!cmdName.equals(other.cmdName))
+ return false;
+ if (longOption == null) {
+ if (other.longOption != null)
+ return false;
+ } else if (!longOption.equals(other.longOption))
+ return false;
+ if (shortOption == null) {
+ if (other.shortOption != null)
+ return false;
+ } else if (!shortOption.equals(other.shortOption))
+ return false;
+ return true;
}
}
diff --git a/framework/src/main/java/org/onap/cli/fw/input/ParameterType.java b/framework/src/main/java/org/onap/cli/fw/input/OnapCommandParameterType.java
index 6a9254f5..85ace4a6 100644
--- a/framework/src/main/java/org/onap/cli/fw/input/ParameterType.java
+++ b/framework/src/main/java/org/onap/cli/fw/input/OnapCommandParameterType.java
@@ -22,7 +22,7 @@ import org.onap.cli.fw.error.OnapCommandInvalidParameterType;
* Parameter type supported by Oclip CLI.
*
*/
-public enum ParameterType {
+public enum OnapCommandParameterType {
/**
* JSON file.
*/
@@ -45,7 +45,7 @@ public enum ParameterType {
* @throws OnapCommandInvalidParameterType
* exception
*/
- public static ParameterType get(String name) throws OnapCommandInvalidParameterType {
+ public static OnapCommandParameterType get(String name) throws OnapCommandInvalidParameterType {
if (JSON.name().equalsIgnoreCase(name)) {
return JSON;
} else if (YAML.name().equalsIgnoreCase(name)) {
diff --git a/framework/src/main/java/org/onap/cli/fw/input/cache/Param.java b/framework/src/main/java/org/onap/cli/fw/input/cache/OnapCommandParamEntity.java
index 5a32e886..85473d84 100644
--- a/framework/src/main/java/org/onap/cli/fw/input/cache/Param.java
+++ b/framework/src/main/java/org/onap/cli/fw/input/cache/OnapCommandParamEntity.java
@@ -16,7 +16,7 @@
package org.onap.cli.fw.input.cache;
-public class Param {
+public class OnapCommandParamEntity {
private String product;
diff --git a/framework/src/main/java/org/onap/cli/fw/input/cache/OnapCommandParameterCache.java b/framework/src/main/java/org/onap/cli/fw/input/cache/OnapCommandParameterCache.java
index 0b70b5c1..55833167 100644
--- a/framework/src/main/java/org/onap/cli/fw/input/cache/OnapCommandParameterCache.java
+++ b/framework/src/main/java/org/onap/cli/fw/input/cache/OnapCommandParameterCache.java
@@ -16,15 +16,24 @@
package org.onap.cli.fw.input.cache;
+import static org.onap.cli.fw.conf.OnapCommandConstants.DATA_DIRECTORY;
+import static org.onap.cli.fw.conf.OnapCommandConstants.DATA_PATH_JSON_PATTERN;
+
+import java.io.File;
+import java.io.IOException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.onap.cli.fw.conf.Constants;
+import org.onap.cli.fw.conf.OnapCommandConstants;
import org.onap.cli.fw.error.OnapCommandLoadProfileFailed;
import org.onap.cli.fw.error.OnapCommandPersistProfileFailed;
-import org.onap.cli.fw.utils.OnapCommandProfileUtils;
+import org.onap.cli.fw.utils.OnapCommandDiscoveryUtils;
+import org.springframework.core.io.Resource;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
public class OnapCommandParameterCache {
@@ -32,7 +41,7 @@ public class OnapCommandParameterCache {
private static OnapCommandParameterCache single = null;
- private String profileName = Constants.PARAM_CACHE_FILE_NAME;
+ private String profileName = OnapCommandConstants.PARAM_CACHE_FILE_NAME;
private OnapCommandParameterCache() {
@@ -78,12 +87,12 @@ public class OnapCommandParameterCache {
}
private void persist() {
- List<Param> params = new ArrayList<>();
+ List<OnapCommandParamEntity> params = new ArrayList<>();
for (String p: this.paramCache.keySet()) {
for (String name: this.paramCache.get(p).keySet()) {
- Param param = new Param();
+ OnapCommandParamEntity param = new OnapCommandParamEntity();
param.setProduct(p);
param.setName(name);
param.setValue(this.paramCache.get(p).get(name));
@@ -93,21 +102,21 @@ public class OnapCommandParameterCache {
}
try {
- OnapCommandProfileUtils.persistProfile(params, this.profileName);
+ this.persistProfile(params, this.profileName);
} catch (OnapCommandPersistProfileFailed e) {
throw new RuntimeException(e); // NOSONAR
}
}
private void load() {
- List<Param> params= new ArrayList<>();
+ List<OnapCommandParamEntity> params= new ArrayList<>();
try {
- params = OnapCommandProfileUtils.loadParamFromCache(this.profileName);
+ params = this.loadParamFromCache(this.profileName);
} catch (OnapCommandLoadProfileFailed e) {
throw new RuntimeException(e); // NOSONAR
}
- for (Param p : params) {
+ for (OnapCommandParamEntity p : params) {
this.add(p.getProduct(), p.getName(), p.getValue());
}
}
@@ -116,4 +125,39 @@ public class OnapCommandParameterCache {
this.profileName = profileName;
this.load();
}
+
+ private void persistProfile(List<OnapCommandParamEntity> params, String profileName) throws OnapCommandPersistProfileFailed {
+ if (params != null) {
+ try {
+ Resource[] resources = OnapCommandDiscoveryUtils.findResources(DATA_DIRECTORY);
+ if (resources != null && resources.length == 1) {
+ String path = resources[0].getURI().getPath();
+ File file = new File(path + File.separator + profileName + ".json");
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.writerWithDefaultPrettyPrinter().writeValue(file, params);
+ }
+ } catch (IOException e1) {
+ throw new OnapCommandPersistProfileFailed(e1);
+ }
+ }
+ }
+
+ private List<OnapCommandParamEntity> loadParamFromCache(String profileName) throws OnapCommandLoadProfileFailed {
+ List<OnapCommandParamEntity> params = new ArrayList<>();
+
+ try {
+ Resource resource = OnapCommandDiscoveryUtils.findResource(profileName + ".json",
+ DATA_PATH_JSON_PATTERN);
+ if (resource != null) {
+ File file = new File(resource.getURI().getPath());
+ ObjectMapper mapper = new ObjectMapper();
+ OnapCommandParamEntity[] list = mapper.readValue(file, OnapCommandParamEntity[].class);
+ params.addAll(Arrays.asList(list));
+ }
+ } catch (IOException e) {
+ throw new OnapCommandLoadProfileFailed(e);
+ }
+
+ return params;
+ }
}
diff --git a/framework/src/main/java/org/onap/cli/fw/output/PrintDirection.java b/framework/src/main/java/org/onap/cli/fw/output/OnapCommandPrintDirection.java
index 96ad713f..5a8e6657 100644
--- a/framework/src/main/java/org/onap/cli/fw/output/PrintDirection.java
+++ b/framework/src/main/java/org/onap/cli/fw/output/OnapCommandPrintDirection.java
@@ -22,7 +22,7 @@ import org.onap.cli.fw.error.OnapCommandInvalidPrintDirection;
* How to print the result.
*
*/
-public enum PrintDirection {
+public enum OnapCommandPrintDirection {
LANDSCAPE, PORTRAIT;
/**
* Get print direction.
@@ -33,7 +33,7 @@ public enum PrintDirection {
* @throws OnapCommandInvalidPrintDirection
* exception
*/
- public static PrintDirection get(String name) throws OnapCommandInvalidPrintDirection {
+ public static OnapCommandPrintDirection get(String name) throws OnapCommandInvalidPrintDirection {
if (LANDSCAPE.name().equalsIgnoreCase(name)) {
return LANDSCAPE;
} else if (PORTRAIT.name().equalsIgnoreCase(name)) {
diff --git a/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResult.java b/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResult.java
index ae5d86ca..4eaab81a 100644
--- a/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResult.java
+++ b/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResult.java
@@ -21,11 +21,11 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.onap.cli.fw.conf.Constants;
+import org.onap.cli.fw.conf.OnapCommandConstants;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandOutputFormatNotsupported;
import org.onap.cli.fw.error.OnapCommandOutputPrintingFailed;
-import org.onap.cli.fw.input.ParameterType;
+import org.onap.cli.fw.input.OnapCommandParameterType;
import org.onap.cli.fw.output.print.OnapCommandPrint;
import org.onap.cli.fw.utils.OnapCommandUtils;
@@ -47,7 +47,7 @@ public class OnapCommandResult {
/*
* Type requested by user
*/
- private ResultType type = ResultType.TABLE;
+ private OnapCommandResultType type = OnapCommandResultType.TABLE;
/*
* Scope requested by user
@@ -65,7 +65,7 @@ public class OnapCommandResult {
*
* loaded from schema file
*/
- private PrintDirection printDirection = PrintDirection.LANDSCAPE;
+ private OnapCommandPrintDirection printDirection = OnapCommandPrintDirection.LANDSCAPE;
private String debugInfo = "";
@@ -84,11 +84,11 @@ public class OnapCommandResult {
*/
private boolean isDebug = false;
- public PrintDirection getPrintDirection() {
+ public OnapCommandPrintDirection getPrintDirection() {
return printDirection;
}
- public void setPrintDirection(PrintDirection printDirection) {
+ public void setPrintDirection(OnapCommandPrintDirection printDirection) {
this.printDirection = printDirection;
}
@@ -123,11 +123,11 @@ public class OnapCommandResult {
return recordMap;
}
- public ResultType getType() {
+ public OnapCommandResultType getType() {
return type;
}
- public void setType(ResultType type) {
+ public void setType(OnapCommandResultType type) {
this.type = type;
}
@@ -189,9 +189,9 @@ public class OnapCommandResult {
OnapCommandPrint print = new OnapCommandPrint();
print.setPrintTitle(this.isIncludeTitle());
- if (this.getPrintDirection().equals(PrintDirection.LANDSCAPE)) {
+ if (this.getPrintDirection().equals(OnapCommandPrintDirection.LANDSCAPE)) {
for (OnapCommandResultAttribute record : this.getScopedRecords()) {
- if (record.getType().equals(ParameterType.JSON)) {
+ if (record.getType().equals(OnapCommandParameterType.JSON)) {
print.addColumn(record.getName(), OnapCommandUtils.jsonFlatten(record.getValues()));
} else {
print.addColumn(record.getName(), record.getValues());
@@ -200,11 +200,11 @@ public class OnapCommandResult {
} else {
// Add property column
OnapCommandResultAttribute prp = new OnapCommandResultAttribute();
- prp.setName(Constants.PORTRAINT_COLUMN_NAME_PROPERTY);
+ prp.setName(OnapCommandConstants.PORTRAINT_COLUMN_NAME_PROPERTY);
prp.setScope(OnapCommandResultAttributeScope.SHORT);
// Add value column
OnapCommandResultAttribute val = new OnapCommandResultAttribute();
- val.setName(Constants.PORTRAINT_COLUMN_NAME_VALUE);
+ val.setName(OnapCommandConstants.PORTRAINT_COLUMN_NAME_VALUE);
val.setScope(OnapCommandResultAttributeScope.SHORT);
for (OnapCommandResultAttribute record : this.getScopedRecords()) {
@@ -224,11 +224,11 @@ public class OnapCommandResult {
printOutput = this.getDebugInfo() + "\n";
}
- if (this.getType().equals(ResultType.JSON)) {
+ if (this.getType().equals(OnapCommandResultType.JSON)) {
return printOutput + print.printJson();
- } else if (this.getType().equals(ResultType.TABLE)) {
+ } else if (this.getType().equals(OnapCommandResultType.TABLE)) {
return printOutput + print.printTable(this.isIncludeSeparator());
- } else if (this.getType().equals(ResultType.CSV)) {
+ } else if (this.getType().equals(OnapCommandResultType.CSV)) {
return printOutput + print.printCsv();
}
diff --git a/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResultAttribute.java b/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResultAttribute.java
index fe4ed32e..c00c88b1 100644
--- a/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResultAttribute.java
+++ b/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResultAttribute.java
@@ -20,7 +20,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import org.onap.cli.fw.input.ParameterType;
+import org.onap.cli.fw.input.OnapCommandParameterType;
/**
* Oclip command output records, helps to define the title and its description while command is defined and during run
@@ -53,7 +53,7 @@ public class OnapCommandResultAttribute {
*/
private OnapCommandResultAttributeScope outScope = OnapCommandResultAttributeScope.SHORT;
- private ParameterType paramType = ParameterType.STRING;
+ private OnapCommandParameterType paramType = OnapCommandParameterType.STRING;
private boolean isSecured = false;
@@ -92,11 +92,11 @@ public class OnapCommandResultAttribute {
this.outScope = scope;
}
- public ParameterType getType() {
+ public OnapCommandParameterType getType() {
return paramType;
}
- public void setType(ParameterType type) {
+ public void setType(OnapCommandParameterType type) {
this.paramType = type;
}
diff --git a/framework/src/main/java/org/onap/cli/fw/output/ResultType.java b/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResultType.java
index 49ddf457..ebd13ebd 100644
--- a/framework/src/main/java/org/onap/cli/fw/output/ResultType.java
+++ b/framework/src/main/java/org/onap/cli/fw/output/OnapCommandResultType.java
@@ -20,7 +20,7 @@ package org.onap.cli.fw.output;
* Oclip command result format.
*
*/
-public enum ResultType {
+public enum OnapCommandResultType {
TABLE, CSV, JSON, YAML, TEXT;
/**
@@ -39,13 +39,13 @@ public enum ResultType {
}
/**
- * Get ResultType.
+ * Get OnapCommandResultType.
*
* @param name
* format name
- * @return ResultType
+ * @return OnapCommandResultType
*/
- public static ResultType get(String name) {
+ public static OnapCommandResultType get(String name) {
if (TABLE.name().equalsIgnoreCase(name)) {
return TABLE;
}
diff --git a/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java b/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java
index 96ce59b2..3946c5da 100644
--- a/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java
+++ b/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java
@@ -29,7 +29,7 @@ import java.util.StringTokenizer;
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVPrinter;
import org.onap.cli.fw.error.OnapCommandOutputPrintingFailed;
-import org.onap.cli.fw.output.PrintDirection;
+import org.onap.cli.fw.output.OnapCommandPrintDirection;
/**
* Oclip Command Table print.
@@ -39,17 +39,17 @@ public class OnapCommandPrint {
public static final int MAX_COLUMN_LENGTH = 50;
- private PrintDirection direction;
+ private OnapCommandPrintDirection direction;
private Map<String, List<String>> data = new LinkedHashMap<>();
private boolean printTitle = true;
- public PrintDirection getDirection() {
+ public OnapCommandPrintDirection getDirection() {
return direction;
}
- public void setDirection(PrintDirection direction) {
+ public void setDirection(OnapCommandPrintDirection direction) {
this.direction = direction;
}
diff --git a/framework/src/main/java/org/onap/cli/fw/OnapCommandRegistrar.java b/framework/src/main/java/org/onap/cli/fw/registrar/OnapCommandRegistrar.java
index d50ff464..f8fb73fd 100644
--- a/framework/src/main/java/org/onap/cli/fw/OnapCommandRegistrar.java
+++ b/framework/src/main/java/org/onap/cli/fw/registrar/OnapCommandRegistrar.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onap.cli.fw;
+package org.onap.cli.fw.registrar;
import java.io.IOException;
import java.util.HashMap;
@@ -24,8 +24,9 @@ import java.util.Map;
import java.util.Set;
import org.apache.commons.io.IOUtils;
-import org.onap.cli.fw.conf.Constants;
-import org.onap.cli.fw.conf.OnapCommandConfg;
+import org.onap.cli.fw.cmd.OnapCommand;
+import org.onap.cli.fw.conf.OnapCommandConfig;
+import org.onap.cli.fw.conf.OnapCommandConstants;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandHelpFailed;
import org.onap.cli.fw.error.OnapCommandInvalidRegistration;
@@ -34,15 +35,16 @@ import org.onap.cli.fw.error.OnapCommandProductVersionInvalid;
import org.onap.cli.fw.error.OnapCommandRegistrationProductInfoMissing;
import org.onap.cli.fw.error.OnapUnsupportedSchemaProfile;
import org.onap.cli.fw.input.cache.OnapCommandParameterCache;
+import org.onap.cli.fw.output.OnapCommandPrintDirection;
import org.onap.cli.fw.output.OnapCommandResult;
import org.onap.cli.fw.output.OnapCommandResultAttribute;
import org.onap.cli.fw.output.OnapCommandResultAttributeScope;
-import org.onap.cli.fw.output.PrintDirection;
-import org.onap.cli.fw.output.ResultType;
+import org.onap.cli.fw.output.OnapCommandResultType;
+import org.onap.cli.fw.schema.OnapCommandSchema;
+import org.onap.cli.fw.schema.OnapCommandSchemaInfo;
import org.onap.cli.fw.utils.OnapCommandDiscoveryUtils;
import org.onap.cli.fw.utils.OnapCommandHelperUtils;
import org.onap.cli.fw.utils.OnapCommandUtils;
-import org.onap.cli.fw.utils.SchemaInfo;
/**
@@ -57,7 +59,7 @@ public class OnapCommandRegistrar {
private Set<String> availableProductVersions = new HashSet<>();
- private String enabledProductVersion = OnapCommandConfg.getEnabledProductVersion();
+ private String enabledProductVersion = null;
private boolean isInteractiveMode = false;
@@ -114,6 +116,13 @@ public class OnapCommandRegistrar {
this.registryProfilePlugins.put(profile, cmd);
}
+ private OnapCommandRegistrar() {
+ this.enabledProductVersion = System.getenv(OnapCommandConstants.OPEN_CLI_PRODUCT_IN_USE_ENV_NAME);
+ if (this.enabledProductVersion == null) {
+ this.enabledProductVersion = OnapCommandConfig.getPropertyValue(OnapCommandConstants.OPEN_CLI_PRODUCT_NAME);
+ }
+ }
+
/**
* Get global registrar.
*
@@ -190,7 +199,7 @@ public class OnapCommandRegistrar {
* @throws OnapCommandException
* exception
*/
- public List<SchemaInfo> listCommandInfo() throws OnapCommandException {
+ public List<OnapCommandSchemaInfo> listCommandInfo() throws OnapCommandException {
return OnapCommandDiscoveryUtils.discoverSchemas();
}
@@ -256,11 +265,11 @@ public class OnapCommandRegistrar {
}
private void autoDiscoverSchemas() throws OnapCommandException {
- List<SchemaInfo> schemas = OnapCommandDiscoveryUtils.discoverOrLoadSchemas(true);
+ List<OnapCommandSchemaInfo> schemas = OnapCommandDiscoveryUtils.discoverOrLoadSchemas(true);
Map<String, Class<OnapCommand>> plugins = this.autoDiscoverCommandPlugins();
- for (SchemaInfo schema : schemas) {
+ for (OnapCommandSchemaInfo schema : schemas) {
if (schema.isIgnore()) {
continue;
}
@@ -283,7 +292,7 @@ public class OnapCommandRegistrar {
public String getVersion() {
String version = this.getClass().getPackage().getImplementationVersion();
if (version == null) {
- version = OnapCommandConfg.getVersion();
+ version = OnapCommandConfig.getPropertyValue(OnapCommandConstants.OPEN_CLI_VERSION);
}
String buildTime = OnapCommandHelperUtils.findLastBuildTime();
@@ -297,14 +306,14 @@ public class OnapCommandRegistrar {
String versionInfo = "";
try {
- versionInfo = IOUtils.toString(this.getClass().getClassLoader().getResourceAsStream(Constants.VERSION_INFO));
+ versionInfo = IOUtils.toString(this.getClass().getClassLoader().getResourceAsStream(OnapCommandConstants.VERSION_INFO));
} catch (IOException e) {
//Never occurs // NOSONAR
}
- versionInfo = versionInfo.replaceAll(Constants.VERSION_INFO_PLACE_HOLDER_ENB_PRD_VER, configuredProductVersion);
- versionInfo = versionInfo.replaceAll(Constants.VERSION_INFO_PLACE_HOLDER_AVL_PRD_VER, this.availableProductVersions.toString());
- versionInfo = versionInfo.replaceAll(Constants.VERSION_INFO_PLACE_HOLDER_VERSION + "", version + buildTime);
+ versionInfo = versionInfo.replaceAll(OnapCommandConstants.VERSION_INFO_PLACE_HOLDER_ENB_PRD_VER, configuredProductVersion);
+ versionInfo = versionInfo.replaceAll(OnapCommandConstants.VERSION_INFO_PLACE_HOLDER_AVL_PRD_VER, this.availableProductVersions.toString());
+ versionInfo = versionInfo.replaceAll(OnapCommandConstants.VERSION_INFO_PLACE_HOLDER_VERSION + "", version + buildTime);
return versionInfo;
}
@@ -326,32 +335,32 @@ public class OnapCommandRegistrar {
private String getHelp(boolean isEnabledProductVersionOnly) throws OnapCommandHelpFailed {
OnapCommandResult help = new OnapCommandResult();
- help.setType(ResultType.TABLE);
- help.setPrintDirection(PrintDirection.LANDSCAPE);
+ help.setType(OnapCommandResultType.TABLE);
+ help.setPrintDirection(OnapCommandPrintDirection.LANDSCAPE);
OnapCommandResultAttribute attr = new OnapCommandResultAttribute();
- attr.setName(Constants.NAME.toUpperCase());
- attr.setDescription(Constants.DESCRIPTION);
+ attr.setName(OnapCommandConstants.NAME.toUpperCase());
+ attr.setDescription(OnapCommandConstants.DESCRIPTION);
attr.setScope(OnapCommandResultAttributeScope.SHORT);
help.getRecords().add(attr);
OnapCommandResultAttribute attrVer = new OnapCommandResultAttribute();
if (!isEnabledProductVersionOnly) {
- attrVer.setName(Constants.INFO_PRODUCT.toUpperCase());
- attrVer.setDescription(Constants.DESCRIPTION);
+ attrVer.setName(OnapCommandConstants.INFO_PRODUCT.toUpperCase());
+ attrVer.setDescription(OnapCommandConstants.DESCRIPTION);
attrVer.setScope(OnapCommandResultAttributeScope.SHORT);
help.getRecords().add(attrVer);
}
OnapCommandResultAttribute attrSrv = new OnapCommandResultAttribute();
- attrSrv.setName(Constants.SERVICE.toUpperCase());
- attrSrv.setDescription(Constants.SERVICE);
+ attrSrv.setName(OnapCommandConstants.INFO_SERVICE.toUpperCase());
+ attrSrv.setDescription(OnapCommandConstants.INFO_SERVICE);
attrSrv.setScope(OnapCommandResultAttributeScope.SHORT);
help.getRecords().add(attrSrv);
OnapCommandResultAttribute attrDesc = new OnapCommandResultAttribute();
- attrDesc.setName(Constants.DESCRIPTION.toUpperCase());
- attrDesc.setDescription(Constants.DESCRIPTION);
+ attrDesc.setName(OnapCommandConstants.DESCRIPTION.toUpperCase());
+ attrDesc.setDescription(OnapCommandConstants.DESCRIPTION);
attrDesc.setScope(OnapCommandResultAttributeScope.SHORT);
help.getRecords().add(attrDesc);
diff --git a/framework/src/main/java/org/onap/cli/fw/OnapCommandSchema.java b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchema.java
index d5f71044..12eede74 100644
--- a/framework/src/main/java/org/onap/cli/fw/OnapCommandSchema.java
+++ b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchema.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onap.cli.fw;
+package org.onap.cli.fw.schema;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
diff --git a/framework/src/main/java/org/onap/cli/fw/utils/SchemaInfo.java b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaInfo.java
index beb02a37..67675480 100644
--- a/framework/src/main/java/org/onap/cli/fw/utils/SchemaInfo.java
+++ b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaInfo.java
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-package org.onap.cli.fw.utils;
+package org.onap.cli.fw.schema;
-import org.onap.cli.fw.cmd.CommandType;
-import org.onap.cli.fw.conf.Constants;
+import org.onap.cli.fw.cmd.OnapCommandType;
+import org.onap.cli.fw.conf.OnapCommandConstants;
/**
- * SchemaInfo is used in discovery caching.
+ * OnapCommandSchemaInfo is used in discovery caching.
*
*/
-public class SchemaInfo {
+public class OnapCommandSchemaInfo {
/**
* Name of the schema file name
@@ -44,11 +44,11 @@ public class SchemaInfo {
*/
private String version;
- private String type = CommandType.CMD.name();
+ private String type = OnapCommandType.CMD.name();
- private String schemaProfile = Constants.BASIC_SCHEMA_PROFILE;
+ private String schemaProfile = OnapCommandConstants.BASIC_SCHEMA_PROFILE;
- private String ignore = Constants.BOOLEAN_FALSE;
+ private String ignore = OnapCommandConstants.BOOLEAN_FALSE;
public String getSchemaName() {
return schemaName;
@@ -107,7 +107,7 @@ public class SchemaInfo {
}
public boolean isIgnore() {
- return Constants.BOOLEAN_TRUE.equalsIgnoreCase(this.getIgnore());
+ return OnapCommandConstants.BOOLEAN_TRUE.equalsIgnoreCase(this.getIgnore());
}
public String getIgnore() {
diff --git a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandSchemaLoaderUtils.java b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java
index 04bfd23c..8aea883e 100644
--- a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandSchemaLoaderUtils.java
+++ b/framework/src/main/java/org/onap/cli/fw/schema/OnapCommandSchemaLoader.java
@@ -14,68 +14,43 @@
* limitations under the License.
*/
-package org.onap.cli.fw.utils;
-
-import static org.onap.cli.fw.conf.Constants.ATTRIBUTES;
-import static org.onap.cli.fw.conf.Constants.AUTH;
-import static org.onap.cli.fw.conf.Constants.AUTH_VALUES;
-import static org.onap.cli.fw.conf.Constants.BODY;
-import static org.onap.cli.fw.conf.Constants.BOOLEAN_TRUE;
-import static org.onap.cli.fw.conf.Constants.COMMAND_TYPE_VALUES;
-import static org.onap.cli.fw.conf.Constants.DEAFULT_PARAMETER_PASSWORD;
-import static org.onap.cli.fw.conf.Constants.DEAFULT_PARAMETER_USERNAME;
-import static org.onap.cli.fw.conf.Constants.DEFAULT_PARAMETER_FILE_NAME;
-import static org.onap.cli.fw.conf.Constants.DEFAULT_PARAMETER_HTTP_FILE_NAME;
-import static org.onap.cli.fw.conf.Constants.DEFAULT_PARAMETER_NO_AUTH;
-import static org.onap.cli.fw.conf.Constants.DEFAULT_VALUE;
-import static org.onap.cli.fw.conf.Constants.DESCRIPTION;
-import static org.onap.cli.fw.conf.Constants.DIRECTION;
-import static org.onap.cli.fw.conf.Constants.HEADERS;
-import static org.onap.cli.fw.conf.Constants.HTTP;
-import static org.onap.cli.fw.conf.Constants.HTTP_MANDATORY_SECTIONS;
-import static org.onap.cli.fw.conf.Constants.HTTP_SECTIONS;
-import static org.onap.cli.fw.conf.Constants.INFO;
-import static org.onap.cli.fw.conf.Constants.INFO_AUTHOR;
-import static org.onap.cli.fw.conf.Constants.INFO_IGNORE;
-import static org.onap.cli.fw.conf.Constants.INFO_PARAMS_LIST;
-import static org.onap.cli.fw.conf.Constants.INFO_PARAMS_MANDATORY_LIST;
-import static org.onap.cli.fw.conf.Constants.INFO_PRODUCT;
-import static org.onap.cli.fw.conf.Constants.INFO_SERVICE;
-import static org.onap.cli.fw.conf.Constants.INFO_TYPE;
-import static org.onap.cli.fw.conf.Constants.INPUT_PARAMS_LIST;
-import static org.onap.cli.fw.conf.Constants.INPUT_PARAMS_MANDATORY_LIST;
-import static org.onap.cli.fw.conf.Constants.IS_INCLUDE;
-import static org.onap.cli.fw.conf.Constants.IS_OPTIONAL;
-import static org.onap.cli.fw.conf.Constants.IS_SECURED;
-import static org.onap.cli.fw.conf.Constants.LONG_OPTION;
-import static org.onap.cli.fw.conf.Constants.METHOD_TYPE;
-import static org.onap.cli.fw.conf.Constants.MODE;
-import static org.onap.cli.fw.conf.Constants.MODE_VALUES;
-import static org.onap.cli.fw.conf.Constants.MULTIPART_ENTITY_NAME;
-import static org.onap.cli.fw.conf.Constants.NAME;
-import static org.onap.cli.fw.conf.Constants.OPEN_CLI_SCHEMA_VERSION;
-import static org.onap.cli.fw.conf.Constants.PARAMETERS;
-import static org.onap.cli.fw.conf.Constants.QUERIES;
-import static org.onap.cli.fw.conf.Constants.REQUEST;
-import static org.onap.cli.fw.conf.Constants.RESULTS;
-import static org.onap.cli.fw.conf.Constants.RESULT_MAP;
-import static org.onap.cli.fw.conf.Constants.RESULT_PARAMS_LIST;
-import static org.onap.cli.fw.conf.Constants.RESULT_PARAMS_MANDATORY_LIST;
-import static org.onap.cli.fw.conf.Constants.SAMPLE_RESPONSE;
-import static org.onap.cli.fw.conf.Constants.SCHEMA_FILE_NOT_EXIST;
-import static org.onap.cli.fw.conf.Constants.SCHEMA_FILE_WRONG_EXTN;
-import static org.onap.cli.fw.conf.Constants.SCHEMA_PATH_PATERN;
-import static org.onap.cli.fw.conf.Constants.SCOPE;
-import static org.onap.cli.fw.conf.Constants.SERVICE;
-import static org.onap.cli.fw.conf.Constants.SERVICE_PARAMS_LIST;
-import static org.onap.cli.fw.conf.Constants.SERVICE_PARAMS_MANDATORY_LIST;
-import static org.onap.cli.fw.conf.Constants.SHORT_OPTION;
-import static org.onap.cli.fw.conf.Constants.SUCCESS_CODES;
-import static org.onap.cli.fw.conf.Constants.TOP_LEVEL_MANDATORY_LIST;
-import static org.onap.cli.fw.conf.Constants.TOP_LEVEL_PARAMS_LIST;
-import static org.onap.cli.fw.conf.Constants.TYPE;
-import static org.onap.cli.fw.conf.Constants.URI;
-import static org.onap.cli.fw.conf.Constants.VERSION;
+package org.onap.cli.fw.schema;
+
+import static org.onap.cli.fw.conf.OnapCommandConstants.ATTRIBUTES;
+import static org.onap.cli.fw.conf.OnapCommandConstants.BOOLEAN_TRUE;
+import static org.onap.cli.fw.conf.OnapCommandConstants.COMMAND_TYPE_VALUES;
+import static org.onap.cli.fw.conf.OnapCommandConstants.DEFAULT_PARAMETER_FILE_NAME;
+import static org.onap.cli.fw.conf.OnapCommandConstants.DEFAULT_VALUE;
+import static org.onap.cli.fw.conf.OnapCommandConstants.DESCRIPTION;
+import static org.onap.cli.fw.conf.OnapCommandConstants.DIRECTION;
+import static org.onap.cli.fw.conf.OnapCommandConstants.INFO;
+import static org.onap.cli.fw.conf.OnapCommandConstants.INFO_AUTHOR;
+import static org.onap.cli.fw.conf.OnapCommandConstants.INFO_IGNORE;
+import static org.onap.cli.fw.conf.OnapCommandConstants.INFO_PARAMS_LIST;
+import static org.onap.cli.fw.conf.OnapCommandConstants.INFO_PARAMS_MANDATORY_LIST;
+import static org.onap.cli.fw.conf.OnapCommandConstants.INFO_PRODUCT;
+import static org.onap.cli.fw.conf.OnapCommandConstants.INFO_SERVICE;
+import static org.onap.cli.fw.conf.OnapCommandConstants.INFO_TYPE;
+import static org.onap.cli.fw.conf.OnapCommandConstants.INPUT_PARAMS_LIST;
+import static org.onap.cli.fw.conf.OnapCommandConstants.INPUT_PARAMS_MANDATORY_LIST;
+import static org.onap.cli.fw.conf.OnapCommandConstants.IS_INCLUDE;
+import static org.onap.cli.fw.conf.OnapCommandConstants.IS_OPTIONAL;
+import static org.onap.cli.fw.conf.OnapCommandConstants.IS_SECURED;
+import static org.onap.cli.fw.conf.OnapCommandConstants.LONG_OPTION;
+import static org.onap.cli.fw.conf.OnapCommandConstants.NAME;
+import static org.onap.cli.fw.conf.OnapCommandConstants.OPEN_CLI_SCHEMA_VERSION;
+import static org.onap.cli.fw.conf.OnapCommandConstants.PARAMETERS;
+import static org.onap.cli.fw.conf.OnapCommandConstants.RESULTS;
+import static org.onap.cli.fw.conf.OnapCommandConstants.RESULT_PARAMS_LIST;
+import static org.onap.cli.fw.conf.OnapCommandConstants.RESULT_PARAMS_MANDATORY_LIST;
+import static org.onap.cli.fw.conf.OnapCommandConstants.SCHEMA_FILE_NOT_EXIST;
+import static org.onap.cli.fw.conf.OnapCommandConstants.SCHEMA_FILE_WRONG_EXTN;
+import static org.onap.cli.fw.conf.OnapCommandConstants.SCHEMA_PATH_PATERN;
+import static org.onap.cli.fw.conf.OnapCommandConstants.SCOPE;
+import static org.onap.cli.fw.conf.OnapCommandConstants.SHORT_OPTION;
+import static org.onap.cli.fw.conf.OnapCommandConstants.TOP_LEVEL_MANDATORY_LIST;
+import static org.onap.cli.fw.conf.OnapCommandConstants.TOP_LEVEL_PARAMS_LIST;
+import static org.onap.cli.fw.conf.OnapCommandConstants.TYPE;
import java.io.File;
import java.io.FileInputStream;
@@ -90,12 +65,10 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.ad.OnapService;
-import org.onap.cli.fw.cmd.CommandType;
-import org.onap.cli.fw.cmd.OnapHttpCommand;
-import org.onap.cli.fw.conf.Constants;
-import org.onap.cli.fw.conf.OnapCommandConfg;
+import org.onap.cli.fw.cmd.OnapCommand;
+import org.onap.cli.fw.cmd.OnapCommandType;
+import org.onap.cli.fw.conf.OnapCommandConfig;
+import org.onap.cli.fw.conf.OnapCommandConstants;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandInvalidSchema;
import org.onap.cli.fw.error.OnapCommandInvalidSchemaVersion;
@@ -104,15 +77,17 @@ import org.onap.cli.fw.error.OnapCommandParameterOptionConflict;
import org.onap.cli.fw.error.OnapCommandSchemaNotFound;
import org.onap.cli.fw.info.OnapCommandInfo;
import org.onap.cli.fw.input.OnapCommandParameter;
-import org.onap.cli.fw.input.ParameterType;
+import org.onap.cli.fw.input.OnapCommandParameterType;
+import org.onap.cli.fw.output.OnapCommandPrintDirection;
import org.onap.cli.fw.output.OnapCommandResult;
import org.onap.cli.fw.output.OnapCommandResultAttribute;
import org.onap.cli.fw.output.OnapCommandResultAttributeScope;
-import org.onap.cli.fw.output.PrintDirection;
+import org.onap.cli.fw.utils.OnapCommandDiscoveryUtils;
+import org.onap.cli.fw.utils.OnapCommandUtils;
import org.springframework.core.io.Resource;
import org.yaml.snakeyaml.Yaml;
-public class OnapCommandSchemaLoaderUtils {
+public class OnapCommandSchemaLoader {
/**
* Validates schema version.
@@ -138,10 +113,10 @@ public class OnapCommandSchemaLoaderUtils {
throw new OnapCommandSchemaNotFound(schemaName, e);
}
if (inputStream == null) {
- inputStream = OnapCommandSchemaLoaderUtils.loadSchemaFromFile(schemaName);
+ inputStream = OnapCommandSchemaLoader.loadSchemaFromFile(schemaName);
}
- Map<String, ?> values = OnapCommandSchemaLoaderUtils.loadSchema(inputStream, schemaName);
+ Map<String, ?> values = OnapCommandSchemaLoader.loadSchema(inputStream, schemaName);
String schemaVersion = "";
if (values.keySet().contains(OPEN_CLI_SCHEMA_VERSION)) {
Object obj = values.get(OPEN_CLI_SCHEMA_VERSION);
@@ -173,16 +148,16 @@ public class OnapCommandSchemaLoaderUtils {
validateSchemaVersion(DEFAULT_PARAMETER_FILE_NAME, cmd.getSchemaVersion()) : new HashMap<>();
//mrkanag default_parameter is supported only for parameters.
if (defaultParameterMap.containsKey(INFO)) {
- defaultParameterMap.remove(Constants.INFO);
+ defaultParameterMap.remove(OnapCommandConstants.INFO);
}
- errors.addAll(OnapCommandSchemaLoaderUtils.parseSchema(cmd, defaultParameterMap, validateSchema));
+ errors.addAll(OnapCommandSchemaLoader.parseSchema(cmd, defaultParameterMap, validateSchema));
}
Map<String, List<Map<String, String>>> commandYamlMap =
(Map<String, List<Map<String, String>>>)validateSchemaVersion(schemaName, cmd.getSchemaVersion());
- errors.addAll(OnapCommandSchemaLoaderUtils.parseSchema(cmd, commandYamlMap, validateSchema));
+ errors.addAll(OnapCommandSchemaLoader.parseSchema(cmd, commandYamlMap, validateSchema));
return errors;
} catch (OnapCommandException e) {
@@ -192,37 +167,7 @@ public class OnapCommandSchemaLoaderUtils {
}
}
- public static List<String> loadHttpSchema(OnapHttpCommand cmd, String schemaName, boolean includeDefault,
- boolean validateSchema) throws OnapCommandException {
- try {
- List<String> errors = new ArrayList<>();
- if (includeDefault) {
- Map<String, ?> defaultParameterMap = includeDefault ?
- validateSchemaVersion(DEFAULT_PARAMETER_HTTP_FILE_NAME, cmd.getSchemaVersion()) : new HashMap<>();
-
- //mrkanag default_parameter is supported only for parameters.
- if (defaultParameterMap.containsKey(INFO)) {
- defaultParameterMap.remove(Constants.INFO);
- }
-
- errors.addAll(OnapCommandSchemaLoaderUtils.parseSchema(cmd, defaultParameterMap, validateSchema));
- }
-
- Map<String, List<Map<String, String>>> commandYamlMap =
- (Map<String, List<Map<String, String>>>)validateSchemaVersion(schemaName, cmd.getSchemaVersion());
-
- errors.addAll(OnapCommandSchemaLoaderUtils.parseHttpSchema(cmd, commandYamlMap, validateSchema));
-
- return errors;
-
- } catch (OnapCommandException e) {
- throw e;
- } catch (Exception e) {
- throw new OnapCommandInvalidSchema(schemaName, e);
- }
- }
-
- static List<String> parseSchema(OnapCommand cmd,
+ public static List<String> parseSchema(OnapCommand cmd,
final Map<String, ?> values,
boolean validate) throws OnapCommandException {
@@ -231,8 +176,8 @@ public class OnapCommandSchemaLoaderUtils {
List<String> longOptions = new ArrayList<>();
if (validate) {
- OnapCommandUtils.validateTags(exceptionList, (Map<String, Object>) values, OnapCommandConfg.getSchemaAttrInfo(TOP_LEVEL_PARAMS_LIST),
- OnapCommandConfg.getSchemaAttrInfo(TOP_LEVEL_MANDATORY_LIST), "root level");
+ OnapCommandUtils.validateTags(exceptionList, (Map<String, Object>) values, OnapCommandConfig.getCommaSeparatedList(TOP_LEVEL_PARAMS_LIST),
+ OnapCommandConfig.getCommaSeparatedList(TOP_LEVEL_MANDATORY_LIST), "root level");
}
@@ -261,8 +206,8 @@ public class OnapCommandSchemaLoaderUtils {
if (infoMap != null) {
if (validate) {
OnapCommandUtils.validateTags(exceptionList, (Map<String, Object>) values.get(key),
- OnapCommandConfg.getSchemaAttrInfo(INFO_PARAMS_LIST),
- OnapCommandConfg.getSchemaAttrInfo(INFO_PARAMS_MANDATORY_LIST), INFO);
+ OnapCommandConfig.getCommaSeparatedList(INFO_PARAMS_LIST),
+ OnapCommandConfig.getCommaSeparatedList(INFO_PARAMS_MANDATORY_LIST), INFO);
HashMap<String, String> validationMap = new HashMap<>();
validationMap.put(INFO_TYPE, COMMAND_TYPE_VALUES);
@@ -274,9 +219,9 @@ public class OnapCommandSchemaLoaderUtils {
exceptionList.add("Attribute '" + secKey + "' under '" + INFO + "' is empty");
} else {
String value = String.valueOf(obj);
- if (!OnapCommandConfg.getSchemaAttrInfo(validationMap.get(secKey)).contains(value)) {
+ if (!OnapCommandConfig.getCommaSeparatedList(validationMap.get(secKey)).contains(value)) {
exceptionList.add("Attribute '" + secKey + "' contains invalid value. Valide values are "
- + OnapCommandConfg.getSchemaAttrInfo(validationMap.get(key))); //
+ + OnapCommandConfig.getCommaSeparatedList(validationMap.get(key))); //
}
}
}
@@ -299,7 +244,7 @@ public class OnapCommandSchemaLoaderUtils {
case INFO_TYPE:
Object obj = infoMap.get(key1);
- info.setCommandType(CommandType.get(obj.toString()));
+ info.setCommandType(OnapCommandType.get(obj.toString()));
break;
case INFO_AUTHOR:
@@ -309,7 +254,7 @@ public class OnapCommandSchemaLoaderUtils {
case INFO_IGNORE:
Object ignore = infoMap.get(key1);
- info.setIgnore(ignore.toString().equalsIgnoreCase(Constants.BOOLEAN_TRUE));
+ info.setIgnore(ignore.toString().equalsIgnoreCase(OnapCommandConstants.BOOLEAN_TRUE));
break;
}
}
@@ -341,8 +286,8 @@ public class OnapCommandSchemaLoaderUtils {
}
if (validate) {
- OnapCommandUtils.validateTags(exceptionList, parameter, OnapCommandConfg.getSchemaAttrInfo(INPUT_PARAMS_LIST),
- OnapCommandConfg.getSchemaAttrInfo(INPUT_PARAMS_MANDATORY_LIST), PARAMETERS);
+ OnapCommandUtils.validateTags(exceptionList, parameter, OnapCommandConfig.getCommaSeparatedList(INPUT_PARAMS_LIST),
+ OnapCommandConfig.getCommaSeparatedList(INPUT_PARAMS_MANDATORY_LIST), PARAMETERS);
}
for (Map.Entry<String, String> entry1 : parameter.entrySet()) {
@@ -390,7 +335,7 @@ public class OnapCommandSchemaLoaderUtils {
case TYPE:
try {
- param.setParameterType(ParameterType.get(parameter.get(key2)));
+ param.setParameterType(OnapCommandParameterType.get(parameter.get(key2)));
} catch (OnapCommandException ex) {
OnapCommandUtils.throwOrCollect(ex, exceptionList, validate);
}
@@ -461,7 +406,7 @@ public class OnapCommandSchemaLoaderUtils {
switch (key3) {
case DIRECTION:
try {
- result.setPrintDirection(PrintDirection.get((String) valueMap.get(key3)));
+ result.setPrintDirection(OnapCommandPrintDirection.get((String) valueMap.get(key3)));
} catch (OnapCommandException ex) {
OnapCommandUtils.throwOrCollect(ex, exceptionList, validate);
}
@@ -473,8 +418,8 @@ public class OnapCommandSchemaLoaderUtils {
for (Map<String, String> map : attrs) {
OnapCommandResultAttribute attr = new OnapCommandResultAttribute();
if (validate) {
- OnapCommandUtils.validateTags(exceptionList, map, OnapCommandConfg.getSchemaAttrInfo(RESULT_PARAMS_LIST),
- OnapCommandConfg.getSchemaAttrInfo(RESULT_PARAMS_MANDATORY_LIST), ATTRIBUTES);
+ OnapCommandUtils.validateTags(exceptionList, map, OnapCommandConfig.getCommaSeparatedList(RESULT_PARAMS_LIST),
+ OnapCommandConfig.getCommaSeparatedList(RESULT_PARAMS_MANDATORY_LIST), ATTRIBUTES);
}
Set<String> resultParamNames = new HashSet<>();
@@ -508,7 +453,7 @@ public class OnapCommandSchemaLoaderUtils {
case TYPE:
try {
- attr.setType(ParameterType.get(map.get(key4)));
+ attr.setType(OnapCommandParameterType.get(map.get(key4)));
} catch (OnapCommandException ex) {
OnapCommandUtils.throwOrCollect(ex, exceptionList, validate);
}
@@ -548,173 +493,6 @@ public class OnapCommandSchemaLoaderUtils {
return exceptionList;
}
- /**
- * Load the schema.
- *
- * @param cmd
- * OnapHttpCommand
- * @param schemaName
- * schema name
- * @throws OnapCommandException
- * on error
- */
- static ArrayList<String> parseHttpSchema(OnapHttpCommand cmd,
- final Map<String, ?> values,
- boolean validate) throws OnapCommandException {
- ArrayList<String> errorList = new ArrayList<>();
- try {
- Map<String, ?> valMap = (Map<String, ?>) values.get(HTTP);
-
- if (valMap != null) {
- if (validate) {
- OnapCommandUtils.validateTags(errorList, valMap, OnapCommandConfg.getSchemaAttrInfo(HTTP_SECTIONS),
- OnapCommandConfg.getSchemaAttrInfo(HTTP_MANDATORY_SECTIONS), PARAMETERS);
- errorList.addAll(OnapCommandUtils.validateHttpSchemaSection(values));
- }
- for (Map.Entry<String, ?> entry1 : valMap.entrySet()) {
- String key1 = entry1.getKey();
-
- switch (key1) {
- case REQUEST:
- Map<String, ?> map = (Map<String, ?>) valMap.get(key1);
-
- for (Map.Entry<String, ?> entry2 : map.entrySet()) {
- try {
- String key2 = entry2.getKey();
-
- switch (key2) {
- case URI:
- Object obj = map.get(key2);
- cmd.getInput().setUri(obj.toString());
- break;
- case METHOD_TYPE:
- Object method = map.get(key2);
- cmd.getInput().setMethod(method.toString());
- break;
- case BODY:
- Object body = map.get(key2);
- cmd.getInput().setBody(body.toString());
- break;
- case HEADERS:
- Map<String, String> head = (Map<String, String>) map.get(key2);
- cmd.getInput().setReqHeaders(head);
- break;
- case QUERIES:
- Map<String, String> query = (Map<String, String>) map.get(key2);
-
- cmd.getInput().setReqQueries(query);
- break;
- case MULTIPART_ENTITY_NAME:
- Object multipartEntityName = map.get(key2);
- cmd.getInput().setMultipartEntityName(multipartEntityName.toString());
- break;
- }
- }catch (Exception ex) {
- OnapCommandUtils.throwOrCollect(new OnapCommandInvalidSchema(cmd.getSchemaName(), ex), errorList, validate);
- }
- }
- break;
-
- case SERVICE:
- Map<String, String> serviceMap = (Map<String, String>) valMap.get(key1);
-
- if (serviceMap != null) {
- if (validate) {
- OnapCommandUtils.validateTags(errorList, (Map<String, Object>) valMap.get(key1),
- OnapCommandConfg.getSchemaAttrInfo(SERVICE_PARAMS_LIST),
- OnapCommandConfg.getSchemaAttrInfo(SERVICE_PARAMS_MANDATORY_LIST), SERVICE);
-
- HashMap<String, String> validationMap = new HashMap<>();
- validationMap.put(AUTH, AUTH_VALUES);
- validationMap.put(MODE, MODE_VALUES);
-
- for (String secKey : validationMap.keySet()) {
- if (serviceMap.containsKey(secKey)) {
- Object obj = serviceMap.get(secKey);
- if (obj == null) {
- errorList.add("Attribute '" + secKey + "' under '" + SERVICE + "' is empty");
- } else {
- String value = String.valueOf(obj);
- if (!OnapCommandConfg.getSchemaAttrInfo(validationMap.get(secKey)).contains(value)) {
- errorList.add("Attribute '" + secKey + "' contains invalid value. Valide values are "
- + OnapCommandConfg.getSchemaAttrInfo(validationMap.get(key1))); //
- }
- }
- }
- }
- }
-
- OnapService srv = new OnapService();
-
- for (Map.Entry<String, String> entry : serviceMap.entrySet()) {
- String key = entry.getKey();
-
- switch (key) {
- case NAME:
- srv.setName(serviceMap.get(key));
- break;
-
- case VERSION:
- srv.setVersion(serviceMap.get(key).toString());
- break;
-
- case AUTH:
- Object obj = serviceMap.get(key);
- srv.setAuthType(obj.toString());
-
- //On None type, username, password and no_auth are invalid
- if (srv.isNoAuth()) {
- cmd.getParametersMap().get(DEAFULT_PARAMETER_USERNAME).setInclude(false);
- cmd.getParametersMap().get(DEAFULT_PARAMETER_PASSWORD).setInclude(false);
- cmd.getParametersMap().get(DEFAULT_PARAMETER_NO_AUTH).setInclude(false);
- }
- break;
-
- //mrkanag: from auth command, add the parameters to the command's parameters list
-
- case MODE:
- Object mode = serviceMap.get(key);
- srv.setMode(mode.toString());
- break;
- }
- }
- cmd.setService(srv);
- }
- break;
-
- case SUCCESS_CODES:
- if (validate) {
- OnapCommandUtils.validateHttpSccessCodes(errorList, (List<Object>) valMap.get(key1));
- }
- cmd.setSuccessStatusCodes((ArrayList) valMap.get(key1));
- break;
-
- case RESULT_MAP:
- if (validate) {
- OnapCommandUtils.validateHttpResultMap(errorList, values);
- }
- cmd.setResultMap((Map<String, String>) valMap.get(key1));
- break;
-
- case SAMPLE_RESPONSE:
- // (mrkanag) implement sample response handling
- break;
- }
- }
- }
- }catch (OnapCommandException e) {
- OnapCommandUtils.throwOrCollect(e, errorList, validate);
- }
-
- //Handle the parameters for auth
- if (!cmd.getService().isNoAuth()) {
- OnapCommand login = OnapCommandDiscoveryUtils.findAuthCommand(cmd, "login");
- OnapCommandUtils.copyParamSchemasFrom(login, cmd);
- }
-
- return errorList;
- }
-
public static InputStream loadSchemaFromFile(String schemaLocation) throws OnapCommandInvalidSchema {
File schemaFile = new File(schemaLocation);
try {
@@ -743,7 +521,7 @@ public class OnapCommandSchemaLoaderUtils {
*/
public static Map<String, ?> loadSchema(Resource resource) throws OnapCommandInvalidSchema {
try {
- return OnapCommandSchemaLoaderUtils.loadSchema(resource.getInputStream(), resource.getFilename());
+ return OnapCommandSchemaLoader.loadSchema(resource.getInputStream(), resource.getFilename());
} catch (IOException e) {
throw new OnapCommandInvalidSchema(resource.getFilename(), e);
}
diff --git a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java
index e1b3ea2b..7d305a86 100644
--- a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java
+++ b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java
@@ -16,13 +16,13 @@
package org.onap.cli.fw.utils;
-import static org.onap.cli.fw.conf.Constants.DATA_DIRECTORY;
-import static org.onap.cli.fw.conf.Constants.DATA_PATH_JSON_PATTERN;
-import static org.onap.cli.fw.conf.Constants.DISCOVERY_FILE;
-import static org.onap.cli.fw.conf.Constants.NAME;
-import static org.onap.cli.fw.conf.Constants.OPEN_CLI_SCHEMA_VERSION;
-import static org.onap.cli.fw.conf.Constants.SCHEMA_DIRECTORY;
-import static org.onap.cli.fw.conf.Constants.SCHEMA_PATH_PATERN;
+import static org.onap.cli.fw.conf.OnapCommandConstants.DATA_DIRECTORY;
+import static org.onap.cli.fw.conf.OnapCommandConstants.DATA_PATH_JSON_PATTERN;
+import static org.onap.cli.fw.conf.OnapCommandConstants.DISCOVERY_FILE;
+import static org.onap.cli.fw.conf.OnapCommandConstants.NAME;
+import static org.onap.cli.fw.conf.OnapCommandConstants.OPEN_CLI_SCHEMA_VERSION;
+import static org.onap.cli.fw.conf.OnapCommandConstants.SCHEMA_DIRECTORY;
+import static org.onap.cli.fw.conf.OnapCommandConstants.SCHEMA_PATH_PATERN;
import java.io.File;
import java.io.IOException;
@@ -34,16 +34,15 @@ import java.util.List;
import java.util.Map;
import java.util.ServiceLoader;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.OnapCommandRegistrar;
-import org.onap.cli.fw.cmd.OnapHttpCommand;
-import org.onap.cli.fw.conf.Constants;
-import org.onap.cli.fw.conf.OnapCommandConfg;
+import org.onap.cli.fw.cmd.OnapCommand;
+import org.onap.cli.fw.conf.OnapCommandConfig;
+import org.onap.cli.fw.conf.OnapCommandConstants;
import org.onap.cli.fw.error.OnapCommandDiscoveryFailed;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandInstantiationFailed;
import org.onap.cli.fw.error.OnapCommandInvalidSchema;
-import org.onap.cli.fw.error.OnapCommandNotFound;
+import org.onap.cli.fw.schema.OnapCommandSchemaInfo;
+import org.onap.cli.fw.schema.OnapCommandSchemaLoader;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
@@ -64,11 +63,11 @@ public class OnapCommandDiscoveryUtils {
* @throws OnapCommandDiscoveryFailed
* exception
*/
- public static SchemaInfo getSchemaInfo(String cmd, String version) throws OnapCommandException {
- List<SchemaInfo> list = OnapCommandDiscoveryUtils.discoverOrLoadSchemas(false);
- SchemaInfo schemaInfo = null;
+ public static OnapCommandSchemaInfo getSchemaInfo(String cmd, String version) throws OnapCommandException {
+ List<OnapCommandSchemaInfo> list = OnapCommandDiscoveryUtils.discoverOrLoadSchemas(false);
+ OnapCommandSchemaInfo schemaInfo = null;
if (list != null) {
- for (SchemaInfo schema : list) {
+ for (OnapCommandSchemaInfo schema : list) {
if (cmd.equals(schema.getCmdName()) && version.equals(schema.getProduct())) {
schemaInfo = schema;
break;
@@ -87,9 +86,10 @@ public class OnapCommandDiscoveryUtils {
* @throws OnapCommandDiscoveryFailed
* exception
*/
- public static List<SchemaInfo> discoverOrLoadSchemas(boolean forceRefresh) throws OnapCommandException {
- List<SchemaInfo> schemas = new ArrayList<>();
- if (forceRefresh || OnapCommandConfg.isDiscoverAlways() || !OnapCommandDiscoveryUtils.isAlreadyDiscovered()) {
+ public static List<OnapCommandSchemaInfo> discoverOrLoadSchemas(boolean forceRefresh) throws OnapCommandException {
+ List<OnapCommandSchemaInfo> schemas = new ArrayList<>();
+ if (forceRefresh || Boolean.parseBoolean(OnapCommandConfig.getPropertyValue(OnapCommandConstants.DISCOVER_ALWAYS))
+ || !OnapCommandDiscoveryUtils.isAlreadyDiscovered()) {
schemas = OnapCommandDiscoveryUtils.discoverSchemas();
if (!schemas.isEmpty()) {
OnapCommandDiscoveryUtils.persistSchemaInfo(schemas);
@@ -101,7 +101,7 @@ public class OnapCommandDiscoveryUtils {
if (resource != null) {
File file = new File(resource.getURI().getPath());
ObjectMapper mapper = new ObjectMapper();
- SchemaInfo[] list = mapper.readValue(file, SchemaInfo[].class);
+ OnapCommandSchemaInfo[] list = mapper.readValue(file, OnapCommandSchemaInfo[].class);
schemas.addAll(Arrays.asList(list));
}
} catch (IOException e) {
@@ -144,7 +144,7 @@ public class OnapCommandDiscoveryUtils {
* @throws OnapCommandDiscoveryFailed
* exception
*/
- public static void persistSchemaInfo(List<SchemaInfo> schemas) throws OnapCommandDiscoveryFailed {
+ public static void persistSchemaInfo(List<OnapCommandSchemaInfo> schemas) throws OnapCommandDiscoveryFailed {
if (schemas != null) {
try {
Resource[] resources = OnapCommandDiscoveryUtils.findResources(DATA_DIRECTORY);
@@ -219,13 +219,13 @@ public class OnapCommandDiscoveryUtils {
public static String identitySchemaProfileType(Map<String, ?> schemaYamlMap) {
- for (String schemeType : OnapCommandConfg.getSchemaAttrInfo(Constants.SCHEMA_TYPES_SUPPORTED)) {
+ for (String schemeType : OnapCommandConfig.getCommaSeparatedList(OnapCommandConstants.SCHEMA_TYPES_SUPPORTED)) {
if (schemaYamlMap.get(schemeType) != null) {
return schemeType;
}
}
- return Constants.BASIC_SCHEMA_PROFILE;
+ return OnapCommandConstants.BASIC_SCHEMA_PROFILE;
}
/**
@@ -237,8 +237,8 @@ public class OnapCommandDiscoveryUtils {
* @throws OnapCommandInvalidSchema
* exception
*/
- public static List<SchemaInfo> discoverSchemas() throws OnapCommandException {
- List<SchemaInfo> extSchemas = new ArrayList<>();
+ public static List<OnapCommandSchemaInfo> discoverSchemas() throws OnapCommandException {
+ List<OnapCommandSchemaInfo> extSchemas = new ArrayList<>();
try {
Resource[] res = findResources(SCHEMA_PATH_PATERN);
if (res != null && res.length > 0) {
@@ -246,21 +246,21 @@ public class OnapCommandDiscoveryUtils {
for (Resource resource : res) {
try {
- resourceMap = OnapCommandSchemaLoaderUtils.loadSchema(resource);
+ resourceMap = OnapCommandSchemaLoader.loadSchema(resource);
} catch (OnapCommandException e) {
OnapCommandUtils.LOG.error("Ignores invalid schema " + resource.getURI().toString(), e);
continue;
}
if (resourceMap != null && resourceMap.size() > 0) {
- SchemaInfo schema = new SchemaInfo();
+ OnapCommandSchemaInfo schema = new OnapCommandSchemaInfo();
schema.setSchemaURI(resource.getURI().toString());
Object obj = resourceMap.get(OPEN_CLI_SCHEMA_VERSION);
schema.setVersion(obj.toString());
- if (!schema.getVersion().equalsIgnoreCase(Constants.OPEN_CLI_SCHEMA_VERSION_VALUE_1_0)) {
+ if (!schema.getVersion().equalsIgnoreCase(OnapCommandConstants.OPEN_CLI_SCHEMA_VERSION_VALUE_1_0)) {
OnapCommandUtils.LOG.info("Unsupported Schema version found " + schema.getSchemaURI());
continue;
}
@@ -268,17 +268,17 @@ public class OnapCommandDiscoveryUtils {
schema.setSchemaName(resource.getFilename());
schema.setCmdName((String) resourceMap.get(NAME));
- Map<String, ?> infoMap = (Map<String, ?>) resourceMap.get(Constants.INFO);
- if (infoMap != null && infoMap.get(Constants.INFO_TYPE) != null) {
- schema.setType(infoMap.get(Constants.INFO_TYPE).toString());
+ Map<String, ?> infoMap = (Map<String, ?>) resourceMap.get(OnapCommandConstants.INFO);
+ if (infoMap != null && infoMap.get(OnapCommandConstants.INFO_TYPE) != null) {
+ schema.setType(infoMap.get(OnapCommandConstants.INFO_TYPE).toString());
}
- if (infoMap != null && infoMap.get(Constants.INFO_PRODUCT) != null) {
- schema.setProduct(infoMap.get(Constants.INFO_PRODUCT).toString());
+ if (infoMap != null && infoMap.get(OnapCommandConstants.INFO_PRODUCT) != null) {
+ schema.setProduct(infoMap.get(OnapCommandConstants.INFO_PRODUCT).toString());
}
- if (infoMap != null && infoMap.get(Constants.INFO_IGNORE) != null) {
- schema.setIgnore(infoMap.get(Constants.INFO_IGNORE).toString());
+ if (infoMap != null && infoMap.get(OnapCommandConstants.INFO_IGNORE) != null) {
+ schema.setIgnore(infoMap.get(OnapCommandConstants.INFO_IGNORE).toString());
}
schema.setSchemaProfile(identitySchemaProfileType(resourceMap));
@@ -322,27 +322,4 @@ public class OnapCommandDiscoveryUtils {
}
}
-
- /**
- *
- * @param authAction login/logout
- * @return
- * @throws OnapCommandException
- */
- public static OnapCommand findAuthCommand(OnapHttpCommand forCmd, String authAction) throws OnapCommandException {
- OnapCommand auth = null;
- try {
- //mrkanag: fix this to discover the auth command by matching info->product & service
- auth = OnapCommandRegistrar.getRegistrar().get(
- forCmd.getInfo().getService() + "-" +
- forCmd.getService().getAuthType() + "-" + authAction,
- forCmd.getInfo().getProduct());
- } catch (OnapCommandNotFound e) {
- auth = OnapCommandRegistrar.getRegistrar().get(
- forCmd.getService().getAuthType() + "-" + authAction,
- forCmd.getInfo().getProduct());
- }
-
- return auth;
- }
}
diff --git a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandHelperUtils.java b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandHelperUtils.java
index f5ac764b..5e8c3f52 100644
--- a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandHelperUtils.java
+++ b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandHelperUtils.java
@@ -16,24 +16,24 @@
package org.onap.cli.fw.utils;
-import static org.onap.cli.fw.conf.Constants.DESCRIPTION;
-import static org.onap.cli.fw.conf.Constants.NAME;
+import static org.onap.cli.fw.conf.OnapCommandConstants.DESCRIPTION;
+import static org.onap.cli.fw.conf.OnapCommandConstants.NAME;
import java.io.IOException;
import java.util.jar.Attributes;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
-import org.onap.cli.fw.OnapCommand;
+import org.onap.cli.fw.cmd.OnapCommand;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandHelpFailed;
import org.onap.cli.fw.input.OnapCommandParameter;
-import org.onap.cli.fw.input.ParameterType;
+import org.onap.cli.fw.input.OnapCommandParameterType;
+import org.onap.cli.fw.output.OnapCommandPrintDirection;
import org.onap.cli.fw.output.OnapCommandResult;
import org.onap.cli.fw.output.OnapCommandResultAttribute;
import org.onap.cli.fw.output.OnapCommandResultAttributeScope;
-import org.onap.cli.fw.output.PrintDirection;
-import org.onap.cli.fw.output.ResultType;
+import org.onap.cli.fw.output.OnapCommandResultType;
public class OnapCommandHelperUtils {
@@ -87,8 +87,8 @@ public class OnapCommandHelperUtils {
// Add parameters
OnapCommandResult paramTable = new OnapCommandResult();
- paramTable.setPrintDirection(PrintDirection.LANDSCAPE);
- paramTable.setType(ResultType.TABLE);
+ paramTable.setPrintDirection(OnapCommandPrintDirection.LANDSCAPE);
+ paramTable.setType(OnapCommandResultType.TABLE);
paramTable.setIncludeTitle(false);
paramTable.setIncludeSeparator(false);
@@ -137,8 +137,8 @@ public class OnapCommandHelperUtils {
}
optSecondCol += " It is of type " + param.getParameterType().name() + ".";
- if (param.getParameterType().equals(ParameterType.JSON)
- || param.getParameterType().equals(ParameterType.YAML)) {
+ if (param.getParameterType().equals(OnapCommandParameterType.JSON)
+ || param.getParameterType().equals(OnapCommandParameterType.YAML)) {
optSecondCol += " It's recommended to input the complete path of the file, which is having the value for it.";
}
if (param.isOptional()) {
@@ -168,8 +168,8 @@ public class OnapCommandHelperUtils {
// Add results
OnapCommandResult resultTable = new OnapCommandResult();
- resultTable.setPrintDirection(PrintDirection.PORTRAIT);
- resultTable.setType(ResultType.TABLE);
+ resultTable.setPrintDirection(OnapCommandPrintDirection.PORTRAIT);
+ resultTable.setType(OnapCommandResultType.TABLE);
resultTable.setIncludeTitle(false);
resultTable.setIncludeSeparator(false);
@@ -195,7 +195,7 @@ public class OnapCommandHelperUtils {
}
// Error
- help += "\n\nError::\n\n On error, it prints <HTTP STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE>\n";
+ help += "\n\nError::\n\n On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE>\n";
return help;
}
diff --git a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandProfileUtils.java b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandProfileUtils.java
deleted file mode 100644
index b1fff95d..00000000
--- a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandProfileUtils.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2017 Huawei Technologies Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.onap.cli.fw.utils;
-
-import static org.onap.cli.fw.conf.Constants.DATA_DIRECTORY;
-import static org.onap.cli.fw.conf.Constants.DATA_PATH_JSON_PATTERN;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.onap.cli.fw.error.OnapCommandLoadProfileFailed;
-import org.onap.cli.fw.error.OnapCommandPersistProfileFailed;
-import org.onap.cli.fw.input.cache.Param;
-import org.springframework.core.io.Resource;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-public class OnapCommandProfileUtils {
-
- public static List<Param> loadParamFromCache(String profileName) throws OnapCommandLoadProfileFailed {
- List<Param> params = new ArrayList<>();
-
- try {
- Resource resource = OnapCommandDiscoveryUtils.findResource(profileName + ".json",
- DATA_PATH_JSON_PATTERN);
- if (resource != null) {
- File file = new File(resource.getURI().getPath());
- ObjectMapper mapper = new ObjectMapper();
- Param[] list = mapper.readValue(file, Param[].class);
- params.addAll(Arrays.asList(list));
- }
- } catch (IOException e) {
- throw new OnapCommandLoadProfileFailed(e);
- }
-
- return params;
- }
-
- public static void persistProfile(List<Param> params, String profileName) throws OnapCommandPersistProfileFailed {
- if (params != null) {
- try {
- Resource[] resources = OnapCommandDiscoveryUtils.findResources(DATA_DIRECTORY);
- if (resources != null && resources.length == 1) {
- String path = resources[0].getURI().getPath();
- File file = new File(path + File.separator + profileName + ".json");
- ObjectMapper mapper = new ObjectMapper();
- mapper.writerWithDefaultPrettyPrinter().writeValue(file, params);
- }
- } catch (IOException e1) {
- throw new OnapCommandPersistProfileFailed(e1);
- }
- }
- }
-
-}
diff --git a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java
index 57a2e303..ad739cd7 100644
--- a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java
+++ b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java
@@ -16,63 +16,31 @@
package org.onap.cli.fw.utils;
-import static org.onap.cli.fw.conf.Constants.ATTRIBUTES;
-import static org.onap.cli.fw.conf.Constants.BODY;
-import static org.onap.cli.fw.conf.Constants.BOOLEAN_VALUE;
-import static org.onap.cli.fw.conf.Constants.HEADERS;
-import static org.onap.cli.fw.conf.Constants.HTTP;
-import static org.onap.cli.fw.conf.Constants.HTTP_BODY_FAILED_PARSING;
-import static org.onap.cli.fw.conf.Constants.HTTP_BODY_JSON_EMPTY;
-import static org.onap.cli.fw.conf.Constants.HTTP_METHODS;
-import static org.onap.cli.fw.conf.Constants.HTTP_REQUEST_MANDATORY_PARAMS;
-import static org.onap.cli.fw.conf.Constants.HTTP_REQUEST_PARAMS;
-import static org.onap.cli.fw.conf.Constants.HTTP_SUCCESS_CODE_INVALID;
-import static org.onap.cli.fw.conf.Constants.METHOD;
-import static org.onap.cli.fw.conf.Constants.NAME;
-import static org.onap.cli.fw.conf.Constants.PARAMETERS;
-import static org.onap.cli.fw.conf.Constants.QUERIES;
-import static org.onap.cli.fw.conf.Constants.REQUEST;
-import static org.onap.cli.fw.conf.Constants.RESULTS;
-import static org.onap.cli.fw.conf.Constants.RESULT_MAP;
-import static org.onap.cli.fw.conf.Constants.URI;
-
-import java.io.IOException;
+import static org.onap.cli.fw.conf.OnapCommandConstants.BOOLEAN_VALUE;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.UUID;
-import java.util.stream.Collectors;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.cmd.OnapHttpCommand;
-import org.onap.cli.fw.conf.Constants;
-import org.onap.cli.fw.conf.OnapCommandConfg;
+import org.onap.cli.fw.cmd.OnapCommand;
+import org.onap.cli.fw.conf.OnapCommandConfig;
+import org.onap.cli.fw.conf.OnapCommandConstants;
import org.onap.cli.fw.error.OnapCommandException;
-import org.onap.cli.fw.error.OnapCommandHttpHeaderNotFound;
-import org.onap.cli.fw.error.OnapCommandHttpInvalidResponseBody;
-import org.onap.cli.fw.error.OnapCommandHttpInvalidResultMap;
import org.onap.cli.fw.error.OnapCommandInvalidParameterValue;
import org.onap.cli.fw.error.OnapCommandParameterNotFound;
import org.onap.cli.fw.error.OnapCommandResultEmpty;
-import org.onap.cli.fw.error.OnapCommandResultMapProcessingFailed;
-import org.onap.cli.fw.http.HttpInput;
-import org.onap.cli.fw.http.HttpResult;
import org.onap.cli.fw.input.OnapCommandParameter;
-import org.onap.cli.fw.input.ParameterType;
+import org.onap.cli.fw.input.OnapCommandParameterType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.fasterxml.jackson.databind.ObjectMapper;
import com.jayway.jsonpath.JsonPath;
-import net.minidev.json.JSONArray;
-import net.minidev.json.JSONObject;
-
/**
* Provides helper method to parse Yaml files and produce required objects.
*
@@ -87,7 +55,7 @@ public class OnapCommandUtils {
}
- static void throwOrCollect(OnapCommandException ex, List<String> list, boolean shouldCollectException)
+ public static void throwOrCollect(OnapCommandException ex, List<String> list, boolean shouldCollectException)
throws OnapCommandException {
if (shouldCollectException) {
list.add(ex.getMessage());
@@ -96,7 +64,7 @@ public class OnapCommandUtils {
}
}
- static void validateTags(List<String> schemaErrors, Map<String, ?> yamlMap, List<String> totalParams,
+ public static void validateTags(List<String> schemaErrors, Map<String, ?> yamlMap, List<String> totalParams,
List<String> mandatoryParams, String section) {
// mrkanag capture invalid entries as well
for (String param : totalParams) {
@@ -123,76 +91,19 @@ public class OnapCommandUtils {
* string
* @return boolean
*/
- static boolean validateBoolean(String toValidate) {
- return OnapCommandConfg.getSchemaAttrInfo(BOOLEAN_VALUE).contains(toValidate.toLowerCase());
+ public static boolean validateBoolean(String toValidate) {
+ return OnapCommandConfig.getCommaSeparatedList(BOOLEAN_VALUE).contains(toValidate.toLowerCase());
}
- private static String emptySection(String section) {
+ public static String emptySection(String section) {
return "The section '" + section + ":' cann't be null or empty";
}
- static String invalidBooleanValueMessage(String section, String attribute, String value) {
+ public static String invalidBooleanValueMessage(String section, String attribute, String value) {
return "The value '" + value + "' of '" + attribute + "' present under '" + section + "' should be boolean";
}
- private static Set<String> validateHttpQueries(Map<String, Object> requestMap) {
- Map<String, Object> queries = (Map<String, Object>) requestMap.get(QUERIES);
- Set<String> queryParamNames = new HashSet<>();
- if (queries != null) {
- for (Entry<String, Object> entry : queries.entrySet()) {
- parseParameters(String.valueOf(entry.getValue()), queryParamNames);
- }
- }
- return queryParamNames;
- }
-
-
- private static Set<String> validateHttpHeaders(Map<String, Object> requestMap) {
-
- Map<String, Object> headers = (Map<String, Object>) requestMap.get(HEADERS);
- Set<String> headerParamNames = new HashSet<>();
- if (headers != null) {
- for (Entry<String, Object> entry : headers.entrySet()) {
- parseParameters(String.valueOf(entry.getValue()), headerParamNames);
- }
- }
- return headerParamNames;
- }
-
- private static Set<String> validateHttpBody(List<String> errorList, Map<String, Object> requestMap) {
- Set<String> bodyParamNames = new HashSet<>();
- Object bodyString = requestMap.get(BODY);
- if (bodyString == null) {
- return bodyParamNames;
- }
-
- String body = String.valueOf(bodyString);
- JSONObject obj = null;
- try {
- obj = new ObjectMapper().readValue(body, JSONObject.class);
- } catch (IOException e1) { // NOSONAR
- errorList.add(HTTP_BODY_FAILED_PARSING);
- }
- if (obj == null || "".equals(obj.toString())) {
- errorList.add(HTTP_BODY_JSON_EMPTY);
- }
- parseParameters(body, bodyParamNames);
-
- return bodyParamNames;
- }
-
- private static Set<String> validateHttpUri(List<String> errorList, Map<String, Object> requestMap) {
- Set<String> uriParamNames = new HashSet<>();
- String uri = (String) requestMap.get(URI);
- if (uri == null || uri.isEmpty()) {
- errorList.add(emptySection(URI));
- return uriParamNames;
- }
- parseParameters(uri, uriParamNames);
- return uriParamNames;
- }
-
- private static void parseParameters(String line, Set<String> paramNames) {
+ public static void parseParameters(String line, Set<String> paramNames) {
int currentIdx = 0;
while (currentIdx < line.length()) {
@@ -209,108 +120,6 @@ public class OnapCommandUtils {
}
- private static Set<String> getRequestParams(Map<String, ?> yamlMap) {
-
- Set<String> set = new HashSet<>();
-
- @SuppressWarnings("unchecked")
- List<Map<String, Object>> inputParams = (List<Map<String, Object>>) yamlMap.get(PARAMETERS);
-
- if (inputParams != null) {
- for (Map<String, Object> map : inputParams) {
- for (Entry<String, Object> entry : map.entrySet()) {
- Object key = entry.getKey();
-
- if (NAME.equals(key)) {
- set.add(String.valueOf(entry.getValue()));
- break;
- }
- }
- }
- }
-
- return set;
- }
-
- static void validateHttpResultMap(List<String> errorList, Map<String, ?> values) throws OnapCommandException {
- Map<String, ?> valMap = (Map<String, ?>) values.get(HTTP);
- List<Map<String, String>> attributes = (List<Map<String, String>>) ((Map<String, ?>)values.get(RESULTS)).get(ATTRIBUTES);
- Set<String> resultMapParams = ((Map<String, String>) valMap.get(RESULT_MAP)).keySet();
-
- Set<String> resultAttNames = attributes.stream().map(map -> map.get(NAME))
- .collect(Collectors.toSet());
-
- List<String> invaliResultMapParams = resultMapParams.stream()
- .filter(p -> !resultAttNames.contains(p)).collect(Collectors.toList());
-
- if (!invaliResultMapParams.isEmpty()) {
- throwOrCollect(new OnapCommandHttpInvalidResultMap(invaliResultMapParams), errorList, true);
- }
- }
-
- static void validateHttpSccessCodes(List<String> errorList, List<Object> requestSuccessCodes) {
-
- if (requestSuccessCodes == null || requestSuccessCodes.isEmpty()) {
- errorList.add(HTTP_SUCCESS_CODE_INVALID);
- return;
- }
-
- for (Object successCode : requestSuccessCodes) {
- Integer code = (Integer) successCode;
- if (code < 200 || code >= 300) {
- if ( code != 404) {
- errorList.add(HTTP_SUCCESS_CODE_INVALID);
- }
- }
- }
-
- }
-
- static ArrayList<String> validateHttpSchemaSection(Map<String, ?> values) {
- ArrayList<String> errorList = new ArrayList<>();
- Map<String, ?> map = (Map<String, ?>) values.get(HTTP);
- Map<String, Object> requestMap = (Map<String, Object>) map.get(REQUEST);
-
- if (requestMap != null && !requestMap.isEmpty()) {
- validateTags(errorList, requestMap, OnapCommandConfg.getSchemaAttrInfo(HTTP_REQUEST_PARAMS),
- OnapCommandConfg.getSchemaAttrInfo(HTTP_REQUEST_MANDATORY_PARAMS), REQUEST);
- String method = (String) requestMap.get(METHOD);
- if (method != null && !method.isEmpty()) {
- if (!OnapCommandConfg.getSchemaAttrInfo(HTTP_METHODS).contains(method.toLowerCase())) {
- errorList.add("Attribute '" + METHOD + "' under '" + REQUEST + "' is invalid, correct types are "
- + OnapCommandConfg.getSchemaAttrInfo(HTTP_METHODS).toString());
- }
- } else {
- errorList.add("Http request method cann't be null or empty");
- }
-
- Set<String> requestParams = getRequestParams(values);
-
- Set<String> uriParams = validateHttpUri(errorList, requestMap);
-
- Set<String> bodyParams = validateHttpBody(errorList, requestMap);
-
- Set<String> headerParams = validateHttpHeaders(requestMap);
-
- Set<String> queryParams = validateHttpQueries(requestMap);
-
- HashSet<String> totoalParams = new HashSet<>(uriParams);
- totoalParams.addAll(bodyParams);
- totoalParams.addAll(headerParams);
- totoalParams.addAll(queryParams);
-
- List<String> nonDeclaredParams = totoalParams.stream().filter(param -> !requestParams.contains(param))
- .collect(Collectors.toList());
-
- nonDeclaredParams.stream().forEach(p -> errorList.add("The parameter '" + p
- + "' declared under 'parameters:' section is not mapped into request section."));
- } else {
- errorList.add(emptySection(REQUEST));
- }
- return errorList;
- }
-
-
/**
* Create Dict from list of Parameters.
*
@@ -318,7 +127,7 @@ public class OnapCommandUtils {
* list of parameters
* @return map
*/
- public static Map<String, OnapCommandParameter> getInputMap(List<OnapCommandParameter> inputs) {
+ public static Map<String, OnapCommandParameter> getInputMap(Set<OnapCommandParameter> inputs) {
Map<String, OnapCommandParameter> map = new HashMap<>();
for (OnapCommandParameter param : inputs) {
map.put(param.getName(), param);
@@ -361,28 +170,6 @@ public class OnapCommandUtils {
}
/**
- * Construct method name.
- *
- * @param name
- * name
- * @param prefix
- * prefix
- * @return string
- */
- public static String formMethodNameFromAttributeName(String name, String prefix) {
- if (name == null || name.isEmpty()) {
- return name;
- }
-
- String methodName = prefix;
- for (String tk : name.split("-")) {
- methodName += Character.toString(tk.charAt(0)).toUpperCase();
- methodName += tk.substring(1);
- }
- return methodName;
- }
-
- /**
* There are unique values like uuid is supported, so when input, output (default) values has
* these special entries, then it will get replaced with it's value
*
@@ -410,13 +197,13 @@ public class OnapCommandUtils {
String value = "";
switch (splEntry) {
- case Constants.SPL_ENTRY_UUID:
+ case OnapCommandConstants.SPL_ENTRY_UUID:
value = UUID.randomUUID().toString();
break;
default:
- if (splEntry.startsWith(Constants.SPL_ENTRY_ENV)) {
+ if (splEntry.startsWith(OnapCommandConstants.SPL_ENTRY_ENV)) {
//start to read after env:ENV_VAR_NAME
String envVarName = splEntry.substring(4);
value = System.getenv(envVarName);
@@ -463,10 +250,10 @@ public class OnapCommandUtils {
String value = params.get(paramName).getValue().toString();
OnapCommandParameter param = params.get(paramName);
- if (ParameterType.ARRAY.equals(param.getParameterType())
- || ParameterType.MAP.equals(param.getParameterType())
- || ParameterType.JSON.equals(param.getParameterType())
- || ParameterType.YAML.equals(param.getParameterType())) {
+ if (OnapCommandParameterType.ARRAY.equals(param.getParameterType())
+ || OnapCommandParameterType.MAP.equals(param.getParameterType())
+ || OnapCommandParameterType.JSON.equals(param.getParameterType())
+ || OnapCommandParameterType.YAML.equals(param.getParameterType())) {
// ignore the front and back double quotes in json body
result += line.substring(currentIdx, idxS - 1) + value;
currentIdx = idxE + 2;
@@ -479,190 +266,6 @@ public class OnapCommandUtils {
return result;
}
- private static ArrayList<String> replaceLineFromOutputResults(String line, HttpResult resultHttp)
- throws OnapCommandHttpHeaderNotFound, OnapCommandHttpInvalidResponseBody,
- OnapCommandResultMapProcessingFailed, OnapCommandResultEmpty {
- String headerProcessedLine = "";
-
- ArrayList<String> result = new ArrayList<>();
- if (!line.contains("$b{") && !line.contains("$h{")) {
- result.add(line);
- return result;
- }
-
- /**
- * In case of empty response body [] or {}
- **/
- if (resultHttp.getBody().length() <= 2) {
- return result;
- }
-
- /**
- * Process headers macros : line: $h{abc}-$b{$.[*].xyz} , After processing line will be [abc's
- * value]-$b{$.[*].xyz}
- **/
- int currentIdx = 0;
- while (currentIdx < line.length()) {
- int idxS = line.indexOf("$h{", currentIdx);
- if (idxS == -1) {
- headerProcessedLine += line.substring(currentIdx);
- break;
- }
- int idxE = line.indexOf("}", idxS);
- String headerName = line.substring(idxS + 3, idxE);
- headerName = headerName.trim();
- if (!resultHttp.getRespHeaders().containsKey(headerName)) {
- throw new OnapCommandHttpHeaderNotFound(headerName);
- }
- String value = resultHttp.getRespHeaders().get(headerName);
-
- headerProcessedLine += line.substring(currentIdx, idxS) + value;
- currentIdx = idxE + 1;
- }
-
- // Process body jsonpath macros
- List<Object> values = new ArrayList<>();
- String bodyProcessedPattern = "";
- currentIdx = 0;
- int maxRows = 1; // in normal case, only one row will be there
- while (currentIdx < headerProcessedLine.length()) {
- int idxS = headerProcessedLine.indexOf("$b{", currentIdx);
- if (idxS == -1) {
- bodyProcessedPattern += headerProcessedLine.substring(currentIdx);
- break;
- }
- int idxE = headerProcessedLine.indexOf("}", idxS);
- String jsonPath = headerProcessedLine.substring(idxS + 3, idxE);
- jsonPath = jsonPath.trim();
- try {
- // JSONArray or String
- Object value = JsonPath.read(resultHttp.getBody(), jsonPath);
- if (value instanceof JSONArray) {
- JSONArray arr = (JSONArray) value;
- if (arr.size() > maxRows) {
- maxRows = arr.size();
- }
- }
- bodyProcessedPattern += headerProcessedLine.substring(currentIdx, idxS) + "%s";
- values.add(value);
- currentIdx = idxE + 1;
- } catch (Exception e) {
- throw new OnapCommandHttpInvalidResponseBody(jsonPath, e);
- }
- }
-
- if (bodyProcessedPattern.isEmpty()) {
- result.add(headerProcessedLine);
- return result;
- } else {
- for (int i = 0; i < maxRows; i++) {
- currentIdx = 0;
- String bodyProcessedLine = "";
- int positionalIdx = 0; // %s positional idx
- while (currentIdx < bodyProcessedPattern.length()) {
- int idxS = bodyProcessedPattern.indexOf("%s", currentIdx);
- if (idxS == -1) {
- bodyProcessedLine += bodyProcessedPattern.substring(currentIdx);
- break;
- }
- int idxE = idxS + 2; // %s
- try {
- Object value = values.get(positionalIdx);
- String valueS = String.valueOf(value);
- if (value instanceof JSONArray) {
- JSONArray arr = (JSONArray) value;
- if (!arr.isEmpty()) {
- valueS = arr.get(i).toString();
- } else {
- throw new OnapCommandResultEmpty();
- }
- }
-
- bodyProcessedLine += bodyProcessedPattern.substring(currentIdx, idxS) + valueS;
- currentIdx = idxE;
- positionalIdx++;
- } catch (OnapCommandResultEmpty e) {
- throw e;
- } catch (Exception e) {
- throw new OnapCommandResultMapProcessingFailed(line, e);
- }
- }
- result.add(bodyProcessedLine);
- }
-
- return result;
- }
- }
-
- /**
- * Set argument to param value.
- *
- * @param params
- * map
- * @param input
- * HttpInput
- * @return HttpInput
- * @throws OnapCommandParameterNotFound
- * exception
- * @throws OnapCommandInvalidParameterValue
- * exception
- */
- public static HttpInput populateParameters(Map<String, OnapCommandParameter> params, HttpInput input)
- throws OnapCommandException {
- HttpInput inp = new HttpInput();
- for (OnapCommandParameter param : params.values()) {
- if (ParameterType.BINARY.equals(param.getParameterType())) {
- inp.setBinaryData(true);
- break;
- }
- }
- inp.setBody(replaceLineFromInputParameters(input.getBody(), params));
- inp.setUri(replaceLineFromInputParameters(input.getUri(), params));
- inp.setMethod(input.getMethod().toLowerCase());
- for (String h : input.getReqHeaders().keySet()) {
- String value = input.getReqHeaders().get(h);
- inp.getReqHeaders().put(h, replaceLineFromInputParameters(value, params));
- }
-
- for (String h : input.getReqQueries().keySet()) {
- String value = input.getReqQueries().get(h);
- inp.getReqQueries().put(h, replaceLineFromInputParameters(value, params));
- }
-
- return inp;
- }
-
- /**
- * Populate result.
- *
- * @param resultMap
- * map
- * @param resultHttp
- * HttpResult
- * @return map
- * @throws OnapCommandHttpHeaderNotFound
- * header not found exception
- * @throws OnapCommandHttpInvalidResponseBody
- * invalid response body exception
- * @throws OnapCommandResultMapProcessingFailed
- * map processing failed exception
- */
- public static Map<String, ArrayList<String>> populateOutputs(Map<String, String> resultMap, HttpResult resultHttp)
- throws OnapCommandException {
- Map<String, ArrayList<String>> resultsProcessed = new HashMap<>();
-
- for (Entry<String, String> entry : resultMap.entrySet()) {
- String key = entry.getKey();
- try {
- resultsProcessed.put(key, replaceLineFromOutputResults(resultMap.get(key), resultHttp));
- } catch(OnapCommandResultEmpty e) {
- // pass // NOSONAR
- }
- }
-
- return resultsProcessed;
- }
-
/**
* Populate result from input parameters.
*
@@ -671,12 +274,7 @@ public class OnapCommandUtils {
* @param params
* Map<String, OnapCommandParameter>
* @return map
- * @throws OnapCommandHttpHeaderNotFound
- * header not found exception
- * @throws OnapCommandHttpInvalidResponseBody
- * invalid response body exception
- * @throws OnapCommandResultMapProcessingFailed
- * map processing failed exception
+ * @throws OnapCommandException
*/
public static Map<String, ArrayList<String>> populateOutputsFromInputParameters(
Map<String, ArrayList<String>> resultMap,
diff --git a/framework/src/main/resources/META-INF/services/org.onap.cli.fw.OnapCommand b/framework/src/main/resources/META-INF/services/org.onap.cli.fw.OnapCommand
deleted file mode 100644
index 1993bcb6..00000000
--- a/framework/src/main/resources/META-INF/services/org.onap.cli.fw.OnapCommand
+++ /dev/null
@@ -1,6 +0,0 @@
-org.onap.cli.fw.cmd.OnapSchemaValidateCommand
-org.onap.cli.fw.cmd.OnapSchemaRefreshCommand
-org.onap.cli.fw.cmd.BasicAuthLoginCommand
-org.onap.cli.fw.cmd.BasicAuthLogoutCommand
-org.onap.cli.fw.cmd.CatalogCommand
-org.onap.cli.fw.cmd.OnapHttpCommand \ No newline at end of file
diff --git a/framework/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand b/framework/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
new file mode 100644
index 00000000..89648bf5
--- /dev/null
+++ b/framework/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
@@ -0,0 +1,2 @@
+org.onap.cli.fw.cmd.OnapSchemaValidateCommand
+org.onap.cli.fw.cmd.OnapSchemaRefreshCommand \ No newline at end of file
diff --git a/framework/src/main/resources/log4j.properties b/framework/src/main/resources/log4j.properties
index f117ef6e..419faf30 100644
--- a/framework/src/main/resources/log4j.properties
+++ b/framework/src/main/resources/log4j.properties
@@ -1,4 +1,4 @@
-log4j.rootLogger=ERROR, file
+log4j.rootLogger=ALL, file
# Redirect log messages to a log file, support file rolling.
log4j.appender.file=org.apache.log4j.RollingFileAppender
diff --git a/framework/src/main/resources/open-cli.properties b/framework/src/main/resources/open-cli.properties
index b009472b..c8792835 100644
--- a/framework/src/main/resources/open-cli.properties
+++ b/framework/src/main/resources/open-cli.properties
@@ -1,8 +1,6 @@
-cli.ignore_auth=false
-cli.http.api_key_use_cookies=true
-cli.discover_always=false
cli.product_name=open-cli
cli.version=1.0
+cli.discover_always=false
#schema validation
cli.schema.top_level_params_list=open_cli_schema_version,name,description,parameters,results,http,info
@@ -17,29 +15,16 @@ cli.schema.input_params_mandatory_list=name,description,type
cli.schema.result_params_list=name,description,scope,type,is_secured, default_value
cli.schema.result_params_mandatory_list=name, description, type, scope
-#http
-cli.schema.http_sections=request,service,success_codes,result_map,sample_response
-cli.schema.http_mandatory_sections=request, success_codes
-
-cli.schema.http_request_params=uri,method,body,headers,queries,multipart_entity_name
-cli.schema.http_request_mandatory_params=uri,method
-
-cli.schema.service_params_list=name,version,auth,mode
-cli.schema.service_params_mandatory_list=auth,mode
-
-cli.schema.http_methods=post,get,delete,put,head
-
cli.schema.boolean_values=true,false
-cli.schema.auth_values=none,basic
-cli.schema.mode_values=direct,catalog
cli.command.type=cmd,auth,catalog
-#product version
-cli.product.version=open-cli
-
# moco properties
-cli.sample.gen.enable=false
+cli.sample.gen.enable=true
cli.sample.gen.target=.
# mrkanag Move this to db, once exteranl command registration is supported in place of discovery
-cli.schema.type.supported=http
+cli.schema.type.supported=
+
+#other properties to load (it should be hanled when plugins are made as externally register-able
+#when command plugin management support is enabled in oclip
+cli.plugins-prps= \ No newline at end of file
diff --git a/framework/src/test/java/org/onap/cli/cmd/sample/OnapCommandSample.java b/framework/src/test/java/org/onap/cli/cmd/sample/OnapCommandSample.java
index c76df290..b225a3a0 100644
--- a/framework/src/test/java/org/onap/cli/cmd/sample/OnapCommandSample.java
+++ b/framework/src/test/java/org/onap/cli/cmd/sample/OnapCommandSample.java
@@ -16,10 +16,10 @@
package org.onap.cli.cmd.sample;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.OnapCommandSchema;
+import org.onap.cli.fw.cmd.OnapCommand;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandExecutionFailed;
+import org.onap.cli.fw.schema.OnapCommandSchema;
/**
* This command helps to test the Command functionalities.
diff --git a/framework/src/test/java/org/onap/cli/cmd/sample/OnapCommandSampleTest.java b/framework/src/test/java/org/onap/cli/cmd/sample/OnapCommandSampleTest.java
index 51ed776f..a83cda52 100644
--- a/framework/src/test/java/org/onap/cli/cmd/sample/OnapCommandSampleTest.java
+++ b/framework/src/test/java/org/onap/cli/cmd/sample/OnapCommandSampleTest.java
@@ -19,20 +19,20 @@ package org.onap.cli.cmd.sample;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.HashSet;
+import java.util.Set;
import java.util.UUID;
import org.junit.Test;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.OnapCommandRegistrar;
-import org.onap.cli.fw.conf.Constants;
+import org.onap.cli.fw.cmd.OnapCommand;
+import org.onap.cli.fw.conf.OnapCommandConstants;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandExecutionFailed;
import org.onap.cli.fw.error.OnapCommandNotInitialized;
import org.onap.cli.fw.input.OnapCommandParameter;
-import org.onap.cli.fw.input.ParameterType;
+import org.onap.cli.fw.input.OnapCommandParameterType;
import org.onap.cli.fw.output.OnapCommandResultAttribute;
+import org.onap.cli.fw.registrar.OnapCommandRegistrar;
public class OnapCommandSampleTest {
@Test
@@ -42,13 +42,13 @@ public class OnapCommandSampleTest {
OnapCommand sample = OnapCommandRegistrar.getRegistrar().get("sample-test");
- List<OnapCommandParameter> parameters = new ArrayList();
+ Set<OnapCommandParameter> parameters = new HashSet();
OnapCommandParameter v = new OnapCommandParameter();
- v.setName(Constants.DEFAULT_PARAMETER_VERSION);
+ v.setName(OnapCommandConstants.DEFAULT_PARAMETER_VERSION);
v.setValue("true");
parameters.add(v);
OnapCommandParameter h = new OnapCommandParameter();
- h.setName(Constants.DEFAULT_PARAMETER_HELP);
+ h.setName(OnapCommandConstants.DEFAULT_PARAMETER_HELP);
h.setValue("false");
parameters.add(h);
sample.setParameters(parameters);
@@ -61,11 +61,11 @@ public class OnapCommandSampleTest {
public void sampleTestHelp() {
OnapCommandSample sample = new OnapCommandSample();
try {
- List<OnapCommandParameter> parameters = new ArrayList();
+ Set<OnapCommandParameter> parameters = new HashSet();
OnapCommandParameter v = new OnapCommandParameter();
- v.setName(Constants.DEFAULT_PARAMETER_HELP);
+ v.setName(OnapCommandConstants.DEFAULT_PARAMETER_HELP);
v.setValue("true");
- v.setParameterType(ParameterType.BOOL);
+ v.setParameterType(OnapCommandParameterType.BOOL);
parameters.add(v);
sample.setParameters(parameters);
sample.execute();
@@ -78,39 +78,32 @@ public class OnapCommandSampleTest {
try {
OnapCommand sample = OnapCommandRegistrar.getRegistrar().get("sample-test");
- List<OnapCommandParameter> parameters = new ArrayList();
+ Set<OnapCommandParameter> parameters = new HashSet();
OnapCommandParameter v = new OnapCommandParameter();
- v.setName(Constants.DEFAULT_PARAMETER_VERSION);
+ v.setName(OnapCommandConstants.DEFAULT_PARAMETER_VERSION);
v.setValue("false");
parameters.add(v);
OnapCommandParameter h = new OnapCommandParameter();
- h.setName(Constants.DEFAULT_PARAMETER_HELP);
+ h.setName(OnapCommandConstants.DEFAULT_PARAMETER_HELP);
h.setValue("false");
parameters.add(h);
OnapCommandParameter f = new OnapCommandParameter();
- f.setName(Constants.DEFAULT_PARAMETER_OUTPUT_FORMAT);
+ f.setName(OnapCommandConstants.DEFAULT_PARAMETER_OUTPUT_FORMAT);
f.setValue("table");
parameters.add(f);
OnapCommandParameter l = new OnapCommandParameter();
- l.setName(Constants.DEFAULT_PARAMETER_OUTPUT_ATTR_LONG);
+ l.setName(OnapCommandConstants.DEFAULT_PARAMETER_OUTPUT_ATTR_LONG);
l.setValue("true");
parameters.add(l);
OnapCommandParameter t = new OnapCommandParameter();
- t.setName(Constants.DEFAULT_PARAMETER_OUTPUT_NO_TITLE);
+ t.setName(OnapCommandConstants.DEFAULT_PARAMETER_OUTPUT_NO_TITLE);
t.setValue("true");
parameters.add(t);
- OnapCommandParameter a = new OnapCommandParameter();
- a.setName(Constants.DEFAULT_PARAMETER_NO_AUTH);
- a.setValue("true");
- parameters.add(a);
OnapCommandParameter d = new OnapCommandParameter();
- d.setName(Constants.DEFAULT_PARAMETER_DEBUG);
+ d.setName(OnapCommandConstants.DEFAULT_PARAMETER_DEBUG);
d.setValue("true");
parameters.add(d);
- OnapCommandParameter m = new OnapCommandParameter();
- m.setName(Constants.DEAFULT_PARAMETER_HOST_URL);
- m.setValue("http://localhost");
- parameters.add(m);
+
sample.setParameters(parameters);
sample.execute();
@@ -132,39 +125,31 @@ public class OnapCommandSampleTest {
OnapCommandSample sample = new OnapCommandSample();
sample.failCase = true;
- List<OnapCommandParameter> parameters = new ArrayList();
+ Set<OnapCommandParameter> parameters = new HashSet();
OnapCommandParameter v = new OnapCommandParameter();
- v.setName(Constants.DEFAULT_PARAMETER_VERSION);
+ v.setName(OnapCommandConstants.DEFAULT_PARAMETER_VERSION);
v.setValue("false");
parameters.add(v);
OnapCommandParameter h = new OnapCommandParameter();
- h.setName(Constants.DEFAULT_PARAMETER_HELP);
+ h.setName(OnapCommandConstants.DEFAULT_PARAMETER_HELP);
h.setValue("false");
parameters.add(h);
OnapCommandParameter f = new OnapCommandParameter();
- f.setName(Constants.DEFAULT_PARAMETER_OUTPUT_FORMAT);
+ f.setName(OnapCommandConstants.DEFAULT_PARAMETER_OUTPUT_FORMAT);
f.setValue("table");
parameters.add(f);
OnapCommandParameter l = new OnapCommandParameter();
- l.setName(Constants.DEFAULT_PARAMETER_OUTPUT_ATTR_LONG);
+ l.setName(OnapCommandConstants.DEFAULT_PARAMETER_OUTPUT_ATTR_LONG);
l.setValue("true");
parameters.add(l);
OnapCommandParameter t = new OnapCommandParameter();
- t.setName(Constants.DEFAULT_PARAMETER_OUTPUT_NO_TITLE);
+ t.setName(OnapCommandConstants.DEFAULT_PARAMETER_OUTPUT_NO_TITLE);
t.setValue("true");
parameters.add(t);
- OnapCommandParameter a = new OnapCommandParameter();
- a.setName(Constants.DEFAULT_PARAMETER_NO_AUTH);
- a.setValue("true");
- parameters.add(a);
OnapCommandParameter d = new OnapCommandParameter();
- d.setName(Constants.DEFAULT_PARAMETER_DEBUG);
+ d.setName(OnapCommandConstants.DEFAULT_PARAMETER_DEBUG);
d.setValue("true");
parameters.add(d);
- OnapCommandParameter m = new OnapCommandParameter();
- m.setName(Constants.DEAFULT_PARAMETER_HOST_URL);
- m.setValue("http://localhost");
- parameters.add(m);
sample.setParameters(parameters);
sample.execute();
}
diff --git a/framework/src/test/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommandTest.java b/framework/src/test/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommandTest.java
index 8d8de2f7..f094203b 100644
--- a/framework/src/test/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommandTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommandTest.java
@@ -18,9 +18,8 @@ package org.onap.cli.fw.cmd;
import org.junit.Ignore;
import org.junit.Test;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.OnapCommandRegistrar;
import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.registrar.OnapCommandRegistrar;
import org.onap.cli.fw.schema.ValidateSchemaTest;
diff --git a/framework/src/test/java/org/onap/cli/fw/conf/OnapCommandConfgTest.java b/framework/src/test/java/org/onap/cli/fw/conf/OnapCommandConfgTest.java
index 2c25991b..d6ef3a34 100644
--- a/framework/src/test/java/org/onap/cli/fw/conf/OnapCommandConfgTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/conf/OnapCommandConfgTest.java
@@ -16,28 +16,6 @@
package org.onap.cli.fw.conf;
-import java.io.IOException;
-import java.util.Properties;
-
-import org.junit.Assert;
-import org.junit.Test;
-
public class OnapCommandConfgTest {
- @Test
- public void versionTest() {
- String str = OnapCommandConfg.getVersion();
- Assert.assertTrue(str != null);
- }
-
- @Test
- public void isAuthIgnoredTest() throws IOException {
- Properties prps = new Properties();
- prps.load(OnapCommandConfg.class.getClassLoader().getResourceAsStream("open-cli.properties"));
- boolean auth = OnapCommandConfg.isAuthIgnored();
- Assert.assertTrue(auth == Boolean.valueOf(prps.getProperty("cli.ignore_auth")));
- Assert.assertTrue(OnapCommandConfg.isCookiesBasedAuth() == Boolean
- .valueOf(prps.getProperty("cli.http.api_key_use_cookies")));
- }
-
}
diff --git a/framework/src/test/java/org/onap/cli/fw/error/OnapCommandErrorTest.java b/framework/src/test/java/org/onap/cli/fw/error/OnapCommandErrorTest.java
index 899f2e3b..58c0f432 100644
--- a/framework/src/test/java/org/onap/cli/fw/error/OnapCommandErrorTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/error/OnapCommandErrorTest.java
@@ -45,12 +45,6 @@ public class OnapCommandErrorTest {
}
@Test
- public void oclipCommandHttpHeaderNotFoundTest() {
- OnapCommandHttpHeaderNotFound failed = new OnapCommandHttpHeaderNotFound("name");
- assertEquals("0x3003::Http header name is not returned from the service", failed.getMessage());
- }
-
- @Test
public void oclipCommandClientInitialzationFailedTest() {
OnapCommandClientInitialzationFailed failed = new OnapCommandClientInitialzationFailed("Test",
new Exception("Test Command Failed"));
@@ -107,22 +101,6 @@ public class OnapCommandErrorTest {
}
@Test
- public void oclipCommandHttpFailureTest1() {
- OnapCommandHttpFailure failed = new OnapCommandHttpFailure("Failed");
- assertEquals("0x3001::Failed", failed.getMessage());
-
- failed = new OnapCommandHttpFailure(new Exception("failed"), 201);
- assertEquals("201::0x3001::failed", failed.getMessage());
- }
-
- @Test
- public void oclipCommandHttpFailureTest2() {
- OnapCommandHttpFailure failed = new OnapCommandHttpFailure("Failed", 203);
-
- assertEquals("203::0x3001::Failed", failed.getMessage());
- }
-
- @Test
public void oclipCommandInvalidParameterTypeTest() {
OnapCommandInvalidParameterType failed = new OnapCommandInvalidParameterType("Failed");
@@ -141,7 +119,7 @@ public class OnapCommandErrorTest {
OnapCommandInvalidRegistration failed = new OnapCommandInvalidRegistration(OnapCommandErrorTest.class);
assertEquals("0x2001::Invalid commad class org.onap.cli.fw.error.OnapCommandErrorTest registration, "
- + "it should be derived from org.onap.cli.fw.OnapCommand", failed.getMessage());
+ + "it should be derived from org.onap.cli.fw.cmd.OnapCommand", failed.getMessage());
}
@Test
@@ -166,29 +144,6 @@ public class OnapCommandErrorTest {
}
@Test
- public void oclipCommandLoginFailedTest1() {
- OnapCommandLoginFailed failed = new OnapCommandLoginFailed(new Exception("Failed"));
-
- assertEquals("0x4001::Login failed, Failed", failed.getMessage());
- }
-
- @Test
- public void oclipCommandLoginFailedTest2() {
- OnapCommandLoginFailed failed = new OnapCommandLoginFailed("Failed", 201);
-
- assertEquals("201::0x4001::Login failed, Failed", failed.getMessage());
- }
-
- @Test
- public void oclipCommandLogoutFailedTest() {
- OnapCommandLogoutFailed failed = new OnapCommandLogoutFailed(new Exception("Failed"));
- assertEquals("0x4002::Logout failed, Failed", failed.getMessage());
-
- failed = new OnapCommandLogoutFailed(200);
- assertEquals("200::0x4002::Logout failed", failed.getMessage());
- }
-
- @Test
public void oclipCommandNotFoundTest() {
OnapCommandNotFound failed = new OnapCommandNotFound("Test", "1.0");
@@ -254,13 +209,6 @@ public class OnapCommandErrorTest {
}
@Test
- public void oclipCommandServiceNotFoundTest() {
- OnapCommandServiceNotFound failed = new OnapCommandServiceNotFound("Service");
-
- assertEquals("0xd001::Service Service is not found in MSB", failed.getMessage());
- }
-
- @Test
public void oclipCommandOutputFormatNotsupportedTest() {
OnapCommandOutputFormatNotsupported failed = new OnapCommandOutputFormatNotsupported("Format");
diff --git a/framework/src/test/java/org/onap/cli/fw/input/OnapCommandParameterTest.java b/framework/src/test/java/org/onap/cli/fw/input/OnapCommandParameterTest.java
index 44656f9f..82781b43 100644
--- a/framework/src/test/java/org/onap/cli/fw/input/OnapCommandParameterTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/input/OnapCommandParameterTest.java
@@ -36,7 +36,7 @@ public class OnapCommandParameterTest {
param.setLongOption("longOption");
param.setName("name");
param.setOptional(true);
- param.setParameterType(ParameterType.JSON);
+ param.setParameterType(OnapCommandParameterType.JSON);
param.setSecured(false);
param.setShortOption("shortOption");
param.setValue("value");
@@ -44,15 +44,15 @@ public class OnapCommandParameterTest {
assertTrue(param.getDefaultValue().equals("defaultValue") && param.getDescription().equals("description")
&& param.getLongOption().equals("longOption") && param.getName().equals("name")
&& param.getShortOption().equals("shortOption") && param.getValue().equals("value")
- && param.isOptional() && !param.isSecured() && param.getParameterType().equals(ParameterType.JSON));
+ && param.isOptional() && !param.isSecured() && param.getParameterType().equals(OnapCommandParameterType.JSON));
assertTrue("value".equals(param.getValue()));
- param.setParameterType(ParameterType.ARRAY);
+ param.setParameterType(OnapCommandParameterType.ARRAY);
param.setValue(Arrays.asList("1", "2", "3"));
assertTrue("[\"1\",\"2\",\"3\"]".equals(param.getValue()));
- param.setParameterType(ParameterType.MAP);
+ param.setParameterType(OnapCommandParameterType.MAP);
Map<String, String> map = new HashMap<>();
map.put("One", "1");
map.put("Two", "2");
@@ -82,7 +82,7 @@ public class OnapCommandParameterTest {
param.setOptional(false);
param.setValue("");
param.setDefaultValue("");
- param.setParameterType(ParameterType.STRING);
+ param.setParameterType(OnapCommandParameterType.STRING);
try {
param.validate();
} catch (OnapCommandException e) {
@@ -94,7 +94,7 @@ public class OnapCommandParameterTest {
public void oclipCommandInvalidParameterValueArrayExeceptionTest() throws OnapCommandInvalidParameterValue {
OnapCommandParameter param = new OnapCommandParameter();
param.setName("name");
- param.setParameterType(ParameterType.ARRAY);
+ param.setParameterType(OnapCommandParameterType.ARRAY);
param.setValue("value");
assertTrue("[\"1\",\"2\",\"3\"]".equals(param.getValue()));
@@ -104,7 +104,7 @@ public class OnapCommandParameterTest {
public void oclipCommandInvalidParameterValueMapExeceptionTest() throws OnapCommandInvalidParameterValue {
OnapCommandParameter param = new OnapCommandParameter();
param.setName("name");
- param.setParameterType(ParameterType.MAP);
+ param.setParameterType(OnapCommandParameterType.MAP);
param.setValue("value");
assertTrue("{\"One\":\"1\",\"Two\":\"2\",\"Three\":\"3\"}".equals(param.getValue()));
}
@@ -113,7 +113,7 @@ public class OnapCommandParameterTest {
public void oclipCommandInvalidParameterValueBinaryExeceptionTest() throws OnapCommandException {
OnapCommandParameter param = new OnapCommandParameter();
param.setName("name");
- param.setParameterType(ParameterType.BINARY);
+ param.setParameterType(OnapCommandParameterType.BINARY);
param.setValue("value");
param.validate();
}
diff --git a/framework/src/test/java/org/onap/cli/fw/input/ParameterTypeTest.java b/framework/src/test/java/org/onap/cli/fw/input/ParameterTypeTest.java
index 877f08f5..a42b9120 100644
--- a/framework/src/test/java/org/onap/cli/fw/input/ParameterTypeTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/input/ParameterTypeTest.java
@@ -27,22 +27,22 @@ public class ParameterTypeTest {
public void paramTypeGetTest() {
try {
- assertTrue(ParameterType.JSON.equals(ParameterType.get("json"))
- && ParameterType.YAML.equals(ParameterType.get("yaml"))
- && ParameterType.STRING.equals(ParameterType.get("string"))
- && ParameterType.DIGIT.equals(ParameterType.get("digit"))
- && ParameterType.URL.equals(ParameterType.get("url"))
- && ParameterType.BOOL.equals(ParameterType.get("bool"))
- && ParameterType.MAP.equals(ParameterType.get("map"))
- && ParameterType.BINARY.equals(ParameterType.get("binary"))
- && ParameterType.TEXT.equals(ParameterType.get("text"))
- && ParameterType.ARRAY.equals(ParameterType.get("array")));
+ assertTrue(OnapCommandParameterType.JSON.equals(OnapCommandParameterType.get("json"))
+ && OnapCommandParameterType.YAML.equals(OnapCommandParameterType.get("yaml"))
+ && OnapCommandParameterType.STRING.equals(OnapCommandParameterType.get("string"))
+ && OnapCommandParameterType.DIGIT.equals(OnapCommandParameterType.get("digit"))
+ && OnapCommandParameterType.URL.equals(OnapCommandParameterType.get("url"))
+ && OnapCommandParameterType.BOOL.equals(OnapCommandParameterType.get("bool"))
+ && OnapCommandParameterType.MAP.equals(OnapCommandParameterType.get("map"))
+ && OnapCommandParameterType.BINARY.equals(OnapCommandParameterType.get("binary"))
+ && OnapCommandParameterType.TEXT.equals(OnapCommandParameterType.get("text"))
+ && OnapCommandParameterType.ARRAY.equals(OnapCommandParameterType.get("array")));
} catch (OnapCommandInvalidParameterType e) {
fail("Shouldn't have thrown this exception : " + e.getMessage());
}
try {
- ParameterType.get("name");
+ OnapCommandParameterType.get("name");
} catch (OnapCommandInvalidParameterType e) {
assertTrue("0x7001::Parameter type name is invalid".equals(e.getMessage()));
}
diff --git a/framework/src/test/java/org/onap/cli/fw/output/OnapCommandResultAttributeScopeTest.java b/framework/src/test/java/org/onap/cli/fw/output/OnapCommandResultAttributeScopeTest.java
index 7ab3fe52..8f5f861a 100644
--- a/framework/src/test/java/org/onap/cli/fw/output/OnapCommandResultAttributeScopeTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/output/OnapCommandResultAttributeScopeTest.java
@@ -21,7 +21,7 @@ import static org.junit.Assert.assertTrue;
import java.util.Collections;
import org.junit.Test;
-import org.onap.cli.fw.input.ParameterType;
+import org.onap.cli.fw.input.OnapCommandParameterType;
public class OnapCommandResultAttributeScopeTest {
@Test
@@ -31,11 +31,11 @@ public class OnapCommandResultAttributeScopeTest {
att.setName("name");
att.setScope(OnapCommandResultAttributeScope.LONG);
att.setSecured(true);
- att.setType(ParameterType.DIGIT);
+ att.setType(OnapCommandParameterType.DIGIT);
att.setValues(Collections.emptyList());
assertTrue("description".equals(att.getDescription()) && "name".equals(att.getName())
&& OnapCommandResultAttributeScope.LONG.equals(att.getScope())
- && ParameterType.DIGIT.equals(att.getType()) && att.getValues().isEmpty());
+ && OnapCommandParameterType.DIGIT.equals(att.getType()) && att.getValues().isEmpty());
}
}
diff --git a/framework/src/test/java/org/onap/cli/fw/output/OnapCommandResultTest.java b/framework/src/test/java/org/onap/cli/fw/output/OnapCommandResultTest.java
index 9c832c24..667ed02a 100644
--- a/framework/src/test/java/org/onap/cli/fw/output/OnapCommandResultTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/output/OnapCommandResultTest.java
@@ -26,7 +26,7 @@ import java.util.List;
import org.junit.Ignore;
import org.junit.Test;
import org.onap.cli.fw.error.OnapCommandException;
-import org.onap.cli.fw.input.ParameterType;
+import org.onap.cli.fw.input.OnapCommandParameterType;
public class OnapCommandResultTest {
@@ -37,16 +37,16 @@ public class OnapCommandResultTest {
res.setIncludeSeparator(true);
res.setIncludeTitle(true);
res.setOutput("Output");
- res.setPrintDirection(PrintDirection.LANDSCAPE);
+ res.setPrintDirection(OnapCommandPrintDirection.LANDSCAPE);
res.setRecords(new ArrayList<OnapCommandResultAttribute>());
res.setScope(OnapCommandResultAttributeScope.LONG);
- res.setType(ResultType.TABLE);
+ res.setType(OnapCommandResultType.TABLE);
res.setDebug(true);
assertTrue("debugInfo".equals(res.getDebugInfo()) && res.isIncludeSeparator()
- && "Output".equals(res.getOutput()) && PrintDirection.LANDSCAPE.equals(res.getPrintDirection())
+ && "Output".equals(res.getOutput()) && OnapCommandPrintDirection.LANDSCAPE.equals(res.getPrintDirection())
&& res.getRecords().isEmpty() && OnapCommandResultAttributeScope.LONG.equals(res.getScope())
- && ResultType.TABLE.equals(res.getType()));
+ && OnapCommandResultType.TABLE.equals(res.getType()));
String help = res.print();
@@ -61,18 +61,18 @@ public class OnapCommandResultTest {
res.setIncludeSeparator(true);
res.setIncludeTitle(true);
res.setOutput("Output");
- res.setPrintDirection(PrintDirection.LANDSCAPE);
+ res.setPrintDirection(OnapCommandPrintDirection.LANDSCAPE);
OnapCommandResultAttribute att = new OnapCommandResultAttribute();
att.setName("param");
att.setDescription("description");
- att.setType(ParameterType.STRING);
+ att.setType(OnapCommandParameterType.STRING);
att.setValues(new ArrayList<String>(Arrays.asList(new String[] { "value" })));
List<OnapCommandResultAttribute> list = new ArrayList<OnapCommandResultAttribute>();
list.add(att);
res.setRecords(list);
res.setScope(OnapCommandResultAttributeScope.LONG);
- res.setType(ResultType.TABLE);
+ res.setType(OnapCommandResultType.TABLE);
res.getRecordsMap();
String expRes = "+--------+\n|param |\n+--------+\n|value |\n+--------+\n";
String result = res.print();
@@ -88,19 +88,19 @@ public class OnapCommandResultTest {
res.setIncludeSeparator(true);
res.setIncludeTitle(true);
res.setOutput("Output");
- res.setPrintDirection(PrintDirection.LANDSCAPE);
+ res.setPrintDirection(OnapCommandPrintDirection.LANDSCAPE);
OnapCommandResultAttribute att = new OnapCommandResultAttribute();
att.setName("param");
att.setDescription("description");
- att.setType(ParameterType.JSON);
+ att.setType(OnapCommandParameterType.JSON);
att.setValues(
new ArrayList<String>(Arrays.asList(new String[] { "{\"id\": \"0001\",\"value\": \"result\"}" })));
List<OnapCommandResultAttribute> list = new ArrayList<OnapCommandResultAttribute>();
list.add(att);
res.setRecords(list);
res.setScope(OnapCommandResultAttributeScope.LONG);
- res.setType(ResultType.JSON);
+ res.setType(OnapCommandResultType.JSON);
// Will be handled after the json print is implemented
String result = res.print();
@@ -118,25 +118,25 @@ public class OnapCommandResultTest {
res.setIncludeSeparator(true);
res.setIncludeTitle(true);
res.setOutput("Output");
- res.setPrintDirection(PrintDirection.LANDSCAPE);
+ res.setPrintDirection(OnapCommandPrintDirection.LANDSCAPE);
OnapCommandResultAttribute att = new OnapCommandResultAttribute();
att.setName("param");
att.setDescription("description");
- att.setType(ParameterType.STRING);
+ att.setType(OnapCommandParameterType.STRING);
att.setValues(new ArrayList<String>(Arrays.asList(new String[] { "value" })));
List<OnapCommandResultAttribute> list = new ArrayList<OnapCommandResultAttribute>();
list.add(att);
OnapCommandResultAttribute a1 = new OnapCommandResultAttribute();
a1.setName("param1");
a1.setDescription("description1");
- a1.setType(ParameterType.STRING);
+ a1.setType(OnapCommandParameterType.STRING);
a1.setValues(new ArrayList<String>(Arrays.asList(new String[] { "value1" })));
list.add(a1);
res.setRecords(list);
res.setScope(OnapCommandResultAttributeScope.LONG);
- res.setType(ResultType.CSV);
+ res.setType(OnapCommandResultType.CSV);
String expRes = "param,param1\r\n";
String result = res.print();
@@ -152,25 +152,25 @@ public class OnapCommandResultTest {
res.setIncludeSeparator(true);
res.setIncludeTitle(true);
res.setOutput("Output");
- res.setPrintDirection(PrintDirection.PORTRAIT);
+ res.setPrintDirection(OnapCommandPrintDirection.PORTRAIT);
OnapCommandResultAttribute att = new OnapCommandResultAttribute();
att.setName("param");
att.setDescription("description");
- att.setType(ParameterType.STRING);
+ att.setType(OnapCommandParameterType.STRING);
att.setValues(new ArrayList<String>(Arrays.asList(new String[] { "value" })));
List<OnapCommandResultAttribute> list = new ArrayList<OnapCommandResultAttribute>();
list.add(att);
OnapCommandResultAttribute a1 = new OnapCommandResultAttribute();
a1.setName("param1");
a1.setDescription("description1");
- a1.setType(ParameterType.STRING);
+ a1.setType(OnapCommandParameterType.STRING);
a1.setValues(new ArrayList<String>(Arrays.asList(new String[] { "value1" })));
list.add(a1);
res.setRecords(list);
res.setScope(OnapCommandResultAttributeScope.LONG);
- res.setType(ResultType.CSV);
+ res.setType(OnapCommandResultType.CSV);
String expRes = "property,value\r\nparam,value\r\n";
String result = res.print();
assertEquals(expRes, result);
@@ -183,19 +183,19 @@ public class OnapCommandResultTest {
res.setIncludeSeparator(true);
res.setIncludeTitle(true);
res.setOutput("Output");
- res.setPrintDirection(PrintDirection.PORTRAIT);
+ res.setPrintDirection(OnapCommandPrintDirection.PORTRAIT);
OnapCommandResultAttribute att = new OnapCommandResultAttribute();
att.setName("param");
att.setDescription("description");
- att.setType(ParameterType.STRING);
+ att.setType(OnapCommandParameterType.STRING);
att.setValues(new ArrayList<String>(Arrays.asList(new String[] { "value" })));
List<OnapCommandResultAttribute> list = new ArrayList<OnapCommandResultAttribute>();
list.add(att);
res.setRecords(list);
res.setScope(OnapCommandResultAttributeScope.LONG);
- res.setType(ResultType.TABLE);
+ res.setType(OnapCommandResultType.TABLE);
String expRes = "+----------+--------+\n|property |value |\n+----------+--------+"
+ "\n|param |value |\n+----------+--------+\n";
diff --git a/framework/src/test/java/org/onap/cli/fw/output/PrintDirectionTest.java b/framework/src/test/java/org/onap/cli/fw/output/PrintDirectionTest.java
index d1ad7950..ae8dd2e1 100644
--- a/framework/src/test/java/org/onap/cli/fw/output/PrintDirectionTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/output/PrintDirectionTest.java
@@ -27,14 +27,14 @@ public class PrintDirectionTest {
public void printDirectionGetTest() {
try {
- assertTrue(PrintDirection.LANDSCAPE.equals(PrintDirection.get("landscape"))
- && PrintDirection.PORTRAIT.equals(PrintDirection.get("portrait")));
+ assertTrue(OnapCommandPrintDirection.LANDSCAPE.equals(OnapCommandPrintDirection.get("landscape"))
+ && OnapCommandPrintDirection.PORTRAIT.equals(OnapCommandPrintDirection.get("portrait")));
} catch (OnapCommandInvalidPrintDirection e) {
fail("Shouldn't have thrown this exception : " + e.getMessage());
}
try {
- PrintDirection.get("name");
+ OnapCommandPrintDirection.get("name");
} catch (OnapCommandInvalidPrintDirection e) {
assertTrue("0x8003::Print direction name is invalid".equals(e.getMessage()));
}
diff --git a/framework/src/test/java/org/onap/cli/fw/output/ResultTypeTest.java b/framework/src/test/java/org/onap/cli/fw/output/ResultTypeTest.java
index 3c4c5665..a6590b3d 100644
--- a/framework/src/test/java/org/onap/cli/fw/output/ResultTypeTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/output/ResultTypeTest.java
@@ -24,19 +24,19 @@ import org.junit.Test;
public class ResultTypeTest {
@Test
public void resultTypeGetTest() {
- assertTrue(ResultType.TABLE.equals(ResultType.get("table")) && ResultType.CSV.equals(ResultType.get("csv"))
- && ResultType.JSON.equals(ResultType.get("json")) && ResultType.YAML.equals(ResultType.get("yaml"))
- && ResultType.TEXT.equals(ResultType.get("text")));
+ assertTrue(OnapCommandResultType.TABLE.equals(OnapCommandResultType.get("table")) && OnapCommandResultType.CSV.equals(OnapCommandResultType.get("csv"))
+ && OnapCommandResultType.JSON.equals(OnapCommandResultType.get("json")) && OnapCommandResultType.YAML.equals(OnapCommandResultType.get("yaml"))
+ && OnapCommandResultType.TEXT.equals(OnapCommandResultType.get("text")));
}
@Test
public void isTabularFormTest() {
- assertTrue(ResultType.isTabularForm("table"));
+ assertTrue(OnapCommandResultType.isTabularForm("table"));
}
@Test
public void isTabularFormNotTest() {
- assertFalse(ResultType.isTabularForm("text"));
+ assertFalse(OnapCommandResultType.isTabularForm("text"));
}
}
diff --git a/framework/src/test/java/org/onap/cli/fw/output/print/OnapCommandPrintTest.java b/framework/src/test/java/org/onap/cli/fw/output/print/OnapCommandPrintTest.java
index 84c868b3..812e58e2 100644
--- a/framework/src/test/java/org/onap/cli/fw/output/print/OnapCommandPrintTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/output/print/OnapCommandPrintTest.java
@@ -25,7 +25,7 @@ import java.util.List;
import org.junit.Ignore;
import org.junit.Test;
import org.onap.cli.fw.error.OnapCommandOutputPrintingFailed;
-import org.onap.cli.fw.output.PrintDirection;
+import org.onap.cli.fw.output.OnapCommandPrintDirection;
public class OnapCommandPrintTest {
@@ -33,7 +33,7 @@ public class OnapCommandPrintTest {
@Ignore
public void printCsvTest() throws OnapCommandOutputPrintingFailed {
OnapCommandPrint pr = new OnapCommandPrint();
- pr.setDirection(PrintDirection.LANDSCAPE);
+ pr.setDirection(OnapCommandPrintDirection.LANDSCAPE);
pr.setPrintTitle(true);
pr.addColumn("name1", new ArrayList<String>(Arrays.asList(new String[] { "value1" })));
String exp = "name1\r\n";
@@ -45,7 +45,7 @@ public class OnapCommandPrintTest {
public void printTableTest() throws OnapCommandOutputPrintingFailed {
OnapCommandPrint pr = new OnapCommandPrint();
List<String> getColumnsData = new ArrayList<String>();
- pr.setDirection(PrintDirection.LANDSCAPE);
+ pr.setDirection(OnapCommandPrintDirection.LANDSCAPE);
pr.setPrintTitle(true);
pr.addColumn("name2", new ArrayList<String>(Arrays.asList(new String[] { "value2" })));
String exp = "+--------+\n|name2 |\n+--------+\n|value2 |\n+--------+\n";
@@ -58,7 +58,7 @@ public class OnapCommandPrintTest {
public void printTableNullColumnHeaderTest() throws OnapCommandOutputPrintingFailed {
OnapCommandPrint pr = new OnapCommandPrint();
List<String> getColumnsData = new ArrayList<String>();
- pr.setDirection(PrintDirection.LANDSCAPE);
+ pr.setDirection(OnapCommandPrintDirection.LANDSCAPE);
pr.setPrintTitle(true);
pr.addColumn("name2", new ArrayList<String>(Arrays.asList(new String[] { "value2" })));
String exp = "+--------+\n|name2 |\n+--------+\n|value2 |\n+--------+\n";
@@ -71,7 +71,7 @@ public class OnapCommandPrintTest {
public void printTableEmptyColumnValuesTest() throws OnapCommandOutputPrintingFailed {
OnapCommandPrint pr = new OnapCommandPrint();
List<String> getColumnsData = new ArrayList<String>();
- pr.setDirection(PrintDirection.LANDSCAPE);
+ pr.setDirection(OnapCommandPrintDirection.LANDSCAPE);
pr.setPrintTitle(true);
pr.addColumn("name2", new ArrayList<String>(Arrays.asList(new String[] { "" })));
String exp = "+--------+\n|name2 |\n+--------+\n| |\n+--------+\n";
diff --git a/framework/src/test/java/org/onap/cli/fw/OnapCommandRegistrarTest.java b/framework/src/test/java/org/onap/cli/fw/registrar/OnapCommandRegistrarTest.java
index 3f9f780d..539ec245 100644
--- a/framework/src/test/java/org/onap/cli/fw/OnapCommandRegistrarTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/registrar/OnapCommandRegistrarTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onap.cli.fw;
+package org.onap.cli.fw.registrar;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -26,9 +26,11 @@ import java.net.URL;
import org.junit.Before;
import org.junit.Test;
+import org.onap.cli.fw.cmd.OnapCommand;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandHelpFailed;
import org.onap.cli.fw.error.OnapCommandNotFound;
+import org.onap.cli.fw.schema.OnapCommandSchema;
public class OnapCommandRegistrarTest {
@@ -99,13 +101,22 @@ public class OnapCommandRegistrarTest {
OnapCommandRegistrar.getRegistrar().setEnabledProductVersion("open-cli");
assertEquals("open-cli", OnapCommandRegistrar.getRegistrar().getEnabledProductVersion());
OnapCommandRegistrar.getRegistrar().getAvailableProductVersions();
- assertTrue(OnapCommandRegistrar.getRegistrar().listCommandsForEnabledProductVersion().contains("schema-refresh"));
+ assertTrue(OnapCommandRegistrar.getRegistrar().listCommandsForEnabledProductVersion().contains("sample-test"));
assertTrue(OnapCommandRegistrar.getRegistrar().listCommandInfo().size() > 2);
} catch (Exception e) {
fail("failed to test the profile");
}
}
+
+
+ @Test
+ public void test() throws OnapCommandException {
+ OnapCommandRegistrar registrar = OnapCommandRegistrar.getRegistrar();
+ OnapCommand cmd = registrar.get("sample-test");
+ cmd.printVersion();
+ registrar.listCommands();
+ }
}
@OnapCommandSchema(schema = "sample-test-schema.yaml")
diff --git a/framework/src/test/java/org/onap/cli/fw/schema/ValidateSchemaTest.java b/framework/src/test/java/org/onap/cli/fw/schema/ValidateSchemaTest.java
index a900fe6d..8153b6db 100644
--- a/framework/src/test/java/org/onap/cli/fw/schema/ValidateSchemaTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/schema/ValidateSchemaTest.java
@@ -21,11 +21,9 @@ import static org.junit.Assert.assertTrue;
import java.util.List;
import org.junit.Test;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.cmd.OnapHttpCommand;
+import org.onap.cli.fw.cmd.OnapCommand;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandInvalidSchema;
-import org.onap.cli.fw.utils.OnapCommandSchemaLoaderUtils;
public class ValidateSchemaTest {
@@ -36,7 +34,7 @@ public class ValidateSchemaTest {
@Override
protected void run() throws OnapCommandException {}
};
- OnapCommandSchemaLoaderUtils.loadSchema(cmd, "fdsfds.yaml", true, true);
+ OnapCommandSchemaLoader.loadSchema(cmd, "fdsfds.yaml", true, true);
}
@Test(expected = OnapCommandInvalidSchema.class)
@@ -45,7 +43,7 @@ public class ValidateSchemaTest {
@Override
protected void run() throws OnapCommandException {}
};
- OnapCommandSchemaLoaderUtils.loadSchema(cmd, "fdsfds", true, true);
+ OnapCommandSchemaLoader.loadSchema(cmd, "fdsfds", true, true);
}
@Test(expected = OnapCommandInvalidSchema.class)
@@ -54,7 +52,7 @@ public class ValidateSchemaTest {
@Override
protected void run() throws OnapCommandException {}
};
- OnapCommandSchemaLoaderUtils.loadSchema(cmd,
+ OnapCommandSchemaLoader.loadSchema(cmd,
ValidateSchemaTest.class.getClassLoader().getResource("open-cli.properties").getFile(),
true, true);
}
@@ -65,7 +63,7 @@ public class ValidateSchemaTest {
@Override
protected void run() throws OnapCommandException {}
};
- OnapCommandSchemaLoaderUtils.loadSchema(cmd, "schema-invalid-file-null.yaml", true, true);
+ OnapCommandSchemaLoader.loadSchema(cmd, "schema-invalid-file-null.yaml", true, true);
}
@Test
@@ -74,7 +72,7 @@ public class ValidateSchemaTest {
@Override
protected void run() throws OnapCommandException {}
};
- OnapCommandSchemaLoaderUtils.loadSchema(cmd, "schema-validate-pass.yaml", true, true);
+ OnapCommandSchemaLoader.loadSchema(cmd, "schema-validate-pass.yaml", true, true);
}
@@ -84,49 +82,32 @@ public class ValidateSchemaTest {
@Override
protected void run() throws OnapCommandException {}
};
- OnapCommandSchemaLoaderUtils.loadSchema(cmd, "schema-invalid-file.yaml", true, true);
+ OnapCommandSchemaLoader.loadSchema(cmd, "schema-invalid-file.yaml", true, true);
}
@Test
public void validateTest() throws OnapCommandException {
- OnapCommand cmd1 = new OnapCommand() {
- @Override
- protected void run() throws OnapCommandException {}
- };
- List<String> errorList1 = OnapCommandSchemaLoaderUtils.loadSchema(cmd1, "schema-validate-http.yaml", true, true);
- assertTrue(errorList1.size() > 0);
-
OnapCommand cmd2 = new OnapCommand() {
@Override
protected void run() throws OnapCommandException {}
};
- List<String> errorList2 = OnapCommandSchemaLoaderUtils.loadSchema(cmd2, "schema-validate-basic.yaml", true, true);
+ List<String> errorList2 = OnapCommandSchemaLoader.loadSchema(cmd2, "schema-validate-basic.yaml", true, true);
assertTrue(errorList2.size() > 0);
OnapCommand cmd3 = new OnapCommand() {
@Override
protected void run() throws OnapCommandException {}
};
- List<String> errorList3 = OnapCommandSchemaLoaderUtils.loadSchema(cmd2, "schema-validate-invalidschematype.yaml", true, true);
+ List<String> errorList3 = OnapCommandSchemaLoader.loadSchema(cmd2, "schema-validate-invalidschematype.yaml", true, true);
assertTrue(errorList3.size() > 0);
- OnapCommand cmd4 = new OnapCommand() {
- @Override
- protected void run() throws OnapCommandException {}
- };
- List<String> errorList4 = OnapCommandSchemaLoaderUtils.loadSchema(cmd2, "schema-validate-invalid.yaml", true, true);
-
- OnapHttpCommand oclipHttpCommand = new OnapHttpCommand();
- errorList4.addAll(OnapCommandSchemaLoaderUtils.loadHttpSchema(oclipHttpCommand,
- "schema-validate-invalid.yaml", true, true));
- assertTrue(errorList4.size() > 0);
OnapCommand cmd5 = new OnapCommand() {
@Override
protected void run() throws OnapCommandException {}
};
- List<String> errorList5 = OnapCommandSchemaLoaderUtils.loadSchema(cmd5, "schema-validate-pass.yaml", true, true);
+ List<String> errorList5 = OnapCommandSchemaLoader.loadSchema(cmd5, "schema-validate-pass.yaml", true, true);
assertTrue(errorList5.size() == 0);
}
diff --git a/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java b/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java
index 8cac03bf..317920f8 100644
--- a/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java
@@ -23,9 +23,7 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.IOException;
-import java.util.ArrayList;
import java.util.Arrays;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -35,29 +33,20 @@ import org.junit.FixMethodOrder;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runners.MethodSorters;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.OnapCommandSchema;
-import org.onap.cli.fw.cmd.OnapHttpCommand;
+import org.onap.cli.fw.cmd.OnapCommand;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandHelpFailed;
-import org.onap.cli.fw.error.OnapCommandHttpHeaderNotFound;
-import org.onap.cli.fw.error.OnapCommandHttpInvalidResponseBody;
-import org.onap.cli.fw.error.OnapCommandInvalidParameterType;
-import org.onap.cli.fw.error.OnapCommandInvalidPrintDirection;
-import org.onap.cli.fw.error.OnapCommandInvalidResultAttributeScope;
import org.onap.cli.fw.error.OnapCommandInvalidSchema;
import org.onap.cli.fw.error.OnapCommandInvalidSchemaVersion;
import org.onap.cli.fw.error.OnapCommandParameterNameConflict;
-import org.onap.cli.fw.error.OnapCommandParameterNotFound;
import org.onap.cli.fw.error.OnapCommandParameterOptionConflict;
import org.onap.cli.fw.error.OnapCommandSchemaNotFound;
-import org.onap.cli.fw.http.HttpInput;
-import org.onap.cli.fw.http.HttpResult;
import org.onap.cli.fw.info.OnapCommandInfo;
import org.onap.cli.fw.input.OnapCommandParameter;
-import org.onap.cli.fw.input.ParameterType;
import org.onap.cli.fw.output.OnapCommandResult;
-import org.springframework.core.io.Resource;
+import org.onap.cli.fw.schema.OnapCommandSchema;
+import org.onap.cli.fw.schema.OnapCommandSchemaInfo;
+import org.onap.cli.fw.schema.OnapCommandSchemaLoader;
import mockit.Invocation;
import mockit.Mock;
@@ -65,21 +54,9 @@ import mockit.MockUp;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class OnapCommandUtilsTest {
-
- @Test(expected = OnapCommandInvalidSchema.class)
- public void oclipCommandUtilsInputStreamNullTest() throws OnapCommandException {
- OnapCommandSchemaLoaderUtils.validateSchemaVersion("sample-test1-schema-http1.yaml", "1.0");
- }
-
- @Test
- public void oclipCommandUtilsInputStreamNotNullTest() throws OnapCommandException {
- Map<String, ?> map = OnapCommandSchemaLoaderUtils.validateSchemaVersion("sample-test1-schema-http.yaml", "1.0");
- assertTrue(map != null);
- }
-
@Test
public void externalSchemaTest() {
- SchemaInfo schema = new SchemaInfo();
+ OnapCommandSchemaInfo schema = new OnapCommandSchemaInfo();
schema.setCmdName("cmdName");
schema.setSchemaName("schemaName");
schema.setVersion("version");
@@ -91,7 +68,7 @@ public class OnapCommandUtilsTest {
@Test
public void schemaFileNotFoundTest() throws OnapCommandException {
- Map<String, ?> map = OnapCommandSchemaLoaderUtils.validateSchemaVersion("sample-test-schema.yaml", "1.0");
+ Map<String, ?> map = OnapCommandSchemaLoader.validateSchemaVersion("sample-test-schema.yaml", "1.0");
assertTrue(map.size() > 0);
}
@@ -100,7 +77,7 @@ public class OnapCommandUtilsTest {
public void invalidSchemaFileTest() throws OnapCommandException {
Map<String, ?> map = null;
try {
- map = OnapCommandSchemaLoaderUtils.validateSchemaVersion("sample-test-schema1.yaml", "1.0");
+ map = OnapCommandSchemaLoader.validateSchemaVersion("sample-test-schema1.yaml", "1.0");
} catch (OnapCommandInvalidSchemaVersion e) {
fail("Test should not have thrown this exception : " + e.getMessage());
} catch (OnapCommandInvalidSchema e) {
@@ -114,7 +91,7 @@ public class OnapCommandUtilsTest {
public void validateWrongSchemaVersionTest() throws OnapCommandException {
Map<String, ?> map = null;
try {
- map = OnapCommandSchemaLoaderUtils.validateSchemaVersion("sample-test-invalid-schema.yaml", "1.0");
+ map = OnapCommandSchemaLoader.validateSchemaVersion("sample-test-invalid-schema.yaml", "1.0");
} catch (OnapCommandInvalidSchemaVersion e) {
fail("Test should not have thrown this exception : " + e.getMessage());
} catch (OnapCommandInvalidSchema e) {
@@ -128,7 +105,7 @@ public class OnapCommandUtilsTest {
public void validateSchemaVersionTest() throws OnapCommandException {
Map<String, ?> map = null;
try {
- map = OnapCommandSchemaLoaderUtils.validateSchemaVersion("sample-test-schema.yaml", "1.1");
+ map = OnapCommandSchemaLoader.validateSchemaVersion("sample-test-schema.yaml", "1.1");
} catch (OnapCommandInvalidSchemaVersion e) {
assertEquals("0xb003::Command schema open_cli_schema_version 1.0 is invalid or missing", e.getMessage());
} catch (OnapCommandInvalidSchema e) {
@@ -141,32 +118,32 @@ public class OnapCommandUtilsTest {
@Test
public void loadOnapCommandSchemaWithOutDefaultTest() throws OnapCommandException {
OnapCommand cmd = new OnapCommandSample();
- OnapCommandSchemaLoaderUtils.loadSchema(cmd, "sample-test-schema.yaml", false, false);
+ OnapCommandSchemaLoader.loadSchema(cmd, "sample-test-schema.yaml", false, false);
assertTrue("sample-test".equals(cmd.getName()) && cmd.getParameters().size() == 9);
}
@Test(expected = OnapCommandParameterNameConflict.class)
public void loadOnapCommandSchemaWithDuplicateNameTest() throws OnapCommandException {
OnapCommand cmd = new OnapCommandSample();
- OnapCommandSchemaLoaderUtils.loadSchema(cmd, "sample-test-invalid-schema-duplicate-name.yaml", false, false);
+ OnapCommandSchemaLoader.loadSchema(cmd, "sample-test-invalid-schema-duplicate-name.yaml", false, false);
}
@Test(expected = OnapCommandParameterOptionConflict.class)
public void loadOnapCommandSchemaWithDuplicateShortOptionTest() throws OnapCommandException {
OnapCommand cmd = new OnapCommandSample();
- OnapCommandSchemaLoaderUtils.loadSchema(cmd, "sample-test-invalid-schema-duplicate-shortoption.yaml", false, false);
+ OnapCommandSchemaLoader.loadSchema(cmd, "sample-test-invalid-schema-duplicate-shortoption.yaml", false, false);
}
@Test(expected = OnapCommandParameterOptionConflict.class)
public void loadOnapCommandSchemaWithDuplicateLongOptionTest() throws OnapCommandException {
OnapCommand cmd = new OnapCommandSample();
- OnapCommandSchemaLoaderUtils.loadSchema(cmd, "sample-test-invalid-schema-duplicate-longoption.yaml", false, false);
+ OnapCommandSchemaLoader.loadSchema(cmd, "sample-test-invalid-schema-duplicate-longoption.yaml", false, false);
}
@Test
public void loadOnapCommandSchemaWithDefaultTest() throws OnapCommandException {
OnapCommand cmd = new OnapCommandSample();
- OnapCommandSchemaLoaderUtils.loadSchema(cmd, "sample-test-schema.yaml", true, false);
+ OnapCommandSchemaLoader.loadSchema(cmd, "sample-test-schema.yaml", true, false);
assertTrue("sample-test".equals(cmd.getName()) && cmd.getParameters().size() > 9);
for (OnapCommandParameter com : cmd.getParameters()) {
@@ -177,49 +154,11 @@ public class OnapCommandUtilsTest {
assertTrue(map.size() == 15);
}
- @Test
- public void loadOnapCommandSchemaAuthRequiredTest() throws OnapCommandException {
- OnapCommand cmd = new OnapCommandSample();
- OnapCommandSchemaLoaderUtils.loadSchema(cmd, "sample-test-schema-auth-required.yaml", true, false);
- assertTrue("sample-test".equals(cmd.getName()));
-
- Map<String, OnapCommandParameter> map = OnapCommandUtils.getInputMap(cmd.getParameters());
- assertTrue(map.size() == 7);
- }
-
- @Test
- public void loadHttpBasedSchemaExceptionTest() throws OnapCommandException {
- OnapHttpCommand cmd = new OnapHttpCommandSample();
- cmd.setName("sample-test-http");
- try {
- OnapCommandSchemaLoaderUtils.loadHttpSchema(cmd, "sample-test-schema.yaml", true, false);
- } catch (OnapCommandParameterNameConflict | OnapCommandParameterOptionConflict
- | OnapCommandInvalidParameterType | OnapCommandInvalidPrintDirection
- | OnapCommandInvalidResultAttributeScope | OnapCommandSchemaNotFound | OnapCommandInvalidSchema
- | OnapCommandInvalidSchemaVersion e) {
- assertTrue(e.getMessage().contains("0xb001::Command schema sample-test-schema.yaml is invalid"));
- }
- }
-
- @Test
- public void loadHttpBasedSchemaTest() throws OnapCommandException {
- OnapHttpCommand cmd = new OnapHttpCommandSample();
- cmd.setName("sample-create-http");
- try {
- OnapCommandSchemaLoaderUtils.loadHttpSchema(cmd, "sample-test-schema-http.yaml", true, true);
- assertTrue(cmd.getSuccessStatusCodes().size() == 2);
- } catch (OnapCommandParameterNameConflict | OnapCommandParameterOptionConflict
- | OnapCommandInvalidParameterType | OnapCommandInvalidPrintDirection
- | OnapCommandInvalidResultAttributeScope | OnapCommandSchemaNotFound | OnapCommandInvalidSchema
- | OnapCommandInvalidSchemaVersion e) {
- fail("Test should not have thrown this exception : " + e.getMessage());
- }
- }
@Test
public void helpCommandTest() throws IOException, OnapCommandException {
OnapCommand cmd = new OnapCommandSample();
- OnapCommandSchemaLoaderUtils.loadSchema(cmd, "sample-test-schema.yaml", true, false);
+ OnapCommandSchemaLoader.loadSchema(cmd, "sample-test-schema.yaml", true, false);
String actualResult = OnapCommandHelperUtils.help(cmd);
@@ -231,7 +170,7 @@ public class OnapCommandUtilsTest {
@Test
public void findOnapCommandsTest() {
List<Class<OnapCommand>> cmds = OnapCommandDiscoveryUtils.discoverCommandPlugins();
- assertTrue(cmds.size() == 7);
+ assertTrue(cmds.size() == 3);
}
@Test
@@ -264,105 +203,12 @@ public class OnapCommandUtilsTest {
}
- @Test
- public void formMethodNameFromAttributeTest() {
-
- String str = "";
- String name = OnapCommandUtils.formMethodNameFromAttributeName(str, "test");
-
- assertEquals("", name);
-
- str = null;
- name = OnapCommandUtils.formMethodNameFromAttributeName(str, "test");
-
- assertEquals(null, name);
-
- str = "test-get";
- name = OnapCommandUtils.formMethodNameFromAttributeName(str, "");
- assertEquals("TestGet", name);
-
- }
-
- @Test
- public void populateParametersTest() throws OnapCommandException {
-
- HttpInput input = new HttpInput();
- input.setBody("body");
- input.setMethod("method");
- Map<String, String> mapHead = new HashMap<>();
- mapHead.put("key2", "${value2}");
- input.setReqHeaders(mapHead);
- Map<String, String> query = new HashMap<>();
- query.put("key3", "{${value3}}");
- input.setReqQueries(query);
- input.setUri("uri");
-
- Map<String, OnapCommandParameter> params = new HashMap<>();
- OnapCommandParameter param = new OnapCommandParameter();
- param.setDefaultValue("defaultValue2");
- param.setParameterType(ParameterType.STRING);
- params.put("value2", param);
- OnapCommandParameter param1 = new OnapCommandParameter();
- param1.setDefaultValue("{\"defaultValue3\"}");
- param1.setParameterType(ParameterType.JSON);
- params.put("value3", param1);
-
- HttpInput input1 = OnapCommandUtils.populateParameters(params, input);
- String expected = "\nURL: uri\nMethod: method\nRequest Queries: {key3={\"defaultValue3\"}}\n"
- + "Request Body: body\nRequest Headers: {key2=defaultValue2}\nRequest Cookies: {}\nbinaryData=false";
- assertEquals(expected, input1.toString());
-
- input.setBody("${body}");
-
- HttpInput input2 = null;
- try {
- input2 = OnapCommandUtils.populateParameters(params, input);
- } catch (OnapCommandParameterNotFound e) {
- assertEquals("0x7005::Command input parameter body is not valid", e.getMessage());
- }
-
- }
-
- @Test(expected = OnapCommandHttpHeaderNotFound.class)
- public void populateOutputsTest() throws OnapCommandException {
- HttpResult output = new HttpResult();
- output.setBody(
- "{\"serviceName\":\"test\",\"version\":\"v1\",\"url\":\"/api/test/v1\",\"protocol\":\"REST\",\"visualRange\":\"1\",\"lb_policy\":\"hash\",\"nodes\":[{\"ip\":\"127.0.0.1\",\"port\":\"8012\",\"ttl\":0,\"nodeId\":\"test_127.0.0.1_8012\",\"expiration\":\"2017-02-10T05:33:25Z\",\"created_at\":\"2017-02-10T05:33:25Z\",\"updated_at\":\"2017-02-10T05:33:25Z\"}],\"status\":\"1\"}");
- Map<String, String> mapHead = new HashMap<>();
- mapHead.put("head1", "value1");
- output.setRespHeaders(mapHead);
- output.setStatus(0);
-
- Map<String, String> params = new HashMap<>();
- params.put("head", "$h{head1}");
- params.put("body", "$b{$.serviceName}");
- params.put("key", "value");
-
- Map<String, ArrayList<String>> input1 = OnapCommandUtils.populateOutputs(params, output);
- assertEquals("{head=[value1], body=[test], key=[value]}", input1.toString());
-
- params.put("body", "$b{{$.serviceName}");
- try {
- input1 = OnapCommandUtils.populateOutputs(params, output);
- } catch (OnapCommandHttpInvalidResponseBody e) {
- assertEquals(
- "0x3004::Http response body does not have json entry {$.serviceName, Missing property in path $['{$']",
- e.getMessage());
- }
- output.setBody("{}");
- input1 = OnapCommandUtils.populateOutputs(params, output);
- params.put("head", "$h{head2}");
- output.setBody("{\"test\"}");
- input1 = OnapCommandUtils.populateOutputs(params, output);
- }
-
-
@Test(expected = OnapCommandHelpFailed.class)
public void zendExceptionHelpTest1() throws OnapCommandException {
mockPrintMethodException();
OnapCommand cmd = new OnapCommandSample();
- OnapCommandSchemaLoaderUtils.loadSchema(cmd, "sample-test-schema.yaml", true, false);
+ OnapCommandSchemaLoader.loadSchema(cmd, "sample-test-schema.yaml", true, false);
OnapCommandHelperUtils.help(cmd);
@@ -372,7 +218,7 @@ public class OnapCommandUtilsTest {
@Test
public void test() throws OnapCommandException {
OnapCommandSampleInfo cmd = new OnapCommandSampleInfo();
- OnapCommandSchemaLoaderUtils.loadSchema(cmd, "sample-test-info.yaml", true, false);
+ OnapCommandSchemaLoader.loadSchema(cmd, "sample-test-info.yaml", true, false);
OnapCommandInfo info = cmd.getInfo();
assert info != null;
}
@@ -391,30 +237,6 @@ public class OnapCommandUtilsTest {
}
}
- @OnapCommandSchema(schema = "sample-test-schema-http.yaml")
- class OnapHttpCommandSample extends OnapHttpCommand {
-
- @Override
- protected void run() throws OnapCommandException {
- }
- }
-
- private void mockExternalResources() {
- new MockUp<OnapCommandUtils>() {
- boolean isMock = true;
-
- @Mock
- public Resource[] getExternalResources(Invocation inv, String pattern) throws IOException {
- if (isMock) {
- isMock = false;
- throw new IOException();
- } else {
- return inv.proceed(pattern);
- }
- }
- };
- }
-
private void mockPrintMethodException() {
new MockUp<OnapCommandResult>() {
boolean isMock = true;
diff --git a/framework/src/test/resources/META-INF/services/org.onap.cli.fw.OnapCommand b/framework/src/test/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
index a01b9d53..a01b9d53 100644
--- a/framework/src/test/resources/META-INF/services/org.onap.cli.fw.OnapCommand
+++ b/framework/src/test/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
diff --git a/main/sample-test-schema-sample.yaml b/main/sample-test-schema-sample.yaml
new file mode 100644
index 00000000..3bb7a210
--- /dev/null
+++ b/main/sample-test-schema-sample.yaml
@@ -0,0 +1,16 @@
+open_cli_sample_version: 1.0
+name: sample-test
+version: open-cli
+samples:
+ sample1:
+ name: sample-test
+ input: --string-param test
+ moco: sample-test-schema-moco.json
+ output: |
+ +----------+--------+
+ |property |value |
+ +----------+--------+
+ |output-1 |[] |
+ +----------+--------+
+ |output-2 |[] |
+ +----------+--------+
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 67be81bb..fc1a949c 100644
--- a/main/src/main/java/org/onap/cli/main/OnapCli.java
+++ b/main/src/main/java/org/onap/cli/main/OnapCli.java
@@ -22,20 +22,20 @@ import java.util.Arrays;
import java.util.List;
import org.apache.commons.io.IOUtils;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.OnapCommandRegistrar;
-import org.onap.cli.fw.conf.Constants;
-import org.onap.cli.fw.conf.OnapCommandConfg;
+import org.onap.cli.fw.cmd.OnapCommand;
+import org.onap.cli.fw.conf.OnapCommandConfig;
+import org.onap.cli.fw.conf.OnapCommandConstants;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandHelpFailed;
import org.onap.cli.fw.error.OnapCommandInvalidSample;
import org.onap.cli.fw.error.OnapCommandWarning;
import org.onap.cli.fw.input.OnapCommandParameter;
+import org.onap.cli.fw.output.OnapCommandPrintDirection;
import org.onap.cli.fw.output.OnapCommandResult;
import org.onap.cli.fw.output.OnapCommandResultAttribute;
import org.onap.cli.fw.output.OnapCommandResultAttributeScope;
-import org.onap.cli.fw.output.PrintDirection;
-import org.onap.cli.fw.output.ResultType;
+import org.onap.cli.fw.output.OnapCommandResultType;
+import org.onap.cli.fw.registrar.OnapCommandRegistrar;
import org.onap.cli.main.conf.OnapCliConstants;
import org.onap.cli.main.interactive.StringCompleter;
import org.onap.cli.main.utils.OnapCliArgsParser;
@@ -147,18 +147,18 @@ public class OnapCli {
public static String getDirectiveHelp() throws OnapCommandHelpFailed {
OnapCommandResult help = new OnapCommandResult();
- help.setType(ResultType.TABLE);
- help.setPrintDirection(PrintDirection.LANDSCAPE);
+ help.setType(OnapCommandResultType.TABLE);
+ help.setPrintDirection(OnapCommandPrintDirection.LANDSCAPE);
OnapCommandResultAttribute attr = new OnapCommandResultAttribute();
- attr.setName(Constants.NAME.toUpperCase());
- attr.setDescription(Constants.DESCRIPTION);
+ attr.setName(OnapCommandConstants.NAME.toUpperCase());
+ attr.setDescription(OnapCommandConstants.DESCRIPTION);
attr.setScope(OnapCommandResultAttributeScope.SHORT);
help.getRecords().add(attr);
OnapCommandResultAttribute attrDesc = new OnapCommandResultAttribute();
- attrDesc.setName(Constants.DESCRIPTION.toUpperCase());
- attrDesc.setDescription(Constants.DESCRIPTION);
+ attrDesc.setName(OnapCommandConstants.DESCRIPTION.toUpperCase());
+ attrDesc.setDescription(OnapCommandConstants.DESCRIPTION);
attrDesc.setScope(OnapCommandResultAttributeScope.SHORT);
help.getRecords().add(attrDesc);
@@ -378,11 +378,11 @@ public class OnapCli {
}
private void generateSmapleYaml(OnapCommand cmd) throws OnapCommandException {
- if (OnapCommandConfg.isSampleGenerateEnabled() && this.getExitCode() == OnapCliConstants.EXIT_SUCCESS) {
+ if (Boolean.parseBoolean(OnapCommandConfig.getPropertyValue(OnapCommandConstants.SAMPLE_GEN_ENABLED)) && this.getExitCode() == OnapCliConstants.EXIT_SUCCESS) {
try {
SampleYamlGenerator.generateSampleYaml(args, cmd.getResult().print(),
OnapCommandRegistrar.getRegistrar().getEnabledProductVersion(),
- OnapCommandConfg.getSampleGenerateTargetFolder() + "/" + cmd.getSchemaName().replaceAll(".yaml", "") + "-sample.yaml",
+ OnapCommandConfig.getPropertyValue(OnapCommandConstants.SAMPLE_GEN_TARGET_FOLDER) + "/" + cmd.getSchemaName().replaceAll(".yaml", "") + "-sample.yaml",
cmd.getResult().isDebug());
} catch (IOException error) {
throw new OnapCommandInvalidSample(args.get(0), error);
diff --git a/main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java b/main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java
index 725459e9..fdf6d5b8 100644
--- a/main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java
+++ b/main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java
@@ -16,26 +16,27 @@
package org.onap.cli.main.utils;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import net.minidev.json.JSONObject;
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import org.apache.commons.io.FileUtils;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandInvalidParameterValue;
import org.onap.cli.fw.input.OnapCommandParameter;
-import org.onap.cli.fw.input.ParameterType;
+import org.onap.cli.fw.input.OnapCommandParameterType;
import org.onap.cli.main.error.OnapCliArgumentValueMissing;
import org.onap.cli.main.error.OnapCliInvalidArgument;
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import net.minidev.json.JSONObject;
/**
* Oclip CLI utilities.
@@ -65,7 +66,7 @@ public class OnapCliArgsParser {
* @throws OnapCommandInvalidParameterValue
* exception
*/
- public static void populateParams(List<OnapCommandParameter> params, List<String> args)
+ public static void populateParams(Set<OnapCommandParameter> params, List<String> args)
throws OnapCommandException {
Map<String, String> shortOptionMap = new HashMap<>();
Map<String, String> longOptionMap = new HashMap<>();
@@ -93,35 +94,35 @@ public class OnapCliArgsParser {
int positionalIdx = 0;
// Skip the first args oclip cmd name, so start from 1
for (int i = 1; i < args.size(); i++) {
- String paramName = null;
- if (shortOptionMap.containsKey(args.get(i))) {
- paramName = shortOptionMap.get(args.get(i));
- } else if (longOptionMap.containsKey(args.get(i))) {
- paramName = longOptionMap.get(args.get(i));
- }
-
- if (paramName != null) {
+ String paramName = null;
+ if (shortOptionMap.containsKey(args.get(i))) {
+ paramName = shortOptionMap.get(args.get(i));
+ } else if (longOptionMap.containsKey(args.get(i))) {
+ paramName = longOptionMap.get(args.get(i));
+ }
+
+ if (paramName != null) {
// end of the list or if its option rather than a value
if ((i + 1) == args.size() || args.get(i + 1).startsWith("-")) {
- if (paramMap.get(paramName).getParameterType().equals(ParameterType.BOOL)) {
+ if (paramMap.get(paramName).getParameterType().equals(OnapCommandParameterType.BOOL)) {
paramMap.get(paramName).setValue("true");
continue;
}
throw new OnapCliArgumentValueMissing(args.get(i));
}
- if (paramMap.get(paramName).getParameterType().equals(ParameterType.JSON)) {
+ if (paramMap.get(paramName).getParameterType().equals(OnapCommandParameterType.JSON)) {
paramMap.get(paramName).setValue(readJsonStringFromUrl(args.get(i + 1),
paramMap.get(paramName).getName()));
i++;
continue;
- } if (paramMap.get(paramName).getParameterType().equals(ParameterType.TEXT)) {
+ } if (paramMap.get(paramName).getParameterType().equals(OnapCommandParameterType.TEXT)) {
paramMap.get(paramName).setValue(readTextStringFromUrl(args.get(i + 1),
paramMap.get(paramName).getName()));
i++;
continue;
} else if (paramMap.get(paramName).getParameterType()
- .equals(ParameterType.ARRAY)) {
+ .equals(OnapCommandParameterType.ARRAY)) {
Object value = paramMap.get(paramName).getValue();
List<String> list;
if (value == "") {
@@ -134,7 +135,7 @@ public class OnapCliArgsParser {
paramMap.get(paramName).setValue(list);
i++;
continue;
- } else if (paramMap.get(paramName).getParameterType().equals(ParameterType.MAP)) {
+ } else if (paramMap.get(paramName).getParameterType().equals(OnapCommandParameterType.MAP)) {
Object value = paramMap.get(paramName).getValue();
Map<String, String> map;
diff --git a/main/src/test/java/org/onap/cli/main/OnapCliMainTest.java b/main/src/test/java/org/onap/cli/main/OnapCliMainTest.java
index 9d3b036c..f7401904 100644
--- a/main/src/test/java/org/onap/cli/main/OnapCliMainTest.java
+++ b/main/src/test/java/org/onap/cli/main/OnapCliMainTest.java
@@ -18,21 +18,12 @@ package org.onap.cli.main;
import static org.junit.Assert.fail;
-import java.io.File;
import java.io.IOException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import org.junit.Ignore;
import org.junit.Test;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.OnapCommandRegistrar;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandHelpFailed;
-import org.onap.cli.main.utils.OnapCliArgsParser;
+import org.onap.cli.fw.registrar.OnapCommandRegistrar;
import jline.console.ConsoleReader;
import mockit.Invocation;
@@ -73,44 +64,6 @@ public class OnapCliMainTest {
this.handle(new String[] { "sample-test", "--help" });
}
- @Ignore
- @Test
- public void testHandleProfile() {
- this.handle(new String[] { "-c", "test" });
- }
-
- @Ignore
- @Test
- public void testAAICustomerList() {
- this.handle(new String[] { "customer-list", "-u", "AAI", "-p", "AAI", "-m", "https://192.168.17.12:8443" });
- }
-
- @Ignore
- @Test
- public void testAAICloudList() {
- this.handle(new String[] { "cloud-list", "-u", "AAI", "-p", "AAI", "-m", "https://192.168.17.12:8443" });
- }
-
- @Test
- public void testHelpSampleCreateCommand() throws OnapCommandException {
- ClassLoader cl = ClassLoader.getSystemClassLoader();
- URL[] urls = ((URLClassLoader) cl).getURLs();
- for (URL url : urls) {
- if (url.getPath().contains("main/target/test-classes")) {
- File file = new File(url.getPath() + "data");
- if (!file.exists()) {
- file.mkdirs();
- }
- break;
- }
- }
- this.handle(new String[] { "sample-create", "--help" });
- OnapCommand cmd = OnapCommandRegistrar.getRegistrar().get("sample-create");
- List<String> args = new ArrayList<>(Arrays.asList(new String[] { "sample-create", "--service-name", "test-service", "-i", "ip1", "-i",
- "ip2", "-o", "port1=value1", "-o", "port2=value2" }));
- OnapCliArgsParser.populateParams(cmd.getParameters(), args);
- }
-
@Test
public void testHelpSampleCommandShort() {
this.handle(new String[] { "sample-test", "-h" });
diff --git a/main/src/test/java/org/onap/cli/main/OnapCommandSampleTest.java b/main/src/test/java/org/onap/cli/main/OnapCommandSampleTest.java
index fcaa8236..3ec63ae6 100644
--- a/main/src/test/java/org/onap/cli/main/OnapCommandSampleTest.java
+++ b/main/src/test/java/org/onap/cli/main/OnapCommandSampleTest.java
@@ -16,9 +16,9 @@
package org.onap.cli.main;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.OnapCommandSchema;
+import org.onap.cli.fw.cmd.OnapCommand;
import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.schema.OnapCommandSchema;
/**
* This command helps to test the Command functionalities.
diff --git a/main/src/test/java/org/onap/cli/main/utils/OnapCliUtilsTest.java b/main/src/test/java/org/onap/cli/main/utils/OnapCliUtilsTest.java
index ad1a7ccc..eb2ca294 100644
--- a/main/src/test/java/org/onap/cli/main/utils/OnapCliUtilsTest.java
+++ b/main/src/test/java/org/onap/cli/main/utils/OnapCliUtilsTest.java
@@ -16,19 +16,21 @@
package org.onap.cli.main.utils;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
import org.junit.Assert;
import org.junit.Test;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.input.OnapCommandParameter;
-import org.onap.cli.fw.input.ParameterType;
+import org.onap.cli.fw.input.OnapCommandParameterType;
import org.onap.cli.main.error.OnapCliArgumentValueMissing;
import org.onap.cli.main.error.OnapCliInvalidArgument;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
public class OnapCliUtilsTest {
@Test
@@ -36,25 +38,25 @@ public class OnapCliUtilsTest {
OnapCommandParameter param1 = new OnapCommandParameter();
param1.setLongOption("host-username");
param1.setName("host-username");
- param1.setParameterType(ParameterType.STRING);
+ param1.setParameterType(OnapCommandParameterType.STRING);
OnapCommandParameter param2 = new OnapCommandParameter();
param2.setLongOption("host-password");
param2.setName("host-password");
- param2.setParameterType(ParameterType.STRING);
+ param2.setParameterType(OnapCommandParameterType.STRING);
OnapCommandParameter param3 = new OnapCommandParameter();
param3.setLongOption("host-url");
param3.setName("host-url");
- param3.setParameterType(ParameterType.STRING);
+ param3.setParameterType(OnapCommandParameterType.STRING);
OnapCommandParameter param4 = new OnapCommandParameter();
param4.setLongOption("string-param");
param4.setName("string-param");
- param4.setParameterType(ParameterType.STRING);
+ param4.setParameterType(OnapCommandParameterType.STRING);
OnapCommandParameter param5 = new OnapCommandParameter();
param5.setLongOption("long-opt");
param5.setName("long-opt");
- param5.setParameterType(ParameterType.STRING);
+ param5.setParameterType(OnapCommandParameterType.STRING);
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(param1);
paramslist.add(param2);
paramslist.add(param3);
@@ -78,13 +80,13 @@ public class OnapCliUtilsTest {
public void testpositionalargs() throws OnapCommandException {
OnapCommandParameter paramargs = new OnapCommandParameter();
paramargs.setName("http://localhost:8082/file.txt");
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(paramargs);
String[] args = new String[] { "positional-args", "http://localhost:8082/file.txt" };
- paramargs.setParameterType(ParameterType.STRING);
+ paramargs.setParameterType(OnapCommandParameterType.STRING);
OnapCliArgsParser.populateParams(paramslist, Arrays.asList(args));
List<String> expectedList = Arrays.asList(args);
- Assert.assertEquals("positional-args", expectedList.get(1), paramslist.get(0).getValue());
+ Assert.assertEquals("positional-args", expectedList.get(1), paramslist.iterator().next().getValue());
}
@Test
@@ -92,14 +94,14 @@ public class OnapCliUtilsTest {
OnapCommandParameter boolparam = new OnapCommandParameter();
boolparam.setLongOption("bool");
boolparam.setName("bool-param");
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(boolparam);
String[] args = new String[] { "sample-create", "--bool" };
- boolparam.setParameterType(ParameterType.BOOL);
+ boolparam.setParameterType(OnapCommandParameterType.BOOL);
OnapCliArgsParser.populateParams(paramslist, Arrays.asList(args));
List<String> expectedList = Arrays.asList(args);
- Assert.assertNotNull(expectedList.get(1), paramslist.get(0).getValue());
+ Assert.assertNotNull(expectedList.get(1), paramslist.iterator().next().getValue());
}
@@ -108,14 +110,14 @@ public class OnapCliUtilsTest {
OnapCommandParameter boolparam = new OnapCommandParameter();
boolparam.setShortOption("b");
boolparam.setName("bool-param");
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(boolparam);
String[] args = new String[] { "sample-create", "-b", };
- boolparam.setParameterType(ParameterType.BOOL);
+ boolparam.setParameterType(OnapCommandParameterType.BOOL);
OnapCliArgsParser.populateParams(paramslist, Arrays.asList(args));
List<String> expectedList = Arrays.asList(args);
- Assert.assertNotNull(expectedList.get(1), paramslist.get(0).getValue());
+ Assert.assertNotNull(expectedList.get(1), paramslist.iterator().next().getValue());
}
@Test
@@ -123,14 +125,14 @@ public class OnapCliUtilsTest {
OnapCommandParameter boolparam = new OnapCommandParameter();
boolparam.setLongOption("text-param");
boolparam.setName("text-param");
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(boolparam);
String[] args = new String[] { "sample-create", "--text-param" , "text"};
- boolparam.setParameterType(ParameterType.TEXT);
+ boolparam.setParameterType(OnapCommandParameterType.TEXT);
OnapCliArgsParser.populateParams(paramslist, Arrays.asList(args));
List<String> expectedList = Arrays.asList(args);
- Assert.assertNotNull(expectedList.get(1), paramslist.get(0).getValue());
+ Assert.assertNotNull(expectedList.get(1), paramslist.iterator().next().getValue());
}
@@ -139,14 +141,14 @@ public class OnapCliUtilsTest {
OnapCommandParameter boolparam = new OnapCommandParameter();
boolparam.setShortOption("e");
boolparam.setName("text-param");
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(boolparam);
String[] args = new String[] { "sample-create", "-e" , "text"};
- boolparam.setParameterType(ParameterType.TEXT);
+ boolparam.setParameterType(OnapCommandParameterType.TEXT);
OnapCliArgsParser.populateParams(paramslist, Arrays.asList(args));
List<String> expectedList = Arrays.asList(args);
- Assert.assertNotNull(expectedList.get(1), paramslist.get(0).getValue());
+ Assert.assertNotNull(expectedList.get(1), paramslist.iterator().next().getValue());
}
@Test
@@ -154,14 +156,14 @@ public class OnapCliUtilsTest {
OnapCommandParameter jsonparam = new OnapCommandParameter();
jsonparam.setShortOption("j");
jsonparam.setName("json-param");
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(jsonparam);
File resourcesDirectory = new File("src/test/resources/sampletest.json");
String[] args = new String[] { "sample-create", "-j", "file:" + resourcesDirectory };
- jsonparam.setParameterType(ParameterType.JSON);
+ jsonparam.setParameterType(OnapCommandParameterType.JSON);
OnapCliArgsParser.populateParams(paramslist, Arrays.asList(args));
List<String> expectedList = Arrays.asList(args);
- Assert.assertNotNull(expectedList.get(1), paramslist.get(0).getValue());
+ Assert.assertNotNull(expectedList.get(1), paramslist.iterator().next().getValue());
}
@Test
@@ -169,14 +171,14 @@ public class OnapCliUtilsTest {
OnapCommandParameter jsonparam = new OnapCommandParameter();
jsonparam.setLongOption("json-param");
jsonparam.setName("json-param");
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(jsonparam);
File resourcesDirectory = new File("src/test/resources/sampletest.json");
String[] args = new String[] { "sample-create", "--json-param", "file:" + resourcesDirectory };
- jsonparam.setParameterType(ParameterType.JSON);
+ jsonparam.setParameterType(OnapCommandParameterType.JSON);
OnapCliArgsParser.populateParams(paramslist, Arrays.asList(args));
List<String> expectedList = Arrays.asList(args);
- Assert.assertNotNull(expectedList.get(1), paramslist.get(0).getValue());
+ Assert.assertNotNull(expectedList.get(1), paramslist.iterator().next().getValue());
}
@Test
@@ -185,25 +187,25 @@ public class OnapCliUtilsTest {
OnapCommandParameter param1 = new OnapCommandParameter();
param1.setShortOption("u");
param1.setName("host-username");
- param1.setParameterType(ParameterType.STRING);
+ param1.setParameterType(OnapCommandParameterType.STRING);
OnapCommandParameter param2 = new OnapCommandParameter();
param2.setShortOption("p");
param2.setName("host-password");
- param2.setParameterType(ParameterType.STRING);
+ param2.setParameterType(OnapCommandParameterType.STRING);
OnapCommandParameter param3 = new OnapCommandParameter();
param3.setShortOption("r");
param3.setName("host-url");
- param3.setParameterType(ParameterType.STRING);
+ param3.setParameterType(OnapCommandParameterType.STRING);
OnapCommandParameter param4 = new OnapCommandParameter();
param4.setShortOption("c");
param4.setName("string-param");
- param4.setParameterType(ParameterType.STRING);
+ param4.setParameterType(OnapCommandParameterType.STRING);
OnapCommandParameter param5 = new OnapCommandParameter();
param5.setShortOption("l");
param5.setName("long-opt");
- param5.setParameterType(ParameterType.STRING);
+ param5.setParameterType(OnapCommandParameterType.STRING);
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(param1);
paramslist.add(param2);
paramslist.add(param3);
@@ -230,14 +232,14 @@ public class OnapCliUtilsTest {
arrayval.setName("node-ip");
String[] args = new String[] { "sample-create", "--node-ip", "{}" };
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(arrayval);
- arrayval.setParameterType(ParameterType.ARRAY);
+ arrayval.setParameterType(OnapCommandParameterType.ARRAY);
OnapCliArgsParser.populateParams(paramslist, Arrays.asList(args));
List<String> expectedList = Arrays.asList(args);
- Assert.assertNotNull(expectedList.get(1), paramslist.get(0).getValue());
+ Assert.assertNotNull(expectedList.get(1), paramslist.iterator().next().getValue());
}
@Test
@@ -245,15 +247,15 @@ public class OnapCliUtilsTest {
OnapCommandParameter param1 = new OnapCommandParameter();
param1.setLongOption("map");
param1.setName("MAP");
- param1.setParameterType(ParameterType.MAP);
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ param1.setParameterType(OnapCommandParameterType.MAP);
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(param1);
- param1.setParameterType(ParameterType.MAP);
+ param1.setParameterType(OnapCommandParameterType.MAP);
OnapCliArgsParser.populateParams(paramslist,
Arrays.asList("show", "--map", "param1=value1", "--map", "param2=value2"));
- Assert.assertEquals("{\"param1\":\"value1\",\"param2\":\"value2\"}", paramslist.get(0).getValue().toString());
+ Assert.assertEquals("{\"param1\":\"value1\",\"param2\":\"value2\"}", paramslist.iterator().next().getValue().toString());
}
@Test(expected = OnapCliInvalidArgument.class)
@@ -261,13 +263,13 @@ public class OnapCliUtilsTest {
OnapCommandParameter param1 = new OnapCommandParameter();
param1.setLongOption("map");
param1.setName("MAP");
- param1.setParameterType(ParameterType.MAP);
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ param1.setParameterType(OnapCommandParameterType.MAP);
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(param1);
- param1.setParameterType(ParameterType.MAP);
+ param1.setParameterType(OnapCommandParameterType.MAP);
OnapCliArgsParser.populateParams(paramslist, Arrays.asList("show", "--map", "param1=value1", "--map", "param2"));
- Assert.assertEquals("{\"param1\":\"value1\",\"param2\"}", paramslist.get(0).getValue().toString());
+ Assert.assertEquals("{\"param1\":\"value1\",\"param2\"}", paramslist.iterator().next().getValue().toString());
}
@Test(expected = OnapCliInvalidArgument.class)
@@ -275,26 +277,26 @@ public class OnapCliUtilsTest {
OnapCommandParameter param1 = new OnapCommandParameter();
param1.setShortOption("o");
param1.setName("node-port");
- param1.setParameterType(ParameterType.MAP);
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ param1.setParameterType(OnapCommandParameterType.MAP);
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(param1);
- param1.setParameterType(ParameterType.MAP);
+ param1.setParameterType(OnapCommandParameterType.MAP);
OnapCliArgsParser.populateParams(paramslist, Arrays.asList("show", "-o", "param1=value1", "-o", "param2"));
- Assert.assertEquals("{\"param1\":\"value1\",\"param2\"}", paramslist.get(0).getValue().toString());
+ Assert.assertEquals("{\"param1\":\"value1\",\"param2\"}", paramslist.iterator().next().getValue().toString());
}
@Test(expected = OnapCliInvalidArgument.class)
public void testpositionalargsfails() throws OnapCommandException {
OnapCommandParameter paramargs = new OnapCommandParameter();
paramargs.setName("http://localhost:8082/file.txt");
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(paramargs);
String[] args = new String[] { "positional-args", "http://localhost:8082/file.txt",
"http://localhost:8082/file.txt" };
- paramargs.setParameterType(ParameterType.STRING);
+ paramargs.setParameterType(OnapCommandParameterType.STRING);
OnapCliArgsParser.populateParams(paramslist, Arrays.asList(args));
List<String> expectedList = Arrays.asList(args);
- Assert.assertEquals("positional-args", expectedList.get(1), paramslist.get(0).getValue());
+ Assert.assertEquals("positional-args", expectedList.get(1), paramslist.iterator().next().getValue());
}
@Test(expected = OnapCliInvalidArgument.class)
@@ -302,14 +304,14 @@ public class OnapCliUtilsTest {
OnapCommandParameter boolparam = new OnapCommandParameter();
boolparam.setShortOption("b");
boolparam.setName("bool-param");
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(boolparam);
String[] args = new String[] { "sample-create", "-b", "-b", "-h" };
- boolparam.setParameterType(ParameterType.BOOL);
+ boolparam.setParameterType(OnapCommandParameterType.BOOL);
OnapCliArgsParser.populateParams(paramslist, Arrays.asList(args));
List<String> expectedList = Arrays.asList(args);
- Assert.assertEquals("true", paramslist.get(0).getValue());
+ Assert.assertEquals("true", paramslist.iterator().next().getValue());
}
@Test(expected = OnapCliInvalidArgument.class)
@@ -317,14 +319,14 @@ public class OnapCliUtilsTest {
OnapCommandParameter boolparam = new OnapCommandParameter();
boolparam.setShortOption("bool");
boolparam.setName("bool-param");
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(boolparam);
String[] args = new String[] { "sample-create", "--bool", "--bool", "--help" };
- boolparam.setParameterType(ParameterType.BOOL);
+ boolparam.setParameterType(OnapCommandParameterType.BOOL);
OnapCliArgsParser.populateParams(paramslist, Arrays.asList(args));
List<String> expectedList = Arrays.asList(args);
- Assert.assertEquals("true", paramslist.get(0).getValue());
+ Assert.assertEquals("true", paramslist.iterator().next().getValue());
}
@Test(expected = OnapCliArgumentValueMissing.class)
@@ -332,14 +334,14 @@ public class OnapCliUtilsTest {
OnapCommandParameter jsonparam = new OnapCommandParameter();
jsonparam.setLongOption("json-param");
jsonparam.setName("json-param");
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(jsonparam);
File resourcesDirectory = new File("src/test/resources/sampletest.json");
String[] args = new String[] { "sample-create", "--json-param", "file:" + resourcesDirectory, "--json-param" };
- jsonparam.setParameterType(ParameterType.JSON);
+ jsonparam.setParameterType(OnapCommandParameterType.JSON);
OnapCliArgsParser.populateParams(paramslist, Arrays.asList(args));
List<String> expectedList = Arrays.asList(args);
- Assert.assertEquals("--json-param", paramslist.get(0).getValue());
+ Assert.assertEquals("--json-param", paramslist.iterator().next().getValue());
}
@@ -348,14 +350,14 @@ public class OnapCliUtilsTest {
OnapCommandParameter jsonparam = new OnapCommandParameter();
jsonparam.setShortOption("j");
jsonparam.setName("json-param");
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(jsonparam);
File resourcesDirectory = new File("src/test/resources/sampletest.json");
String[] args = new String[] { "sample-create", "-j", "file:" + resourcesDirectory, "-j" };
- jsonparam.setParameterType(ParameterType.JSON);
+ jsonparam.setParameterType(OnapCommandParameterType.JSON);
OnapCliArgsParser.populateParams(paramslist, Arrays.asList(args));
List<String> expectedList = Arrays.asList(args);
- Assert.assertEquals("--json-param", paramslist.get(0).getValue());
+ Assert.assertEquals("--json-param", paramslist.iterator().next().getValue());
}
} \ No newline at end of file
diff --git a/main/src/test/resources/META-INF/services/org.onap.cli.fw.OnapCommand b/main/src/test/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
index 16dd879a..16dd879a 100644
--- a/main/src/test/resources/META-INF/services/org.onap.cli.fw.OnapCommand
+++ b/main/src/test/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
diff --git a/main/src/test/resources/open-cli-schema/sample-create-schema.yaml b/main/src/test/resources/open-cli-schema/sample-create-schema.yaml
deleted file mode 100644
index 05f93cda..00000000
--- a/main/src/test/resources/open-cli-schema/sample-create-schema.yaml
+++ /dev/null
@@ -1,73 +0,0 @@
-open_cli_schema_version: 1.0
-name: sample-create
-description: Sample create into Onap
-info:
- product: open-cli
- service: test
- type: cmd
- author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
-
-parameters:
- - name: service-name
- description: Oclip service name
- type: string
- short_option: x
- long_option: service-name
- is_optional: false
- - name: node-ip
- description: Oclip service running node IP
- type: array
- short_option: i
- long_option: node-ip
- - name: node-port
- description: Oclip service running node port
- type: map
- short_option: o
- long_option: node-port
-results:
- direction: portrait
- attributes:
- - name: name
- description: Oclip service name
- scope: short
- type: string
- - name: version
- description: Oclip service version
- scope: short
- type: string
- - name: url
- description: Oclip service base url
- scope: short
- type: url
- - name: status
- description: Oclip service status
- scope: short
- type: digit
- - name: nodes
- description: Oclip service running nodes
- scope: long
- type: string
- - name: location
- description: Oclip service location
- scope: long
- type: url
-http:
- request:
- uri: /services
- method: POST
- body: '{"serviceName":"${service-name}","nodeIp":"${node-ip}","nodePort":"${node-port}"}'
- headers:
- queries:
- success_codes:
- - 201
- - 200
- result_map:
- name: $b{$.serviceName}
- version: $b{$.version}
- url: $b{$.url}
- status: $b{$.status}
- nodes: $b{$.nodes[*].ip}:$b{$.nodes[*].port}
- location: $h{Location}
-
- sample_response:
- body: {"serviceName":"test","version":"v1","url":"/api/test/v1","protocol":"REST","visualRange":"1","lb_policy":"hash","nodes":[{"ip":"127.0.0.1","port":"8012","ttl":0,"nodeId":"test_127.0.0.1_8012","expiration":"2017-02-10T05:33:25Z","created_at":"2017-02-10T05:33:25Z","updated_at":"2017-02-10T05:33:25Z"}],"status":"1"} \ No newline at end of file
diff --git a/main/src/test/resources/sample-test-schema.yaml b/main/src/test/resources/open-cli-schema/sample-test-schema.yaml
index 584eec87..584eec87 100644
--- a/main/src/test/resources/sample-test-schema.yaml
+++ b/main/src/test/resources/open-cli-schema/sample-test-schema.yaml
diff --git a/plugins/onap-amsterdam/features/so/pom.xml b/plugins/onap-amsterdam/features/so/pom.xml
deleted file mode 100644
index afa5acf6..00000000
--- a/plugins/onap-amsterdam/features/so/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2017 Huawei Technologies Co., Ltd.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
- http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-onap-amsterdam-features</artifactId>
- <version>2.0.0</version>
- </parent>
-
- <artifactId>cli-plugins-onap-amsterdam-features-so</artifactId>
- <name>cli/plugins/onap-amsterdam/features/so</name>
- <packaging>jar</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/plugins/openecomp/features/aai/pom.xml b/plugins/openecomp/features/aai/pom.xml
deleted file mode 100644
index dc452b45..00000000
--- a/plugins/openecomp/features/aai/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2017 Huawei Technologies Co., Ltd.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
- http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-openecomp-features</artifactId>
- <version>2.0.0</version>
- </parent>
-
- <artifactId>cli-plugins-openecomp-features-aai</artifactId>
- <name>cli/plugins/openecomp/features/aai</name>
- <packaging>jar</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/pom.xml b/pom.xml
index b5904d02..f3c2a672 100644
--- a/pom.xml
+++ b/pom.xml
@@ -37,7 +37,8 @@
<modules>
<module>framework</module>
- <module>plugins</module>
+ <module>profiles</module>
+ <module>products</module>
<module>main</module>
<module>deployment</module>
<module>validate</module>
diff --git a/plugins/onap-amsterdam/auth/pom.xml b/products/onap-amsterdam/auth/pom.xml
index eaa83cb6..22d14da5 100644
--- a/plugins/onap-amsterdam/auth/pom.xml
+++ b/products/onap-amsterdam/auth/pom.xml
@@ -23,12 +23,12 @@
<parent>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-onap-amsterdam</artifactId>
+ <artifactId>cli-products-onap-amsterdam</artifactId>
<version>2.0.0</version>
</parent>
- <artifactId>cli-plugins-onap-amsterdam-auth</artifactId>
- <name>cli/plugins/onap-amsterdam/auth</name>
+ <artifactId>cli-products-onap-amsterdam-auth</artifactId>
+ <name>cli/products/onap-amsterdam/auth</name>
<packaging>jar</packaging>
<build>
<plugins>
diff --git a/plugins/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLoginCommandAmesterdam.java b/products/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLoginCommandAmesterdam.java
index 2e7e95eb..e6049bbf 100644
--- a/plugins/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLoginCommandAmesterdam.java
+++ b/products/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLoginCommandAmesterdam.java
@@ -16,9 +16,9 @@
package org.onap.cli.cmd.auth;
-import org.onap.cli.fw.OnapCommandSchema;
-import org.onap.cli.fw.cmd.BasicAuthLoginCommand;
import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.http.cmd.BasicAuthLoginCommand;
+import org.onap.cli.fw.schema.OnapCommandSchema;
@OnapCommandSchema(schema = "basic-login-onap-1-1.yaml")
public class OnapBasicAuthLoginCommandAmesterdam extends BasicAuthLoginCommand {
diff --git a/plugins/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLogoutCommandAmesterdam.java b/products/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLogoutCommandAmesterdam.java
index 130f71be..34d00bf8 100644
--- a/plugins/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLogoutCommandAmesterdam.java
+++ b/products/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLogoutCommandAmesterdam.java
@@ -16,9 +16,9 @@
package org.onap.cli.cmd.auth;
-import org.onap.cli.fw.OnapCommandSchema;
-import org.onap.cli.fw.cmd.BasicAuthLogoutCommand;
import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.http.cmd.BasicAuthLogoutCommand;
+import org.onap.cli.fw.schema.OnapCommandSchema;
@OnapCommandSchema(schema = "basic-logout-onap-1-1.yaml")
public class OnapBasicAuthLogoutCommandAmesterdam extends BasicAuthLogoutCommand {
diff --git a/plugins/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapSdcBasicAuthLoginCommandAmesterdam.java b/products/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapSdcBasicAuthLoginCommandAmesterdam.java
index cae9b3fd..6924401a 100644
--- a/plugins/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapSdcBasicAuthLoginCommandAmesterdam.java
+++ b/products/onap-amsterdam/auth/src/main/java/org/onap/cli/cmd/auth/OnapSdcBasicAuthLoginCommandAmesterdam.java
@@ -16,9 +16,9 @@
package org.onap.cli.cmd.auth;
-import org.onap.cli.fw.OnapCommandSchema;
-import org.onap.cli.fw.cmd.BasicAuthLoginCommand;
import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.http.cmd.BasicAuthLoginCommand;
+import org.onap.cli.fw.schema.OnapCommandSchema;
@OnapCommandSchema(schema = "basic-login-onap-sdc-1-1.yaml")
public class OnapSdcBasicAuthLoginCommandAmesterdam extends BasicAuthLoginCommand {
diff --git a/plugins/onap-amsterdam/auth/src/main/resources/META-INF/services/org.onap.cli.fw.OnapCommand b/products/onap-amsterdam/auth/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
index 3095b6f8..3095b6f8 100644
--- a/plugins/onap-amsterdam/auth/src/main/resources/META-INF/services/org.onap.cli.fw.OnapCommand
+++ b/products/onap-amsterdam/auth/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
diff --git a/plugins/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-login-onap-1-1.yaml b/products/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-login-onap-1-1.yaml
index 52e6ba42..52e6ba42 100644
--- a/plugins/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-login-onap-1-1.yaml
+++ b/products/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-login-onap-1-1.yaml
diff --git a/plugins/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-login-onap-sdc-1-1.yaml b/products/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-login-onap-sdc-1-1.yaml
index bd0b2e70..bd0b2e70 100644
--- a/plugins/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-login-onap-sdc-1-1.yaml
+++ b/products/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-login-onap-sdc-1-1.yaml
diff --git a/plugins/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-logout-onap-1-1.yaml b/products/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-logout-onap-1-1.yaml
index c5e44183..c5e44183 100644
--- a/plugins/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-logout-onap-1-1.yaml
+++ b/products/onap-amsterdam/auth/src/main/resources/open-cli-schema/basic-logout-onap-1-1.yaml
diff --git a/plugins/onap-amsterdam/catalog/pom.xml b/products/onap-amsterdam/catalog/pom.xml
index d041dced..10b64184 100644
--- a/plugins/onap-amsterdam/catalog/pom.xml
+++ b/products/onap-amsterdam/catalog/pom.xml
@@ -23,12 +23,12 @@
<parent>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-onap-amsterdam</artifactId>
+ <artifactId>cli-products-onap-amsterdam</artifactId>
<version>2.0.0</version>
</parent>
- <artifactId>cli-plugins-onap-amsterdam-catalog</artifactId>
- <name>cli/plugins/onap-amsterdam/catalog</name>
+ <artifactId>cli-products-onap-amsterdam-catalog</artifactId>
+ <name>cli/products/onap-amsterdam/catalog</name>
<packaging>jar</packaging>
<build>
<plugins>
diff --git a/plugins/onap-amsterdam/catalog/src/main/resources/open-cli-schema/catalog-onap-1_1.yaml b/products/onap-amsterdam/catalog/src/main/resources/open-cli-schema/catalog-onap-1_1.yaml
index 27fd24ae..27fd24ae 100644
--- a/plugins/onap-amsterdam/catalog/src/main/resources/open-cli-schema/catalog-onap-1_1.yaml
+++ b/products/onap-amsterdam/catalog/src/main/resources/open-cli-schema/catalog-onap-1_1.yaml
diff --git a/plugins/onap-amsterdam/features/msb/pom.xml b/products/onap-amsterdam/features/aai/pom.xml
index 27b3642d..1b10c0a2 100644
--- a/plugins/onap-amsterdam/features/msb/pom.xml
+++ b/products/onap-amsterdam/features/aai/pom.xml
@@ -23,12 +23,12 @@
<parent>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-onap-amsterdam-features</artifactId>
+ <artifactId>cli-products-onap-amsterdam-features</artifactId>
<version>2.0.0</version>
</parent>
- <artifactId>cli-plugins-onap-amsterdam-features-msb</artifactId>
- <name>cli/plugins/onap-amsterdam/features/msb</name>
+ <artifactId>cli-products-onap-amsterdam-features-aai</artifactId>
+ <name>cli/products/onap-amsterdam/features/aai</name>
<packaging>jar</packaging>
<build>
<plugins>
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-create-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-create-schema-1.1.yaml
index 4377332b..4377332b 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-delete-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-delete-schema-1.1.yaml
index c9f7e7a5..c9f7e7a5 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-delete-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-delete-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-list-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-list-schema-1.1.yaml
index 6048e907..6048e907 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-create-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-create-schema-1.1.yaml
index 709e7358..709e7358 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema-1.1.yaml
index c765dc73..c765dc73 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema-1.1.yaml
index ca2fd79c..ca2fd79c 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-show-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-show-schema-1.1.yaml
index f8cb93d0..f8cb93d0 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-show-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/customer/customer-show-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-create-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-create-schema-1.1.yaml
index bd00aee8..bd00aee8 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-delete-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-delete-schema-1.1.yaml
index 140dfc9e..140dfc9e 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-delete-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-delete-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-list-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-list-schema-1.1.yaml
index 244d6aec..244d6aec 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-show-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-show-schema-1.1.yaml
index 6c511602..6c511602 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-show-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-show-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-create-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-create-schema-1.1.yaml
index 58b14ac5..58b14ac5 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-delete-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-delete-schema-1.1.yaml
index f8fb4943..f8fb4943 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-delete-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-delete-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-list-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-list-schema-1.1.yaml
index fd17c14e..fd17c14e 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-create-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-create-schema-1.1.yaml
index 877940aa..877940aa 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-delete-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-delete-schema-1.1.yaml
index 2ecc868e..2ecc868e 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-delete-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-delete-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-list-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-list-schema-1.1.yaml
index 3624824a..3624824a 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vim/vim-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-create-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-create-schema-1.1.yaml
index 71ea1b8f..71ea1b8f 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-delete-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-delete-schema-1.1.yaml
index 449a2f5d..449a2f5d 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-delete-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-delete-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-list-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-list-schema-1.1.yaml
index d63e10b5..d63e10b5 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-show-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-show-schema-1.1.yaml
index 241e4b14..241e4b14 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-show-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/esr/vnfm/vnfm-show-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/service-list-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/service-list-schema-1.1.yaml
index 10e058d6..10e058d6 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/service-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/service-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/vf-list-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/vf-list-schema-1.1.yaml
index adb238c0..adb238c0 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/vf-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/vf-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/vf-show-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/vf-show-schema-1.1.yaml
index 95463354..95463354 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/vf-show-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-instance/vf-show-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-create-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-create-schema-1.1.yaml
index 5475ce38..5475ce38 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-delete-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-delete-schema-1.1.yaml
index 2c1f1af8..2c1f1af8 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-delete-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-delete-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-list-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-list-schema-1.1.yaml
index 747d7c11..747d7c11 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/service-type/service-type-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-create-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-create-schema-1.1.yaml
index ddf6a579..ddf6a579 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-delete-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-delete-schema-1.1.yaml
index c20862ad..c20862ad 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-delete-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-delete-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema-1.1.yaml
index 7938c090..7938c090 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-create-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-create-schema-1.1.yaml
index f10dde93..f10dde93 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-delete-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-delete-schema-1.1.yaml
index 000ca852..000ca852 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-delete-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-delete-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-list-schema-1.1.yaml b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-list-schema-1.1.yaml
index c30dacd6..c30dacd6 100644
--- a/plugins/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/main/resources/open-cli-schema/tenant/tenant-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-create-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-create-schema-1.1-moco.json
index 223ebd26..223ebd26 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-create-schema-1.1-sample.yaml
index 3d032ec8..3d032ec8 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-delete-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-delete-schema-1.1-moco.json
index 85094a9d..85094a9d 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-delete-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-delete-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-delete-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-delete-schema-1.1-sample.yaml
index 711f1410..711f1410 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-delete-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-delete-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-schema-1.1-moco.json
index 2e5b1db0..2e5b1db0 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-schema-1.1-sample.yaml
index d16c858d..d16c858d 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-create-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-create-schema-1.1-moco.json
index 18bb05d7..18bb05d7 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-create-schema-1.1-sample.yaml
index f1530e30..f1530e30 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-delete-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-delete-schema-1.1-moco.json
index 26e8a918..26e8a918 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-delete-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-delete-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-delete-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-delete-schema-1.1-sample.yaml
index 6633f356..6633f356 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-delete-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-delete-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-list-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-list-schema-1.1-moco.json
index f7737271..f7737271 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-list-schema-1.1-sample.yaml
index 023a6209..023a6209 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-show-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-show-schema-1.1-moco.json
index 242db8c1..242db8c1 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-show-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-show-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-show-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-show-schema-1.1-sample.yaml
index 50fab324..50fab324 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-show-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/customer/customer-show-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-create-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-create-schema-1.1-moco.json
index 639f3581..639f3581 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-create-schema-1.1-sample.yaml
index 0af19bb5..0af19bb5 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-delete-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-delete-schema-1.1-moco.json
index 9adbf83d..9adbf83d 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-delete-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-delete-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-delete-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-delete-schema-1.1-sample.yaml
index f0d210e7..f0d210e7 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-delete-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-delete-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-list-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-list-schema-1.1-moco.json
index b3b4738c..b3b4738c 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-list-schema-1.1-sample.yaml
index 79558757..79558757 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-show-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-show-schema-1.1-moco.json
index b6ac827d..b6ac827d 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-show-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-show-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-show-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-show-schema-1.1-sample.yaml
index e4355b1b..e4355b1b 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-show-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/ems/ems-show-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-create-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-create-schema-1.1-moco.json
index 01ff5088..01ff5088 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-create-schema-1.1-sample.yaml
index a2f9b009..a2f9b009 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-delete-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-delete-schema-1.1-moco.json
index 4b5f43d3..4b5f43d3 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-delete-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-delete-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-delete-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-delete-schema-1.1-sample.yaml
index e325d4c4..e325d4c4 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-delete-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-delete-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-list-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-list-schema-1.1-moco.json
index c9d425b3..c9d425b3 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-list-schema-1.1-sample.yaml
index fcb44ee6..fcb44ee6 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vim/vim-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-create-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-create-schema-1.1-moco.json
index b5091ecc..b5091ecc 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-create-schema-1.1-sample.yaml
index b9d8ab10..b9d8ab10 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-delete-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-delete-schema-1.1-moco.json
index 01248fc7..01248fc7 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-delete-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-delete-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-delete-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-delete-schema-1.1-sample.yaml
index 8ed8159d..8ed8159d 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-delete-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-delete-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-list-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-list-schema-1.1-moco.json
index 246f2dd2..246f2dd2 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-list-schema-1.1-sample.yaml
index 5ea9cfd0..5ea9cfd0 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-show-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-show-schema-1.1-moco.json
index 1b34db2f..1b34db2f 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-show-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-show-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-show-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-show-schema-1.1-sample.yaml
index 76acd620..76acd620 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-show-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/esr/vnfm/vnfm-show-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/service-list-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/service-list-schema-1.1-moco.json
index e9a1d529..e9a1d529 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/service-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/service-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/service-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/service-list-schema-1.1-sample.yaml
index 4ff87fbf..4ff87fbf 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/service-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/service-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-list-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-list-schema-1.1-moco.json
index 096b5992..096b5992 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-list-schema-1.1-sample.yaml
index 46877883..46877883 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-show-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-show-schema-1.1-moco.json
index 3d697e03..3d697e03 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-show-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-show-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-show-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-show-schema-1.1-sample.yaml
index 97b12cd8..97b12cd8 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-show-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-instance/vf-show-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-create-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-create-schema-1.1-moco.json
index d41ec6e3..d41ec6e3 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-create-schema-1.1-sample.yaml
index 33cb278a..33cb278a 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-delete-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-delete-schema-1.1-moco.json
index 682d32f1..682d32f1 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-delete-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-delete-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-delete-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-delete-schema-1.1-sample.yaml
index a95f289d..a95f289d 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-delete-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-delete-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-list-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-list-schema-1.1-moco.json
index 337d445e..337d445e 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-list-schema-1.1-sample.yaml
index 59affec0..59affec0 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/service-type/service-type-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-create-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-create-schema-1.1-moco.json
index 0839ead0..0839ead0 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-create-schema-1.1-sample.yaml
index f817e377..f817e377 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-delete-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-delete-schema-1.1-moco.json
index 302ea818..302ea818 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-delete-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-delete-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-delete-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-delete-schema-1.1-sample.yaml
index da9b6491..da9b6491 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-delete-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-delete-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-list-schema-1.1-moco.json b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-list-schema-1.1-moco.json
index 9565db34..9565db34 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-list-schema-1.1-sample.yaml
index 5739cc82..5739cc82 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/subscription/subscription-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-create-sample-1.1.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-create-sample-1.1.yaml
index 64cb9853..64cb9853 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-create-sample-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-create-sample-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-delete-sample-1.1.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-delete-sample-1.1.yaml
index 3da7762a..3da7762a 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-delete-sample-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-delete-sample-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-list-sample-1.1.yaml b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-list-sample-1.1.yaml
index 36730547..36730547 100644
--- a/plugins/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-list-sample-1.1.yaml
+++ b/products/onap-amsterdam/features/aai/src/test/resources/open-cli-sample/tenant/tenant-list-sample-1.1.yaml
diff --git a/products/onap-amsterdam/features/msb/pom.xml b/products/onap-amsterdam/features/msb/pom.xml
new file mode 100644
index 00000000..6945bd30
--- /dev/null
+++ b/products/onap-amsterdam/features/msb/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2017 Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.onap.cli</groupId>
+ <artifactId>cli-products-onap-amsterdam-features</artifactId>
+ <version>2.0.0</version>
+ </parent>
+
+ <artifactId>cli-products-onap-amsterdam-features-msb</artifactId>
+ <name>cli/products/onap-amsterdam/features/msb</name>
+ <packaging>jar</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/plugins/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-create-schema.yaml b/products/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-create-schema.yaml
index 44f1f86a..44f1f86a 100644
--- a/plugins/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-create-schema.yaml
+++ b/products/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-create-schema.yaml
diff --git a/plugins/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-delete-schema.yaml b/products/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-delete-schema.yaml
index cc7f875b..cc7f875b 100644
--- a/plugins/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-delete-schema.yaml
+++ b/products/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-delete-schema.yaml
diff --git a/plugins/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-list-schema.yaml b/products/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-list-schema.yaml
index 91f847f3..91f847f3 100644
--- a/plugins/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-list-schema.yaml
+++ b/products/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-list-schema.yaml
diff --git a/plugins/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-show-schema.yaml b/products/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-show-schema.yaml
index 13de1030..13de1030 100644
--- a/plugins/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-show-schema.yaml
+++ b/products/onap-amsterdam/features/msb/src/main/resources/open-cli-schema/microservice-show-schema.yaml
diff --git a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-create-schema-moco.json b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-create-schema-moco.json
index d2b703d0..d2b703d0 100644
--- a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-create-schema-moco.json
+++ b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-create-schema-moco.json
diff --git a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-create-schema-sample.yaml b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-create-schema-sample.yaml
index 3216ff7e..3216ff7e 100644
--- a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-create-schema-sample.yaml
+++ b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-create-schema-sample.yaml
diff --git a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-delete-schema-moco.json b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-delete-schema-moco.json
index 0c3d7e82..0c3d7e82 100644
--- a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-delete-schema-moco.json
+++ b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-delete-schema-moco.json
diff --git a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-delete-schema-sample.yaml b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-delete-schema-sample.yaml
index c0a3778d..c0a3778d 100644
--- a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-delete-schema-sample.yaml
+++ b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-delete-schema-sample.yaml
diff --git a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-list-schema-moco.json b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-list-schema-moco.json
index b836183d..b836183d 100644
--- a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-list-schema-moco.json
+++ b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-list-schema-moco.json
diff --git a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-list-schema-sample.yaml b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-list-schema-sample.yaml
index 819618dd..819618dd 100644
--- a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-list-schema-sample.yaml
+++ b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-list-schema-sample.yaml
diff --git a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-show-schema-moco.json b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-show-schema-moco.json
index 5064b7b6..5064b7b6 100644
--- a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-show-schema-moco.json
+++ b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-show-schema-moco.json
diff --git a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-show-schema-sample.yaml b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-show-schema-sample.yaml
index b75cb8bc..b75cb8bc 100644
--- a/plugins/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-show-schema-sample.yaml
+++ b/products/onap-amsterdam/features/msb/src/test/resources/open-cli-sample/microservice-show-schema-sample.yaml
diff --git a/plugins/onap-amsterdam/features/pom.xml b/products/onap-amsterdam/features/pom.xml
index 3757a3a1..b16a2149 100644
--- a/plugins/onap-amsterdam/features/pom.xml
+++ b/products/onap-amsterdam/features/pom.xml
@@ -23,21 +23,21 @@
<parent>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-onap-amsterdam</artifactId>
+ <artifactId>cli-products-onap-amsterdam</artifactId>
<version>2.0.0</version>
</parent>
- <artifactId>cli-plugins-onap-amsterdam-features</artifactId>
- <name>cli/plugins/onap-amsterdam/features</name>
+ <artifactId>cli-products-onap-amsterdam-features</artifactId>
+ <name>cli/products/onap-amsterdam/features</name>
<packaging>pom</packaging>
-
+
<modules>
<module>msb</module>
<module>aai</module>
<module>sdc</module>
<module>so</module>
</modules>
-
+
<build>
<pluginManagement>
<plugins>
@@ -60,8 +60,8 @@
<type>${project.packaging}</type>
</artifactItem>
</artifactItems>
- <!-- copy to plugin dependencies -->
- <outputDirectory>../../../../plugins/target/lib</outputDirectory>
+ <!-- copy to products dependencies -->
+ <outputDirectory>../../../../products/target/lib</outputDirectory>
</configuration>
</execution>
</executions>
diff --git a/plugins/onap-amsterdam/features/sdc/pom.xml b/products/onap-amsterdam/features/sdc/pom.xml
index 009709c6..68155f4c 100644
--- a/plugins/onap-amsterdam/features/sdc/pom.xml
+++ b/products/onap-amsterdam/features/sdc/pom.xml
@@ -21,12 +21,12 @@
<parent>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-onap-amsterdam-features</artifactId>
+ <artifactId>cli-products-onap-amsterdam-features</artifactId>
<version>2.0.0</version>
</parent>
- <artifactId>cli-plugins-onap-amsterdam-features-sdc</artifactId>
- <name>cli/plugins/onap-amsterdam/features/sdc</name>
+ <artifactId>cli-products-onap-amsterdam-features-sdc</artifactId>
+ <name>cli/products/onap-amsterdam/features/sdc</name>
<packaging>jar</packaging>
<build>
<plugins>
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-add-vf-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-add-vf-schema-1.1.yaml
index e1166e4b..e1166e4b 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-add-vf-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-add-vf-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-approve-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-approve-schema-1.1.yaml
index b814db50..b814db50 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-approve-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-approve-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-complete-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-complete-schema-1.1.yaml
index 8b0ee7a1..8b0ee7a1 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-complete-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-complete-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-request-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-request-schema-1.1.yaml
index dc19c796..dc19c796 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-request-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-request-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-start-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-start-schema-1.1.yaml
index 598eea7e..598eea7e 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-start-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-certify-start-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-checkin-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-checkin-schema-1.1.yaml
index 048e8c41..048e8c41 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-checkin-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-checkin-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-checkout-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-checkout-schema-1.1.yaml
index cf243365..cf243365 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-checkout-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-checkout-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-create-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-create-schema-1.1.yaml
index 6d34d4ab..6d34d4ab 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-distribute-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-distribute-schema-1.1.yaml
index aa69687e..aa69687e 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-distribute-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-distribute-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-list-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-list-schema-1.1.yaml
index 2e1bccea..2e1bccea 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-revert-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-revert-schema-1.1.yaml
index 9029b2a4..9029b2a4 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-revert-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-revert-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service2vf-model-list-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service2vf-model-list-schema-1.1.yaml
index 8a50f4f2..8a50f4f2 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service2vf-model-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/service-model/service2vf-model-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-complete-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-complete-schema-1.1.yaml
index 06ac254c..06ac254c 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-complete-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-complete-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-request-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-request-schema-1.1.yaml
index 5af2098e..5af2098e 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-request-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-request-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-start-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-start-schema-1.1.yaml
index e7944133..e7944133 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-start-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-certify-start-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-checkin-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-checkin-schema-1.1.yaml
index 019cab00..019cab00 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-checkin-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-checkin-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-create-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-create-schema-1.1.yaml
index 44b706d0..44b706d0 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-list-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-list-schema-1.1.yaml
index 48619c87..48619c87 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf-model-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf2vfmodule-model-list-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf2vfmodule-model-list-schema-1.1.yaml
index ae151279..ae151279 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf2vfmodule-model-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vf/vf2vfmodule-model-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-entitlement-pool-create-schema.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-entitlement-pool-create-schema.yaml
index 721d2604..721d2604 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-entitlement-pool-create-schema.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-entitlement-pool-create-schema.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-entitlement-pool-show-schema.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-entitlement-pool-show-schema.yaml
index 20c134cc..20c134cc 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-entitlement-pool-show-schema.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-entitlement-pool-show-schema.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-group-create-schema.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-group-create-schema.yaml
index 9797f46d..9797f46d 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-group-create-schema.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-group-create-schema.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-group-show-schema.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-group-show-schema.yaml
index 15609462..15609462 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-group-show-schema.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-group-show-schema.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-model-create-schema.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-model-create-schema.yaml
index cfcc1a13..cfcc1a13 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-model-create-schema.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-model-create-schema.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-model-show-schema.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-model-show-schema.yaml
index da1c3b57..da1c3b57 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-model-show-schema.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/license-model-show-schema.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-create-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-create-schema-1.1.yaml
index b424e31d..b424e31d 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-list-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-list-schema-1.1.yaml
index 0194a4d2..0194a4d2 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-checkin-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-checkin-schema-1.1.yaml
index 38e335f3..38e335f3 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-checkin-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-checkin-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-checkout-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-checkout-schema-1.1.yaml
index 42fd8193..42fd8193 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-checkout-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-checkout-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-create-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-create-schema-1.1.yaml
index dad02b4f..dad02b4f 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-create-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-create-schema-1.1.yaml
index ca9d00ea..ca9d00ea 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-list-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-list-schema-1.1.yaml
index d847ce80..d847ce80 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-create-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-create-schema-1.1.yaml
index 7b637067..7b637067 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-list-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-list-schema-1.1.yaml
index 92de8d25..92de8d25 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-create-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-create-schema-1.1.yaml
index 76c12cc9..76c12cc9 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-list-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-list-schema-1.1.yaml
index 37a8fa5c..37a8fa5c 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-list-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-list-schema-1.1.yaml
index c01c9802..c01c9802 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-revert-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-revert-schema-1.1.yaml
index 05185fdb..05185fdb 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-revert-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-revert-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-submit-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-submit-schema-1.1.yaml
index 8d7274e0..8d7274e0 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-submit-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-submit-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-add-artifact-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-add-artifact-schema-1.1.yaml
index 446f002a..446f002a 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-add-artifact-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-add-artifact-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkin-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkin-schema-1.1.yaml
index c556d4a0..c556d4a0 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkin-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkin-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkout-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkout-schema-1.1.yaml
index aed6f39a..aed6f39a 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkout-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkout-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-1.1.yaml
index 2ddda92d..2ddda92d 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema-1.1.yaml
index bc0114ae..bc0114ae 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-package-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-package-schema-1.1.yaml
index 766e1f77..766e1f77 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-package-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-package-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-revert-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-revert-schema-1.1.yaml
index 932b1b3b..932b1b3b 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-revert-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-revert-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-show-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-show-schema-1.1.yaml
index b788148b..b788148b 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-show-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-show-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-submit-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-submit-schema-1.1.yaml
index 04b84b07..04b84b07 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-submit-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-submit-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-validate-schema-1.1.yaml b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-validate-schema-1.1.yaml
index 61b664c5..61b664c5 100644
--- a/plugins/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-validate-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-validate-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-add-vf-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-add-vf-schema-1.1-moco.json
index 34058a31..34058a31 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-add-vf-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-add-vf-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-add-vf-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-add-vf-schema-1.1-sample.yaml
index ff90dd98..ff90dd98 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-add-vf-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-add-vf-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-complete-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-complete-schema-1.1-moco.json
index b7ea4ebf..b7ea4ebf 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-complete-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-complete-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-complete-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-complete-schema-1.1-sample.yaml
index 8b6e831a..8b6e831a 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-complete-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-complete-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-request-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-request-schema-1.1-moco.json
index 0ae0e2da..0ae0e2da 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-request-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-request-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-request-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-request-schema-1.1-sample.yaml
index 7ba27d9a..7ba27d9a 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-request-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-request-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-start-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-start-schema-1.1-moco.json
index 1f1330d6..1f1330d6 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-start-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-start-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-start-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-start-schema-1.1-sample.yaml
index e4386d94..e4386d94 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-start-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-certify-start-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-checkin-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-checkin-schema-1.1-moco.json
index b6979a55..b6979a55 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-checkin-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-checkin-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-checkin-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-checkin-schema-1.1-sample.yaml
index 25969019..25969019 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-checkin-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-checkin-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-create-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-create-schema-1.1-moco.json
index 5521a446..5521a446 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-create-schema-1.1-sample.yaml
index 82eba525..82eba525 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-distribute-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-distribute-schema-1.1-moco.json
index 9baedf85..9baedf85 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-distribute-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-distribute-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-distribute-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-distribute-schema-1.1-sample.yaml
index cd25fbab..cd25fbab 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-distribute-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-distribute-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-list-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-list-schema-1.1-moco.json
index d5745217..d5745217 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-list-schema-1.1-sample.yaml
index 53d0f826..53d0f826 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service-model-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service2vf-model-list-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service2vf-model-list-schema-1.1-moco.json
index cb4b6e16..cb4b6e16 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service2vf-model-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service2vf-model-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service2vf-model-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service2vf-model-list-schema-1.1-sample.yaml
index 88275646..88275646 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service2vf-model-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/service-model/service2vf-model-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-complete-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-complete-schema-1.1-moco.json
index 48df97c4..48df97c4 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-complete-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-complete-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-complete-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-complete-schema-1.1-sample.yaml
index 9b3a9c97..9b3a9c97 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-complete-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-complete-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-request-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-request-schema-1.1-moco.json
index 5160e68f..5160e68f 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-request-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-request-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-request-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-request-schema-1.1-sample.yaml
index 8da64f9c..8da64f9c 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-request-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-request-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-start-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-start-schema-1.1-moco.json
index e5332cb8..e5332cb8 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-start-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-start-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-start-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-start-schema-1.1-sample.yaml
index 885dc5c1..885dc5c1 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-start-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-certify-start-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-checkin-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-checkin-schema-1.1-moco.json
index 5fd14717..5fd14717 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-checkin-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-checkin-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-checkin-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-checkin-schema-1.1-sample.yaml
index 588ada2b..588ada2b 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-checkin-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-checkin-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-create-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-create-schema-1.1-moco.json
index c71e0448..c71e0448 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-create-schema-1.1-sample.yaml
index e9b6db76..e9b6db76 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-list-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-list-schema-1.1-moco.json
index 0a7e338e..0a7e338e 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-list-schema-1.1-sample.yaml
index c0598d94..c0598d94 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf-model-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf2vfmodule-model-list-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf2vfmodule-model-list-schema-1.1-moco.json
index 14d15d02..14d15d02 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf2vfmodule-model-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf2vfmodule-model-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf2vfmodule-model-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf2vfmodule-model-list-schema-1.1-sample.yaml
index f729652b..f729652b 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf2vfmodule-model-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vf/vf2vfmodule-model-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-entitlement-pool-create-schema.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-entitlement-pool-create-schema.yaml
index 25f9f8a9..25f9f8a9 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-entitlement-pool-create-schema.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-entitlement-pool-create-schema.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-entitlement-pool-show-schema.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-entitlement-pool-show-schema.yaml
index 786453ab..786453ab 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-entitlement-pool-show-schema.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-entitlement-pool-show-schema.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-group-create-schema.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-group-create-schema.yaml
index ee8bc124..ee8bc124 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-group-create-schema.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-group-create-schema.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-group-show-schema.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-group-show-schema.yaml
index e9f70f7d..e9f70f7d 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-group-show-schema.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-group-show-schema.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-model-create-schema.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-model-create-schema.yaml
index d95292ef..d95292ef 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-model-create-schema.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-model-create-schema.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-model-show-schema.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-model-show-schema.yaml
index d9ee023e..d9ee023e 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-model-show-schema.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/license-model-show-schema.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-1.1-moco.json
index 44038797..44038797 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-1.1-sample.yaml
index d0cefb53..d0cefb53 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-list-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-list-schema-1.1-moco.json
index 3da67ac8..3da67ac8 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-list-schema-1.1-sample.yaml
index d245498b..d245498b 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-aggreement-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkin-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkin-schema-1.1-moco.json
index c62f721c..c62f721c 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkin-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkin-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkin-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkin-schema-1.1-sample.yaml
index 27c3a32b..27c3a32b 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkin-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkin-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkout-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkout-schema-1.1-moco.json
index 164a59c7..164a59c7 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkout-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkout-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkout-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkout-schema-1.1-sample.yaml
index 5c11d88a..5c11d88a 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkout-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-checkout-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-create-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-create-schema-1.1-moco.json
index 57445daf..57445daf 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-create-schema-1.1-sample.yaml
index 46c7473e..46c7473e 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-1.1-moco.json
index f40193ad..f40193ad 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-1.1-sample.yaml
index a4d563bc..a4d563bc 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-list-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-list-schema-1.1-moco.json
index acf1f022..acf1f022 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-list-schema-1.1-sample.yaml
index ced316b1..ced316b1 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-entitlement-pool-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-1.1-moco.json
index d3b8c0d2..d3b8c0d2 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-1.1-sample.yaml
index 914ec5ff..914ec5ff 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-list-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-list-schema-1.1-moco.json
index ac09b4eb..ac09b4eb 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-list-schema-1.1-sample.yaml
index 42e68514..42e68514 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-feature-group-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-create-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-create-schema-1.1-moco.json
index 4ac759e9..4ac759e9 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-create-schema-1.1-sample.yaml
index c48d2b9a..c48d2b9a 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-list-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-list-schema-1.1-moco.json
index cb688bbc..cb688bbc 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-list-schema-1.1-sample.yaml
index 79e17327..79e17327 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-key-group-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-list-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-list-schema-1.1-moco.json
index 8634d109..8634d109 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-list-schema-1.1-sample.yaml
index 9f2e7691..9f2e7691 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-revert-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-revert-schema-1.1-moco.json
index 5045c98c..5045c98c 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-revert-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-revert-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-revert-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-revert-schema-1.1-sample.yaml
index 6a4b1d05..6a4b1d05 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-revert-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-revert-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-submit-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-submit-schema-1.1-moco.json
index b7811539..b7811539 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-submit-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-submit-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-submit-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-submit-schema-1.1-sample.yaml
index 9a0656de..9a0656de 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-submit-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vlm/vlm-submit-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-schema-1.1-moco.json
index bf29aed4..bf29aed4 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-schema-1.1-sample.yaml
index 5fcfc877..5fcfc877 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-schema-1.1-moco.json
index fb90a444..fb90a444 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-schema-1.1-sample.yaml
index 02507598..02507598 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-schema-1.1-moco.json
index 0a9b516c..0a9b516c 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-schema-1.1-sample.yaml
index 6847df0f..6847df0f 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-schema-1.1-moco.json
index b2f96dd9..b2f96dd9 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-schema-1.1-sample.yaml
index d3276fe9..d3276fe9 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-package-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-package-schema-1.1-moco.json
index 9c93fb79..9c93fb79 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-package-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-package-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-package-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-package-schema-1.1-sample.yaml
index a034c9fc..a034c9fc 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-package-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-package-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-revert-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-revert-schema-1.1-moco.json
index fcff4c97..fcff4c97 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-revert-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-revert-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-revert-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-revert-schema-1.1-sample.yaml
index 9dceda5c..9dceda5c 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-revert-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-revert-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-schema-1.1-moco.json
index 8caab9a1..8caab9a1 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-schema-1.1-sample.yaml
index 84effbf5..84effbf5 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-schema-1.1-moco.json
index 6ec6072b..6ec6072b 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-schema-1.1-sample.yaml
index 97013bb6..97013bb6 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-upload-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-upload-schema-1.1-sample.yaml
index 92990a77..92990a77 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-upload-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-upload-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-validate-schema-1.1-moco.json b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-validate-schema-1.1-moco.json
index 8ae9d2c5..8ae9d2c5 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-validate-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-validate-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-validate-schema-1.1-sample.yaml b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-validate-schema-1.1-sample.yaml
index 4e0389e8..4e0389e8 100644
--- a/plugins/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-validate-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-validate-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/aai/pom.xml b/products/onap-amsterdam/features/so/pom.xml
index 45e7ced3..23da8eb3 100644
--- a/plugins/onap-amsterdam/features/aai/pom.xml
+++ b/products/onap-amsterdam/features/so/pom.xml
@@ -23,12 +23,12 @@
<parent>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-onap-amsterdam-features</artifactId>
+ <artifactId>cli-products-onap-amsterdam-features</artifactId>
<version>2.0.0</version>
</parent>
- <artifactId>cli-plugins-onap-amsterdam-features-aai</artifactId>
- <name>cli/plugins/onap-amsterdam/features/aai</name>
+ <artifactId>cli-products-onap-amsterdam-features-so</artifactId>
+ <name>cli/products/onap-amsterdam/features/so</name>
<packaging>jar</packaging>
<build>
<plugins>
diff --git a/plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/service-create-schema-1.1.yaml b/products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/service-create-schema-1.1.yaml
index 8073f07e..8073f07e 100644
--- a/plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/service-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/service-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/service-delete-schema-1.1.yaml b/products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/service-delete-schema-1.1.yaml
index ce45e2d8..ce45e2d8 100644
--- a/plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/service-delete-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/service-delete-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-create-schema-1.1.yaml b/products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-create-schema-1.1.yaml
index 9a56a9a4..9a56a9a4 100644
--- a/plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-delete-schema-1.1.yaml b/products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-delete-schema-1.1.yaml
index e3a7cbea..e3a7cbea 100644
--- a/plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-delete-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-delete-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-module-create-schema-1.1.yaml b/products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-module-create-schema-1.1.yaml
index 3f08e44c..3f08e44c 100644
--- a/plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-module-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-module-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-module-delete-schema-1.1.yaml b/products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-module-delete-schema-1.1.yaml
index 18ed5fc3..18ed5fc3 100644
--- a/plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-module-delete-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vf-module-delete-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vfmodule-create-schema-1.1.yaml b/products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vfmodule-create-schema-1.1.yaml
index e1f77aad..e1f77aad 100644
--- a/plugins/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vfmodule-create-schema-1.1.yaml
+++ b/products/onap-amsterdam/features/so/src/main/resources/open-cli-schema/services/vfmodule-create-schema-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-sample-1.1.yaml b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-sample-1.1.yaml
index c8810226..c8810226 100644
--- a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-sample-1.1.yaml
+++ b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-sample-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-schema-1.1-moco.json b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-schema-1.1-moco.json
index 28321085..28321085 100644
--- a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-schema-1.1-sample.yaml
index e4f37195..e4f37195 100644
--- a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-delete-sample-1.1.yaml b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-delete-sample-1.1.yaml
index b4994c9e..b4994c9e 100644
--- a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-delete-sample-1.1.yaml
+++ b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/service-delete-sample-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-create-schema-1.1-moco.json b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-create-schema-1.1-moco.json
index 0d8a97b9..0d8a97b9 100644
--- a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-create-schema-1.1-moco.json
+++ b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-create-schema-1.1-moco.json
diff --git a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-create-schema-1.1-sample.yaml b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-create-schema-1.1-sample.yaml
index 265d293a..265d293a 100644
--- a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-create-schema-1.1-sample.yaml
+++ b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-create-schema-1.1-sample.yaml
diff --git a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-module-create-sample-1.1.yaml b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-module-create-sample-1.1.yaml
index c04d2357..c04d2357 100644
--- a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-module-create-sample-1.1.yaml
+++ b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-module-create-sample-1.1.yaml
diff --git a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-module-delete-sample-1.1.yaml b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-module-delete-sample-1.1.yaml
index 74536538..74536538 100644
--- a/plugins/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-module-delete-sample-1.1.yaml
+++ b/products/onap-amsterdam/features/so/src/test/resources/open-cli-sample/services/vf-module-delete-sample-1.1.yaml
diff --git a/plugins/onap-amsterdam/pom.xml b/products/onap-amsterdam/pom.xml
index 2b4dfada..27a4e3f3 100644
--- a/plugins/onap-amsterdam/pom.xml
+++ b/products/onap-amsterdam/pom.xml
@@ -23,21 +23,21 @@
<parent>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins</artifactId>
+ <artifactId>cli-products</artifactId>
<version>2.0.0</version>
</parent>
- <artifactId>cli-plugins-onap-amsterdam</artifactId>
- <name>cli/plugins/onap-amsterdam</name>
+ <artifactId>cli-products-onap-amsterdam</artifactId>
+ <name>cli/products/onap-amsterdam</name>
<packaging>pom</packaging>
-
+
<modules>
<module>auth</module>
<module>catalog</module>
<module>features</module>
</modules>
-
- <build>
+
+ <build>
<pluginManagement>
<plugins>
<plugin>
@@ -59,8 +59,8 @@
<type>${project.packaging}</type>
</artifactItem>
</artifactItems>
- <!-- copy to plugin dependencies -->
- <outputDirectory>../../../plugins/target/lib</outputDirectory>
+ <!-- copy to products dependencies -->
+ <outputDirectory>../../../products/target/lib</outputDirectory>
</configuration>
</execution>
</executions>
diff --git a/plugins/openecomp/auth/pom.xml b/products/openecomp/auth/pom.xml
index 8b69d782..c38a4447 100644
--- a/plugins/openecomp/auth/pom.xml
+++ b/products/openecomp/auth/pom.xml
@@ -23,13 +23,14 @@
<parent>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-openecomp</artifactId>
+ <artifactId>cli-products-openecomp</artifactId>
<version>2.0.0</version>
</parent>
- <artifactId>cli-plugins-openecomp-auth</artifactId>
- <name>cli/plugins/openecomp/auth</name>
+ <artifactId>cli-products-openecomp-auth</artifactId>
+ <name>cli/products/openecomp/auth</name>
<packaging>jar</packaging>
+
<build>
<plugins>
<plugin>
diff --git a/plugins/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLoginCommand.java b/products/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLoginCommand.java
index e0fa3abf..9f24e575 100644
--- a/plugins/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLoginCommand.java
+++ b/products/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLoginCommand.java
@@ -16,9 +16,9 @@
package org.onap.cli.cmd.auth;
-import org.onap.cli.fw.OnapCommandSchema;
-import org.onap.cli.fw.cmd.BasicAuthLoginCommand;
import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.http.cmd.BasicAuthLoginCommand;
+import org.onap.cli.fw.schema.OnapCommandSchema;
@OnapCommandSchema(schema = "basic-login-onap-1-0.yaml")
public class OnapBasicAuthLoginCommand extends BasicAuthLoginCommand {
diff --git a/plugins/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLogoutCommand.java b/products/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLogoutCommand.java
index b87989c7..1753e4b0 100644
--- a/plugins/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLogoutCommand.java
+++ b/products/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLogoutCommand.java
@@ -16,9 +16,9 @@
package org.onap.cli.cmd.auth;
-import org.onap.cli.fw.OnapCommandSchema;
-import org.onap.cli.fw.cmd.BasicAuthLogoutCommand;
import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.http.cmd.BasicAuthLogoutCommand;
+import org.onap.cli.fw.schema.OnapCommandSchema;
@OnapCommandSchema(schema = "basic-logout-onap-1-0.yaml")
public class OnapBasicAuthLogoutCommand extends BasicAuthLogoutCommand {
diff --git a/plugins/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapSdcBasicAuthLoginCommand.java b/products/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapSdcBasicAuthLoginCommand.java
index 0e8805a4..10b6e622 100644
--- a/plugins/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapSdcBasicAuthLoginCommand.java
+++ b/products/openecomp/auth/src/main/java/org/onap/cli/cmd/auth/OnapSdcBasicAuthLoginCommand.java
@@ -16,9 +16,9 @@
package org.onap.cli.cmd.auth;
-import org.onap.cli.fw.OnapCommandSchema;
-import org.onap.cli.fw.cmd.BasicAuthLoginCommand;
import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.http.cmd.BasicAuthLoginCommand;
+import org.onap.cli.fw.schema.OnapCommandSchema;
@OnapCommandSchema(schema = "basic-login-onap-sdc-1-0.yaml")
public class OnapSdcBasicAuthLoginCommand extends BasicAuthLoginCommand {
diff --git a/plugins/openecomp/auth/src/main/resources/META-INF/services/org.onap.cli.fw.OnapCommand b/products/openecomp/auth/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
index 7594b30f..a7b1c80f 100644
--- a/plugins/openecomp/auth/src/main/resources/META-INF/services/org.onap.cli.fw.OnapCommand
+++ b/products/openecomp/auth/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
@@ -1,3 +1,3 @@
-org.onap.cli.cmd.auth.OnapBasicAuthLoginCommand
-org.onap.cli.cmd.auth.OnapBasicAuthLogoutCommand
+org.onap.cli.cmd.auth.OnapBasicAuthLoginCommand
+org.onap.cli.cmd.auth.OnapBasicAuthLogoutCommand
org.onap.cli.cmd.auth.OnapSdcBasicAuthLoginCommand \ No newline at end of file
diff --git a/plugins/openecomp/auth/src/main/resources/open-cli-schema/basic-login-onap-1-0.yaml b/products/openecomp/auth/src/main/resources/open-cli-schema/basic-login-onap-1-0.yaml
index 675a1f88..675a1f88 100644
--- a/plugins/openecomp/auth/src/main/resources/open-cli-schema/basic-login-onap-1-0.yaml
+++ b/products/openecomp/auth/src/main/resources/open-cli-schema/basic-login-onap-1-0.yaml
diff --git a/plugins/openecomp/auth/src/main/resources/open-cli-schema/basic-login-onap-sdc-1-0.yaml b/products/openecomp/auth/src/main/resources/open-cli-schema/basic-login-onap-sdc-1-0.yaml
index d9467440..d9467440 100644
--- a/plugins/openecomp/auth/src/main/resources/open-cli-schema/basic-login-onap-sdc-1-0.yaml
+++ b/products/openecomp/auth/src/main/resources/open-cli-schema/basic-login-onap-sdc-1-0.yaml
diff --git a/plugins/openecomp/auth/src/main/resources/open-cli-schema/basic-logout-onap-1-0.yaml b/products/openecomp/auth/src/main/resources/open-cli-schema/basic-logout-onap-1-0.yaml
index 1e2bea22..1e2bea22 100644
--- a/plugins/openecomp/auth/src/main/resources/open-cli-schema/basic-logout-onap-1-0.yaml
+++ b/products/openecomp/auth/src/main/resources/open-cli-schema/basic-logout-onap-1-0.yaml
diff --git a/plugins/openecomp/catalog/pom.xml b/products/openecomp/catalog/pom.xml
index 6e216449..19cd87b6 100644
--- a/plugins/openecomp/catalog/pom.xml
+++ b/products/openecomp/catalog/pom.xml
@@ -23,12 +23,12 @@
<parent>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-openecomp</artifactId>
+ <artifactId>cli-products-openecomp</artifactId>
<version>2.0.0</version>
</parent>
- <artifactId>cli-plugins-openecomp-catalog</artifactId>
- <name>cli/plugins/openecomp/catalog</name>
+ <artifactId>cli-products-openecomp-catalog</artifactId>
+ <name>cli/products/openecomp/catalog</name>
<packaging>jar</packaging>
<build>
<plugins>
diff --git a/plugins/openecomp/catalog/src/main/resources/open-cli-schema/catalog-onap-1-0.yaml b/products/openecomp/catalog/src/main/resources/open-cli-schema/catalog-onap-1-0.yaml
index d55e23d3..d55e23d3 100644
--- a/plugins/openecomp/catalog/src/main/resources/open-cli-schema/catalog-onap-1-0.yaml
+++ b/products/openecomp/catalog/src/main/resources/open-cli-schema/catalog-onap-1-0.yaml
diff --git a/products/openecomp/features/aai/pom.xml b/products/openecomp/features/aai/pom.xml
new file mode 100644
index 00000000..ad113712
--- /dev/null
+++ b/products/openecomp/features/aai/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2017 Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.onap.cli</groupId>
+ <artifactId>cli-products-openecomp-features</artifactId>
+ <version>2.0.0</version>
+ </parent>
+
+ <artifactId>cli-products-openecomp-features-aai</artifactId>
+ <name>cli/products/openecomp/features/aai</name>
+ <packaging>jar</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-list-schema.yaml b/products/openecomp/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-list-schema.yaml
index 50cea668..50cea668 100644
--- a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-list-schema.yaml
+++ b/products/openecomp/features/aai/src/main/resources/open-cli-schema/cloud-region/cloud-list-schema.yaml
diff --git a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-create-schema.yaml b/products/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-create-schema.yaml
index 8ca23903..8ca23903 100644
--- a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-create-schema.yaml
+++ b/products/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-create-schema.yaml
diff --git a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema.yaml b/products/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema.yaml
index 01fecefb..01fecefb 100644
--- a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema.yaml
+++ b/products/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-delete-schema.yaml
diff --git a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema.yaml b/products/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema.yaml
index 043e5bc7..043e5bc7 100644
--- a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema.yaml
+++ b/products/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-list-schema.yaml
diff --git a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-show-schema.yaml b/products/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-show-schema.yaml
index 357efefa..357efefa 100644
--- a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-show-schema.yaml
+++ b/products/openecomp/features/aai/src/main/resources/open-cli-schema/customer/customer-show-schema.yaml
diff --git a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-create-schema.yaml b/products/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-create-schema.yaml
index e59e910f..e59e910f 100644
--- a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-create-schema.yaml
+++ b/products/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-create-schema.yaml
diff --git a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-delete-schema.yaml b/products/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-delete-schema.yaml
index 4c615b40..4c615b40 100644
--- a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-delete-schema.yaml
+++ b/products/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-delete-schema.yaml
diff --git a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-list-schema.yaml b/products/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-list-schema.yaml
index 746b58f8..746b58f8 100644
--- a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-list-schema.yaml
+++ b/products/openecomp/features/aai/src/main/resources/open-cli-schema/service-type/service-type-list-schema.yaml
diff --git a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/subscription/subscription-create-schema.yaml b/products/openecomp/features/aai/src/main/resources/open-cli-schema/subscription/subscription-create-schema.yaml
index 2fd3ca98..2fd3ca98 100644
--- a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/subscription/subscription-create-schema.yaml
+++ b/products/openecomp/features/aai/src/main/resources/open-cli-schema/subscription/subscription-create-schema.yaml
diff --git a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema.yaml b/products/openecomp/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema.yaml
index 4893194d..4893194d 100644
--- a/plugins/openecomp/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema.yaml
+++ b/products/openecomp/features/aai/src/main/resources/open-cli-schema/subscription/subscription-list-schema.yaml
diff --git a/plugins/openecomp/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-sample-1.0.yaml b/products/openecomp/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-sample-1.0.yaml
index f57b3018..f57b3018 100644
--- a/plugins/openecomp/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-sample-1.0.yaml
+++ b/products/openecomp/features/aai/src/test/resources/open-cli-sample/cloud-region/cloud-list-sample-1.0.yaml
diff --git a/plugins/openecomp/features/pom.xml b/products/openecomp/features/pom.xml
index b1f334bf..d5fd72fa 100644
--- a/plugins/openecomp/features/pom.xml
+++ b/products/openecomp/features/pom.xml
@@ -23,19 +23,19 @@
<parent>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-openecomp</artifactId>
+ <artifactId>cli-products-openecomp</artifactId>
<version>2.0.0</version>
</parent>
- <artifactId>cli-plugins-openecomp-features</artifactId>
- <name>cli/plugins/openecomp/features</name>
+ <artifactId>cli-products-openecomp-features</artifactId>
+ <name>cli/products/openecomp/features</name>
<packaging>pom</packaging>
-
+
<modules>
<module>aai</module>
<module>sdc</module>
</modules>
-
+
<build>
<pluginManagement>
<plugins>
@@ -58,8 +58,8 @@
<type>${project.packaging}</type>
</artifactItem>
</artifactItems>
- <!-- copy to plugin dependencies -->
- <outputDirectory>../../../../plugins/target/lib</outputDirectory>
+ <!-- copy to products dependencies -->
+ <outputDirectory>../../../../products/target/lib</outputDirectory>
</configuration>
</execution>
</executions>
diff --git a/plugins/openecomp/features/sdc/pom.xml b/products/openecomp/features/sdc/pom.xml
index fc2b1b5a..b1a90570 100644
--- a/plugins/openecomp/features/sdc/pom.xml
+++ b/products/openecomp/features/sdc/pom.xml
@@ -21,12 +21,12 @@
<parent>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-openecomp-features</artifactId>
+ <artifactId>cli-products-openecomp-features</artifactId>
<version>2.0.0</version>
</parent>
- <artifactId>cli-plugins-openecomp-features-sdc</artifactId>
- <name>cli/plugins/openecomp/features/sdc</name>
+ <artifactId>cli-products-openecomp-features-sdc</artifactId>
+ <name>cli/products/openecomp/features/sdc</name>
<packaging>jar</packaging>
<build>
<plugins>
diff --git a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/license-models/license-model-create-schema.yaml b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/license-models/license-model-create-schema.yaml
index a223c8d4..a223c8d4 100644
--- a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/license-models/license-model-create-schema.yaml
+++ b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/license-models/license-model-create-schema.yaml
diff --git a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/license-models/license-model-show-schema.yaml b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/license-models/license-model-show-schema.yaml
index 860cbea9..860cbea9 100644
--- a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/license-models/license-model-show-schema.yaml
+++ b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/license-models/license-model-show-schema.yaml
diff --git a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkin-schema.yaml b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkin-schema.yaml
index d7b2d90f..d7b2d90f 100644
--- a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkin-schema.yaml
+++ b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkin-schema.yaml
diff --git a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkout-schema.yaml b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkout-schema.yaml
index 50d73517..50d73517 100644
--- a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkout-schema.yaml
+++ b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-checkout-schema.yaml
diff --git a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema.yaml b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema.yaml
index f3fbbd6a..f3fbbd6a 100644
--- a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema.yaml
+++ b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema.yaml
diff --git a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema.yaml b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema.yaml
index 3bdd41d7..3bdd41d7 100644
--- a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema.yaml
+++ b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema.yaml
diff --git a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-show-schema.yaml b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-show-schema.yaml
index affe73e7..affe73e7 100644
--- a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-show-schema.yaml
+++ b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-show-schema.yaml
diff --git a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-submit-schema.yaml b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-submit-schema.yaml
index 00c95f01..00c95f01 100644
--- a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-submit-schema.yaml
+++ b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-submit-schema.yaml
diff --git a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-upload-schema.yaml b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-upload-schema.yaml
index b8708b83..b8708b83 100644
--- a/plugins/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-upload-schema.yaml
+++ b/products/openecomp/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-upload-schema.yaml
diff --git a/plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-sample.yaml b/products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-sample.yaml
index 6d703741..6d703741 100644
--- a/plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-sample.yaml
+++ b/products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkin-sample.yaml
diff --git a/plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-sample.yaml b/products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-sample.yaml
index b935cd20..b935cd20 100644
--- a/plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-sample.yaml
+++ b/products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-checkout-sample.yaml
diff --git a/plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-sample.yaml b/products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-sample.yaml
index 3fb85e48..3fb85e48 100644
--- a/plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-sample.yaml
+++ b/products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-create-sample.yaml
diff --git a/plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-sample.yaml b/products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-sample.yaml
index 50ba22db..50ba22db 100644
--- a/plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-sample.yaml
+++ b/products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-list-sample.yaml
diff --git a/plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-sample.yaml b/products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-sample.yaml
index 4af221e3..4af221e3 100644
--- a/plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-sample.yaml
+++ b/products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-show-sample.yaml
diff --git a/plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-sample.yaml b/products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-sample.yaml
index 3cf101bc..3cf101bc 100644
--- a/plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-sample.yaml
+++ b/products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-submit-sample.yaml
diff --git a/plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-upload-sample.yaml b/products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-upload-sample.yaml
index b615bd66..b615bd66 100644
--- a/plugins/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-upload-sample.yaml
+++ b/products/openecomp/features/sdc/src/test/resources/open-cli-sample/vsp/vsp-upload-sample.yaml
diff --git a/plugins/openecomp/pom.xml b/products/openecomp/pom.xml
index 2f490432..7aebdb5c 100644
--- a/plugins/openecomp/pom.xml
+++ b/products/openecomp/pom.xml
@@ -23,20 +23,19 @@
<parent>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins</artifactId>
+ <artifactId>cli-products</artifactId>
<version>2.0.0</version>
</parent>
- <artifactId>cli-plugins-openecomp</artifactId>
- <name>cli/plugins/openecomp</name>
+ <artifactId>cli-products-openecomp</artifactId>
+ <name>cli/products/openecomp</name>
<packaging>pom</packaging>
-
+
<modules>
<module>auth</module>
<module>catalog</module>
<module>features</module>
</modules>
-
<build>
<pluginManagement>
<plugins>
@@ -59,8 +58,8 @@
<type>${project.packaging}</type>
</artifactItem>
</artifactItems>
- <!-- copy to plugin dependencies -->
- <outputDirectory>../../../plugins/target/lib</outputDirectory>
+ <!-- copy to products dependencies -->
+ <outputDirectory>../../../products/target/lib</outputDirectory>
</configuration>
</execution>
</executions>
diff --git a/plugins/pom.xml b/products/pom.xml
index 2e733529..725feedf 100644
--- a/plugins/pom.xml
+++ b/products/pom.xml
@@ -13,12 +13,7 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
- http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ --><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -27,8 +22,8 @@
<version>2.0.0</version>
</parent>
- <artifactId>cli-plugins</artifactId>
- <name>cli/plugins</name>
+ <artifactId>cli-products</artifactId>
+ <name>cli/products</name>
<packaging>pom</packaging>
<dependencies>
<dependency>
@@ -39,7 +34,7 @@
</dependency>
<dependency>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-framework</artifactId>
+ <artifactId>cli-profiles-http</artifactId>
<version>${project.parent.version}</version>
</dependency>
</dependencies>
@@ -65,8 +60,7 @@
</profile>
</profiles>
-
- <build>
+ <build>
<pluginManagement>
<plugins>
<plugin>
@@ -89,7 +83,7 @@
</artifactItem>
</artifactItems>
<!-- copy to plugin dependencies -->
- <outputDirectory>../../plugins/target/lib</outputDirectory>
+ <outputDirectory>../../products/target/lib</outputDirectory>
</configuration>
</execution>
</executions>
@@ -97,5 +91,4 @@
</plugins>
</pluginManagement>
</build>
-</project>
-
+</project> \ No newline at end of file
diff --git a/plugins/sample/pom.xml b/products/sample/pom.xml
index 113ac4b4..bcd4fbed 100644
--- a/plugins/sample/pom.xml
+++ b/products/sample/pom.xml
@@ -23,12 +23,12 @@
<parent>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins</artifactId>
+ <artifactId>cli-products</artifactId>
<version>2.0.0</version>
</parent>
- <artifactId>cli-plugins-sample</artifactId>
- <name>cli/plugins/sample</name>
+ <artifactId>cli-products-sample</artifactId>
+ <name>cli/products/sample</name>
<packaging>jar</packaging>
<build>
<plugins>
diff --git a/plugins/sample/src/main/java/org/onap/cli/sample/OnapHelloWorldCommand.java b/products/sample/src/main/java/org/onap/cli/sample/OnapHelloWorldCommand.java
index 0f70ba9d..39311998 100644
--- a/plugins/sample/src/main/java/org/onap/cli/sample/OnapHelloWorldCommand.java
+++ b/products/sample/src/main/java/org/onap/cli/sample/OnapHelloWorldCommand.java
@@ -18,10 +18,10 @@ package org.onap.cli.sample;
import java.util.Map;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.OnapCommandSchema;
+import org.onap.cli.fw.cmd.OnapCommand;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.input.OnapCommandParameter;
+import org.onap.cli.fw.schema.OnapCommandSchema;
/**
* Hello world.
@@ -42,4 +42,5 @@ public class OnapHelloWorldCommand extends OnapCommand {
//Populate outputs
this.getResult().getRecordsMap().get("output").getValues().add(output);
}
+
}
diff --git a/plugins/sample/src/main/resources/META-INF/services/org.onap.cli.fw.OnapCommand b/products/sample/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
index dfd6b3de..dfd6b3de 100644
--- a/plugins/sample/src/main/resources/META-INF/services/org.onap.cli.fw.OnapCommand
+++ b/products/sample/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
diff --git a/plugins/sample/src/main/resources/open-cli-schema/hello-world-http.yaml b/products/sample/src/main/resources/open-cli-schema/hello-world-http.yaml
index 7acba741..7acba741 100644
--- a/plugins/sample/src/main/resources/open-cli-schema/hello-world-http.yaml
+++ b/products/sample/src/main/resources/open-cli-schema/hello-world-http.yaml
diff --git a/plugins/sample/src/main/resources/open-cli-schema/hello-world.yaml b/products/sample/src/main/resources/open-cli-schema/hello-world.yaml
index e87e6dff..e87e6dff 100644
--- a/plugins/sample/src/main/resources/open-cli-schema/hello-world.yaml
+++ b/products/sample/src/main/resources/open-cli-schema/hello-world.yaml
diff --git a/profiles/http/pom.xml b/profiles/http/pom.xml
new file mode 100644
index 00000000..ecc0a951
--- /dev/null
+++ b/profiles/http/pom.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.cli</groupId>
+ <artifactId>cli-profiles</artifactId>
+ <version>2.0.0</version>
+ </parent>
+
+ <artifactId>cli-profiles-http</artifactId>
+ <name>cli-profiles/http</name>
+ <packaging>jar</packaging>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.cli</groupId>
+ <artifactId>cli-sample-mock-generator</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>4.3.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpmime</artifactId>
+ <version>4.0.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.jayway.jsonpath</groupId>
+ <artifactId>json-path</artifactId>
+ <version>2.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>2.6.3</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.11</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jmockit</groupId>
+ <artifactId>jmockit</artifactId>
+ <version>1.19</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jmockit</groupId>
+ <artifactId>jmockit-coverage</artifactId>
+ <version>1.19</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/framework/src/main/java/org/onap/cli/fw/ad/OnapAuthClient.java b/profiles/http/src/main/java/org/onap/cli/fw/http/auth/OnapCommandHttpAuthClient.java
index 6a324808..af02afdd 100644
--- a/framework/src/main/java/org/onap/cli/fw/ad/OnapAuthClient.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/auth/OnapCommandHttpAuthClient.java
@@ -14,38 +14,37 @@
* limitations under the License.
*/
-package org.onap.cli.fw.ad;
+package org.onap.cli.fw.http.auth;
import java.util.HashMap;
import java.util.Map;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.OnapCommandRegistrar;
-import org.onap.cli.fw.cmd.OnapHttpCommand;
-import org.onap.cli.fw.conf.Constants;
-import org.onap.cli.fw.conf.OnapCommandConfg;
+import org.onap.cli.fw.cmd.OnapCommand;
+import org.onap.cli.fw.conf.OnapCommandConfig;
import org.onap.cli.fw.error.OnapCommandException;
-import org.onap.cli.fw.error.OnapCommandHttpFailure;
import org.onap.cli.fw.error.OnapCommandInvalidParameterValue;
-import org.onap.cli.fw.error.OnapCommandNotFound;
-import org.onap.cli.fw.http.HttpInput;
-import org.onap.cli.fw.http.HttpResult;
-import org.onap.cli.fw.http.OnapHttpConnection;
+import org.onap.cli.fw.http.cmd.OnapHttpCommand;
+import org.onap.cli.fw.http.conf.OnapCommandHttpConstants;
+import org.onap.cli.fw.http.connect.HttpInput;
+import org.onap.cli.fw.http.connect.HttpResult;
+import org.onap.cli.fw.http.connect.OnapHttpConnection;
+import org.onap.cli.fw.http.error.OnapCommandHttpFailure;
+import org.onap.cli.fw.http.schema.OnapCommandSchemaHttpLoader;
import org.onap.cli.fw.output.OnapCommandResultAttribute;
-import org.onap.cli.fw.utils.OnapCommandDiscoveryUtils;
+import org.onap.cli.fw.registrar.OnapCommandRegistrar;
import org.onap.cli.fw.utils.OnapCommandUtils;
/**
* Oclip Auth client helps to do login and logout.
*
*/
-public class OnapAuthClient {
+public class OnapCommandHttpAuthClient {
private OnapHttpCommand cmd = null;
private OnapHttpConnection http = null;
- public OnapAuthClient(OnapHttpCommand cmd, boolean debug) throws OnapCommandHttpFailure, OnapCommandInvalidParameterValue {
+ public OnapCommandHttpAuthClient(OnapHttpCommand cmd, boolean debug) throws OnapCommandHttpFailure, OnapCommandInvalidParameterValue {
this.cmd = cmd;
this.http = new OnapHttpConnection(debug);
}
@@ -59,11 +58,11 @@ public class OnapAuthClient {
public void login() throws OnapCommandException {
// For development purpose, its introduced and is not supported for production
- if (OnapCommandConfg.isAuthIgnored()) {
+ if (Boolean.parseBoolean(OnapCommandConfig.getPropertyValue(OnapCommandHttpConstants.OPEN_IGNORE_AUTH))) {
return;
}
- OnapCommand login = OnapCommandDiscoveryUtils.findAuthCommand(this.cmd, "login");
+ OnapCommand login = OnapCommandSchemaHttpLoader.findAuthCommand(this.cmd, "login");
OnapCommandUtils.copyParamsFrom(this.cmd, login);
login.execute();
@@ -88,11 +87,11 @@ public class OnapAuthClient {
*/
public void logout() throws OnapCommandException {
// For development purpose, its introduced and is not supported for production
- if (OnapCommandConfg.isAuthIgnored()) {
+ if (Boolean.parseBoolean(OnapCommandConfig.getPropertyValue(OnapCommandHttpConstants.OPEN_IGNORE_AUTH))) {
return;
}
- OnapCommand logout = OnapCommandDiscoveryUtils.findAuthCommand(this.cmd, "logout");
+ OnapCommand logout = OnapCommandSchemaHttpLoader.findAuthCommand(this.cmd, "logout");
OnapCommandUtils.copyParamsFrom(this.cmd, logout);
@@ -113,25 +112,25 @@ public class OnapAuthClient {
private String getServiceUrl(OnapHttpCommand cmd) throws OnapCommandException {
if (cmd.getService().isModeDirect()){
- return cmd.getParametersMap().get(Constants.DEAFULT_PARAMETER_HOST_URL).getValue().toString();
+ return cmd.getParametersMap().get(OnapCommandHttpConstants.DEAFULT_PARAMETER_HOST_URL).getValue().toString();
} else { //Catalog mode
OnapCommand catalog = OnapCommandRegistrar.getRegistrar().get("catalog");
Map<String, String> paramsOverrides = new HashMap<>();
- paramsOverrides.put(Constants.CATALOG_SERVICE_NAME, cmd.getService().getName());
- paramsOverrides.put(Constants.CATALOG_SERVICE_VERSION, cmd.getService().getVersion());
+ paramsOverrides.put(OnapCommandHttpConstants.CATALOG_SERVICE_NAME, cmd.getService().getName());
+ paramsOverrides.put(OnapCommandHttpConstants.CATALOG_SERVICE_VERSION, cmd.getService().getVersion());
OnapCommandUtils.copyParamsFrom(cmd, catalog, paramsOverrides);
catalog.execute();
- String hostUrl = catalog.getResult().getRecordsMap().get(Constants.CATALOG_SERVICE_HOST_URL).getValues().get(0);
+ String hostUrl = catalog.getResult().getRecordsMap().get(OnapCommandHttpConstants.CATALOG_SERVICE_HOST_URL).getValues().get(0);
hostUrl = hostUrl.trim();
if (hostUrl.endsWith("/")) {
hostUrl = hostUrl.substring(0, hostUrl.length()-1);
}
- String basePath = catalog.getResult().getRecordsMap().get(Constants.CATALOG_SERVICE_BASE_PATH).getValues().get(0);
+ String basePath = catalog.getResult().getRecordsMap().get(OnapCommandHttpConstants.CATALOG_SERVICE_BASE_PATH).getValues().get(0);
basePath = basePath.trim();
if (basePath.startsWith("/")) {
basePath = basePath.substring(1);
diff --git a/framework/src/main/java/org/onap/cli/fw/ad/OnapService.java b/profiles/http/src/main/java/org/onap/cli/fw/http/auth/OnapCommandHttpService.java
index a16c4434..e2c8007d 100644
--- a/framework/src/main/java/org/onap/cli/fw/ad/OnapService.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/auth/OnapCommandHttpService.java
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-package org.onap.cli.fw.ad;
+package org.onap.cli.fw.http.auth;
-import org.onap.cli.fw.conf.Constants;
+import org.onap.cli.fw.http.conf.OnapCommandHttpConstants;
/**
* Oclip Service as reported in api catalog.
*/
-public class OnapService {
+public class OnapCommandHttpService {
/*
* Oclip Service name like aai.
*/
@@ -41,9 +41,9 @@ public class OnapService {
* Another mode is 'direct', in which bastPath will be
* same as OnapCredentails.ServiceUrl.
*/
- private String mode = Constants.MODE_DIRECT;
+ private String mode = OnapCommandHttpConstants.MODE_DIRECT;
- private String authType = Constants.AUTH_NONE;
+ private String authType = OnapCommandHttpConstants.AUTH_NONE;
public String getMode() {
return mode;
@@ -54,7 +54,7 @@ public class OnapService {
}
public boolean isModeDirect() {
- return this.getMode().equals(Constants.MODE_DIRECT);
+ return this.getMode().equals(OnapCommandHttpConstants.MODE_DIRECT);
}
public String getAuthType() {
@@ -66,7 +66,7 @@ public class OnapService {
}
public boolean isNoAuth() {
- return this.authType.equalsIgnoreCase(Constants.AUTH_NONE);
+ return this.authType.equalsIgnoreCase(OnapCommandHttpConstants.AUTH_NONE);
}
public String getName() {
diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/BasicAuthLoginCommand.java b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/BasicAuthLoginCommand.java
index 28a86a9b..afab750d 100644
--- a/framework/src/main/java/org/onap/cli/fw/cmd/BasicAuthLoginCommand.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/BasicAuthLoginCommand.java
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-package org.onap.cli.fw.cmd;
+package org.onap.cli.fw.http.cmd;
import java.util.Map;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.impl.auth.BasicScheme;
-import org.onap.cli.fw.OnapCommandSchema;
-import org.onap.cli.fw.conf.Constants;
import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.http.conf.OnapCommandHttpConstants;
import org.onap.cli.fw.input.OnapCommandParameter;
+import org.onap.cli.fw.schema.OnapCommandSchema;
@OnapCommandSchema(schema = "basic-login.yaml")
public class BasicAuthLoginCommand extends OnapHttpCommand {
@@ -33,9 +33,9 @@ public class BasicAuthLoginCommand extends OnapHttpCommand {
//get the input arguments
Map<String, OnapCommandParameter> paramMap = getParametersMap();
- OnapCommandParameter usernameParam = paramMap.get(Constants.DEAFULT_PARAMETER_USERNAME);
+ OnapCommandParameter usernameParam = paramMap.get(OnapCommandHttpConstants.DEAFULT_PARAMETER_USERNAME);
String username = usernameParam.getValue().toString();
- OnapCommandParameter usernamePassword = paramMap.get(Constants.DEAFULT_PARAMETER_PASSWORD);
+ OnapCommandParameter usernamePassword = paramMap.get(OnapCommandHttpConstants.DEAFULT_PARAMETER_PASSWORD);
String password = usernamePassword.getValue().toString();
//Execute the command to get token
@@ -43,6 +43,6 @@ public class BasicAuthLoginCommand extends OnapHttpCommand {
username, password), "UTF-8", false).getValue();
//Fill out the result part
- this.getResult().getRecordsMap().get(Constants.AUTH_SERVICE_AUTHORIZATION).getValues().add(authToken);
+ this.getResult().getRecordsMap().get(OnapCommandHttpConstants.AUTH_SERVICE_AUTHORIZATION).getValues().add(authToken);
}
}
diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/BasicAuthLogoutCommand.java b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/BasicAuthLogoutCommand.java
index 553b28f8..6b54b3e0 100644
--- a/framework/src/main/java/org/onap/cli/fw/cmd/BasicAuthLogoutCommand.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/BasicAuthLogoutCommand.java
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-package org.onap.cli.fw.cmd;
+package org.onap.cli.fw.http.cmd;
-import org.onap.cli.fw.OnapCommandSchema;
import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.schema.OnapCommandSchema;
@OnapCommandSchema(schema = "basic-logout.yaml")
public class BasicAuthLogoutCommand extends OnapHttpCommand {
diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/CatalogCommand.java b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/CatalogCommand.java
index 34bf90c2..2393fe82 100644
--- a/framework/src/main/java/org/onap/cli/fw/cmd/CatalogCommand.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/CatalogCommand.java
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-package org.onap.cli.fw.cmd;
+package org.onap.cli.fw.http.cmd;
-import org.onap.cli.fw.OnapCommandSchema;
import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.schema.OnapCommandSchema;
@OnapCommandSchema(schema = "catalog.yaml")
public class CatalogCommand extends OnapHttpCommand {
diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/OnapHttpCommand.java b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java
index 892f367a..09ba7449 100644
--- a/framework/src/main/java/org/onap/cli/fw/cmd/OnapHttpCommand.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onap.cli.fw.cmd;
+package org.onap.cli.fw.http.cmd;
import java.io.IOException;
import java.util.ArrayList;
@@ -22,19 +22,22 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.OnapCommandSchema;
-import org.onap.cli.fw.ad.OnapAuthClient;
-import org.onap.cli.fw.ad.OnapService;
-import org.onap.cli.fw.conf.Constants;
-import org.onap.cli.fw.conf.OnapCommandConfg;
+import org.onap.cli.fw.cmd.OnapCommand;
+import org.onap.cli.fw.cmd.OnapCommandType;
+import org.onap.cli.fw.conf.OnapCommandConfig;
+import org.onap.cli.fw.conf.OnapCommandConstants;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandExecutionFailed;
-import org.onap.cli.fw.error.OnapCommandFailedMocoGenerate;
-import org.onap.cli.fw.http.HttpInput;
-import org.onap.cli.fw.http.HttpResult;
+import org.onap.cli.fw.http.auth.OnapCommandHttpAuthClient;
+import org.onap.cli.fw.http.auth.OnapCommandHttpService;
+import org.onap.cli.fw.http.conf.OnapCommandHttpConstants;
+import org.onap.cli.fw.http.connect.HttpInput;
+import org.onap.cli.fw.http.connect.HttpResult;
+import org.onap.cli.fw.http.error.OnapCommandFailedMocoGenerate;
+import org.onap.cli.fw.http.schema.OnapCommandSchemaHttpLoader;
+import org.onap.cli.fw.http.utils.OnapCommandHttpUtils;
import org.onap.cli.fw.output.OnapCommandResultAttribute;
-import org.onap.cli.fw.utils.OnapCommandSchemaLoaderUtils;
+import org.onap.cli.fw.schema.OnapCommandSchema;
import org.onap.cli.fw.utils.OnapCommandUtils;
import org.onap.cli.http.mock.MockJsonGenerator;
import org.onap.cli.http.mock.MockRequest;
@@ -44,7 +47,7 @@ import org.onap.cli.http.mock.MockResponse;
* Oclip http Command.
*
*/
-@OnapCommandSchema(type = Constants.HTTP_SCHEMA_PROFILE)
+@OnapCommandSchema(type = OnapCommandHttpConstants.HTTP_SCHEMA_PROFILE)
public class OnapHttpCommand extends OnapCommand {
private HttpInput input = new HttpInput();
@@ -53,9 +56,9 @@ public class OnapHttpCommand extends OnapCommand {
private Map<String, String> resultMap = new HashMap<>();
- protected OnapAuthClient authClient;
+ protected OnapCommandHttpAuthClient authClient;
- private OnapService oclipService = new OnapService();
+ private OnapCommandHttpService oclipService = new OnapCommandHttpService();
public void setInput(HttpInput input) {
this.input = input;
@@ -63,7 +66,7 @@ public class OnapHttpCommand extends OnapCommand {
@Override
public String getSchemaVersion() {
- return Constants.OPEN_CLI_SCHEMA_VERSION_VALUE_1_0;
+ return OnapCommandConstants.OPEN_CLI_SCHEMA_VERSION_VALUE_1_0;
}
public void setSuccessStatusCodes(List<Integer> successStatusCodes) {
@@ -89,27 +92,27 @@ public class OnapHttpCommand extends OnapCommand {
/*
* Oclip service, this command uses to execute it.
*/
- public OnapService getService() {
+ public OnapCommandHttpService getService() {
return this.oclipService;
}
- public void setService(OnapService service) {
+ public void setService(OnapCommandHttpService service) {
this.oclipService = service;
}
@Override
protected List<String> initializeProfileSchema() throws OnapCommandException {
- return OnapCommandSchemaLoaderUtils.loadHttpSchema(this, this.getSchemaName(), true, false);
+ return OnapCommandSchemaHttpLoader.loadHttpSchema(this, this.getSchemaName(), true, false);
}
@Override
protected void validate() throws OnapCommandException {
if (! this.isAuthRequired()) {
- if (this.getParametersMap().containsKey(Constants.DEAFULT_PARAMETER_USERNAME)) {
- this.getParametersMap().get(Constants.DEAFULT_PARAMETER_USERNAME).setOptional(true);
+ if (this.getParametersMap().containsKey(OnapCommandHttpConstants.DEAFULT_PARAMETER_USERNAME)) {
+ this.getParametersMap().get(OnapCommandHttpConstants.DEAFULT_PARAMETER_USERNAME).setOptional(true);
}
- if (this.getParametersMap().containsKey(Constants.DEAFULT_PARAMETER_PASSWORD)) {
- this.getParametersMap().get(Constants.DEAFULT_PARAMETER_PASSWORD).setOptional(true);
+ if (this.getParametersMap().containsKey(OnapCommandHttpConstants.DEAFULT_PARAMETER_PASSWORD)) {
+ this.getParametersMap().get(OnapCommandHttpConstants.DEAFULT_PARAMETER_PASSWORD).setOptional(true);
}
}
@@ -118,8 +121,8 @@ public class OnapHttpCommand extends OnapCommand {
private boolean isAuthRequired() {
return !this.getService().isNoAuth()
- && "false".equals(this.getParametersMap().get(Constants.DEFAULT_PARAMETER_NO_AUTH).getValue())
- && this.getInfo().getCommandType().equals(CommandType.CMD);
+ && "false".equals(this.getParametersMap().get(OnapCommandHttpConstants.DEFAULT_PARAMETER_NO_AUTH).getValue())
+ && this.getInfo().getCommandType().equals(OnapCommandType.CMD);
}
@Override
@@ -128,7 +131,7 @@ public class OnapHttpCommand extends OnapCommand {
// For auth/catalog type commands, login and logout logic is not required
boolean isAuthRequired = this.isAuthRequired();
- this.authClient = new OnapAuthClient(
+ this.authClient = new OnapCommandHttpAuthClient(
this,
this.getResult().isDebug());
@@ -155,7 +158,7 @@ public class OnapHttpCommand extends OnapCommand {
protected void processRequest() throws OnapCommandException {
- HttpInput httpInput = OnapCommandUtils.populateParameters(this.getParametersMap(), this.getInput());
+ HttpInput httpInput = OnapCommandHttpUtils.populateParameters(this.getParametersMap(), this.getInput());
httpInput.setUri(this.authClient.getServiceUrl() + httpInput.getUri());
HttpResult output = this.authClient.run(httpInput);
@@ -165,7 +168,7 @@ public class OnapHttpCommand extends OnapCommand {
throw new OnapCommandExecutionFailed(this.getName(), output.getBody(), output.getStatus());
}
- Map<String, ArrayList<String>> results = OnapCommandUtils.populateOutputs(this.getResultMap(), output);
+ Map<String, ArrayList<String>> results = OnapCommandHttpUtils.populateOutputs(this.getResultMap(), output);
results = OnapCommandUtils.populateOutputsFromInputParameters(results, this.getParametersMap());
for (OnapCommandResultAttribute attr : this.getResult().getRecords()) {
@@ -177,7 +180,7 @@ public class OnapHttpCommand extends OnapCommand {
private void generateJsonMock(HttpInput httpInput, HttpResult httpResult, String schemaName)
throws OnapCommandFailedMocoGenerate {
- if (OnapCommandConfg.isSampleGenerateEnabled()) {
+ if (Boolean.parseBoolean(OnapCommandConfig.getPropertyValue(OnapCommandConstants.SAMPLE_GEN_ENABLED))) {
try {
MockRequest mockRequest = new MockRequest();
mockRequest.setMethod(httpInput.getMethod());
@@ -189,7 +192,8 @@ public class OnapHttpCommand extends OnapCommand {
mockResponse.setStatus(httpResult.getStatus());
mockResponse.setJson(httpResult.getBody());
- MockJsonGenerator.generateMocking(mockRequest, mockResponse, OnapCommandConfg.getSampleGenerateTargetFolder()
+ MockJsonGenerator.generateMocking(mockRequest, mockResponse,
+ OnapCommandConfig.getPropertyValue(OnapCommandConstants.SAMPLE_GEN_TARGET_FOLDER)
+ "/" + schemaName.replace(".yaml", "") + "-moco.json");
} catch (IOException error) {
throw new OnapCommandFailedMocoGenerate(schemaName, error);
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/conf/OnapCommandHttpConstants.java b/profiles/http/src/main/java/org/onap/cli/fw/http/conf/OnapCommandHttpConstants.java
new file mode 100644
index 00000000..c33d2f27
--- /dev/null
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/conf/OnapCommandHttpConstants.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2017 Huawei Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.cli.fw.http.conf;
+
+/**
+ * OnapCommandHttpConstants.
+ *
+ */
+public class OnapCommandHttpConstants {
+ public static final String CONF = "open-cli-http.properties";
+ public static final String OPEN_IGNORE_AUTH = "cli.ignore_auth";
+ public static final String HTTP_API_KEY_USE_COOKIES = "cli.http.api_key_use_cookies";
+ public static final String HTTP_SECTIONS = "cli.schema.http_sections";
+ public static final String HTTP_MANDATORY_SECTIONS = "cli.schema.http_mandatory_sections";
+ public static final String HTTP_REQUEST_PARAMS = "cli.schema.http_request_params";
+ public static final String HTTP_REQUEST_MANDATORY_PARAMS = "cli.schema.http_request_mandatory_params";
+ public static final String HTTP_METHODS = "cli.schema.http_methods";
+ //http connection
+ public static final String SSLCONTEST_TLS = "TLSV1.2";
+ public static final String APPLICATION_JSON = "application/json";
+ public static final String DEFAULT_PARAMETER_HTTP_FILE_NAME = "default_input_parameters_http.yaml";
+ public static final String DEAFULT_PARAMETER_USERNAME = "host-username";
+ public static final String DEAFULT_PARAMETER_PASSWORD = "host-password";
+ public static final String DEAFULT_PARAMETER_HOST_URL = "host-url";
+ public static final String DEFAULT_PARAMETER_NO_AUTH = "no-auth";
+ public static final String HTTP_SCHEMA_PROFILE = "http";
+ //http
+ public static final String HTTP = "http";
+ public static final String METHOD = "method";
+ public static final String SERVICE = "service";
+ public static final String VERSION = "version";
+ public static final String BASE_PATH = "base_path";
+ public static final String AUTH = "auth";
+ public static final String AUTH_NONE = "none";
+ public static final String AUTH_BASIC = "basic";
+ public static final String MODE = "mode";
+ public static final String MODE_DIRECT = "direct";
+ public static final String MODE_CATALOG = "catalog";
+ public static final String REQUEST = "request";
+ public static final String URI = "uri";
+ public static final String BODY = "body";
+ public static final String METHOD_TYPE = "method";
+ public static final String POST = "post";
+ public static final String GET = "get";
+ public static final String DELETE = "delete";
+ public static final String PUT = "put";
+ public static final String HEAD = "delete";
+ public static final String HEADERS = "headers";
+ public static final String QUERIES = "queries";
+ public static final String COOKIES = "cookies";
+ public static final String SUCCESS_CODES = "success_codes";
+ public static final String RESULT_MAP = "result_map";
+ public static final String SAMPLE_RESPONSE = "sample_response";
+ public static final String MULTIPART_ENTITY_NAME = "multipart_entity_name";
+ public static final String HTTP_SECTION_EMPTY = "Http Section cann't be null or empty";
+ public static final String HTTP_BODY_SECTION_EMPTY = "http body section under 'request:' cann't be null or empty";
+ public static final String HTTP_BODY_FAILED_PARSING = "The http body json is failed to parse";
+ public static final String HTTP_BODY_JSON_EMPTY = "The http body json cann't be null or empty";
+ public static final String HTTP_SUCCESS_CODE_INVALID = "Invalid http success code.";
+ public static final String HTTP_SAMPLE_RESPONSE_EMPTY = "Sample response cann't be null or empty";
+ public static final String HTTP_SAMPLE_RESPONSE_FAILED_PARSING = "The http Sample response json is failed to parse.";
+ //auth plugin
+ public static final String AUTH_SERVICE_AUTHORIZATION = "Authorization";
+ //catalog plugin
+ public static final String CATALOG_SERVICE_NAME = "catalog-service-name";
+ public static final String CATALOG_SERVICE_VERSION = "catalog-service-version";
+ public static final String CATALOG_SERVICE_BASE_PATH = "catalog-service-base-path";
+ public static final String CATALOG_SERVICE_HOST_URL = "catalog-service-host-url";
+
+ public static final String AUTH_VALUES = "cli.schema.auth_values";
+ public static final String MODE_VALUES = "cli.schema.mode_values";
+ public static final String SERVICE_PARAMS_LIST = "cli.schema.service_params_list";
+ public static final String SERVICE_PARAMS_MANDATORY_LIST = "cli.schema.service_params_mandatory_list";
+}
+
+
diff --git a/framework/src/main/java/org/onap/cli/fw/http/HttpInput.java b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/HttpInput.java
index 69439bd4..722dd12e 100644
--- a/framework/src/main/java/org/onap/cli/fw/http/HttpInput.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/HttpInput.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onap.cli.fw.http;
+package org.onap.cli.fw.http.connect;
import java.util.HashMap;
import java.util.Map;
diff --git a/framework/src/main/java/org/onap/cli/fw/http/HttpResult.java b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/HttpResult.java
index e000ee15..42c636c0 100644
--- a/framework/src/main/java/org/onap/cli/fw/http/HttpResult.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/HttpResult.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onap.cli.fw.http;
+package org.onap.cli.fw.http.connect;
import java.util.HashMap;
import java.util.Map;
diff --git a/framework/src/main/java/org/onap/cli/fw/http/OnapHttpConnection.java b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java
index 6fdf7046..a5a75e11 100644
--- a/framework/src/main/java/org/onap/cli/fw/http/OnapHttpConnection.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onap.cli.fw.http;
+package org.onap.cli.fw.http.connect;
import java.io.File;
import java.io.IOException;
@@ -63,8 +63,8 @@ import org.apache.http.impl.cookie.BasicClientCookie;
import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.EntityUtils;
-import org.onap.cli.fw.conf.Constants;
-import org.onap.cli.fw.error.OnapCommandHttpFailure;
+import org.onap.cli.fw.http.conf.OnapCommandHttpConstants;
+import org.onap.cli.fw.http.error.OnapCommandHttpFailure;
/**
* Helps to make http connection.<br>
@@ -110,10 +110,10 @@ public class OnapHttpConnection {
}
private void initHttpClient(boolean isSecured) throws OnapCommandHttpFailure {
- if (this.httpClient == null) {
+ if (this.httpClient == null) {
try {
if (isSecured) {
- SSLContext sslContext = SSLContext.getInstance(Constants.SSLCONTEST_TLS);
+ SSLContext sslContext = SSLContext.getInstance(OnapCommandHttpConstants.SSLCONTEST_TLS);
sslContext.init(null, new TrustManager[] { new TrustAllX509TrustManager() },
new java.security.SecureRandom());
X509HostnameVerifier hostnameVerifier = new AllowAllHostnameVerifier();
@@ -130,9 +130,9 @@ public class OnapHttpConnection {
} catch (Exception e) {
throw new OnapCommandHttpFailure(e);
}
- }
+ }
}
-
+
public String getDebugInfo() {
return this.debugDetails;
}
@@ -227,9 +227,9 @@ public class OnapHttpConnection {
private void addCommonHeaders(HttpInput input) {
if (!input.isBinaryData()) {
- input.getReqHeaders().put("Content-Type", Constants.APPLICATION_JSON);
+ input.getReqHeaders().put("Content-Type", OnapCommandHttpConstants.APPLICATION_JSON);
}
- input.getReqHeaders().put("Accept", Constants.APPLICATION_JSON);
+ input.getReqHeaders().put("Accept", OnapCommandHttpConstants.APPLICATION_JSON);
for (String headerName : this.mapCommonHeaders.keySet()) {
input.getReqHeaders().put(headerName, this.mapCommonHeaders.get(headerName));
@@ -315,9 +315,9 @@ public class OnapHttpConnection {
updateInputFromCookies(input, cookieStore);
HttpContext localContext = new BasicHttpContext();
localContext.setAttribute(ClientContext.COOKIE_STORE, cookieStore);
-
+
this.initHttpClient(input.getUri().startsWith("https"));
-
+
HttpResponse resp = this.httpClient.execute(requestBase, localContext);
String respContent = this.getResponseBody(resp);
result.setBody(respContent);
diff --git a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandFailedMocoGenerate.java b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandFailedMocoGenerate.java
index 37e8fb35..12a645c4 100644
--- a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandFailedMocoGenerate.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandFailedMocoGenerate.java
@@ -14,7 +14,9 @@
* limitations under the License.
*/
-package org.onap.cli.fw.error;
+package org.onap.cli.fw.http.error;
+
+import org.onap.cli.fw.error.OnapCommandException;
/**
* Invalid data for generating moco json .
diff --git a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandHttpFailure.java b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandHttpFailure.java
index bec8dd0b..f40ebf45 100644
--- a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandHttpFailure.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandHttpFailure.java
@@ -14,7 +14,9 @@
* limitations under the License.
*/
-package org.onap.cli.fw.error;
+package org.onap.cli.fw.http.error;
+
+import org.onap.cli.fw.error.OnapCommandException;
/**
* Command execution failed.
diff --git a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandHttpHeaderNotFound.java b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandHttpHeaderNotFound.java
index 58fcdfd9..27330fcb 100644
--- a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandHttpHeaderNotFound.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandHttpHeaderNotFound.java
@@ -14,7 +14,9 @@
* limitations under the License.
*/
-package org.onap.cli.fw.error;
+package org.onap.cli.fw.http.error;
+
+import org.onap.cli.fw.error.OnapCommandException;
/**
* OnapCommandParameterNotFound.
diff --git a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandHttpInvalidResponseBody.java b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandHttpInvalidResponseBody.java
index 3e98d07d..90527250 100644
--- a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandHttpInvalidResponseBody.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandHttpInvalidResponseBody.java
@@ -14,7 +14,9 @@
* limitations under the License.
*/
-package org.onap.cli.fw.error;
+package org.onap.cli.fw.http.error;
+
+import org.onap.cli.fw.error.OnapCommandException;
/**
* OnapCommandParameterNotFound.
diff --git a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandHttpInvalidResultMap.java b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandHttpInvalidResultMap.java
index 9303c6b2..ae1a113f 100644
--- a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandHttpInvalidResultMap.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandHttpInvalidResultMap.java
@@ -14,10 +14,12 @@
* limitations under the License.
*/
-package org.onap.cli.fw.error;
+package org.onap.cli.fw.http.error;
import java.util.List;
+import org.onap.cli.fw.error.OnapCommandException;
+
/**
* Invalid result map in HTTP section.
*
diff --git a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandLoginFailed.java b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandLoginFailed.java
index e9c82259..0701dbf2 100644
--- a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandLoginFailed.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandLoginFailed.java
@@ -14,7 +14,9 @@
* limitations under the License.
*/
-package org.onap.cli.fw.error;
+package org.onap.cli.fw.http.error;
+
+import org.onap.cli.fw.error.OnapCommandException;
/**
* Login failed.
diff --git a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandLogoutFailed.java b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandLogoutFailed.java
index df879021..53a58a25 100644
--- a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandLogoutFailed.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandLogoutFailed.java
@@ -14,7 +14,9 @@
* limitations under the License.
*/
-package org.onap.cli.fw.error;
+package org.onap.cli.fw.http.error;
+
+import org.onap.cli.fw.error.OnapCommandException;
/**
* Logout failed.
diff --git a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandServiceNotFound.java b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandServiceNotFound.java
index 9cc0e45f..30833019 100644
--- a/framework/src/main/java/org/onap/cli/fw/error/OnapCommandServiceNotFound.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/error/OnapCommandServiceNotFound.java
@@ -14,7 +14,9 @@
* limitations under the License.
*/
-package org.onap.cli.fw.error;
+package org.onap.cli.fw.http.error;
+
+import org.onap.cli.fw.error.OnapCommandException;
/**
* Command not registered in MSB.
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java b/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
new file mode 100644
index 00000000..a7424732
--- /dev/null
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
@@ -0,0 +1,427 @@
+/*
+ * Copyright 2017 Huawei Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.cli.fw.http.schema;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import org.onap.cli.fw.cmd.OnapCommand;
+import org.onap.cli.fw.conf.OnapCommandConfig;
+import org.onap.cli.fw.conf.OnapCommandConstants;
+import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.error.OnapCommandInvalidSchema;
+import org.onap.cli.fw.error.OnapCommandNotFound;
+import org.onap.cli.fw.http.auth.OnapCommandHttpService;
+import org.onap.cli.fw.http.cmd.OnapHttpCommand;
+import org.onap.cli.fw.http.conf.OnapCommandHttpConstants;
+import org.onap.cli.fw.http.error.OnapCommandHttpInvalidResultMap;
+import org.onap.cli.fw.registrar.OnapCommandRegistrar;
+import org.onap.cli.fw.schema.OnapCommandSchemaLoader;
+import org.onap.cli.fw.utils.OnapCommandUtils;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import net.minidev.json.JSONObject;
+
+public class OnapCommandSchemaHttpLoader {
+
+ public static List<String> loadHttpSchema(OnapHttpCommand cmd, String schemaName, boolean includeDefault,
+ boolean validateSchema) throws OnapCommandException {
+ try {
+ List<String> errors = new ArrayList<>();
+ if (includeDefault) {
+ Map<String, ?> defaultParameterMap = includeDefault ?
+ OnapCommandSchemaLoader.validateSchemaVersion(OnapCommandHttpConstants.DEFAULT_PARAMETER_HTTP_FILE_NAME, cmd.getSchemaVersion()) : new HashMap<>();
+
+ //mrkanag default_parameter is supported only for parameters.
+ if (defaultParameterMap.containsKey(OnapCommandConstants.INFO)) {
+ defaultParameterMap.remove(OnapCommandConstants.INFO);
+ }
+
+ errors.addAll(OnapCommandSchemaLoader.parseSchema(cmd, defaultParameterMap, validateSchema));
+ }
+
+ Map<String, List<Map<String, String>>> commandYamlMap =
+ (Map<String, List<Map<String, String>>>)OnapCommandSchemaLoader.validateSchemaVersion(schemaName, cmd.getSchemaVersion());
+
+ errors.addAll(parseHttpSchema(cmd, commandYamlMap, validateSchema));
+
+ return errors;
+
+ } catch (OnapCommandException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new OnapCommandInvalidSchema(schemaName, e);
+ }
+ }
+
+ /**
+ * Load the schema.
+ *
+ * @param cmd
+ * OnapHttpCommand
+ * @param schemaName
+ * schema name
+ * @throws OnapCommandException
+ * on error
+ */
+ static ArrayList<String> parseHttpSchema(OnapHttpCommand cmd,
+ final Map<String, ?> values,
+ boolean validate) throws OnapCommandException {
+ ArrayList<String> errorList = new ArrayList<>();
+ try {
+ Map<String, ?> valMap = (Map<String, ?>) values.get(OnapCommandHttpConstants.HTTP);
+
+ if (valMap != null) {
+ if (validate) {
+ OnapCommandUtils.validateTags(errorList, valMap, OnapCommandConfig.getCommaSeparatedList(OnapCommandHttpConstants.HTTP_SECTIONS),
+ OnapCommandConfig.getCommaSeparatedList(OnapCommandHttpConstants.HTTP_MANDATORY_SECTIONS), OnapCommandConstants.PARAMETERS);
+ errorList.addAll(validateHttpSchemaSection(values));
+ }
+ for (Map.Entry<String, ?> entry1 : valMap.entrySet()) {
+ String key1 = entry1.getKey();
+
+ switch (key1) {
+ case OnapCommandHttpConstants.REQUEST:
+ Map<String, ?> map = (Map<String, ?>) valMap.get(key1);
+
+ for (Map.Entry<String, ?> entry2 : map.entrySet()) {
+ try {
+ String key2 = entry2.getKey();
+
+ switch (key2) {
+ case OnapCommandHttpConstants.URI:
+ Object obj = map.get(key2);
+ cmd.getInput().setUri(obj.toString());
+ break;
+ case OnapCommandHttpConstants.METHOD_TYPE:
+ Object method = map.get(key2);
+ cmd.getInput().setMethod(method.toString());
+ break;
+ case OnapCommandHttpConstants.BODY:
+ Object body = map.get(key2);
+ cmd.getInput().setBody(body.toString());
+ break;
+ case OnapCommandHttpConstants.HEADERS:
+ Map<String, String> head = (Map<String, String>) map.get(key2);
+ cmd.getInput().setReqHeaders(head);
+ break;
+ case OnapCommandHttpConstants.QUERIES:
+ Map<String, String> query = (Map<String, String>) map.get(key2);
+
+ cmd.getInput().setReqQueries(query);
+ break;
+ case OnapCommandHttpConstants.MULTIPART_ENTITY_NAME:
+ Object multipartEntityName = map.get(key2);
+ cmd.getInput().setMultipartEntityName(multipartEntityName.toString());
+ break;
+ }
+ }catch (Exception ex) {
+ OnapCommandUtils.throwOrCollect(new OnapCommandInvalidSchema(cmd.getSchemaName(), ex), errorList, validate);
+ }
+ }
+ break;
+
+ case OnapCommandHttpConstants.SERVICE:
+ Map<String, String> serviceMap = (Map<String, String>) valMap.get(key1);
+
+ if (serviceMap != null) {
+ if (validate) {
+ OnapCommandUtils.validateTags(errorList, (Map<String, Object>) valMap.get(key1),
+ OnapCommandConfig.getCommaSeparatedList(OnapCommandHttpConstants.SERVICE_PARAMS_LIST),
+ OnapCommandConfig.getCommaSeparatedList(OnapCommandHttpConstants.SERVICE_PARAMS_MANDATORY_LIST), OnapCommandHttpConstants.SERVICE);
+
+ HashMap<String, String> validationMap = new HashMap<>();
+ validationMap.put(OnapCommandHttpConstants.AUTH, OnapCommandHttpConstants.AUTH_VALUES);
+ validationMap.put(OnapCommandHttpConstants.MODE, OnapCommandHttpConstants.MODE_VALUES);
+
+ for (String secKey : validationMap.keySet()) {
+ if (serviceMap.containsKey(secKey)) {
+ Object obj = serviceMap.get(secKey);
+ if (obj == null) {
+ errorList.add("Attribute '" + secKey + "' under '" + OnapCommandHttpConstants.SERVICE + "' is empty");
+ } else {
+ String value = String.valueOf(obj);
+ if (!OnapCommandConfig.getCommaSeparatedList(validationMap.get(secKey)).contains(value)) {
+ errorList.add("Attribute '" + secKey + "' contains invalid value. Valide values are "
+ + OnapCommandConfig.getCommaSeparatedList(validationMap.get(key1))); //
+ }
+ }
+ }
+ }
+ }
+
+ OnapCommandHttpService srv = new OnapCommandHttpService();
+
+ for (Map.Entry<String, String> entry : serviceMap.entrySet()) {
+ String key = entry.getKey();
+
+ switch (key) {
+ case OnapCommandConstants.NAME:
+ srv.setName(serviceMap.get(key));
+ break;
+
+ case OnapCommandHttpConstants.VERSION:
+ srv.setVersion(serviceMap.get(key).toString());
+ break;
+
+ case OnapCommandHttpConstants.AUTH:
+ Object obj = serviceMap.get(key);
+ srv.setAuthType(obj.toString());
+
+ //On None type, username, password and no_auth are invalid
+ if (srv.isNoAuth()) {
+ cmd.getParametersMap().get(OnapCommandHttpConstants.DEAFULT_PARAMETER_USERNAME).setInclude(false);
+ cmd.getParametersMap().get(OnapCommandHttpConstants.DEAFULT_PARAMETER_PASSWORD).setInclude(false);
+ cmd.getParametersMap().get(OnapCommandHttpConstants.DEFAULT_PARAMETER_NO_AUTH).setInclude(false);
+ }
+ break;
+
+ //mrkanag: from auth command, add the parameters to the command's parameters list
+
+ case OnapCommandHttpConstants.MODE:
+ Object mode = serviceMap.get(key);
+ srv.setMode(mode.toString());
+ break;
+ }
+ }
+ cmd.setService(srv);
+ }
+ break;
+
+ case OnapCommandHttpConstants.SUCCESS_CODES:
+ if (validate) {
+ validateHttpSccessCodes(errorList, (List<Object>) valMap.get(key1));
+ }
+ cmd.setSuccessStatusCodes((ArrayList) valMap.get(key1));
+ break;
+
+ case OnapCommandHttpConstants.RESULT_MAP:
+ if (validate) {
+ validateHttpResultMap(errorList, values);
+ }
+ cmd.setResultMap((Map<String, String>) valMap.get(key1));
+ break;
+
+ case OnapCommandHttpConstants.SAMPLE_RESPONSE:
+ // (mrkanag) implement sample response handling
+ break;
+ }
+ }
+ }
+ }catch (OnapCommandException e) {
+ OnapCommandUtils.throwOrCollect(e, errorList, validate);
+ }
+
+ //Handle the parameters for auth
+ if (!cmd.getService().isNoAuth()) {
+ OnapCommand login = OnapCommandSchemaHttpLoader.findAuthCommand(cmd, "login");
+ OnapCommandUtils.copyParamSchemasFrom(login, cmd);
+ }
+
+ return errorList;
+ }
+
+ public static ArrayList<String> validateHttpSchemaSection(Map<String, ?> values) {
+ ArrayList<String> errorList = new ArrayList<>();
+ Map<String, ?> map = (Map<String, ?>) values.get(OnapCommandHttpConstants.HTTP);
+ Map<String, Object> requestMap = (Map<String, Object>) map.get(OnapCommandHttpConstants.REQUEST);
+
+ if (requestMap != null && !requestMap.isEmpty()) {
+ OnapCommandUtils.validateTags(errorList, requestMap, OnapCommandConfig.getCommaSeparatedList(OnapCommandHttpConstants.HTTP_REQUEST_PARAMS),
+ OnapCommandConfig.getCommaSeparatedList(OnapCommandHttpConstants.HTTP_REQUEST_MANDATORY_PARAMS), OnapCommandHttpConstants.REQUEST);
+ String method = (String) requestMap.get(OnapCommandHttpConstants.METHOD);
+ if (method != null && !method.isEmpty()) {
+ if (!OnapCommandConfig.getCommaSeparatedList(OnapCommandHttpConstants.HTTP_METHODS).contains(method.toLowerCase())) {
+ errorList.add("Attribute '" + OnapCommandHttpConstants.METHOD + "' under '" + OnapCommandHttpConstants.REQUEST + "' is invalid, correct types are "
+ + OnapCommandConfig.getCommaSeparatedList(OnapCommandHttpConstants.HTTP_METHODS).toString());
+ }
+ } else {
+ errorList.add("Http request method cann't be null or empty");
+ }
+
+ Set<String> requestParams = getRequestParams(values);
+
+ Set<String> uriParams = validateHttpUri(errorList, requestMap);
+
+ Set<String> bodyParams = validateHttpBody(errorList, requestMap);
+
+ Set<String> headerParams = validateHttpHeaders(requestMap);
+
+ Set<String> queryParams = validateHttpQueries(requestMap);
+
+ HashSet<String> totoalParams = new HashSet<>(uriParams);
+ totoalParams.addAll(bodyParams);
+ totoalParams.addAll(headerParams);
+ totoalParams.addAll(queryParams);
+
+ List<String> nonDeclaredParams = totoalParams.stream().filter(param -> !requestParams.contains(param))
+ .collect(Collectors.toList());
+
+ nonDeclaredParams.stream().forEach(p -> errorList.add("The parameter '" + p
+ + "' declared under 'parameters:' section is not mapped into request section."));
+ } else {
+ errorList.add(OnapCommandUtils.emptySection(OnapCommandHttpConstants.REQUEST));
+ }
+ return errorList;
+ }
+
+ public static void validateHttpSccessCodes(List<String> errorList, List<Object> requestSuccessCodes) {
+
+ if (requestSuccessCodes == null || requestSuccessCodes.isEmpty()) {
+ errorList.add(OnapCommandHttpConstants.HTTP_SUCCESS_CODE_INVALID);
+ return;
+ }
+
+ for (Object successCode : requestSuccessCodes) {
+ Integer code = (Integer) successCode;
+ if (code < 200 || code >= 300) {
+ if ( code != 404) {
+ errorList.add(OnapCommandHttpConstants.HTTP_SUCCESS_CODE_INVALID);
+ }
+ }
+ }
+
+ }
+
+ public static void validateHttpResultMap(List<String> errorList, Map<String, ?> values) throws OnapCommandException {
+ Map<String, ?> valMap = (Map<String, ?>) values.get(OnapCommandHttpConstants.HTTP);
+ List<Map<String, String>> attributes = (List<Map<String, String>>) ((Map<String, ?>)values.get(OnapCommandConstants.RESULTS)).get(OnapCommandConstants.ATTRIBUTES);
+ Set<String> resultMapParams = ((Map<String, String>) valMap.get(OnapCommandHttpConstants.RESULT_MAP)).keySet();
+
+ Set<String> resultAttNames = attributes.stream().map(map -> map.get(OnapCommandConstants.NAME))
+ .collect(Collectors.toSet());
+
+ List<String> invaliResultMapParams = resultMapParams.stream()
+ .filter(p -> !resultAttNames.contains(p)).collect(Collectors.toList());
+
+ if (!invaliResultMapParams.isEmpty()) {
+ OnapCommandUtils.throwOrCollect(new OnapCommandHttpInvalidResultMap(invaliResultMapParams), errorList, true);
+ }
+ }
+
+ public static Set<String> validateHttpQueries(Map<String, Object> requestMap) {
+ Map<String, Object> queries = (Map<String, Object>) requestMap.get(OnapCommandHttpConstants.QUERIES);
+ Set<String> queryParamNames = new HashSet<>();
+ if (queries != null) {
+ for (Entry<String, Object> entry : queries.entrySet()) {
+ OnapCommandUtils.parseParameters(String.valueOf(entry.getValue()), queryParamNames);
+ }
+ }
+ return queryParamNames;
+ }
+
+ public static Set<String> validateHttpHeaders(Map<String, Object> requestMap) {
+
+ Map<String, Object> headers = (Map<String, Object>) requestMap.get(OnapCommandHttpConstants.HEADERS);
+ Set<String> headerParamNames = new HashSet<>();
+ if (headers != null) {
+ for (Entry<String, Object> entry : headers.entrySet()) {
+ OnapCommandUtils.parseParameters(String.valueOf(entry.getValue()), headerParamNames);
+ }
+ }
+ return headerParamNames;
+ }
+
+ public static Set<String> validateHttpBody(List<String> errorList, Map<String, Object> requestMap) {
+ Set<String> bodyParamNames = new HashSet<>();
+ Object bodyString = requestMap.get(OnapCommandHttpConstants.BODY);
+ if (bodyString == null) {
+ return bodyParamNames;
+ }
+
+ String body = String.valueOf(bodyString);
+ JSONObject obj = null;
+ try {
+ obj = new ObjectMapper().readValue(body, JSONObject.class);
+ } catch (IOException e1) { // NOSONAR
+ errorList.add(OnapCommandHttpConstants.HTTP_BODY_FAILED_PARSING);
+ }
+ if (obj == null || "".equals(obj.toString())) {
+ errorList.add(OnapCommandHttpConstants.HTTP_BODY_JSON_EMPTY);
+ }
+ OnapCommandUtils.parseParameters(body, bodyParamNames);
+
+ return bodyParamNames;
+ }
+
+ public static Set<String> validateHttpUri(List<String> errorList, Map<String, Object> requestMap) {
+ Set<String> uriParamNames = new HashSet<>();
+ String uri = (String) requestMap.get(OnapCommandHttpConstants.URI);
+ if (uri == null || uri.isEmpty()) {
+ errorList.add(OnapCommandUtils.emptySection(OnapCommandHttpConstants.URI));
+ return uriParamNames;
+ }
+ OnapCommandUtils.parseParameters(uri, uriParamNames);
+ return uriParamNames;
+ }
+
+ public static Set<String> getRequestParams(Map<String, ?> yamlMap) {
+
+ Set<String> set = new HashSet<>();
+
+ @SuppressWarnings("unchecked")
+ List<Map<String, Object>> inputParams = (List<Map<String, Object>>) yamlMap.get(OnapCommandConstants.PARAMETERS);
+
+ if (inputParams != null) {
+ for (Map<String, Object> map : inputParams) {
+ for (Entry<String, Object> entry : map.entrySet()) {
+ Object key = entry.getKey();
+
+ if (OnapCommandConstants.NAME.equals(key)) {
+ set.add(String.valueOf(entry.getValue()));
+ break;
+ }
+ }
+ }
+ }
+
+ return set;
+ }
+
+ /**
+ *
+ * @param authAction login/logout
+ * @return
+ * @throws OnapCommandException
+ */
+ public static OnapCommand findAuthCommand(OnapHttpCommand forCmd, String authAction) throws OnapCommandException {
+ OnapCommand auth = null;
+ try {
+ //mrkanag: fix this to discover the auth command by matching info->product & service
+ auth = OnapCommandRegistrar.getRegistrar().get(
+ forCmd.getInfo().getService() + "-" +
+ forCmd.getService().getAuthType() + "-" + authAction,
+ forCmd.getInfo().getProduct());
+ } catch (OnapCommandNotFound e) {
+ auth = OnapCommandRegistrar.getRegistrar().get(
+ forCmd.getService().getAuthType() + "-" + authAction,
+ forCmd.getInfo().getProduct());
+ }
+
+ return auth;
+ }
+
+
+}
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java b/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java
new file mode 100644
index 00000000..e4d2cf06
--- /dev/null
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java
@@ -0,0 +1,233 @@
+/*
+ * Copyright 2017 Huawei Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.cli.fw.http.utils;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.error.OnapCommandInvalidParameterValue;
+import org.onap.cli.fw.error.OnapCommandParameterNotFound;
+import org.onap.cli.fw.error.OnapCommandResultEmpty;
+import org.onap.cli.fw.error.OnapCommandResultMapProcessingFailed;
+import org.onap.cli.fw.http.connect.HttpInput;
+import org.onap.cli.fw.http.connect.HttpResult;
+import org.onap.cli.fw.http.error.OnapCommandHttpHeaderNotFound;
+import org.onap.cli.fw.http.error.OnapCommandHttpInvalidResponseBody;
+import org.onap.cli.fw.input.OnapCommandParameter;
+import org.onap.cli.fw.input.OnapCommandParameterType;
+import org.onap.cli.fw.utils.OnapCommandUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.jayway.jsonpath.JsonPath;
+
+import net.minidev.json.JSONArray;
+
+public class OnapCommandHttpUtils {
+
+ static Logger LOG = LoggerFactory.getLogger(OnapCommandHttpUtils.class);
+
+ /**
+ * Set argument to param value.
+ *
+ * @param params
+ * map
+ * @param input
+ * HttpInput
+ * @return HttpInput
+ * @throws OnapCommandParameterNotFound
+ * exception
+ * @throws OnapCommandInvalidParameterValue
+ * exception
+ */
+ public static HttpInput populateParameters(Map<String, OnapCommandParameter> params, HttpInput input)
+ throws OnapCommandException {
+ HttpInput inp = new HttpInput();
+ for (OnapCommandParameter param : params.values()) {
+ if (OnapCommandParameterType.BINARY.equals(param.getParameterType())) {
+ inp.setBinaryData(true);
+ break;
+ }
+ }
+ inp.setBody(OnapCommandUtils.replaceLineFromInputParameters(input.getBody(), params));
+ inp.setUri(OnapCommandUtils.replaceLineFromInputParameters(input.getUri(), params));
+ inp.setMethod(input.getMethod().toLowerCase());
+ for (String h : input.getReqHeaders().keySet()) {
+ String value = input.getReqHeaders().get(h);
+ inp.getReqHeaders().put(h, OnapCommandUtils.replaceLineFromInputParameters(value, params));
+ }
+
+ for (String h : input.getReqQueries().keySet()) {
+ String value = input.getReqQueries().get(h);
+ inp.getReqQueries().put(h, OnapCommandUtils.replaceLineFromInputParameters(value, params));
+ }
+
+ return inp;
+ }
+
+ /**
+ * Populate result.
+ *
+ * @param resultMap
+ * map
+ * @param resultHttp
+ * HttpResult
+ * @return map
+ * @throws OnapCommandHttpHeaderNotFound
+ * header not found exception
+ * @throws OnapCommandHttpInvalidResponseBody
+ * invalid response body exception
+ * @throws OnapCommandResultMapProcessingFailed
+ * map processing failed exception
+ */
+ public static Map<String, ArrayList<String>> populateOutputs(Map<String, String> resultMap, HttpResult resultHttp)
+ throws OnapCommandException {
+ Map<String, ArrayList<String>> resultsProcessed = new HashMap<>();
+
+ for (Entry<String, String> entry : resultMap.entrySet()) {
+ String key = entry.getKey();
+ try {
+ resultsProcessed.put(key, OnapCommandHttpUtils.replaceLineFromOutputResults(resultMap.get(key), resultHttp));
+ } catch(OnapCommandResultEmpty e) {
+ // pass // NOSONAR
+ }
+ }
+
+ return resultsProcessed;
+ }
+
+ public static ArrayList<String> replaceLineFromOutputResults(String line, HttpResult resultHttp)
+ throws OnapCommandHttpHeaderNotFound, OnapCommandHttpInvalidResponseBody,
+ OnapCommandResultMapProcessingFailed, OnapCommandResultEmpty {
+ String headerProcessedLine = "";
+
+ ArrayList<String> result = new ArrayList<>();
+ if (!line.contains("$b{") && !line.contains("$h{")) {
+ result.add(line);
+ return result;
+ }
+
+ /**
+ * In case of empty response body [] or {}
+ **/
+ if (resultHttp.getBody().length() <= 2) {
+ return result;
+ }
+
+ /**
+ * Process headers macros : line: $h{abc}-$b{$.[*].xyz} , After processing line will be [abc's
+ * value]-$b{$.[*].xyz}
+ **/
+ int currentIdx = 0;
+ while (currentIdx < line.length()) {
+ int idxS = line.indexOf("$h{", currentIdx);
+ if (idxS == -1) {
+ headerProcessedLine += line.substring(currentIdx);
+ break;
+ }
+ int idxE = line.indexOf("}", idxS);
+ String headerName = line.substring(idxS + 3, idxE);
+ headerName = headerName.trim();
+ if (!resultHttp.getRespHeaders().containsKey(headerName)) {
+ throw new OnapCommandHttpHeaderNotFound(headerName);
+ }
+ String value = resultHttp.getRespHeaders().get(headerName);
+
+ headerProcessedLine += line.substring(currentIdx, idxS) + value;
+ currentIdx = idxE + 1;
+ }
+
+ // Process body jsonpath macros
+ List<Object> values = new ArrayList<>();
+ String bodyProcessedPattern = "";
+ currentIdx = 0;
+ int maxRows = 1; // in normal case, only one row will be there
+ while (currentIdx < headerProcessedLine.length()) {
+ int idxS = headerProcessedLine.indexOf("$b{", currentIdx);
+ if (idxS == -1) {
+ bodyProcessedPattern += headerProcessedLine.substring(currentIdx);
+ break;
+ }
+ int idxE = headerProcessedLine.indexOf("}", idxS);
+ String jsonPath = headerProcessedLine.substring(idxS + 3, idxE);
+ jsonPath = jsonPath.trim();
+ try {
+ // JSONArray or String
+ Object value = JsonPath.read(resultHttp.getBody(), jsonPath);
+ if (value instanceof JSONArray) {
+ JSONArray arr = (JSONArray) value;
+ if (arr.size() > maxRows) {
+ maxRows = arr.size();
+ }
+ }
+ bodyProcessedPattern += headerProcessedLine.substring(currentIdx, idxS) + "%s";
+ values.add(value);
+ currentIdx = idxE + 1;
+ } catch (Exception e) {
+ throw new OnapCommandHttpInvalidResponseBody(jsonPath, e);
+ }
+ }
+
+ if (bodyProcessedPattern.isEmpty()) {
+ result.add(headerProcessedLine);
+ return result;
+ } else {
+ for (int i = 0; i < maxRows; i++) {
+ currentIdx = 0;
+ String bodyProcessedLine = "";
+ int positionalIdx = 0; // %s positional idx
+ while (currentIdx < bodyProcessedPattern.length()) {
+ int idxS = bodyProcessedPattern.indexOf("%s", currentIdx);
+ if (idxS == -1) {
+ bodyProcessedLine += bodyProcessedPattern.substring(currentIdx);
+ break;
+ }
+ int idxE = idxS + 2; // %s
+ try {
+ Object value = values.get(positionalIdx);
+ String valueS = String.valueOf(value);
+ if (value instanceof JSONArray) {
+ JSONArray arr = (JSONArray) value;
+ if (!arr.isEmpty()) {
+ valueS = arr.get(i).toString();
+ } else {
+ throw new OnapCommandResultEmpty();
+ }
+ }
+
+ bodyProcessedLine += bodyProcessedPattern.substring(currentIdx, idxS) + valueS;
+ currentIdx = idxE;
+ positionalIdx++;
+ } catch (OnapCommandResultEmpty e) {
+ throw e;
+ } catch (Exception e) {
+ throw new OnapCommandResultMapProcessingFailed(line, e);
+ }
+ }
+ result.add(bodyProcessedLine);
+ }
+
+ return result;
+ }
+ }
+
+}
+
diff --git a/profiles/http/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand b/profiles/http/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
new file mode 100644
index 00000000..5ce19e66
--- /dev/null
+++ b/profiles/http/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
@@ -0,0 +1,4 @@
+org.onap.cli.fw.http.cmd.BasicAuthLoginCommand
+org.onap.cli.fw.http.cmd.BasicAuthLogoutCommand
+org.onap.cli.fw.http.cmd.CatalogCommand
+org.onap.cli.fw.http.cmd.OnapHttpCommand \ No newline at end of file
diff --git a/profiles/http/src/main/resources/open-cli-http.properties b/profiles/http/src/main/resources/open-cli-http.properties
new file mode 100644
index 00000000..caeb4a95
--- /dev/null
+++ b/profiles/http/src/main/resources/open-cli-http.properties
@@ -0,0 +1,18 @@
+cli.ignore_auth=false
+cli.http.api_key_use_cookies=true
+
+#schema validation
+#http
+cli.schema.http_sections=request,service,success_codes,result_map,sample_response
+cli.schema.http_mandatory_sections=request, success_codes
+
+cli.schema.http_request_params=uri,method,body,headers,queries,multipart_entity_name
+cli.schema.http_request_mandatory_params=uri,method
+
+cli.schema.service_params_list=name,version,auth,mode
+cli.schema.service_params_mandatory_list=auth,mode
+
+cli.schema.http_methods=post,get,delete,put,head
+
+cli.schema.auth_values=none,basic
+cli.schema.mode_values=direct,catalog
diff --git a/framework/src/main/resources/open-cli-schema/http/basic-login.yaml b/profiles/http/src/main/resources/open-cli-schema/http/basic-login.yaml
index 36473df7..36473df7 100644
--- a/framework/src/main/resources/open-cli-schema/http/basic-login.yaml
+++ b/profiles/http/src/main/resources/open-cli-schema/http/basic-login.yaml
diff --git a/framework/src/main/resources/open-cli-schema/http/basic-logout.yaml b/profiles/http/src/main/resources/open-cli-schema/http/basic-logout.yaml
index f4acc0ae..f4acc0ae 100644
--- a/framework/src/main/resources/open-cli-schema/http/basic-logout.yaml
+++ b/profiles/http/src/main/resources/open-cli-schema/http/basic-logout.yaml
diff --git a/framework/src/main/resources/open-cli-schema/http/catalog.yaml b/profiles/http/src/main/resources/open-cli-schema/http/catalog.yaml
index 508955f5..508955f5 100644
--- a/framework/src/main/resources/open-cli-schema/http/catalog.yaml
+++ b/profiles/http/src/main/resources/open-cli-schema/http/catalog.yaml
diff --git a/framework/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml b/profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml
index d7fbe03c..d7fbe03c 100644
--- a/framework/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml
+++ b/profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml
diff --git a/framework/src/test/java/org/onap/cli/fw/cmd/OnapHttpCommandTest.java b/profiles/http/src/test/java/org/onap/cli/fw/cmd/OnapHttpCommandTest.java
index 3fced8ab..bb318e1f 100644
--- a/framework/src/test/java/org/onap/cli/fw/cmd/OnapHttpCommandTest.java
+++ b/profiles/http/src/test/java/org/onap/cli/fw/cmd/OnapHttpCommandTest.java
@@ -16,44 +16,43 @@
package org.onap.cli.fw.cmd;
-import java.util.ArrayList;
import java.util.HashMap;
-import java.util.List;
+import java.util.HashSet;
+import java.util.Set;
-import org.junit.Ignore;
import org.junit.Test;
import org.onap.cli.fw.error.OnapCommandException;
-import org.onap.cli.fw.http.HttpInput;
+import org.onap.cli.fw.http.cmd.OnapHttpCommand;
+import org.onap.cli.fw.http.connect.HttpInput;
import org.onap.cli.fw.input.OnapCommandParameter;
-import org.onap.cli.fw.input.ParameterType;
+import org.onap.cli.fw.input.OnapCommandParameterType;
public class OnapHttpCommandTest {
- @Ignore
@Test(expected = OnapCommandException.class)
public void runTest() throws OnapCommandException {
OnapCommandParameter param1 = new OnapCommandParameter();
param1.setLongOption("host-username");
param1.setName("host-username");
- param1.setParameterType(ParameterType.STRING);
+ param1.setParameterType(OnapCommandParameterType.STRING);
OnapCommandParameter param2 = new OnapCommandParameter();
param2.setLongOption("host-password");
param2.setName("host-password");
- param2.setParameterType(ParameterType.STRING);
+ param2.setParameterType(OnapCommandParameterType.STRING);
OnapCommandParameter param3 = new OnapCommandParameter();
param3.setLongOption("host-url");
param3.setName("host-url");
- param3.setParameterType(ParameterType.STRING);
+ param3.setParameterType(OnapCommandParameterType.STRING);
OnapCommandParameter param4 = new OnapCommandParameter();
param4.setLongOption("string-param");
param4.setName("string-param");
- param4.setParameterType(ParameterType.STRING);
+ param4.setParameterType(OnapCommandParameterType.STRING);
OnapCommandParameter param5 = new OnapCommandParameter();
param5.setLongOption("long-opt");
param5.setName("long-opt");
- param5.setParameterType(ParameterType.STRING);
+ param5.setParameterType(OnapCommandParameterType.STRING);
- List<OnapCommandParameter> paramslist = new ArrayList<>();
+ Set<OnapCommandParameter> paramslist = new HashSet<>();
paramslist.add(param1);
paramslist.add(param2);
paramslist.add(param3);
diff --git a/framework/src/test/java/org/onap/cli/fw/http/HttpInputOutputTest.java b/profiles/http/src/test/java/org/onap/cli/fw/http/HttpInputOutputTest.java
index 0a3a817e..99ee3d34 100644
--- a/framework/src/test/java/org/onap/cli/fw/http/HttpInputOutputTest.java
+++ b/profiles/http/src/test/java/org/onap/cli/fw/http/HttpInputOutputTest.java
@@ -21,6 +21,8 @@ import static org.junit.Assert.assertTrue;
import java.util.HashMap;
import org.junit.Test;
+import org.onap.cli.fw.http.connect.HttpInput;
+import org.onap.cli.fw.http.connect.HttpResult;
public class HttpInputOutputTest {
diff --git a/framework/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java b/profiles/http/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java
index 785092c2..fe29936a 100644
--- a/framework/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java
+++ b/profiles/http/src/test/java/org/onap/cli/fw/http/OnapHttpConnectionTest.java
@@ -29,7 +29,10 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.protocol.HttpContext;
import org.junit.Before;
import org.junit.Test;
-import org.onap.cli.fw.error.OnapCommandHttpFailure;
+import org.onap.cli.fw.http.connect.HttpInput;
+import org.onap.cli.fw.http.connect.HttpResult;
+import org.onap.cli.fw.http.connect.OnapHttpConnection;
+import org.onap.cli.fw.http.error.OnapCommandHttpFailure;
import mockit.Invocation;
import mockit.Mock;
diff --git a/framework/src/test/java/org/onap/cli/fw/ad/OnapAuthClientCommandBasedTest.java b/profiles/http/src/test/java/org/onap/cli/fw/http/auth/OnapAuthClientCommandBasedTest.java
index 58b44f4a..d3059449 100644
--- a/framework/src/test/java/org/onap/cli/fw/ad/OnapAuthClientCommandBasedTest.java
+++ b/profiles/http/src/test/java/org/onap/cli/fw/http/auth/OnapAuthClientCommandBasedTest.java
@@ -14,48 +14,35 @@
* limitations under the License.
*/
-package org.onap.cli.fw.ad;
+package org.onap.cli.fw.http.auth;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.junit.Before;
import org.junit.Test;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.OnapCommandRegistrar;
-import org.onap.cli.fw.cmd.OnapHttpCommand;
-import org.onap.cli.fw.conf.Constants;
-import org.onap.cli.fw.conf.OnapCommandConfg;
+import org.onap.cli.fw.conf.OnapCommandConfig;
+import org.onap.cli.fw.conf.OnapCommandConstants;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandProductVersionInvalid;
+import org.onap.cli.fw.http.cmd.OnapHttpCommand;
+import org.onap.cli.fw.http.conf.OnapCommandHttpConstants;
+import org.onap.cli.fw.registrar.OnapCommandRegistrar;
public class OnapAuthClientCommandBasedTest {
@Before
public void setup() throws OnapCommandProductVersionInvalid, OnapCommandException {
- OnapCommandRegistrar.getRegistrar().setEnabledProductVersion(OnapCommandConfg.getProductName());
- }
-
- @Test
- public void internalCommandTest() {
- try {
- OnapCommand cmd = OnapCommandRegistrar.getRegistrar().get("sample-test");
- cmd.getInfo().setService(OnapCommandConfg.getProductName());
-
- cmd.execute();
- } catch (OnapCommandException e) {
- fail("Internal command failed to run");
- e.printStackTrace(System.out);
- }
+ OnapCommandRegistrar.getRegistrar().setEnabledProductVersion(OnapCommandConfig.getPropertyValue(OnapCommandConstants.OPEN_CLI_PRODUCT_NAME));
}
@Test
public void yesCatalogYesAuthTest() throws OnapCommandException {
try {
OnapHttpCommand cmd = getCommand("sample-test-schema-yes-auth-yes-catalog.yaml");
- cmd.getParametersMap().get(Constants.DEAFULT_PARAMETER_HOST_URL).setValue("http://localhost:8080");
- cmd.getParametersMap().get(Constants.DEAFULT_PARAMETER_USERNAME).setValue("test");
- cmd.getParametersMap().get(Constants.DEAFULT_PARAMETER_PASSWORD).setValue("password");
+ cmd.getParametersMap().get(OnapCommandHttpConstants.DEAFULT_PARAMETER_HOST_URL).setValue("http://localhost:8080");
+ cmd.getParametersMap().get(OnapCommandHttpConstants.DEAFULT_PARAMETER_USERNAME).setValue("test");
+ cmd.getParametersMap().get(OnapCommandHttpConstants.DEAFULT_PARAMETER_PASSWORD).setValue("password");
cmd.execute();
} catch (OnapCommandException e) {
@@ -68,7 +55,7 @@ public class OnapAuthClientCommandBasedTest {
public void yesCatalogNoAuthTest() throws OnapCommandException {
try {
OnapHttpCommand cmd = getCommand("sample-test-schema-no-auth-yes-catalog.yaml");
- cmd.getParametersMap().get(Constants.DEAFULT_PARAMETER_HOST_URL).setValue("http://localhost:8080");
+ cmd.getParametersMap().get(OnapCommandHttpConstants.DEAFULT_PARAMETER_HOST_URL).setValue("http://localhost:8080");
cmd.execute();
} catch (OnapCommandException e) {
@@ -81,9 +68,9 @@ public class OnapAuthClientCommandBasedTest {
public void noCatalogYesAuthTest() throws OnapCommandException {
try {
OnapHttpCommand cmd = getCommand("sample-test-schema-yes-auth-no-catalog.yaml");
- cmd.getParametersMap().get(Constants.DEAFULT_PARAMETER_HOST_URL).setValue("http://localhost:8080");
- cmd.getParametersMap().get(Constants.DEAFULT_PARAMETER_USERNAME).setValue("test");
- cmd.getParametersMap().get(Constants.DEAFULT_PARAMETER_PASSWORD).setValue("password");
+ cmd.getParametersMap().get(OnapCommandHttpConstants.DEAFULT_PARAMETER_HOST_URL).setValue("http://localhost:8080");
+ cmd.getParametersMap().get(OnapCommandHttpConstants.DEAFULT_PARAMETER_USERNAME).setValue("test");
+ cmd.getParametersMap().get(OnapCommandHttpConstants.DEAFULT_PARAMETER_PASSWORD).setValue("password");
cmd.execute();
} catch (OnapCommandException e) {
@@ -107,7 +94,7 @@ public class OnapAuthClientCommandBasedTest {
public void noCatalogNoAuthTest() throws OnapCommandException {
try {
OnapHttpCommand cmd = getCommand("sample-test-schema-no-auth-no-catalog.yaml");
- cmd.getParametersMap().get(Constants.DEAFULT_PARAMETER_HOST_URL).setValue("http://localhost:8080");
+ cmd.getParametersMap().get(OnapCommandHttpConstants.DEAFULT_PARAMETER_HOST_URL).setValue("http://localhost:8080");
cmd.execute();
} catch (OnapCommandException e) {
@@ -122,7 +109,7 @@ public class OnapAuthClientCommandBasedTest {
protected void processRequest() throws OnapCommandException {
if (!this.getService().isModeDirect()) {
String url = this.authClient.getServiceUrl();
- assert url.equals(this.getParametersMap().get(Constants.DEAFULT_PARAMETER_HOST_URL).getValue() + "/");
+ assert url.equals(this.getParametersMap().get(OnapCommandHttpConstants.DEAFULT_PARAMETER_HOST_URL).getValue() + "/");
}
}
};
diff --git a/framework/src/test/java/org/onap/cli/fw/ad/OnapServiceTest.java b/profiles/http/src/test/java/org/onap/cli/fw/http/auth/OnapServiceTest.java
index 9ceba67d..8501150e 100644
--- a/framework/src/test/java/org/onap/cli/fw/ad/OnapServiceTest.java
+++ b/profiles/http/src/test/java/org/onap/cli/fw/http/auth/OnapServiceTest.java
@@ -14,22 +14,22 @@
* limitations under the License.
*/
-package org.onap.cli.fw.ad;
+package org.onap.cli.fw.http.auth;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
-import org.onap.cli.fw.conf.Constants;
+import org.onap.cli.fw.http.conf.OnapCommandHttpConstants;
public class OnapServiceTest {
@Test
public void serviceTest() {
- OnapService ser = new OnapService();
+ OnapCommandHttpService ser = new OnapCommandHttpService();
ser.setName("name");
ser.setVersion("1.0");
ser.setBasePath("basePath");
- ser.setAuthType(Constants.AUTH_NONE);
+ ser.setAuthType(OnapCommandHttpConstants.AUTH_NONE);
assertTrue(ser.getName().equals("name") && ser.getVersion().equals("1.0")
&& ser.getBasePath().equals("basePath") && ser.isNoAuth());
diff --git a/profiles/http/src/test/java/org/onap/cli/fw/http/error/OnapCommandErrorTest.java b/profiles/http/src/test/java/org/onap/cli/fw/http/error/OnapCommandErrorTest.java
new file mode 100644
index 00000000..cd2131e9
--- /dev/null
+++ b/profiles/http/src/test/java/org/onap/cli/fw/http/error/OnapCommandErrorTest.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2017 Huawei Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.cli.fw.http.error;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.onap.cli.fw.error.OnapCommandResultMapProcessingFailed;
+
+public class OnapCommandErrorTest {
+ @Test
+ public void oclipCommandResultMapProcessingFailedTest() {
+ OnapCommandResultMapProcessingFailed failed = new OnapCommandResultMapProcessingFailed("name",
+ new Exception("failed"));
+ assertEquals("0x3002::Failed to parse the result format of command name, failed", failed.getMessage());
+ }
+
+ @Test
+ public void oclipCommandHttpHeaderNotFoundTest() {
+ OnapCommandHttpHeaderNotFound failed = new OnapCommandHttpHeaderNotFound("name");
+ assertEquals("0x3003::Http header name is not returned from the service", failed.getMessage());
+ }
+
+ @Test
+ public void oclipCommandHttpFailureTest1() {
+ OnapCommandHttpFailure failed = new OnapCommandHttpFailure("Failed");
+ assertEquals("0x3001::Failed", failed.getMessage());
+
+ failed = new OnapCommandHttpFailure(new Exception("failed"), 201);
+ assertEquals("201::0x3001::failed", failed.getMessage());
+ }
+
+ @Test
+ public void oclipCommandHttpFailureTest2() {
+ OnapCommandHttpFailure failed = new OnapCommandHttpFailure("Failed", 203);
+
+ assertEquals("203::0x3001::Failed", failed.getMessage());
+ }
+
+ @Test
+ public void oclipCommandLoginFailedTest1() {
+ OnapCommandLoginFailed failed = new OnapCommandLoginFailed(new Exception("Failed"));
+
+ assertEquals("0x4001::Login failed, Failed", failed.getMessage());
+ }
+
+ @Test
+ public void oclipCommandLoginFailedTest2() {
+ OnapCommandLoginFailed failed = new OnapCommandLoginFailed("Failed", 201);
+
+ assertEquals("201::0x4001::Login failed, Failed", failed.getMessage());
+ }
+
+ @Test
+ public void oclipCommandLogoutFailedTest() {
+ OnapCommandLogoutFailed failed = new OnapCommandLogoutFailed(new Exception("Failed"));
+ assertEquals("0x4002::Logout failed, Failed", failed.getMessage());
+
+ failed = new OnapCommandLogoutFailed(200);
+ assertEquals("200::0x4002::Logout failed", failed.getMessage());
+ }
+
+ @Test
+ public void oclipCommandServiceNotFoundTest() {
+ OnapCommandServiceNotFound failed = new OnapCommandServiceNotFound("Service");
+
+ assertEquals("0xd001::Service Service is not found in MSB", failed.getMessage());
+ }
+
+}
diff --git a/framework/src/test/java/org/onap/cli/fw/utils/OpenCommandRegistrarTest.java b/profiles/http/src/test/java/org/onap/cli/fw/http/schema/ValidateSchemaTest.java
index 648746ca..ddf30ba7 100644
--- a/framework/src/test/java/org/onap/cli/fw/utils/OpenCommandRegistrarTest.java
+++ b/profiles/http/src/test/java/org/onap/cli/fw/http/schema/ValidateSchemaTest.java
@@ -14,28 +14,26 @@
* limitations under the License.
*/
-package org.onap.cli.fw.utils;
+package org.onap.cli.fw.http.schema;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.cli.fw.OnapCommand;
-import org.onap.cli.fw.OnapCommandRegistrar;
-import org.onap.cli.fw.error.OnapCommandException;
-
-
-public class OpenCommandRegistrarTest {
+import static org.junit.Assert.assertTrue;
- @Before
- public void setUp() throws Exception {
+import java.util.List;
- }
+import org.junit.Test;
+import org.onap.cli.fw.cmd.OnapCommand;
+import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.schema.OnapCommandSchemaLoader;
+public class ValidateSchemaTest {
@Test
- public void test() throws OnapCommandException {
- OnapCommandRegistrar registrar = OnapCommandRegistrar.getRegistrar();
- OnapCommand cmd = registrar.get("sample-test");
- cmd.printVersion();
- registrar.listCommands();
+ public void validateTest() throws OnapCommandException {
+
+ OnapCommand cmd1 = new OnapCommand() {
+ @Override
+ protected void run() throws OnapCommandException {}
+ };
+ List<String> errorList1 = OnapCommandSchemaLoader.loadSchema(cmd1, "schema-validate-http.yaml", true, true);
+ assertTrue(errorList1.size() > 0);
}
-
}
diff --git a/profiles/http/src/test/java/org/onap/cli/fw/http/utils/OnapCommandUtilsTest.java b/profiles/http/src/test/java/org/onap/cli/fw/http/utils/OnapCommandUtilsTest.java
new file mode 100644
index 00000000..12920515
--- /dev/null
+++ b/profiles/http/src/test/java/org/onap/cli/fw/http/utils/OnapCommandUtilsTest.java
@@ -0,0 +1,139 @@
+/*
+ * Copyright 2017 Huawei Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.cli.fw.http.utils;
+
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.runners.MethodSorters;
+import org.onap.cli.fw.cmd.OnapCommand;
+import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.error.OnapCommandInvalidParameterType;
+import org.onap.cli.fw.error.OnapCommandInvalidPrintDirection;
+import org.onap.cli.fw.error.OnapCommandInvalidResultAttributeScope;
+import org.onap.cli.fw.error.OnapCommandInvalidSchema;
+import org.onap.cli.fw.error.OnapCommandInvalidSchemaVersion;
+import org.onap.cli.fw.error.OnapCommandParameterNameConflict;
+import org.onap.cli.fw.error.OnapCommandParameterOptionConflict;
+import org.onap.cli.fw.error.OnapCommandSchemaNotFound;
+import org.onap.cli.fw.http.cmd.OnapHttpCommand;
+import org.onap.cli.fw.http.connect.HttpResult;
+import org.onap.cli.fw.http.error.OnapCommandHttpHeaderNotFound;
+import org.onap.cli.fw.http.error.OnapCommandHttpInvalidResponseBody;
+import org.onap.cli.fw.http.schema.OnapCommandSchemaHttpLoader;
+import org.onap.cli.fw.input.OnapCommandParameter;
+import org.onap.cli.fw.schema.OnapCommandSchema;
+import org.onap.cli.fw.schema.OnapCommandSchemaLoader;
+import org.onap.cli.fw.utils.OnapCommandUtils;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class OnapCommandUtilsTest {
+
+ @Test(expected = OnapCommandInvalidSchema.class)
+ public void oclipCommandUtilsInputStreamNullTest() throws OnapCommandException {
+ OnapCommandSchemaLoader.validateSchemaVersion("sample-test1-schema-http1.yaml", "1.0");
+ }
+
+ @Test
+ public void oclipCommandUtilsInputStreamNotNullTest() throws OnapCommandException {
+ Map<String, ?> map = OnapCommandSchemaLoader.validateSchemaVersion("sample-test1-schema-http.yaml", "1.0");
+ assertTrue(map != null);
+ }
+
+ @Test
+ public void loadHttpBasedSchemaTest() throws OnapCommandException {
+ OnapHttpCommand cmd = new OnapHttpCommandSample();
+ cmd.setName("sample-create-http");
+ try {
+ OnapCommandSchemaHttpLoader.loadHttpSchema(cmd, "sample-test-schema-http.yaml", true, true);
+ assertTrue(cmd.getSuccessStatusCodes().size() == 2);
+ } catch (OnapCommandParameterNameConflict | OnapCommandParameterOptionConflict
+ | OnapCommandInvalidParameterType | OnapCommandInvalidPrintDirection
+ | OnapCommandInvalidResultAttributeScope | OnapCommandSchemaNotFound | OnapCommandInvalidSchema
+ | OnapCommandInvalidSchemaVersion e) {
+ fail("Test should not have thrown this exception : " + e.getMessage());
+ }
+ }
+
+
+ @Test
+ public void loadOnapCommandSchemaAuthRequiredTest() throws OnapCommandException {
+ OnapCommand cmd = new OnapCommand() {
+
+ @Override
+ protected void run() throws OnapCommandException {
+ // TODO Auto-generated method stub
+
+ }
+ };
+ OnapCommandSchemaLoader.loadSchema(cmd, "sample-test-schema-auth-required.yaml", true, false);
+ assertTrue("sample-test".equals(cmd.getName()));
+
+ Map<String, OnapCommandParameter> map = OnapCommandUtils.getInputMap(cmd.getParameters());
+ assertTrue(map.size() == 7);
+ }
+
+ @Test(expected = OnapCommandHttpHeaderNotFound.class)
+ public void populateOutputsTest() throws OnapCommandException {
+ HttpResult output = new HttpResult();
+ output.setBody(
+ "{\"serviceName\":\"test\",\"version\":\"v1\",\"url\":\"/api/test/v1\",\"protocol\":\"REST\",\"visualRange\":\"1\",\"lb_policy\":\"hash\",\"nodes\":[{\"ip\":\"127.0.0.1\",\"port\":\"8012\",\"ttl\":0,\"nodeId\":\"test_127.0.0.1_8012\",\"expiration\":\"2017-02-10T05:33:25Z\",\"created_at\":\"2017-02-10T05:33:25Z\",\"updated_at\":\"2017-02-10T05:33:25Z\"}],\"status\":\"1\"}");
+ Map<String, String> mapHead = new HashMap<>();
+ mapHead.put("head1", "value1");
+ output.setRespHeaders(mapHead);
+ output.setStatus(0);
+
+ Map<String, String> params = new HashMap<>();
+ params.put("head", "$h{head1}");
+ params.put("body", "$b{$.serviceName}");
+ params.put("key", "value");
+
+ Map<String, ArrayList<String>> input1 = OnapCommandHttpUtils.populateOutputs(params, output);
+ assertEquals("{head=[value1], body=[test], key=[value]}", input1.toString());
+
+ params.put("body", "$b{{$.serviceName}");
+ try {
+ input1 = OnapCommandHttpUtils.populateOutputs(params, output);
+ } catch (OnapCommandHttpInvalidResponseBody e) {
+ assertEquals(
+ "0x3004::Http response body does not have json entry {$.serviceName, Missing property in path $['{$']",
+ e.getMessage());
+ }
+ output.setBody("{}");
+ input1 = OnapCommandHttpUtils.populateOutputs(params, output);
+ params.put("head", "$h{head2}");
+ output.setBody("{\"test\"}");
+ input1 = OnapCommandHttpUtils.populateOutputs(params, output);
+ }
+
+ @OnapCommandSchema(schema = "sample-test-schema-http.yaml")
+ class OnapHttpCommandSample extends OnapHttpCommand {
+
+ @Override
+ protected void run() throws OnapCommandException {
+ }
+ }
+}
diff --git a/profiles/http/src/test/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand b/profiles/http/src/test/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/profiles/http/src/test/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand
diff --git a/framework/src/test/resources/open-cli-schema/sample-test1-schema-http.yaml b/profiles/http/src/test/resources/open-cli-schema/sample-test1-schema-http.yaml
index f162231f..f162231f 100644
--- a/framework/src/test/resources/open-cli-schema/sample-test1-schema-http.yaml
+++ b/profiles/http/src/test/resources/open-cli-schema/sample-test1-schema-http.yaml
diff --git a/framework/src/test/resources/open-cli-schema/testauth-login.yaml b/profiles/http/src/test/resources/open-cli-schema/testauth-login.yaml
index 3e9211ef..3e9211ef 100644
--- a/framework/src/test/resources/open-cli-schema/testauth-login.yaml
+++ b/profiles/http/src/test/resources/open-cli-schema/testauth-login.yaml
diff --git a/framework/src/test/resources/open-cli-schema/testauth-logout.yaml b/profiles/http/src/test/resources/open-cli-schema/testauth-logout.yaml
index dfe33638..dfe33638 100644
--- a/framework/src/test/resources/open-cli-schema/testauth-logout.yaml
+++ b/profiles/http/src/test/resources/open-cli-schema/testauth-logout.yaml
diff --git a/profiles/http/src/test/resources/open-cli.properties b/profiles/http/src/test/resources/open-cli.properties
new file mode 100644
index 00000000..026b1f13
--- /dev/null
+++ b/profiles/http/src/test/resources/open-cli.properties
@@ -0,0 +1,31 @@
+cli.product_name=open-cli
+cli.version=1.0
+
+cli.discover_always=false
+
+#schema validation
+cli.schema.top_level_params_list=open_cli_schema_version,name,description,parameters,results,http,info
+cli.schema.top_level_mandatory_list=open_cli_schema_version
+
+cli.schema.info_params_list=product,service,type,author,ignore
+cli.schema.info_params_mandatory_list=product,service
+
+cli.schema.input_params_list=name,description,type,short_option,long_option, is_optional,default_value,is_secured,is_include
+cli.schema.input_params_mandatory_list=name,description,type
+
+cli.schema.result_params_list=name,description,scope,type,is_secured, default_value
+cli.schema.result_params_mandatory_list=name, description, type, scope
+
+cli.schema.boolean_values=true,false
+cli.command.type=cmd,auth,catalog
+
+# moco properties
+cli.sample.gen.enable=false
+cli.sample.gen.target=.
+
+# mrkanag Move this to db, once exteranl command registration is supported in place of discovery
+cli.schema.type.supported=http
+
+#other properties to load (it should be hanled when plugins are made as externally register-able
+#when command plugin management support is enabled in oclip
+cli.plugins-prps=open-cli-http.properties \ No newline at end of file
diff --git a/framework/src/test/resources/sample-test-schema-auth-required.yaml b/profiles/http/src/test/resources/sample-test-schema-auth-required.yaml
index bb919d9a..bb919d9a 100644
--- a/framework/src/test/resources/sample-test-schema-auth-required.yaml
+++ b/profiles/http/src/test/resources/sample-test-schema-auth-required.yaml
diff --git a/framework/src/test/resources/sample-test-schema-http.yaml b/profiles/http/src/test/resources/sample-test-schema-http.yaml
index 4ae6e9e0..4ae6e9e0 100644
--- a/framework/src/test/resources/sample-test-schema-http.yaml
+++ b/profiles/http/src/test/resources/sample-test-schema-http.yaml
diff --git a/framework/src/test/resources/sample-test-schema-no-auth-no-catalog.yaml b/profiles/http/src/test/resources/sample-test-schema-no-auth-no-catalog.yaml
index 2629a2f9..2629a2f9 100644
--- a/framework/src/test/resources/sample-test-schema-no-auth-no-catalog.yaml
+++ b/profiles/http/src/test/resources/sample-test-schema-no-auth-no-catalog.yaml
diff --git a/framework/src/test/resources/sample-test-schema-no-auth-yes-catalog.yaml b/profiles/http/src/test/resources/sample-test-schema-no-auth-yes-catalog.yaml
index 15b5bf0c..15b5bf0c 100644
--- a/framework/src/test/resources/sample-test-schema-no-auth-yes-catalog.yaml
+++ b/profiles/http/src/test/resources/sample-test-schema-no-auth-yes-catalog.yaml
diff --git a/framework/src/test/resources/sample-test-schema-swagger.yaml b/profiles/http/src/test/resources/sample-test-schema-swagger.yaml
index 4108d4e6..4108d4e6 100644
--- a/framework/src/test/resources/sample-test-schema-swagger.yaml
+++ b/profiles/http/src/test/resources/sample-test-schema-swagger.yaml
diff --git a/framework/src/test/resources/sample-test-schema-yes-auth-no-catalog.yaml b/profiles/http/src/test/resources/sample-test-schema-yes-auth-no-catalog.yaml
index bb0ae46b..bb0ae46b 100644
--- a/framework/src/test/resources/sample-test-schema-yes-auth-no-catalog.yaml
+++ b/profiles/http/src/test/resources/sample-test-schema-yes-auth-no-catalog.yaml
diff --git a/framework/src/test/resources/sample-test-schema-yes-auth-with-additional-params-no-catalog.yaml b/profiles/http/src/test/resources/sample-test-schema-yes-auth-with-additional-params-no-catalog.yaml
index a5a39f92..a5a39f92 100644
--- a/framework/src/test/resources/sample-test-schema-yes-auth-with-additional-params-no-catalog.yaml
+++ b/profiles/http/src/test/resources/sample-test-schema-yes-auth-with-additional-params-no-catalog.yaml
diff --git a/framework/src/test/resources/sample-test-schema-yes-auth-yes-catalog.yaml b/profiles/http/src/test/resources/sample-test-schema-yes-auth-yes-catalog.yaml
index 4efd4c51..4efd4c51 100644
--- a/framework/src/test/resources/sample-test-schema-yes-auth-yes-catalog.yaml
+++ b/profiles/http/src/test/resources/sample-test-schema-yes-auth-yes-catalog.yaml
diff --git a/framework/src/test/resources/schema-validate-http.yaml b/profiles/http/src/test/resources/schema-validate-http.yaml
index 7bdafc56..7bdafc56 100644
--- a/framework/src/test/resources/schema-validate-http.yaml
+++ b/profiles/http/src/test/resources/schema-validate-http.yaml
diff --git a/profiles/pom.xml b/profiles/pom.xml
new file mode 100644
index 00000000..5e6d00af
--- /dev/null
+++ b/profiles/pom.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2017 Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.onap.cli</groupId>
+ <artifactId>cli</artifactId>
+ <version>2.0.0</version>
+ </parent>
+
+ <artifactId>cli-profiles</artifactId>
+ <name>cli/profiles</name>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>http</module>
+ </modules>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.11</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.cli</groupId>
+ <artifactId>cli-framework</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-artifact</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>${project.artifactId}</artifactId>
+ <version>${project.version}</version>
+ <type>${project.packaging}</type>
+ </artifactItem>
+ </artifactItems>
+ <!-- copy to profiles dependencies -->
+ <outputDirectory>../../profiles/target/lib</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>3.0.0</version>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>../../profiles/target/lib</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <excludeArtifactIds>junit,jmockit</excludeArtifactIds>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
diff --git a/validate/validation/pom.xml b/validate/validation/pom.xml
index 27f34c12..26f507d6 100644
--- a/validate/validation/pom.xml
+++ b/validate/validation/pom.xml
@@ -50,37 +50,37 @@
</dependency>
<dependency>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-sample</artifactId>
+ <artifactId>cli-products-sample</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-onap-amsterdam-catalog</artifactId>
+ <artifactId>cli-products-onap-amsterdam-catalog</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-onap-amsterdam-auth</artifactId>
+ <artifactId>cli-products-onap-amsterdam-auth</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-onap-amsterdam-features-so</artifactId>
+ <artifactId>cli-products-onap-amsterdam-features-so</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-onap-amsterdam-features-sdc</artifactId>
+ <artifactId>cli-products-onap-amsterdam-features-sdc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-onap-amsterdam-features-msb</artifactId>
+ <artifactId>cli-products-onap-amsterdam-features-msb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.onap.cli</groupId>
- <artifactId>cli-plugins-onap-amsterdam-features-aai</artifactId>
+ <artifactId>cli-products-onap-amsterdam-features-aai</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
diff --git a/validate/validation/src/test/java/org/onap/cli/moco/OnapCommandHttpMocoServer.java b/validate/validation/src/test/java/org/onap/cli/moco/OnapCommandHttpMocoServer.java
index 533742ab..b1f18681 100644
--- a/validate/validation/src/test/java/org/onap/cli/moco/OnapCommandHttpMocoServer.java
+++ b/validate/validation/src/test/java/org/onap/cli/moco/OnapCommandHttpMocoServer.java
@@ -36,9 +36,9 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
-import org.onap.cli.fw.OnapCommandRegistrar;
import org.onap.cli.fw.error.OnapCommandException;
import org.onap.cli.fw.error.OnapCommandInvalidSample;
+import org.onap.cli.fw.registrar.OnapCommandRegistrar;
import org.onap.cli.fw.utils.OnapCommandDiscoveryUtils;
import org.onap.cli.main.OnapCli;
import org.slf4j.Logger;
diff --git a/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java b/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java
index fffec3f5..d8e26329 100644
--- a/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java
+++ b/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java
@@ -27,9 +27,9 @@ import java.util.Map;
import org.apache.commons.io.FileUtils;
import org.junit.Ignore;
import org.junit.Test;
-import org.onap.cli.fw.OnapCommandRegistrar;
import org.onap.cli.fw.error.OnapCommandException;
-import org.onap.cli.fw.utils.SchemaInfo;
+import org.onap.cli.fw.registrar.OnapCommandRegistrar;
+import org.onap.cli.fw.schema.OnapCommandSchemaInfo;
import org.onap.cli.main.OnapCli;
import org.onap.cli.moco.OnapCommandHttpMocoServer;
import org.onap.cli.moco.OnapCommandSample;
@@ -49,7 +49,7 @@ public class OnapValidationTest {
OnapCommandRegistrar.getRegistrar().setEnabledProductVersion(version);
System.out.println(version);
System.out.println("==========================\n\n");
- for (SchemaInfo sch : OnapCommandRegistrar.getRegistrar().listCommandInfo()) {
+ for (OnapCommandSchemaInfo sch : OnapCommandRegistrar.getRegistrar().listCommandInfo()) {
if (sch.isIgnore()) {
continue;
}
@@ -70,7 +70,7 @@ public class OnapValidationTest {
System.out.println(version);
System.out.println("==========================\n\n");
int i = 1;
- for (SchemaInfo sch : OnapCommandRegistrar.getRegistrar().listCommandInfo()) {
+ for (OnapCommandSchemaInfo sch : OnapCommandRegistrar.getRegistrar().listCommandInfo()) {
if (sch.isIgnore()) {
continue;
}
diff --git a/validate/validation/src/test/resources/open-cli.properties b/validate/validation/src/test/resources/open-cli.properties
new file mode 100644
index 00000000..026b1f13
--- /dev/null
+++ b/validate/validation/src/test/resources/open-cli.properties
@@ -0,0 +1,31 @@
+cli.product_name=open-cli
+cli.version=1.0
+
+cli.discover_always=false
+
+#schema validation
+cli.schema.top_level_params_list=open_cli_schema_version,name,description,parameters,results,http,info
+cli.schema.top_level_mandatory_list=open_cli_schema_version
+
+cli.schema.info_params_list=product,service,type,author,ignore
+cli.schema.info_params_mandatory_list=product,service
+
+cli.schema.input_params_list=name,description,type,short_option,long_option, is_optional,default_value,is_secured,is_include
+cli.schema.input_params_mandatory_list=name,description,type
+
+cli.schema.result_params_list=name,description,scope,type,is_secured, default_value
+cli.schema.result_params_mandatory_list=name, description, type, scope
+
+cli.schema.boolean_values=true,false
+cli.command.type=cmd,auth,catalog
+
+# moco properties
+cli.sample.gen.enable=false
+cli.sample.gen.target=.
+
+# mrkanag Move this to db, once exteranl command registration is supported in place of discovery
+cli.schema.type.supported=http
+
+#other properties to load (it should be hanled when plugins are made as externally register-able
+#when command plugin management support is enabled in oclip
+cli.plugins-prps=open-cli-http.properties \ No newline at end of file