From dbc13c78875a3d5493054a7252a7804daae8cf1f Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Tue, 15 Jun 2021 16:01:31 +0100 Subject: Move parameters from config Json file to application.yaml Issue-ID: POLICY-3343 Change-Id: Id78c00a5a241337f684a70feeee543f3a88fc01c Signed-off-by: FrancescoFioraEst --- .../src/test/resources/application_test.properties | 30 ++++++++++- .../test/resources/parameters/EmptyParameters.json | 0 .../resources/parameters/InvalidParameters.json | 3 -- .../test/resources/parameters/NoParameters.json | 2 - .../test/resources/parameters/TestParameters.json | 61 ---------------------- .../resources/parameters/TestParametersStd.json | 61 ---------------------- .../src/test/resources/parameters/Unreadable.json | 61 ---------------------- 7 files changed, 29 insertions(+), 189 deletions(-) delete mode 100644 participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/EmptyParameters.json delete mode 100644 participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/InvalidParameters.json delete mode 100644 participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/NoParameters.json delete mode 100644 participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/TestParameters.json delete mode 100644 participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/TestParametersStd.json delete mode 100644 participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/Unreadable.json (limited to 'participant/participant-impl/participant-impl-simulator/src/test/resources') diff --git a/participant/participant-impl/participant-impl-simulator/src/test/resources/application_test.properties b/participant/participant-impl/participant-impl-simulator/src/test/resources/application_test.properties index c31bb9d6b..89c57bb12 100644 --- a/participant/participant-impl/participant-impl-simulator/src/test/resources/application_test.properties +++ b/participant/participant-impl/participant-impl-simulator/src/test/resources/application_test.properties @@ -4,4 +4,32 @@ spring.security.user.password=zb!XztG34 server.servlet.context-path=/onap/participantsim server.error.path=/error -participant.file=src/test/resources/parameters/TestParameters.json +participant.restServerParameters.host=0.0.0.0 +participant.restServerParameters.port=6969 +participant.restServerParameters.userName=healthcheck +participant.restServerParameters.password=zb!XztG34 +participant.restServerParameters.https=false +participant.restServerParameters.aaf=false +participant.intermediaryParameters.reportingTimeInterval=120000 +participant.intermediaryParameters.description=Participant Description +participant.intermediaryParameters.participantId.name=org.onap.PM_CDS_Blueprint +participant.intermediaryParameters.participantId.version=1.0.0 +participant.intermediaryParameters.participantType.name=org.onap.PM_CDS_Blueprint +participant.intermediaryParameters.participantType.version=1.0.0 +participant.intermediaryParameters.clampControlLoopTopics.topicSources[0].topic=POLICY-CLRUNTIME-PARTICIPANT +participant.intermediaryParameters.clampControlLoopTopics.topicSources[0].servers[0]=localhost +participant.intermediaryParameters.clampControlLoopTopics.topicSources[0].topicCommInfrastructure=dmaap +participant.intermediaryParameters.clampControlLoopTopics.topicSources[0].fetchTimeout=15000 +participant.intermediaryParameters.clampControlLoopTopics.topicSinks[0].topic=POLICY-CLRUNTIME-PARTICIPANT +participant.intermediaryParameters.clampControlLoopTopics.topicSinks[0].servers[0]=localhost +participant.intermediaryParameters.clampControlLoopTopics.topicSinks[0].topicCommInfrastructure=dmaap +participant.intermediaryParameters.clampControlLoopTopics.topicSinks[1].topic=POLICY-NOTIFICATION +participant.intermediaryParameters.clampControlLoopTopics.topicSinks[1].servers[0]=localhost +participant.intermediaryParameters.clampControlLoopTopics.topicSinks[1].topicCommInfrastructure=dmaap +participant.databaseProviderParameters.name=PolicyProviderParameterGroup +participant.databaseProviderParameters.implementation=org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl +participant.databaseProviderParameters.databaseDriver=org.h2.Driver +participant.databaseProviderParameters.databaseUrl=jdbc:h2:mem:testdb +participant.databaseProviderParameters.databaseUser=policy +participant.databaseProviderParameters.databasePassword=P01icY +participant.databaseProviderParameters.persistenceUnit=ToscaConceptTest diff --git a/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/EmptyParameters.json b/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/EmptyParameters.json deleted file mode 100644 index e69de29bb..000000000 diff --git a/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/InvalidParameters.json b/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/InvalidParameters.json deleted file mode 100644 index 1035ccb67..000000000 --- a/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/InvalidParameters.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name": " -} diff --git a/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/NoParameters.json b/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/NoParameters.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/NoParameters.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/TestParameters.json b/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/TestParameters.json deleted file mode 100644 index 8c594044b..000000000 --- a/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/TestParameters.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "ControlLoopParticipantGroup", - "restServerParameters": { - "host": "0.0.0.0", - "port": 6969, - "userName": "healthcheck", - "password": "zb!XztG34", - "https": false, - "aaf": false - }, - "intermediaryParameters": { - "name": "Participant parameters", - "reportingTimeInterval": 120000, - "description": "Participant Description", - "participantId": { - "name": "org.onap.PM_CDS_Blueprint", - "version": "1.0.0" - }, - "participantType": { - "name": "org.onap.PM_CDS_Blueprint", - "version": "1.0.0" - }, - "clampControlLoopTopics": { - "topicSources": [ - { - "topic": "POLICY-CLRUNTIME-PARTICIPANT", - "servers": [ - "localhost" - ], - "topicCommInfrastructure": "dmaap", - "fetchTimeout": 15000 - } - ], - "topicSinks": [ - { - "topic": "POLICY-CLRUNTIME-PARTICIPANT", - "servers": [ - "localhost" - ], - "topicCommInfrastructure": "dmaap" - }, - { - "topic": "POLICY-NOTIFICATION", - "servers": [ - "localhost" - ], - "topicCommInfrastructure": "dmaap" - } - ] - } - }, - "databaseProviderParameters": { - "name": "PolicyProviderParameterGroup", - "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", - "databaseDriver": "org.h2.Driver", - "databaseUrl": "jdbc:h2:mem:testdb", - "databaseUser": "policy", - "databasePassword": "P01icY", - "persistenceUnit": "ToscaConceptTest" - } -} diff --git a/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/TestParametersStd.json b/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/TestParametersStd.json deleted file mode 100644 index 0295a8f91..000000000 --- a/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/TestParametersStd.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "ControlLoopParticipantGroup", - "restServerParameters": { - "host": "0.0.0.0", - "port": ${port}, - "userName": "healthcheck", - "password": "zb!XztG34", - "https": false, - "aaf": false - }, - "intermediaryParameters": { - "name": "Participant parameters", - "reportingTimeInterval": 120000, - "description": "Participant Description", - "participantId": { - "name": "org.onap.PM_CDS_Blueprint", - "version": "1.0.0" - }, - "participantType": { - "name": "org.onap.PM_CDS_Blueprint", - "version": "1.0.0" - }, - "clampControlLoopTopics": { - "topicSources": [ - { - "topic": "POLICY-CLRUNTIME-PARTICIPANT", - "servers": [ - "localhost" - ], - "topicCommInfrastructure": "dmaap", - "fetchTimeout": 15000 - } - ], - "topicSinks": [ - { - "topic": "POLICY-CLRUNTIME-PARTICIPANT", - "servers": [ - "localhost" - ], - "topicCommInfrastructure": "dmaap" - }, - { - "topic": "POLICY-NOTIFICATION", - "servers": [ - "localhost" - ], - "topicCommInfrastructure": "dmaap" - } - ] - } - }, - "databaseProviderParameters": { - "name": "PolicyProviderParameterGroup", - "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", - "databaseDriver": "org.h2.Driver", - "databaseUrl": "jdbc:h2:mem:testdb", - "databaseUser": "policy", - "databasePassword": "P01icY", - "persistenceUnit": "ToscaConceptTest" - } -} diff --git a/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/Unreadable.json b/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/Unreadable.json deleted file mode 100644 index fc36b49e4..000000000 --- a/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/Unreadable.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "ControlLoopRuntimeGroup", - "restServerParameters": { - "host": "0.0.0.0", - "port": 6969, - "userName": "healthcheck", - "password": "zb!XztG34", - "https": false, - "aaf": false - }, - "participantParameters": { - "heartBeatMs": 120000, - "updateParameters": { - "maxRetryCount": 1, - "maxWaitMs": 30000 - }, - "stateChangeParameters": { - "maxRetryCount": 1, - "maxWaitMs": 30000 - } - }, - "databaseProviderParameters": { - "name": "PolicyProviderParameterGroup", - "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", - "databaseDriver": "org.h2.Driver", - "databaseUrl": "jdbc:h2:mem:testdb", - "databaseUser": "policy", - "databasePassword": "P01icY", - "persistenceUnit": "ToscaConceptTest" - }, - "topicParameterGroup": { - "topicSources": [ - { - "topic": "POLICY-CLRUNTIME-PARTICIPANT", - "servers": [ - "localhost" - ], - "topicCommInfrastructure": "dmaap", - "fetchTimeout": 15000 - } - ], - "topicSinks": [ - { - "topic": "POLICY-CLRUNTIME-PARTICIPANT", - "servers": [ - "localhost" - ], - "topicCommInfrastructure": "dmaap" - }, - { - "topic": "POLICY-NOTIFICATION", - "servers": [ - "localhost" - ], - "topicCommInfrastructure": "dmaap" - } - ] - } -} - - -- cgit 1.2.3-korg