From 742c4b2ed82860e2a74f3db3b2048173fbc530d8 Mon Sep 17 00:00:00 2001 From: liboNet Date: Sat, 18 Aug 2018 03:15:59 +0800 Subject: integrate PSSDConfiguration to distribution * Integrate the PSSDConfiguration to distribution config parameter. * Moved related PSSDConfigurationParameterGroup classes from "handling" to "parameters" to avoid specified sdc dependency. * Modify all the test case since the distribution config parameter has been changed, update CommonTestData to wrap it. * Add neccessnary SDC handling exceptions which to be used for SDC handler integration. * update the PSSDCOnfiguraitonParameterGroup to add UUID to the setName function to generate unique name for each instance. * use builder to create PSSDConfigurationParametersGroup instead of using many parameters Change-Id: I3c78bc2a51ebc84761bc9458096d6ffa18070b47 Issue-ID: POLICY-956 Signed-off-by: liboNet --- .../parameters/DistributionConfigParameters.json | 26 +++++++++++++++++++++- ...ibutionConfigParameters_EmptyPolicyDecoder.json | 26 +++++++++++++++++++++- ...utionConfigParameters_EmptyPolicyForwarder.json | 26 +++++++++++++++++++++- .../DistributionConfigParameters_InvalidName.json | 26 +++++++++++++++++++++- ...ConfigParameters_InvalidPolicyDecoderClass.json | 26 +++++++++++++++++++++- ...nConfigParameters_InvalidPolicyDecoderType.json | 26 +++++++++++++++++++++- ...nfigParameters_InvalidPolicyForwarderClass.json | 26 +++++++++++++++++++++- ...onfigParameters_InvalidPolicyForwarderType.json | 26 +++++++++++++++++++++- ...figParameters_InvalidReceptionHandlerClass.json | 26 +++++++++++++++++++++- ...nfigParameters_InvalidReceptionHandlerType.json | 26 +++++++++++++++++++++- ...stributionConfigParameters_NoPolicyDecoder.json | 26 +++++++++++++++++++++- ...ributionConfigParameters_NoPolicyForwarder.json | 26 +++++++++++++++++++++- .../resources/parameters/MinimumParameters.json | 26 +++++++++++++++++++++- 13 files changed, 325 insertions(+), 13 deletions(-) (limited to 'main/src/test/resources/parameters') diff --git a/main/src/test/resources/parameters/DistributionConfigParameters.json b/main/src/test/resources/parameters/DistributionConfigParameters.json index 546e5231..bcf8b263 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters.json @@ -4,6 +4,30 @@ "SDCReceptionHandler":{ "receptionHandlerType":"SDC", "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler", + "pssdConfiguration":{ + "asdcAddress": "localhost", + "messageBusAddress": [ + "a.com", + "b.com", + "c.com" + ], + "user": "tbdsdc-1480", + "password": "tbdsdc-1480", + "pollingInterval":20, + "pollingTimeout":30, + "consumerId": "policy-id", + "artifactTypes": [ + "TOSCA_CSAR", + "HEAT" + ], + "consumerGroup": "policy-group", + "environmentName": "environmentName", + "keystorePath": "null", + "keystorePassword": "null", + "activeserverTlsAuth": false, + "isFilterinEmptyResources": true, + "isUseHttpsWithDmaap": false + }, "pluginHandlerParameters":{ "policyDecoders":{ "TOSCADecoder":{ @@ -20,4 +44,4 @@ } } } -} \ No newline at end of file +} diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyDecoder.json b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyDecoder.json index 7a0d14a7..a53dc05f 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyDecoder.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyDecoder.json @@ -4,6 +4,30 @@ "SDCReceptionHandler":{ "receptionHandlerType":"SDC", "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler", + "pssdConfiguration":{ + "asdcAddress": "localhost", + "messageBusAddress": [ + "a.com", + "b.com", + "c.com" + ], + "user": "tbdsdc-1480", + "password": "tbdsdc-1480", + "pollingInterval":20, + "pollingTimeout":30, + "consumerId": "policy-id", + "artifactTypes": [ + "TOSCA_CSAR", + "HEAT" + ], + "consumerGroup": "policy-group", + "environmentName": "environmentName", + "keystorePath": "null", + "keystorePassword": "null", + "activeserverTlsAuth": false, + "isFilterinEmptyResources": true, + "isUseHttpsWithDmaap": false + }, "pluginHandlerParameters":{ "policyDecoders":{ }, @@ -16,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyForwarder.json b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyForwarder.json index b328df3d..b88fda2a 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyForwarder.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyForwarder.json @@ -4,6 +4,30 @@ "SDCReceptionHandler":{ "receptionHandlerType":"SDC", "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler", + "pssdConfiguration":{ + "asdcAddress": "localhost", + "messageBusAddress": [ + "a.com", + "b.com", + "c.com" + ], + "user": "tbdsdc-1480", + "password": "tbdsdc-1480", + "pollingInterval":20, + "pollingTimeout":30, + "consumerId": "policy-id", + "artifactTypes": [ + "TOSCA_CSAR", + "HEAT" + ], + "consumerGroup": "policy-group", + "environmentName": "environmentName", + "keystorePath": "null", + "keystorePassword": "null", + "activeserverTlsAuth": false, + "isFilterinEmptyResources": true, + "isUseHttpsWithDmaap": false + }, "pluginHandlerParameters":{ "policyDecoders":{ "TOSCADecoder":{ @@ -16,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidName.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidName.json index c84a6784..aae53f50 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidName.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidName.json @@ -4,6 +4,30 @@ "SDCReceptionHandler":{ "receptionHandlerType":"SDC", "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler", + "pssdConfiguration":{ + "asdcAddress": "localhost", + "messageBusAddress": [ + "a.com", + "b.com", + "c.com" + ], + "user": "tbdsdc-1480", + "password": "tbdsdc-1480", + "pollingInterval":20, + "pollingTimeout":30, + "consumerId": "policy-id", + "artifactTypes": [ + "TOSCA_CSAR", + "HEAT" + ], + "consumerGroup": "policy-group", + "environmentName": "environmentName", + "keystorePath": "null", + "keystorePassword": "null", + "activeserverTlsAuth": false, + "isFilterinEmptyResources": true, + "isUseHttpsWithDmaap": false + }, "pluginHandlerParameters":{ "policyDecoders":{ "TOSCADecoder":{ @@ -20,4 +44,4 @@ } } } -} \ No newline at end of file +} diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyDecoderClass.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyDecoderClass.json index eeafc25a..c1ad0a9e 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyDecoderClass.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyDecoderClass.json @@ -4,6 +4,30 @@ "SDCReceptionHandler":{ "receptionHandlerType":"SDC", "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler", + "pssdConfiguration":{ + "asdcAddress": "localhost", + "messageBusAddress": [ + "a.com", + "b.com", + "c.com" + ], + "user": "tbdsdc-1480", + "password": "tbdsdc-1480", + "pollingInterval":20, + "pollingTimeout":30, + "consumerId": "policy-id", + "artifactTypes": [ + "TOSCA_CSAR", + "HEAT" + ], + "consumerGroup": "policy-group", + "environmentName": "environmentName", + "keystorePath": "null", + "keystorePassword": "null", + "activeserverTlsAuth": false, + "isFilterinEmptyResources": true, + "isUseHttpsWithDmaap": false + }, "pluginHandlerParameters":{ "policyDecoders":{ "TOSCADecoder":{ @@ -28,4 +52,4 @@ } } } -} \ No newline at end of file +} diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyDecoderType.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyDecoderType.json index 21ff4ad6..26f470ea 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyDecoderType.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyDecoderType.json @@ -4,6 +4,30 @@ "SDCReceptionHandler":{ "receptionHandlerType":"SDC", "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler", + "pssdConfiguration":{ + "asdcAddress": "localhost", + "messageBusAddress": [ + "a.com", + "b.com", + "c.com" + ], + "user": "tbdsdc-1480", + "password": "tbdsdc-1480", + "pollingInterval":20, + "pollingTimeout":30, + "consumerId": "policy-id", + "artifactTypes": [ + "TOSCA_CSAR", + "HEAT" + ], + "consumerGroup": "policy-group", + "environmentName": "environmentName", + "keystorePath": "null", + "keystorePassword": "null", + "activeserverTlsAuth": false, + "isFilterinEmptyResources": true, + "isUseHttpsWithDmaap": false + }, "pluginHandlerParameters":{ "policyDecoders":{ "TOSCADecoder":{ @@ -20,4 +44,4 @@ } } } -} \ No newline at end of file +} diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyForwarderClass.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyForwarderClass.json index 6cf54d80..a194e958 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyForwarderClass.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyForwarderClass.json @@ -4,6 +4,30 @@ "SDCReceptionHandler":{ "receptionHandlerType":"SDC", "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler", + "pssdConfiguration":{ + "asdcAddress": "localhost", + "messageBusAddress": [ + "a.com", + "b.com", + "c.com" + ], + "user": "tbdsdc-1480", + "password": "tbdsdc-1480", + "pollingInterval":20, + "pollingTimeout":30, + "consumerId": "policy-id", + "artifactTypes": [ + "TOSCA_CSAR", + "HEAT" + ], + "consumerGroup": "policy-group", + "environmentName": "environmentName", + "keystorePath": "null", + "keystorePassword": "null", + "activeserverTlsAuth": false, + "isFilterinEmptyResources": true, + "isUseHttpsWithDmaap": false + }, "pluginHandlerParameters":{ "policyDecoders":{ "TOSCADecoder":{ @@ -24,4 +48,4 @@ } } } -} \ No newline at end of file +} diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyForwarderType.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyForwarderType.json index ea44b8aa..895e7d55 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyForwarderType.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidPolicyForwarderType.json @@ -4,6 +4,30 @@ "SDCReceptionHandler":{ "receptionHandlerType":"SDC", "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler", + "pssdConfiguration":{ + "asdcAddress": "localhost", + "messageBusAddress": [ + "a.com", + "b.com", + "c.com" + ], + "user": "tbdsdc-1480", + "password": "tbdsdc-1480", + "pollingInterval":20, + "pollingTimeout":30, + "consumerId": "policy-id", + "artifactTypes": [ + "TOSCA_CSAR", + "HEAT" + ], + "consumerGroup": "policy-group", + "environmentName": "environmentName", + "keystorePath": "null", + "keystorePassword": "null", + "activeserverTlsAuth": false, + "isFilterinEmptyResources": true, + "isUseHttpsWithDmaap": false + }, "pluginHandlerParameters":{ "policyDecoders":{ "TOSCADecoder":{ @@ -20,4 +44,4 @@ } } } -} \ No newline at end of file +} diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerClass.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerClass.json index 7be2a1a6..a368a5b6 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerClass.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerClass.json @@ -4,6 +4,30 @@ "SDCReceptionHandler":{ "receptionHandlerType":"SDC", "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.InvalidSdcReceptionHandler", + "pssdConfiguration":{ + "asdcAddress": "localhost", + "messageBusAddress": [ + "a.com", + "b.com", + "c.com" + ], + "user": "tbdsdc-1480", + "password": "tbdsdc-1480", + "pollingInterval":20, + "pollingTimeout":30, + "consumerId": "policy-id", + "artifactTypes": [ + "TOSCA_CSAR", + "HEAT" + ], + "consumerGroup": "policy-group", + "environmentName": "environmentName", + "keystorePath": "null", + "keystorePassword": "null", + "activeserverTlsAuth": false, + "isFilterinEmptyResources": true, + "isUseHttpsWithDmaap": false + }, "pluginHandlerParameters":{ "policyDecoders":{ "TOSCADecoder":{ @@ -20,4 +44,4 @@ } } } -} \ No newline at end of file +} diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerType.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerType.json index 791236cb..bf0db3e6 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerType.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerType.json @@ -4,6 +4,30 @@ "SDCReceptionHandler":{ "receptionHandlerType":" ", "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler", + "pssdConfiguration":{ + "asdcAddress": "localhost", + "messageBusAddress": [ + "a.com", + "b.com", + "c.com" + ], + "user": "tbdsdc-1480", + "password": "tbdsdc-1480", + "pollingInterval":20, + "pollingTimeout":30, + "consumerId": "policy-id", + "artifactTypes": [ + "TOSCA_CSAR", + "HEAT" + ], + "consumerGroup": "policy-group", + "environmentName": "environmentName", + "keystorePath": "null", + "keystorePassword": "null", + "activeserverTlsAuth": false, + "isFilterinEmptyResources": true, + "isUseHttpsWithDmaap": false + }, "pluginHandlerParameters":{ "policyDecoders":{ "TOSCADecoder":{ @@ -20,4 +44,4 @@ } } } -} \ No newline at end of file +} diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyDecoder.json b/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyDecoder.json index 3ba35753..06d18674 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyDecoder.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyDecoder.json @@ -4,6 +4,30 @@ "SDCReceptionHandler":{ "receptionHandlerType":"SDC", "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler", + "pssdConfiguration":{ + "asdcAddress": "localhost", + "messageBusAddress": [ + "a.com", + "b.com", + "c.com" + ], + "user": "tbdsdc-1480", + "password": "tbdsdc-1480", + "pollingInterval":20, + "pollingTimeout":30, + "consumerId": "policy-id", + "artifactTypes": [ + "TOSCA_CSAR", + "HEAT" + ], + "consumerGroup": "policy-group", + "environmentName": "environmentName", + "keystorePath": "null", + "keystorePassword": "null", + "activeserverTlsAuth": false, + "isFilterinEmptyResources": true, + "isUseHttpsWithDmaap": false + }, "pluginHandlerParameters":{ "policyForwarders":{ "PAPEngineForwarder":{ @@ -14,4 +38,4 @@ } } } -} \ No newline at end of file +} diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyForwarder.json b/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyForwarder.json index 660cac92..d8343b19 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyForwarder.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyForwarder.json @@ -4,6 +4,30 @@ "SDCReceptionHandler":{ "receptionHandlerType":"SDC", "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler", + "pssdConfiguration":{ + "asdcAddress": "localhost", + "messageBusAddress": [ + "a.com", + "b.com", + "c.com" + ], + "user": "tbdsdc-1480", + "password": "tbdsdc-1480", + "pollingInterval":20, + "pollingTimeout":30, + "consumerId": "policy-id", + "artifactTypes": [ + "TOSCA_CSAR", + "HEAT" + ], + "consumerGroup": "policy-group", + "environmentName": "environmentName", + "keystorePath": "null", + "keystorePassword": "null", + "activeserverTlsAuth": false, + "isFilterinEmptyResources": true, + "isUseHttpsWithDmaap": false + }, "pluginHandlerParameters":{ "policyDecoders":{ "TOSCADecoder":{ @@ -14,4 +38,4 @@ } } } -} \ No newline at end of file +} diff --git a/main/src/test/resources/parameters/MinimumParameters.json b/main/src/test/resources/parameters/MinimumParameters.json index 1b42cc4d..18cd529c 100644 --- a/main/src/test/resources/parameters/MinimumParameters.json +++ b/main/src/test/resources/parameters/MinimumParameters.json @@ -4,6 +4,30 @@ "SDCReceptionHandler":{ "receptionHandlerType":"SDC", "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler", + "pssdConfiguration":{ + "asdcAddress": "localhost", + "messageBusAddress": [ + "a.com", + "b.com", + "c.com" + ], + "user": "tbdsdc-1480", + "password": "tbdsdc-1480", + "pollingInterval":20, + "pollingTimeout":30, + "consumerId": "policy-id", + "artifactTypes": [ + "TOSCA_CSAR", + "HEAT" + ], + "consumerGroup": "policy-group", + "environmentName": "environmentName", + "keystorePath": "null", + "keystorePassword": "null", + "activeserverTlsAuth": false, + "isFilterinEmptyResources": true, + "isUseHttpsWithDmaap": false + }, "pluginHandlerParameters":{ "policyDecoders":{ "TOSCADecoder":{ @@ -20,4 +44,4 @@ } } } -} \ No newline at end of file +} -- cgit 1.2.3-korg