summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--csit/config/pap/defaultConfig.json70
-rw-r--r--csit/config/pap/papParameters.yaml76
-rw-r--r--csit/docker-compose-all.yml2
-rw-r--r--csit/pap/tests/pap-test.robot8
4 files changed, 83 insertions, 73 deletions
diff --git a/csit/config/pap/defaultConfig.json b/csit/config/pap/defaultConfig.json
deleted file mode 100644
index 28595321..00000000
--- a/csit/config/pap/defaultConfig.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "name": "PapGroup",
- "restServerParameters": {
- "host": "0.0.0.0",
- "port": 6969,
- "userName": "policyadmin",
- "password": "zb!XztG34",
- "https": true,
- "aaf": false,
- "prometheus": true
- },
- "pdpParameters": {
- "heartBeatMs": 20000,
- "updateParameters": {
- "maxRetryCount": 1,
- "maxWaitMs": 30000
- },
- "stateChangeParameters": {
- "maxRetryCount": 1,
- "maxWaitMs": 30000
- }
- },
- "databaseProviderParameters": {
- "name": "PolicyProviderParameterGroup",
- "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl",
- "databaseDriver": "org.mariadb.jdbc.Driver",
- "databaseUrl": "jdbc:mariadb://mariadb:3306/policyadmin",
- "databaseUser": "policy_user",
- "databasePassword": "policy_user",
- "persistenceUnit": "PolicyMariaDb"
- },
- "savePdpStatisticsInDb": true,
- "topicParameterGroup": {
- "topicSources" : [{
- "topic" : "POLICY-PDP-PAP",
- "servers" : [ "message-router" ],
- "topicCommInfrastructure" : "dmaap",
- "useHttps": true
- },
- {
- "topic" : "POLICY-HEARTBEAT",
- "effectiveTopic": "POLICY-PDP-PAP",
- "consumerGroup": "policy-pap",
- "servers" : [ "message-router" ],
- "topicCommInfrastructure" : "dmaap",
- "useHttps": true
- }],
- "topicSinks" : [{
- "topic" : "POLICY-PDP-PAP",
- "servers" : [ "message-router" ],
- "topicCommInfrastructure" : "dmaap",
- "useHttps": true
- },
- {
- "topic" : "POLICY-NOTIFICATION",
- "servers" : [ "message-router" ],
- "topicCommInfrastructure" : "dmaap",
- "useHttps": true
- }]
- },
- "healthCheckRestClientParameters":[{
- "clientName": "api",
- "hostname": "policy-api",
- "port": 6969,
- "userName": "policyadmin",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "policy/api/v1/healthcheck"
- }]
-}
diff --git a/csit/config/pap/papParameters.yaml b/csit/config/pap/papParameters.yaml
new file mode 100644
index 00000000..fe28bf21
--- /dev/null
+++ b/csit/config/pap/papParameters.yaml
@@ -0,0 +1,76 @@
+spring:
+ security:
+ user:
+ name: policyadmin
+ password: zb!XztG34
+ http:
+ converters:
+ preferred-json-mapper: gson
+
+server:
+ port: 6969
+ ssl:
+ enabled: true
+
+pap:
+ name: PapGroup
+ pdpParameters:
+ 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.mariadb.jdbc.Driver
+ databaseUrl: jdbc:mariadb://mariadb:3306/policyadmin
+ databaseUser: policy_user
+ databasePassword: policy_user
+ persistenceUnit: PolicyMariaDb
+ savePdpStatisticsInDb: true
+ topicParameterGroup:
+ topicSources:
+ - topic: POLICY-PDP-PAP
+ servers:
+ - message-router
+ topicCommInfrastructure: dmaap
+ useHttps: true
+ fetchTimeout: 15000
+ - topic: POLICY-HEARTBEAT
+ effectiveTopic: POLICY-PDP-PAP
+ consumerGroup: policy-pap
+ servers:
+ - message-router
+ topicCommInfrastructure: dmaap
+ useHttps: true
+ fetchTimeout: 15000
+ topicSinks:
+ - topic: POLICY-PDP-PAP
+ servers:
+ - message-router
+ topicCommInfrastructure: dmaap
+ useHttps: true
+ - topic: POLICY-NOTIFICATION
+ servers:
+ - message-router
+ topicCommInfrastructure: dmaap
+ useHttps: true
+ healthCheckRestClientParameters:
+ - clientName: api
+ hostname: policy-api
+ port: 6969
+ userName: policyadmin
+ password: zb!XztG34
+ useHttps: true
+ basePath: policy/api/v1/healthcheck
+
+management:
+ endpoints:
+ web:
+ base-path: /
+ exposure:
+ include: health, metrics, prometheus
+ path-mapping.prometheus: metrics
diff --git a/csit/docker-compose-all.yml b/csit/docker-compose-all.yml
index bad05932..7c289e14 100644
--- a/csit/docker-compose-all.yml
+++ b/csit/docker-compose-all.yml
@@ -103,7 +103,7 @@ services:
expose:
- 6969
volumes:
- - ./config/pap/defaultConfig.json:/opt/app/policy/pap/etc/defaultConfig.json:ro
+ - ./config/pap/papParameters.yaml:/opt/app/policy/pap/etc/papParameters.yaml:ro
- ./config/pap/groups.json:/opt/app/policy/pap/etc/mounted/groups.json:ro
- ./config/ks.jks:/opt/app/policy/pap/etc/ssl/policy-keystore:ro
- ./config/policy-truststore:/opt/app/policy/pap/etc/ssl/policy-truststore:ro
diff --git a/csit/pap/tests/pap-test.robot b/csit/pap/tests/pap-test.robot
index 9fb7e61f..d9713013 100644
--- a/csit/pap/tests/pap-test.robot
+++ b/csit/pap/tests/pap-test.robot
@@ -30,8 +30,12 @@ Consolidated Healthcheck
Metrics
[Documentation] Verify policy pap is exporting prometheus metrics
- ${resp}= GetReq /metrics
- Should Contain ${resp.text} jvm_threads_current
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${policyadmin}= Create list policyadmin zb!XztG34
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${policyadmin}
+ ${resp}= GET On Session policy url=/metrics expected_status=200
+ Log Received response from policy ${resp.text}
+ Should Contain ${resp.text} jvm_threads_live_threads
Statistics
[Documentation] Verify policy pap statistics