summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwaynedunican <wayne.dunican@est.tech>2022-06-03 09:07:59 +0100
committerWayne Dunican <wayne.dunican@est.tech>2022-06-15 09:25:45 +0100
commit6ad6982468b31b6b43c7a8f2e618f06a700c4670 (patch)
treea4706b0fa9640668f9ad46a56e25930221b60e92
parent7e5b47d30a6ec7b4921a0c681ad9c032c7672a0b (diff)
Use proper currentInstanceCount in CSITs
Issue-ID: POLICY-4086 Change-Id: I8d49acb66b798104f2cfbdc3765a68af866f9f6a Signed-off-by: Wayne Dunican <wayne.dunican@est.tech>
-rw-r--r--csit/config/apex-pdp/groups.json28
-rw-r--r--csit/config/pap/groups.json111
-rw-r--r--csit/config/xacml-pdp/groups.json101
-rw-r--r--csit/docker-compose-all.yml4
-rw-r--r--csit/pap/plans/setup.sh3
-rw-r--r--csit/pap/tests/pap-test.robot1
6 files changed, 135 insertions, 113 deletions
diff --git a/csit/config/apex-pdp/groups.json b/csit/config/apex-pdp/groups.json
new file mode 100644
index 00000000..bd5c2868
--- /dev/null
+++ b/csit/config/apex-pdp/groups.json
@@ -0,0 +1,28 @@
+{
+ "groups": [
+ {
+ "name": "defaultGroup",
+ "version": "1.0.0",
+ "description": "The default group that registers all supported policy types and pdps.",
+ "pdpGroupState": "ACTIVE",
+ "pdpSubgroups": [
+ {
+ "pdpType": "apex",
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.operational.common.Apex",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.native.Apex",
+ "version": "1.0.0"
+ }
+ ],
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "policies": []
+ }
+ ]
+ }
+ ]
+}
diff --git a/csit/config/pap/groups.json b/csit/config/pap/groups.json
index cf52fd89..bd5c2868 100644
--- a/csit/config/pap/groups.json
+++ b/csit/config/pap/groups.json
@@ -7,115 +7,6 @@
"pdpGroupState": "ACTIVE",
"pdpSubgroups": [
{
- "pdpType": "xacml",
- "supportedPolicyTypes": [
- {
- "name": "onap.policies.controlloop.guard.common.FrequencyLimiter",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.controlloop.guard.common.MinMax",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.controlloop.guard.common.Blacklist",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.controlloop.guard.common.Filter",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.monitoring.*",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.*",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.resource.AffinityPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.resource.DistancePolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.resource.HpaPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.resource.OptimizationPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.resource.PciPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.service.QueryPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.service.SubscriberPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.resource.Vim_fit",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.resource.VnfPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.native.Xacml",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.Naming",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.match.*",
- "version": "1.0.0"
- }
- ],
- "currentInstanceCount": 1,
- "desiredInstanceCount": 1,
- "policies": [
- {
- "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP",
- "version": "1.0.0"
- }
- ]
- },
- {
- "pdpType": "drools",
- "supportedPolicyTypes": [
- {
- "name": "onap.policies.controlloop.operational.common.Drools",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.native.drools.Controller",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.native.drools.Artifact",
- "version": "1.0.0"
- }
- ],
- "currentInstanceCount": 1,
- "desiredInstanceCount": 1,
- "policies": []
- },
- {
"pdpType": "apex",
"supportedPolicyTypes": [
{
@@ -127,7 +18,7 @@
"version": "1.0.0"
}
],
- "currentInstanceCount": 1,
+ "currentInstanceCount": 0,
"desiredInstanceCount": 1,
"policies": []
}
diff --git a/csit/config/xacml-pdp/groups.json b/csit/config/xacml-pdp/groups.json
new file mode 100644
index 00000000..0a7e5fe3
--- /dev/null
+++ b/csit/config/xacml-pdp/groups.json
@@ -0,0 +1,101 @@
+{
+ "groups": [
+ {
+ "name": "defaultGroup",
+ "version": "1.0.0",
+ "description": "The default group that registers all supported policy types and pdps.",
+ "pdpGroupState": "ACTIVE",
+ "pdpSubgroups": [
+ {
+ "pdpType": "xacml",
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.guard.common.FrequencyLimiter",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.guard.common.MinMax",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.guard.common.Blacklist",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.guard.common.Filter",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.monitoring.*",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.*",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.AffinityPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.DistancePolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.HpaPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.OptimizationPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.PciPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.service.QueryPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.service.SubscriberPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.Vim_fit",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.VnfPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.native.Xacml",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.Naming",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.match.*",
+ "version": "1.0.0"
+ }
+ ],
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "policies": [
+ {
+ "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP",
+ "version": "1.0.0"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/csit/docker-compose-all.yml b/csit/docker-compose-all.yml
index 2ac9b90d..2cc9e45b 100644
--- a/csit/docker-compose-all.yml
+++ b/csit/docker-compose-all.yml
@@ -2,7 +2,7 @@
# ===========LICENSE_START====================================================
# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
# Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
-# Modification Copyright 2021. Nordix Foundation.
+# Modification Copyright 2021-2022 Nordix Foundation.
# ============================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -105,7 +105,7 @@ services:
- 6969
volumes:
- ./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/${PROJECT}/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
- ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh:ro
diff --git a/csit/pap/plans/setup.sh b/csit/pap/plans/setup.sh
index 8612d2bf..1d145fe9 100644
--- a/csit/pap/plans/setup.sh
+++ b/csit/pap/plans/setup.sh
@@ -2,6 +2,7 @@
# ============LICENSE_START=======================================================
# Copyright (C) 2019-2022 Nordix Foundation.
# Modifications Copyright (C) 2019-2021 AT&T Intellectual Property.
+# Modifications Copyright (C) 2022 Nordix Foundation.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -29,12 +30,14 @@ source "${SCRIPTS}"/get-versions.sh
bash "${SCRIPTS}"/get-models-examples.sh
docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d pap
+docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d apex-pdp
unset http_proxy https_proxy
POLICY_PAP_IP=$(get-instance-ip.sh policy-pap)
POLICY_API_IP=$(get-instance-ip.sh policy-api)
MARIADB_IP=$(get-instance-ip.sh mariadb)
+POLICY_APEX_IP=$(get-instance-ip.sh policy-apex-pdp)
echo PAP IP IS "${POLICY_PAP_IP}"
echo API IP IS "${POLICY_API_IP}"
diff --git a/csit/pap/tests/pap-test.robot b/csit/pap/tests/pap-test.robot
index 203ddd6c..b6c9a502 100644
--- a/csit/pap/tests/pap-test.robot
+++ b/csit/pap/tests/pap-test.robot
@@ -46,7 +46,6 @@ Metrics
Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/pap/v1/components/healthcheck",} 1.0
Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="save",repository="PdpGroupRepository",state="SUCCESS",} 1.0
Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="findByKeyName",repository="PdpGroupRepository",state="SUCCESS",} 1.0
- Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="findAll",repository="PdpGroupRepository",state="SUCCESS",} 1.0
Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="findAll",repository="PolicyStatusRepository",state="SUCCESS",} 1.0
Statistics