diff options
author | mmis <michael.morris@ericsson.com> | 2018-08-27 23:29:24 +0100 |
---|---|---|
committer | mmis <michael.morris@ericsson.com> | 2018-08-30 16:52:30 +0100 |
commit | de6124af19910e5ebb1de6698843b8ab64b5931a (patch) | |
tree | 0a7ecfa5c8199e01108345bbd8957db46441b59d /main/src/test/resources/parameters | |
parent | e705197bb18af558fb7ea853b01e1297521763f2 (diff) |
Create code infrastructure for policy forwarding
Added sending of polices from the policy forwarder to the xacml PDP and
added handling of parameters for configuring the policy forwarders
Issue-ID: POLICY-926
Change-Id: I26effe70769f7edc765470a1a9ad40ed9faad82d
Signed-off-by: mmis <michael.morris@ericsson.com>
Diffstat (limited to 'main/src/test/resources/parameters')
12 files changed, 284 insertions, 10 deletions
diff --git a/main/src/test/resources/parameters/DistributionConfigParameters.json b/main/src/test/resources/parameters/DistributionConfigParameters.json index 29e3e467..7a557624 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters.json @@ -44,10 +44,24 @@ "policyForwarders":{ "DummyForwarder":{ "forwarderType":"DummyForwarder", - "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder" + "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder", + "forwarderConfigurationParameters": "dummyConfiguration" } } } } + }, + "policyForwarderConfigurationParameters":{ + "dummyConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarderParameterGroup", + "parameters":{ + "useHttps": false, + "hostname": "192.168.99.100", + "port": 8081, + "userName": "user", + "password": "pw123", + "isManaged": true + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyDecoder.json b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyDecoder.json index ce667771..d11ac9ea 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyDecoder.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyDecoder.json @@ -40,10 +40,24 @@ "policyForwarders":{ "DummyForwarder":{ "forwarderType":"DummyForwarder", - "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder" + "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder", + "forwarderConfigurationName": "dummyConfiguration" } } } } + }, + "policyForwarderConfigurationParameters":{ + "dummyConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarderParameterGroup", + "parameters":{ + "useHttps": false, + "hostname": "192.168.99.100", + "port": 8081, + "userName": "user", + "password": "pw123", + "isManaged": true + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyForwarder.json b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyForwarder.json index 3eceef2d..c534154c 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyForwarder.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyForwarder.json @@ -45,5 +45,18 @@ } } } + }, + "policyForwarderConfigurationParameters":{ + "dummyConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarderParameterGroup", + "parameters":{ + "useHttps": false, + "hostname": "192.168.99.100", + "port": 8081, + "userName": "user", + "password": "pw123", + "isManaged": true + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandler.json b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandler.json index 74733007..b8010f8d 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandler.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandler.json @@ -7,5 +7,18 @@ "password":"zb!XztG34" }, "receptionHandlerParameters":{ + }, + "policyForwarderConfigurationParameters":{ + "dummyConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarderParameterGroup", + "parameters":{ + "useHttps": false, + "hostname": "192.168.99.100", + "port": 8081, + "userName": "user", + "password": "pw123", + "isManaged": true + } + } } }
\ No newline at end of file diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidDecoderAndForwarderParameters.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidDecoderAndForwarderParameters.json index 4d1c4090..0c9caa6c 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidDecoderAndForwarderParameters.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidDecoderAndForwarderParameters.json @@ -52,19 +52,35 @@ "policyForwarders":{ "DummyForwarder":{ "forwarderType":"DummyForwarder", - "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder" + "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder", + "forwarderConfigurationName": "dummyConfiguration" }, "PAPStandaloneForwarder":{ "forwarderType":"", - "forwarderClassName":"org.onap.policy.distribution.main.testclasses.PapStandalonePolicyForwarder" + "forwarderClassName":"org.onap.policy.distribution.main.testclasses.PapStandalonePolicyForwarder", + "forwarderConfigurationName": "dummyConfiguration" }, "PAPEngineForwarder":{ "forwarderType":"PAPEngineForwarder", - "forwarderClassName":"" + "forwarderClassName":"", + "forwarderConfigurationName": "dummyConfiguration" } } } } + }, + "policyForwarderConfigurationParameters":{ + "dummyConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarderParameterGroup", + "parameters":{ + "useHttps": false, + "hostname": "192.168.99.100", + "port": 8081, + "userName": "user", + "password": "pw123", + "isManaged": true + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidForwarderConfigurationClassName.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidForwarderConfigurationClassName.json new file mode 100644 index 00000000..ba895a67 --- /dev/null +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidForwarderConfigurationClassName.json @@ -0,0 +1,67 @@ +{ + "name":"SDCDistributionGroup", + "restServerParameters":{ + "host":"0.0.0.0", + "port":6969, + "userName":"healthcheck", + "password":"zb!XztG34" + }, + "receptionHandlerParameters":{ + "DummyReceptionHandler":{ + "receptionHandlerType":"DummyReceptionHandler", + "receptionHandlerClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandler", + "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":{ + "DummyDecoder":{ + "decoderType":"DummyDecoder", + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder" + } + }, + "policyForwarders":{ + "DummyForwarder":{ + "forwarderType":"DummyForwarder", + "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder", + "forwarderConfigurationParameters": "dummyConfiguration" + } + } + } + } + }, + "policyForwarderConfigurationParameters":{ + "dummyConfiguration":{ + "parameterClassName":"", + "parameters":{ + "useHttps": false, + "hostname": "192.168.99.100", + "port": 8081, + "userName": "user", + "password": "pw123", + "isManaged": true + } + } + } +} diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidName.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidName.json index 377c70ec..7cafc266 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidName.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidName.json @@ -44,10 +44,24 @@ "policyForwarders":{ "DummyForwarder":{ "forwarderType":"DummyForwarder", - "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder" + "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder", + "forwarderConfigurationName": "dummyConfiguration" } } } } + }, + "policyForwarderConfigurationParameters":{ + "dummyConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarderParameterGroup", + "parameters":{ + "useHttps": false, + "hostname": "192.168.99.100", + "port": 8081, + "userName": "user", + "password": "pw123", + "isManaged": true + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerParameters.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerParameters.json index 0ea171e8..793702fb 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerParameters.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerParameters.json @@ -44,10 +44,24 @@ "policyForwarders":{ "DummyForwarder":{ "forwarderType":"DummyForwarder", - "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder" + "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder", + "forwarderConfigurationName": "dummyConfiguration" } } } } + }, + "policyForwarderConfigurationParameters":{ + "dummyConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarderParameterGroup", + "parameters":{ + "useHttps": false, + "hostname": "192.168.99.100", + "port": 8081, + "userName": "user", + "password": "pw123", + "isManaged": true + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidRestServerParameters.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidRestServerParameters.json index 85d450e6..0d650331 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidRestServerParameters.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidRestServerParameters.json @@ -44,10 +44,24 @@ "policyForwarders":{ "DummyForwarder":{ "forwarderType":"DummyForwarder", - "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder" + "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder", + "forwarderConfigurationName": "dummyConfiguration" } } } } + }, + "policyForwarderConfigurationParameters":{ + "dummyConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarderParameterGroup", + "parameters":{ + "useHttps": false, + "hostname": "192.168.99.100", + "port": 8081, + "userName": "user", + "password": "pw123", + "isManaged": true + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyDecoder.json b/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyDecoder.json index ffb4c728..f9392db5 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyDecoder.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyDecoder.json @@ -38,10 +38,24 @@ "policyForwarders":{ "DummyForwarder":{ "forwarderType":"DummyForwarder", - "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder" + "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder", + "forwarderConfigurationName": "dummyConfiguration" } } } } + }, + "policyForwarderConfigurationParameters":{ + "dummyConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarderParameterGroup", + "parameters":{ + "useHttps": false, + "hostname": "192.168.99.100", + "port": 8081, + "userName": "user", + "password": "pw123", + "isManaged": true + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_UnknownForwarderConfigurationClassName.json b/main/src/test/resources/parameters/DistributionConfigParameters_UnknownForwarderConfigurationClassName.json new file mode 100644 index 00000000..c189671d --- /dev/null +++ b/main/src/test/resources/parameters/DistributionConfigParameters_UnknownForwarderConfigurationClassName.json @@ -0,0 +1,67 @@ +{ + "name":"SDCDistributionGroup", + "restServerParameters":{ + "host":"0.0.0.0", + "port":6969, + "userName":"healthcheck", + "password":"zb!XztG34" + }, + "receptionHandlerParameters":{ + "DummyReceptionHandler":{ + "receptionHandlerType":"DummyReceptionHandler", + "receptionHandlerClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandler", + "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":{ + "DummyDecoder":{ + "decoderType":"DummyDecoder", + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder" + } + }, + "policyForwarders":{ + "DummyForwarder":{ + "forwarderType":"DummyForwarder", + "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder", + "forwarderConfigurationParameters": "dummyConfiguration" + } + } + } + } + }, + "policyForwarderConfigurationParameters":{ + "dummyConfiguration":{ + "parameterClassName":"org.onap.policy.Unknown", + "parameters":{ + "useHttps": false, + "hostname": "192.168.99.100", + "port": 8081, + "userName": "user", + "password": "pw123", + "isManaged": true + } + } + } +} diff --git a/main/src/test/resources/parameters/MinimumParameters.json b/main/src/test/resources/parameters/MinimumParameters.json index c113d2ce..1b797def 100644 --- a/main/src/test/resources/parameters/MinimumParameters.json +++ b/main/src/test/resources/parameters/MinimumParameters.json @@ -44,10 +44,24 @@ "policyForwarders":{ "DummyForwarder":{ "forwarderType":"DummyForwarder", - "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder" + "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder", + "forwarderConfigurationName": "dummyConfiguration" } } } } + }, + "policyForwarderConfigurationParameters":{ + "dummyConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarderParameterGroup", + "parameters":{ + "useHttps": false, + "hostname": "192.168.99.100", + "port": 8081, + "userName": "user", + "password": "pw123", + "isManaged": true + } + } } } |