From 115a58a8c55d9dd1230b7373686f7934d40b2629 Mon Sep 17 00:00:00 2001 From: "a.sreekumar" Date: Wed, 26 Jun 2019 10:52:28 +0000 Subject: Adding Topic and REST parameters to policy-endpoints 1) Adding Topic parameters and REST parameters into policy-endpoints module as these are used by other modules such as PAP, APEX and XACML PDPs. 2) ParameterUtils class is also added which can contain related utility methods Change-Id: I5421fbf2234259305e3626ec0859aee0f36ed9b1 Issue-ID: POLICY-1744 Signed-off-by: a.sreekumar --- .../parameters/RestServerParameters_invalid.json | 7 ++++++ .../parameters/RestServerParameters_valid.json | 8 +++++++ .../parameters/TopicParameters_invalid.json | 6 +++++ .../parameters/TopicParameters_valid.json | 28 ++++++++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_invalid.json create mode 100644 policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_valid.json create mode 100644 policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_invalid.json create mode 100644 policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_valid.json (limited to 'policy-endpoints/src/test/resources') diff --git a/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_invalid.json b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_invalid.json new file mode 100644 index 00000000..b106d721 --- /dev/null +++ b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_invalid.json @@ -0,0 +1,7 @@ +{ + "port": 6969, + "userName": "username", + "password": "password", + "https": true, + "aaf": false +} \ No newline at end of file diff --git a/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_valid.json b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_valid.json new file mode 100644 index 00000000..6c113056 --- /dev/null +++ b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_valid.json @@ -0,0 +1,8 @@ +{ + "host": "0.0.0.0", + "port": 6969, + "userName": "username", + "password": "password", + "https": true, + "aaf": false +} \ No newline at end of file diff --git a/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_invalid.json b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_invalid.json new file mode 100644 index 00000000..775b4886 --- /dev/null +++ b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_invalid.json @@ -0,0 +1,6 @@ +{ + "topicSources" : [{ + "topic" : "ueb-source", + "servers" : ["my-server"] + }] +} \ No newline at end of file diff --git a/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_valid.json b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_valid.json new file mode 100644 index 00000000..9222afa5 --- /dev/null +++ b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_valid.json @@ -0,0 +1,28 @@ +{ + "topicSources" : [ { + "topic" : "ueb-source", + "servers" : [ "my-server" ], + "topicCommInfrastructure" : "ueb" + },{ + "topic" : "POLICY-PDP-PAP1", + "servers" : [ "message-router1, message-router2" ], + "topicCommInfrastructure" : "dmaap" + },{ + "topic" : "POLICY-PDP-PAP2", + "servers" : [ "message-router2, message-router3" ], + "topicCommInfrastructure" : "dmaap" + }], + "topicSinks" : [ { + "topic" : "ueb-sink", + "servers" : [ "my-server" ], + "topicCommInfrastructure" : "ueb" + },{ + "topic" : "POLICY-PDP-PAP2", + "servers" : [ "message-router1, message-router2" ], + "topicCommInfrastructure" : "dmaap" + },{ + "topic" : "POLICY-PDP-PAP3", + "servers" : [ "message-router2, message-router3" ], + "topicCommInfrastructure" : "dmaap" + }] +} \ No newline at end of file -- cgit 1.2.3-korg