Restructure of csit files to be used both by docker and k8s config 82/133382/2
authoradheli.tavares <adheli.tavares@est.tech>
Fri, 17 Feb 2023 15:14:07 +0000 (15:14 +0000)
committerAdheli Tavares <adheli.tavares@est.tech>
Wed, 22 Feb 2023 13:22:48 +0000 (13:22 +0000)
Issue-ID: POLICY-4125
Change-Id: Id63b3badb1b451b36e3226970dcafaa5a62d860f
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
165 files changed:
.gitignore
compose/config/apex-pdp/OnapPfConfig.json [moved from csit/config/apex-pdp/OnapPfConfig.json with 100% similarity]
compose/config/apex-pdp/groups.json [moved from csit/config/apex-pdp/groups.json with 100% similarity]
compose/config/apex-pdp/logback.xml [moved from csit/config/apex-pdp/logback.xml with 100% similarity]
compose/config/api/apiParameters.yaml [moved from csit/config/api/apiParameters.yaml with 100% similarity]
compose/config/api/groups.json [moved from csit/config/api/groups.json with 100% similarity]
compose/config/api/logback.xml [moved from csit/config/api/logback.xml with 100% similarity]
compose/config/clamp/A1pmsParticipantParameters.yaml [moved from csit/config/clamp/A1pmsParticipantParameters.yaml with 100% similarity]
compose/config/clamp/AcRuntimeParameters.yaml [moved from csit/config/clamp/AcRuntimeParameters.yaml with 100% similarity]
compose/config/clamp/ClampBackend.properties [moved from csit/config/clamp/ClampBackend.properties with 100% similarity]
compose/config/clamp/HttpParticipantParameters.yaml [moved from csit/config/clamp/HttpParticipantParameters.yaml with 100% similarity]
compose/config/clamp/KubernetesParticipantParameters.yaml [moved from csit/config/clamp/KubernetesParticipantParameters.yaml with 100% similarity]
compose/config/clamp/PolicyParticipantParameters.yaml [moved from csit/config/clamp/PolicyParticipantParameters.yaml with 100% similarity]
compose/config/clamp/groups.json [moved from csit/config/clamp/groups.json with 100% similarity]
compose/config/clamp/logback-backend.xml [moved from csit/config/clamp/logback-backend.xml with 100% similarity]
compose/config/clamp/logback.xml [moved from csit/config/clamp/logback.xml with 100% similarity]
compose/config/clamp/org.onap.clamp.keyfile [moved from csit/config/clamp/org.onap.clamp.keyfile with 100% similarity]
compose/config/clamp/policy-clamp-create-tables.sql [moved from csit/config/clamp/policy-clamp-create-tables.sql with 100% similarity]
compose/config/db-migrator/init.sh [moved from csit/db_migrator_policy_init.sh with 100% similarity]
compose/config/db-migrator/init_pg.sh [moved from csit/db_migrator_policy_init_pg.sh with 100% similarity]
compose/config/db-pg/db-pg.conf [moved from csit/config/db-pg/db-pg.conf with 100% similarity]
compose/config/db-pg/db-pg.sh [moved from csit/config/db-pg/db-pg.sh with 100% similarity]
compose/config/db/db.conf [moved from csit/config/db/db.conf with 100% similarity]
compose/config/db/db.sh [moved from csit/config/db/db.sh with 100% similarity]
compose/config/distribution/defaultConfig.json [moved from csit/config/distribution/defaultConfig.json with 100% similarity]
compose/config/distribution/groups.json [moved from csit/config/distribution/groups.json with 100% similarity]
compose/config/distribution/logback.xml [moved from csit/config/distribution/logback.xml with 100% similarity]
compose/config/drools-applications/custom/engine-system.properties [moved from csit/config/drools-applications/custom/engine-system.properties with 100% similarity]
compose/config/drools-applications/custom/feature-lifecycle.properties [moved from csit/config/drools-applications/custom/feature-lifecycle.properties with 100% similarity]
compose/config/drools-applications/custom/features.pre.sh [moved from csit/config/drools-applications/custom/features.pre.sh with 100% similarity]
compose/config/drools-applications/custom/standalone-settings.xml [moved from csit/config/drools-applications/custom/standalone-settings.xml with 100% similarity]
compose/config/drools-applications/env/base.conf [moved from csit/config/drools-applications/env/base.conf with 100% similarity]
compose/config/drools-applications/env/feature-healthcheck.conf [moved from csit/config/drools-applications/env/feature-healthcheck.conf with 100% similarity]
compose/config/drools-applications/env/feature-pooling-dmaap.conf [moved from csit/config/drools-applications/env/feature-pooling-dmaap.conf with 100% similarity]
compose/config/drools-applications/groups.json [moved from csit/config/drools-applications/groups.json with 100% similarity]
compose/config/drools-pdp/custom/engine-system.properties [moved from csit/config/drools-pdp/custom/engine-system.properties with 100% similarity]
compose/config/drools-pdp/custom/noop.pre.sh [moved from csit/config/drools-pdp/custom/noop.pre.sh with 100% similarity]
compose/config/drools-pdp/env/base.conf [moved from csit/config/drools-pdp/env/base.conf with 100% similarity]
compose/config/drools-pdp/groups.json [moved from csit/config/drools-pdp/groups.json with 100% similarity]
compose/config/pap/groups.json [moved from csit/config/pap/groups.json with 100% similarity]
compose/config/pap/logback.xml [moved from csit/config/pap/logback.xml with 100% similarity]
compose/config/pap/papParameters.yaml [moved from csit/config/pap/papParameters.yaml with 100% similarity]
compose/config/policy-gui/application.yaml [moved from csit/config/policy-gui/application.yaml with 100% similarity]
compose/config/policy-gui/groups.json [moved from csit/config/policy-gui/groups.json with 100% similarity]
compose/config/policy-gui/logback.xml [moved from csit/config/policy-gui/logback.xml with 100% similarity]
compose/config/sim-all/aairesponse/vfw-cnf-cds-test-1-vnf.json [moved from csit/config/sim-all/aairesponse/vfw-cnf-cds-test-1-vnf.json with 100% similarity]
compose/config/sim-all/cdsresponse/apex-example-cba-modify-config.json [moved from csit/config/sim-all/cdsresponse/apex-example-cba-modify-config.json with 100% similarity]
compose/config/sim-all/cdsresponse/apex-example-cba-restart.json [moved from csit/config/sim-all/cdsresponse/apex-example-cba-restart.json with 100% similarity]
compose/config/sim-all/cdsresponse/controlloop-hostname-update-update-config.json [moved from csit/config/sim-all/cdsresponse/controlloop-hostname-update-update-config.json with 100% similarity]
compose/config/sim-all/logback.xml [moved from csit/config/sim-all/logback.xml with 100% similarity]
compose/config/sim-all/simParameters.json [moved from csit/config/sim-all/simParameters.json with 100% similarity]
compose/config/xacml-pdp/defaultConfig.json [moved from csit/config/xacml-pdp/defaultConfig.json with 100% similarity]
compose/config/xacml-pdp/groups.json [moved from csit/config/xacml-pdp/groups.json with 100% similarity]
compose/config/xacml-pdp/logback.xml [moved from csit/config/xacml-pdp/logback.xml with 100% similarity]
compose/docker-compose.gui.yml [new file with mode: 0644]
compose/docker-compose.yml [moved from csit/docker-compose-all.yml with 86% similarity]
compose/export-ports.sh [moved from csit/start-containter.sh with 62% similarity]
compose/get-versions.sh [moved from csit/get-versions.sh with 92% similarity]
compose/metrics/dashboard.yaml [moved from csit/metrics/dashboard.yaml with 100% similarity]
compose/metrics/dashboards/dashboard-apex-pdp.json [moved from csit/metrics/dashboards/dashboard-apex-pdp.json with 100% similarity]
compose/metrics/dashboards/dashboard-api.json [moved from csit/metrics/dashboards/dashboard-api.json with 100% similarity]
compose/metrics/dashboards/dashboard-distribution.json [moved from csit/metrics/dashboards/dashboard-distribution.json with 100% similarity]
compose/metrics/dashboards/dashboard-drools-apps [moved from csit/metrics/dashboards/dashboard-drools-apps with 100% similarity]
compose/metrics/dashboards/dashboard-drools-pdp.json [moved from csit/metrics/dashboards/dashboard-drools-pdp.json with 100% similarity]
compose/metrics/dashboards/dashboard-for-springboot.json [moved from csit/metrics/dashboards/dashboard-for-springboot.json with 100% similarity]
compose/metrics/dashboards/dashboard-jvm-basic.json [moved from csit/metrics/dashboards/dashboard-jvm-basic.json with 100% similarity]
compose/metrics/dashboards/dashboard-pap.json [moved from csit/metrics/dashboards/dashboard-pap.json with 100% similarity]
compose/metrics/dashboards/dashboard-xacml-pdp.json [moved from csit/metrics/dashboards/dashboard-xacml-pdp.json with 100% similarity]
compose/metrics/dashboards/sla-metrics.json [moved from csit/metrics/dashboards/sla-metrics.json with 100% similarity]
compose/metrics/datasource.yaml [moved from csit/metrics/datasource.yaml with 100% similarity]
compose/metrics/prometheus.yml [moved from csit/metrics/prometheus.yml with 100% similarity]
compose/start-compose.sh [new file with mode: 0755]
compose/stop-compose.sh [moved from csit/start-grafana.sh with 58% similarity]
compose/wait_for_port.sh [moved from csit/wait_for_port.sh with 100% similarity]
csit/apex-pdp/plans/setup.sh [deleted file]
csit/apex-pdp/plans/testplan.txt [deleted file]
csit/api/plans/setup.sh [deleted file]
csit/api/plans/testplan.txt [deleted file]
csit/clamp/plans/setup.sh [deleted file]
csit/clamp/plans/testplan.txt [deleted file]
csit/compose-postgres.yml [deleted file]
csit/db-migrator/plans/setup.sh [deleted file]
csit/db-migrator/plans/teardown.sh [deleted file]
csit/db-migrator/plans/testplan.txt [deleted file]
csit/db-migrator/tests/db-migrator-test.robot [deleted file]
csit/distribution/plans/setup.sh [deleted file]
csit/distribution/plans/testplan.txt [deleted file]
csit/distribution/tests/data/event.json [deleted file]
csit/drools-applications/plans/setup.sh [deleted file]
csit/drools-applications/plans/testplan.txt [deleted file]
csit/drools-pdp/plans/setup.sh [deleted file]
csit/drools-pdp/plans/testplan.txt [deleted file]
csit/get-branch.sh [deleted file]
csit/get-instance-ip.sh [deleted file]
csit/get-models-examples.sh [deleted file]
csit/pap/plans/setup.sh [deleted file]
csit/pap/plans/testplan.txt [deleted file]
csit/resources/Dockerfile [new file with mode: 0644]
csit/resources/scripts/get-cluster-info.sh [moved from csit/get-cluster-info.sh with 100% similarity]
csit/resources/scripts/node-templates.sh [new file with mode: 0755]
csit/resources/scripts/prepare-robot-env.sh [moved from csit/prepare-robot-env.sh with 64% similarity]
csit/resources/scripts/pylibs.txt [moved from csit/pylibs.txt with 100% similarity]
csit/resources/scripts/run-test.sh [new file with mode: 0755]
csit/resources/scripts/setup-apex-pdp.sh [moved from csit/distribution/plans/teardown.sh with 67% similarity]
csit/resources/scripts/setup-api.sh [moved from csit/clamp/plans/teardown.sh with 60% similarity]
csit/resources/scripts/setup-clamp.sh [moved from csit/api/plans/teardown.sh with 68% similarity]
csit/resources/scripts/setup-distribution.sh [moved from csit/apex-pdp/plans/teardown.sh with 56% similarity]
csit/resources/scripts/setup-drools-applications.sh [moved from csit/drools-applications/plans/teardown.sh with 53% similarity]
csit/resources/scripts/setup-drools-pdp.sh [moved from csit/drools-pdp/plans/teardown.sh with 61% similarity]
csit/resources/scripts/setup-pap.sh [moved from csit/pap/plans/teardown.sh with 64% similarity]
csit/resources/scripts/setup-xacml-pdp.sh [moved from csit/xacml-pdp/plans/teardown.sh with 59% similarity]
csit/resources/scripts/wait_for_rest.sh [moved from csit/wait_for_rest.sh with 97% similarity]
csit/resources/tests/apex-pdp-test.robot [moved from csit/apex-pdp/tests/apex-pdp-test.robot with 85% similarity]
csit/resources/tests/api-test.robot [moved from csit/api/tests/api-test.robot with 95% similarity]
csit/resources/tests/common-library.robot [moved from csit/common-library.robot with 78% similarity]
csit/resources/tests/data/AutomationComposition.json [moved from csit/clamp/tests/data/AutomationComposition.json with 100% similarity]
csit/resources/tests/data/InstantiateAC.json [moved from csit/clamp/tests/data/InstantiateAC.json with 100% similarity]
csit/resources/tests/data/PMSHMultipleACTosca.yaml [moved from csit/clamp/tests/data/PMSHMultipleACTosca.yaml with 100% similarity]
csit/resources/tests/data/PassivateAC.json [moved from csit/clamp/tests/data/PassivateAC.json with 100% similarity]
csit/resources/tests/data/PassiveCommand.json [moved from csit/clamp/tests/data/PassiveCommand.json with 100% similarity]
csit/resources/tests/data/RunningCommand.json [moved from csit/clamp/tests/data/RunningCommand.json with 100% similarity]
csit/resources/tests/data/StateChangeRunningAC.json [moved from csit/clamp/tests/data/StateChangeRunningAC.json with 100% similarity]
csit/resources/tests/data/VesEventForPnfPolicy.json [moved from csit/apex-pdp/tests/data/VesEventForPnfPolicy.json with 100% similarity]
csit/resources/tests/data/VesEventForVnfPolicy.json [moved from csit/apex-pdp/tests/data/VesEventForVnfPolicy.json with 100% similarity]
csit/resources/tests/data/apex.policy.decisionmaker.input.tosca.json [moved from csit/pap/tests/data/apex.policy.decisionmaker.input.tosca.json with 100% similarity]
csit/resources/tests/data/create.group.request.json [moved from csit/pap/tests/data/create.group.request.json with 100% similarity]
csit/resources/tests/data/csar/sample_csar_with_apex_policy.csar [moved from csit/distribution/config/csar/sample_csar_with_apex_policy.csar with 100% similarity]
csit/resources/tests/data/deploy.drools.policies.json [moved from csit/drools-applications/tests/data/deploy.drools.policies.json with 100% similarity]
csit/resources/tests/data/deploy.group.request.json [moved from csit/pap/tests/data/deploy.group.request.json with 100% similarity]
csit/resources/tests/data/deploy.xacml.policies.json [moved from csit/drools-applications/tests/data/deploy.xacml.policies.json with 100% similarity]
csit/resources/tests/data/event.json [moved from csit/apex-pdp/tests/data/event.json with 100% similarity]
csit/resources/tests/data/functional-pmsh-usecase.yaml [moved from csit/clamp/tests/data/functional-pmsh-usecase.yaml with 100% similarity]
csit/resources/tests/data/http-usecase.yaml [moved from csit/clamp/tests/data/http-usecase.yaml with 100% similarity]
csit/resources/tests/data/make_topic.sh [moved from csit/make_topic.sh with 93% similarity]
csit/resources/tests/data/onap.pnf.metadataSet.Test.json [moved from csit/apex-pdp/tests/data/onap.pnf.metadataSet.Test.json with 100% similarity]
csit/resources/tests/data/onap.policies.apex.pnf.Test.json [moved from csit/apex-pdp/tests/data/onap.policies.apex.pnf.Test.json with 100% similarity]
csit/resources/tests/data/onap.policies.apex.pnf.metadataSet.Test.json [moved from csit/apex-pdp/tests/data/onap.policies.apex.pnf.metadataSet.Test.json with 100% similarity]
csit/resources/tests/data/onap.policies.apex.vnf.Test.json [moved from csit/apex-pdp/tests/data/onap.policies.apex.vnf.Test.json with 100% similarity]
csit/resources/tests/data/onap.policies.native.apex.Sampledomain.json [moved from csit/apex-pdp/tests/data/onap.policies.native.apex.Sampledomain.json with 100% similarity]
csit/resources/tests/data/onap.policy.guard.decision.request.json [moved from csit/xacml-pdp/tests/data/onap.policy.guard.decision.request.json with 100% similarity]
csit/resources/tests/data/onap.policy.monitoring.decision.request.json [moved from csit/xacml-pdp/tests/data/onap.policy.monitoring.decision.request.json with 100% similarity]
csit/resources/tests/data/onap.policy.monitoring.tcagen2.v1.json [moved from csit/api/tests/data/onap.policy.monitoring.tcagen2.v1.json with 100% similarity]
csit/resources/tests/data/onap.policy.monitoring.tcagen2.v2.json [moved from csit/api/tests/data/onap.policy.monitoring.tcagen2.v2.json with 100% similarity]
csit/resources/tests/data/onap.policy.monitoring.tcagen2.v3.json [moved from csit/api/tests/data/onap.policy.monitoring.tcagen2.v3.json with 100% similarity]
csit/resources/tests/data/onap.policy.naming.decision.request.json [moved from csit/xacml-pdp/tests/data/onap.policy.naming.decision.request.json with 100% similarity]
csit/resources/tests/data/onap.policy.optimization.decision.request.json [moved from csit/xacml-pdp/tests/data/onap.policy.optimization.decision.request.json with 100% similarity]
csit/resources/tests/data/onset.sh [moved from csit/onset.sh with 94% similarity]
csit/resources/tests/data/policy_deploy.json [moved from csit/apex-pdp/tests/data/policy_deploy.json with 100% similarity]
csit/resources/tests/data/vCPE.policy.input.tosca.deploy.json [moved from csit/xacml-pdp/tests/data/vCPE.policy.input.tosca.deploy.json with 100% similarity]
csit/resources/tests/data/vcpeOnset.json [moved from csit/drools-applications/tests/data/vcpeOnset.json with 100% similarity]
csit/resources/tests/data/vdnsOnset.json [moved from csit/drools-applications/tests/data/vdnsOnset.json with 100% similarity]
csit/resources/tests/data/vfwOnset.json [moved from csit/drools-applications/tests/data/vfwOnset.json with 100% similarity]
csit/resources/tests/data/wait_topic.sh [moved from csit/wait_topic.sh with 95% similarity]
csit/resources/tests/distribution-test.robot [moved from csit/distribution/tests/distribution-test.robot with 72% similarity]
csit/resources/tests/drools-applications-test.robot [moved from csit/drools-applications/tests/drools-applications-test.robot with 70% similarity]
csit/resources/tests/drools-pdp-test.robot [moved from csit/drools-pdp/tests/drools-pdp-test.robot with 78% similarity]
csit/resources/tests/pap-slas.robot [moved from csit/pap/tests/pap-slas.robot with 94% similarity]
csit/resources/tests/pap-test.robot [moved from csit/pap/tests/pap-test.robot with 87% similarity]
csit/resources/tests/policy-clamp-test.robot [moved from csit/clamp/tests/policy-clamp-test.robot with 77% similarity]
csit/resources/tests/xacml-pdp-test.robot [moved from csit/xacml-pdp/tests/xacml-pdp-test.robot with 89% similarity]
csit/run-project-csit.sh
csit/start-all.sh [deleted file]
csit/stop-all.sh [deleted file]
csit/xacml-pdp/plans/setup.sh [deleted file]
csit/xacml-pdp/plans/testplan.txt [deleted file]

index fee07ae..e1fd2d4 100644 (file)
@@ -12,3 +12,5 @@ env.properties
 models
 .vscode/
 **/*.log
+**/*/Chart.lock
+**/*/charts/
similarity index 100%
rename from csit/config/db/db.sh
rename to compose/config/db/db.sh
diff --git a/compose/docker-compose.gui.yml b/compose/docker-compose.gui.yml
new file mode 100644 (file)
index 0000000..3d711af
--- /dev/null
@@ -0,0 +1,63 @@
+#
+# ===========LICENSE_START====================================================
+#  Copyright 2023 Nordix Foundation.
+# ============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=====================================================
+#
+version: '2'
+services:
+   policy-gui:
+     image: ${CONTAINER_LOCATION}onap/policy-gui:latest
+     container_name: policy-gui
+     depends_on:
+      - policy-clamp-backend
+     hostname: policy-gui
+     environment:
+       CLAMP_URL: http://policy-clamp-backend:8445
+       CLAMP_DISABLE_SSL_VALIDATION: "true"
+     ports:
+      - 2445:2445
+     volumes:
+      - ./config/policy-gui/application.yaml:/opt/app/policy/gui/etc/application.yml
+      - ./config/policy-gui/logback.xml:/opt/app/policy/gui/etc/logback.xml:ro
+      - ./wait_for_port.sh:/opt/app/policy/gui/bin/wait_for_port.sh:ro
+     entrypoint: ./policy-gui.sh
+     working_dir: /opt/app/policy/gui/bin
+     command: ./policy-gui.sh
+   policy-clamp-backend:
+     image: ${CONTAINER_LOCATION}onap/policy-clamp-backend:${POLICY_CLAMP_VERSION}
+     container_name: policy-clamp-backend
+     depends_on:
+      - policy-clamp-runtime-acm
+      - distribution
+     hostname: policy-clamp-backend
+     environment:
+        POLICY_API_HOST: api
+        POLICY_PAP_HOST: pap
+        MARIADB_HOST: mariadb
+        RUNTIME_HOST: policy-clamp-runtime-acm
+     ports:
+      - 8445:8445
+     volumes:
+      - ./config/clamp/ClampBackend.properties:/opt/policy/clamp/config/ClampBackend.properties:ro
+      - ./config/clamp/logback-backend.xml:/opt/policy/clamp/config/logback.xml:ro
+     working_dir: /opt/policy/clamp
+     command: java
+      -Djava.security.egd=file:/dev/./urandom
+      -XX:MinRAMPercentage=50
+      -XX:MaxRAMPercentage=75
+      -jar ./policy-clamp-backend.jar
+      --spring.config.name=ClampBackend
+      --spring.config.location=/opt/policy/clamp/config/ClampBackend.properties
\ No newline at end of file
similarity index 86%
rename from csit/docker-compose-all.yml
rename to compose/docker-compose.yml
index 2116e54..712b652 100644 (file)
@@ -43,7 +43,7 @@ services:
         SQL_DB: policyadmin
         SQL_HOST: mariadb
       volumes:
-         - ./db_migrator_policy_init.sh:/opt/app/policy/bin/db_migrator_policy_init.sh:ro
+         - ./config/db-migrator/init.sh:/opt/app/policy/bin/db_migrator_policy_init.sh:ro
          - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
       entrypoint: /opt/app/policy/bin/wait_for_port.sh
       command: [
@@ -75,7 +75,7 @@ services:
        - 3904
        - 6680
       ports:
-       - 30227:3904
+       - ${DMAAP_PORT}:3904
    api:
       image: ${CONTAINER_LOCATION}onap/policy-api:${POLICY_API_VERSION}
       container_name: policy-api
@@ -83,7 +83,7 @@ services:
        - policy-db-migrator
       hostname: policy-api
       ports:
-       - 30440:6969
+       - ${API_PORT}:6969
       volumes:
        - ./config/api/apiParameters.yaml:/opt/app/policy/api/etc/apiParameters.yaml:ro
        - ./config/api/logback.xml:/opt/app/policy/api/etc/logback.xml:ro
@@ -103,7 +103,7 @@ services:
        - api
       hostname: policy-pap
       ports:
-       - 30442:6969
+       - ${PAP_PORT}:6969
       volumes:
        - ./config/pap/papParameters.yaml:/opt/app/policy/pap/etc/papParameters.yaml:ro
        - ./config/${PROJECT}/groups.json:/opt/app/policy/pap/etc/mounted/groups.json:ro
@@ -125,7 +125,7 @@ services:
        - pap
       hostname: policy-xacml-pdp
       ports:
-       - 30441:6969
+       - ${XACML_PORT}:6969
        - 30999:3904
       volumes:
        - ./config/xacml-pdp/defaultConfig.json:/opt/app/policy/pdpx/etc/defaultConfig.json:ro
@@ -147,8 +147,8 @@ services:
        - pap
       hostname: drools
       ports:
-       - 30217:6969
-       - 30216:9696
+       - ${DROOLS_PORT}:6969
+       - ${DROOLS_TELEMETRY_PORT}:9696
       volumes:
        - ./config/drools-pdp/custom:/tmp/policy-install/config:ro
        - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
@@ -170,8 +170,8 @@ services:
        - xacml-pdp
       hostname: drools-apps
       ports:
-       - 30221:6969
-       - 30219:9696
+       - ${DROOLS_APPS_PORT}:6969
+       - ${DROOLS_APPS_TELEMETRY_PORT}:9696
       volumes:
        - ./config/drools-applications/custom:/tmp/policy-install/config:ro
        - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
@@ -199,8 +199,8 @@ services:
        - pap
       hostname: policy-apex-pdp
       ports:
-       - 30237:6969
-       - 23324:23324
+       - ${APEX_PORT}:6969
+       - ${APEX_EVENTS_PORT}:23324
       volumes:
        - ./config/apex-pdp/OnapPfConfig.json:/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json:ro
        - ./config/apex-pdp/logback.xml:/opt/app/policy/apex-pdp/etc/logback.xml:ro
@@ -222,10 +222,10 @@ services:
        - apex-pdp
       hostname: policy-distribution
       ports:
-       - 30238:6969
+       - ${DIST_PORT}:6969
       volumes:
        - ./config/distribution/defaultConfig.json:/opt/app/policy/distribution/etc/defaultConfig.json:ro
-       - ./distribution/config/temp/:/opt/app/policy/distribution/etc/temp/:ro
+       - /tmp/distribution/:/opt/app/policy/distribution/etc/temp/:ro
        - ./config/distribution/logback.xml:/opt/app/policy/distribution/etc/logback.xml:ro
        - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
       entrypoint: /opt/app/policy/bin/wait_for_port.sh
@@ -244,7 +244,7 @@ services:
        - simulator
       hostname: policy-clamp-runtime-acm
       ports:
-       - 30258:6969
+       - ${ACM_PORT}:6969
       volumes:
        - ./config/clamp/AcRuntimeParameters.yaml:/opt/app/policy/clamp/etc/AcRuntimeParameters.yaml
        - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro
@@ -297,7 +297,7 @@ services:
        - api
       hostname: policy-clamp-ac-pf-ppnt
       ports:
-       - 30218:6969
+       - ${POLICY_PARTICIPANT_PORT}:6969
       volumes:
        - ./config/clamp/PolicyParticipantParameters.yaml:/opt/app/policy/clamp/etc/PolicyParticipantParameters.yaml:ro
        - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro
@@ -325,55 +325,12 @@ services:
         '-c', './a1pms-participant.sh',
         'message-router', '3904'
         ]
-   policy-gui:
-     image: ${CONTAINER_LOCATION}onap/policy-gui:latest
-     container_name: policy-gui
-     depends_on:
-      - policy-clamp-backend
-     hostname: policy-gui
-     environment:
-       CLAMP_URL: http://policy-clamp-backend:8445
-       CLAMP_DISABLE_SSL_VALIDATION: "true"
-     ports:
-      - 2445:2445
-     volumes:
-      - ./config/policy-gui/application.yaml:/opt/app/policy/gui/etc/application.yml
-      - ./config/policy-gui/logback.xml:/opt/app/policy/gui/etc/logback.xml:ro
-      - ./wait_for_port.sh:/opt/app/policy/gui/bin/wait_for_port.sh:ro
-     entrypoint: ./policy-gui.sh
-     working_dir: /opt/app/policy/gui/bin
-     command: ./policy-gui.sh
-   policy-clamp-backend:
-     image: ${CONTAINER_LOCATION}onap/policy-clamp-backend:${POLICY_CLAMP_VERSION}
-     container_name: policy-clamp-backend
-     depends_on:
-      - policy-clamp-runtime-acm
-      - distribution
-     hostname: policy-clamp-backend
-     environment:
-        POLICY_API_HOST: api
-        POLICY_PAP_HOST: pap
-        MARIADB_HOST: mariadb
-        RUNTIME_HOST: policy-clamp-runtime-acm
-     ports:
-      - 8445:8445
-     volumes:
-      - ./config/clamp/ClampBackend.properties:/opt/policy/clamp/config/ClampBackend.properties:ro
-      - ./config/clamp/logback-backend.xml:/opt/policy/clamp/config/logback.xml:ro
-     working_dir: /opt/policy/clamp
-     command: java
-      -Djava.security.egd=file:/dev/./urandom
-      -XX:MinRAMPercentage=50
-      -XX:MaxRAMPercentage=75
-      -jar ./policy-clamp-backend.jar
-      --spring.config.name=ClampBackend
-      --spring.config.location=/opt/policy/clamp/config/ClampBackend.properties
    prometheus:
       image: prom/prometheus:v2.32.1
       container_name: prometheus
       hostname: prometheus
       ports:
-       - 30259:9090
+       - ${PROMETHEUS_PORT}:9090
       volumes:
        - ./metrics/prometheus.yml:/etc/prometheus/prometheus.yml
    grafana:
@@ -383,7 +340,7 @@ services:
        - prometheus
       hostname: grafana
       ports:
-       - 30269:3000
+       - ${GRAFANA_PORT}:3000
       volumes:
        - ./metrics/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
        - ./metrics/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
similarity index 62%
rename from csit/start-containter.sh
rename to compose/export-ports.sh
index 3b1b167..d859b1a 100755 (executable)
@@ -1,6 +1,7 @@
-# ============LICENSE_START====================================================
-# Copyright (C) 2022 Nordix Foundation.
-# =============================================================================
+#!/bin/bash
+# ============LICENSE_START=======================================================
+# Copyright 2023 Nordix Foundation.
+# ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
 # limitations under the License.
 #
 # SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END======================================================
-
-
-if [ "$#" -ne 1 ]
-then
-  echo "Usage: $0 <container-name>"
-  exit 1
-fi
-
-export PROJECT=$1
+# ============LICENSE_END=========================================================
 
 if $(docker images | grep -q "onap\/policy-api")
 then
-    export CONTAINER_LOCATION=$(
+    CONTAINER_LOCATION=$(
         docker images |
         grep onap/policy-api |
         head -1 |
         sed 's/onap\/policy-api.*$//'
     )
+    export CONTAINER_LOCATION
 else
     export CONTAINER_LOCATION="nexus3.onap.org:10001/"
 fi
 
-SCRIPTS=$(git rev-parse --show-toplevel)
-export SCRIPTS="${SCRIPTS}"/csit
-
-source "${SCRIPTS}"/get-versions.sh
-
-docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up $*
-
-echo "Clamp GUI: https://localhost:2445/clamp"
+# EXPLICITLY ASSIGN PORTS FOR TESTING PURPOSES
+export APEX_PORT=30001
+export APEX_EVENTS_PORT=23324
+export API_PORT=30002
+export PAP_PORT=30003
+export XACML_PORT=30004
+export DROOLS_PORT=30005
+export DROOLS_TELEMETRY_PORT=30216
+export DIST_PORT=30006
+export ACM_PORT=30007
+export POLICY_PARTICIPANT_PORT=30008
+export DROOLS_APPS_PORT=30009
+export DROOLS_APPS_TELEMETRY_PORT=30219
+export DMAAP_PORT=30904
+export PROMETHEUS_PORT=30259
+export GRAFANA_PORT=30269
similarity index 92%
rename from csit/get-versions.sh
rename to compose/get-versions.sh
index d309084..600d8c9 100755 (executable)
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END======================================================
 
-
-if [[ -z "$GERRIT_BRANCH" ]]
-then
-    source "${SCRIPTS}"/get-branch.sh
-else
-    echo GERRIT_BRANCH="${GERRIT_BRANCH}"
+if [ -z "${WORKSPACE}" ]; then
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
 fi
 
+GERRIT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' \
+                    "${WORKSPACE}"/.gitreview)
+
+echo GERRIT_BRANCH="${GERRIT_BRANCH}"
+
 export POLICY_MARIADB_VER=10.10.2
 echo POLICY_MARIADB_VER=${POLICY_MARIADB_VER}
 
@@ -36,9 +38,9 @@ echo POLICY_POSTGRES_VER=${POLICY_POSTGRES_VER}
 
 function getDockerVersion
 {
-    REPO=$1
-    DEFAULT_DOCKER_IMAGE_NAME=$2
-    DEFAULT_DOCKER_IMAGE_VERSION=$3
+    REPO=${1}
+    DEFAULT_DOCKER_IMAGE_NAME=${2:-}
+    DEFAULT_DOCKER_IMAGE_VERSION=${3:-}
 
     REPO_RELEASE_DATA=$(
         curl -qL --silent \
diff --git a/compose/start-compose.sh b/compose/start-compose.sh
new file mode 100755 (executable)
index 0000000..57b5531
--- /dev/null
@@ -0,0 +1,95 @@
+#!/bin/bash
+#
+# ============LICENSE_START====================================================
+#  Copyright (C) 2022-2023 Nordix Foundation.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+#Usage: $0 [policy-component] [OPTIONS]"
+#"  OPTIONS:"
+#"  --grafana        start the docker compose with grafana"
+#"  --gui            start the docker compose with gui"
+#"  no policy-component will start all components"
+
+if [ -z "${WORKSPACE}" ]; then
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
+fi
+COMPOSE_FOLDER="${WORKSPACE}"/compose
+
+# Set default values for the options
+grafana=false
+gui=false
+
+# Parse the command-line arguments
+while [[ $# -gt 0 ]]
+do
+  key="$1"
+
+  case $key in
+    --grafana)
+      grafana=true
+      shift
+      ;;
+    --gui)
+      gui=true
+      shift 2
+      break;
+      ;;
+    *)
+      echo "$1"
+      component="$1"
+      shift
+      ;;
+  esac
+done
+
+echo "Configuring docker compose..."
+source "${COMPOSE_FOLDER}"/export-ports.sh > /dev/null 2>&1
+source "${COMPOSE_FOLDER}"/get-versions.sh > /dev/null 2>&1
+
+# in case of csit running for PAP (groups should be for pap) but starts apex-pdp for dependencies.
+if [ -z "$PROJECT" ]; then
+  PROJECT=$component
+fi
+
+if [ -n "$component" ]; then
+  if [ "$grafana" = true ]; then
+    echo "Starting ${component} application with Grafana"
+    docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml up -d "${component}" grafana
+    echo "Prometheus server: http://localhost:${PROMETHEUS_PORT}"
+    echo "Grafana server: http://localhost:${GRAFANA_PORT}"
+  elif [ "$gui" = true ]; then
+    echo "Starting application with gui..."
+    docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml \
+                   -f "${COMPOSE_FOLDER}"/docker-compose.gui.yml up -d "${component}" policy-gui
+    echo "Clamp GUI: https://localhost:2445/clamp"
+  else
+    echo "Starting ${component} application"
+    docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml up -d "${component}"
+  fi
+else
+  PROJECT=pap
+  if [ "$gui" = true ]; then
+    echo "Starting application with gui..."
+    docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml \
+                   -f "${COMPOSE_FOLDER}"/docker-compose.gui.yml up -d
+    echo "Clamp GUI: https://localhost:2445/clamp"
+  else
+    echo "Starting all components..."
+    docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml up -d
+  fi
+fi
similarity index 58%
rename from csit/start-grafana.sh
rename to compose/stop-compose.sh
index 646b6f6..810c9fe 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 #
 # ============LICENSE_START====================================================
-#  Copyright (C) 2022-2023 Nordix Foundation.
+#  Copyright (C) 2023 Nordix Foundation.
 # =============================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END======================================================
 
-SCRIPTS=$(git rev-parse --show-toplevel)
-export SCRIPTS="${SCRIPTS}"/csit
-export CONTAINER_LOCATION="nexus3.onap.org:10001/"
-
-source "${SCRIPTS}"/get-versions.sh
+echo "Shut down started!"
+if [ -z "${WORKSPACE}" ]; then
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
+fi
+COMPOSE_FOLDER="${WORKSPACE}"/compose
 
-export PROJECT="${1}"
+source "${COMPOSE_FOLDER}"/export-ports.sh > /dev/null 2>&1
+source "${COMPOSE_FOLDER}"/get-versions.sh > /dev/null 2>&1
 
-if [ -z "${PROJECT}" ]; then
-    echo "Starting all components..."
-    docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d
-else
-    echo "Starting ${PROJECT} application..."
-    docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d "${PROJECT}" grafana
-fi
+echo "Collecting logs from docker compose containers..."
+docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml logs > docker_compose.log
+cat docker_compose.log
 
-echo "Prometheus server: http://localhost:30259"
-echo "Grafana server: http://localhost:30269"
+echo "Tearing down containers..."
+docker-compose -f "${COMPOSE_FOLDER}"/docker-compose.yml down -v
diff --git a/csit/apex-pdp/plans/setup.sh b/csit/apex-pdp/plans/setup.sh
deleted file mode 100755 (executable)
index 9241041..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/bash
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2018 Ericsson. All rights reserved.
-#
-#  Modifications Copyright (c) 2019-2023 Nordix Foundation.
-#  Modifications Copyright (C) 2020-2021 AT&T Intellectual Property.
-#  Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-echo "Uninstall docker-py and reinstall docker."
-python3 -m pip uninstall -y docker-py
-python3 -m pip uninstall -y docker
-python3 -m pip install -U docker
-
-sudo apt-get -y install libxml2-utils
-
-source "${SCRIPTS}"/get-versions.sh
-
-docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d apex-pdp grafana
-
-unset http_proxy https_proxy
-
-POLICY_API_IP=$(get-instance-ip.sh policy-api)
-POLICY_API_PORT=30440
-POLICY_PAP_IP=$(get-instance-ip.sh policy-pap)
-POLICY_PAP_PORT=30442
-MARIADB_IP=$(get-instance-ip.sh mariadb)
-APEX_IP=$(get-instance-ip.sh policy-apex-pdp)
-APEX_PORT=30237
-SIM_IP=$(get-instance-ip.sh simulator)
-export SIM_IP
-
-echo PAP IP IS "${POLICY_PAP_IP}"
-echo MARIADB IP IS "${MARIADB_IP}"
-echo API IP IS "${POLICY_API_IP}"
-echo APEX IP IS "${APEX_IP}"
-echo DMAAP_IP IS "${SIM_IP}"
-
-# wait for the app to start up
-"${SCRIPTS}"/wait_for_rest.sh localhost "${APEX_PORT}"
-
-ROBOT_VARIABLES=""
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCRIPTS:${SCRIPTS}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v APEX_IP:${APEX_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v APEX_PORT:${APEX_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_PORT:${POLICY_API_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_IP:${POLICY_PAP_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_PORT:${POLICY_PAP_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DMAAP_IP:${SIM_IP}"
diff --git a/csit/apex-pdp/plans/testplan.txt b/csit/apex-pdp/plans/testplan.txt
deleted file mode 100644 (file)
index 3d3525d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests.
-# Place the suites in run order.
-apex-pdp-test.robot
diff --git a/csit/api/plans/setup.sh b/csit/api/plans/setup.sh
deleted file mode 100755 (executable)
index 31d1683..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/bash
-# ============LICENSE_START=======================================================
-# Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
-# Modifications Copyright 2021-2023 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-echo "Uninstall docker-py and reinstall docker."
-python3 -m pip uninstall -y docker-py
-python3 -m pip uninstall -y docker
-python3 -m pip install -U docker
-
-source "${SCRIPTS}"/get-versions.sh
-
-sudo apt-get -y install libxml2-utils
-bash "${SCRIPTS}"/get-models-examples.sh
-
-DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies
-
-NODETEMPLATES=${WORKSPACE}/models/models-examples/src/main/resources/nodetemplates
-
-# create a couple of variations of the policy definitions
-sed -e 's!Measurement_vGMUX!ADifferentValue!' \
-        ${DATA}/vCPE.policy.monitoring.input.tosca.json \
-    >${DATA}/vCPE.policy.monitoring.input.tosca.v1_2.json
-
-sed -e 's!"version": "1.0.0"!"version": "2.0.0"!' \
-        -e 's!"policy-version": 1!"policy-version": 2!' \
-        ${DATA}/vCPE.policy.monitoring.input.tosca.json \
-    >${DATA}/vCPE.policy.monitoring.input.tosca.v2.json
-
-echo "${POLICY_API_VERSION}"
-
-cd "${SCRIPTS}"
-docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d api grafana
-
-sleep 10
-unset http_proxy https_proxy
-
-POLICY_API_IP=$(get-instance-ip.sh policy-api)
-POLICY_API_PORT=30440
-MARIADB_IP=$(get-instance-ip.sh mariadb)
-
-echo API IP IS "${POLICY_API_IP}"
-echo MARIADB IP IS "${MARIADB_IP}"
-
-# wait for the app to start up
-"${SCRIPTS}"/wait_for_rest.sh localhost "$POLICY_API_PORT"
-
-ROBOT_VARIABLES=""
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_PORT:${POLICY_API_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA:${DATA}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v NODETEMPLATES:${NODETEMPLATES}"
\ No newline at end of file
diff --git a/csit/api/plans/testplan.txt b/csit/api/plans/testplan.txt
deleted file mode 100644 (file)
index 9a731f8..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests.
-# Place the suites in run order.
-api-test.robot
diff --git a/csit/clamp/plans/setup.sh b/csit/clamp/plans/setup.sh
deleted file mode 100755 (executable)
index b750b02..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/bash
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2021-2023 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-echo "Uninstall docker-py and reinstall docker."
-pip uninstall -y docker-py
-pip uninstall -y docker
-pip install -U docker==2.7.0
-
-sudo apt-get -y install libxml2-utils
-
-source "${SCRIPTS}"/get-versions.sh
-
-# Bringup ACM runtime containers
-docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-clamp-runtime-acm grafana
-
-sleep 10
-unset http_proxy https_proxy
-
-POLICY_RUNTIME_ACM_IP=$(get-instance-ip.sh policy-clamp-runtime-acm)
-POLICY_RUNTIME_ACM_PORT=30258
-MARIADB_IP=$(get-instance-ip.sh mariadb)
-DMAAP_IP=$(get-instance-ip.sh simulator)
-
-echo MARIADB IP IS "${MARIADB_IP}"
-echo DMAAP_IP IS "${DMAAP_IP}"
-echo POLICY RUNTIME ACM IP IS "${POLICY_RUNTIME_ACM_IP}"
-
-# wait for the app to start up
-"${SCRIPTS}"/wait_for_rest.sh localhost "${POLICY_RUNTIME_ACM_PORT}"
-
-# TODO: This disables the participant during ACM refactoring, will be reenabled when ACM
-# TODO: tests are re-enabled
-
-# Bring up ACM participant containers
-#docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-clamp-ac-k8s-ppnt
-#docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-clamp-ac-http-ppnt
-#docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-clamp-ac-pf-ppnt
-#docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-clamp-ac-a1pms-ppnt
-
-#sleep 10
-unset http_proxy https_proxy
-
-POLICY_PARTICIPANT_IP=$(get-instance-ip.sh policy-clamp-ac-pf-ppnt)
-POLICY_PARTICIPANT_PORT=30218
-POLICY_API_IP=$(get-instance-ip.sh policy-api)
-POLICY_API_PORT=30440
-K8S_PARTICIPANT_IP=$(get-instance-ip.sh policy-clamp-ac-k8s-ppnt)
-K8S_PARTICIPANT_PORT=30295
-HTTP_PARTICIPANT_IP=$(get-instance-ip.sh policy-clamp-ac-http-ppnt)
-HTTP_PARTICIPANT_PORT=30290
-A1PMS_PARTICIPANT_IP=$(get-instance-ip.sh policy-clamp-ac-a1pms-ppnt)
-A1PMS_PARTICIPANT_PORT=30296
-
-echo POLICY PARTICIPANT IP IS "${POLICY_PARTICIPANT_IP}"
-echo API IP IS "${POLICY_API_IP}"
-echo K8S PARTICIPANT IP IS "${K8S_PARTICIPANT_IP}"
-echo HTTP PARTICIPANT IP IS "${HTTP_PARTICIPANT_IP}"
-echo A1PMS PARTICIPANT IP IS "${A1PMS_PARTICIPANT_IP}"
-
-# wait for the app to start up
-#"${SCRIPTS}"/wait_for_rest.sh localhost "${POLICY_PARTICIPANT_PORT}"
-
-ROBOT_VARIABLES=""
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_RUNTIME_ACM_IP:${POLICY_RUNTIME_ACM_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_RUNTIME_ACM_PORT:${POLICY_RUNTIME_ACM_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PARTICIPANT_IP:${POLICY_PARTICIPANT_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PARTICIPANT_PORT:${POLICY_PARTICIPANT_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v K8S_PARTICIPANT_IP:${K8S_PARTICIPANT_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v K8S_PARTICIPANT_PORT:${K8S_PARTICIPANT_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v HTTP_PARTICIPANT_IP:${HTTP_PARTICIPANT_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v HTTP_PARTICIPANT_PORT:${HTTP_PARTICIPANT_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v A1PMS_PARTICIPANT_IP:${A1PMS_PARTICIPANT_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v A1PMS_PARTICIPANT_PORT:${A1PMS_PARTICIPANT_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_PORT:${POLICY_API_PORT}"
diff --git a/csit/clamp/plans/testplan.txt b/csit/clamp/plans/testplan.txt
deleted file mode 100644 (file)
index 3c4f4bc..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests.
-# Place the suites in run order.
-policy-clamp-test.robot
diff --git a/csit/compose-postgres.yml b/csit/compose-postgres.yml
deleted file mode 100644 (file)
index 6c5e00a..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-# ===========LICENSE_START====================================================
-#  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.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END=====================================================
-#
-version: '2'
-services:
-  postgres:
-    image: nexus3.onap.org:10001/library/postgres:${POLICY_POSTGRES_VER}
-    container_name: postgres
-    hostname: postgres
-    command: ['--idle_in_transaction_session_timeout=28800']
-    env_file: config/db-pg/db-pg.conf
-    volumes:
-      - ./config/db-pg:/docker-entrypoint-initdb.d:ro
-    expose:
-      - 5432
-  policy-db-migrator-postgres:
-    image: nexus3.onap.org:10001/onap/policy-db-migrator:${POLICY_DOCKER_VERSION}
-    container_name: policy-db-migrator-postgres
-    hostname: policy-db-migrator-postgres
-    depends_on:
-      - postgres
-    expose:
-      - 6824
-    env_file: config/db-pg/db-pg.conf
-    environment:
-      SQL_DB: policyadmin
-      SQL_HOST: postgres
-      PGPASSWORD: policy_user
-    volumes:
-      - ./db_migrator_policy_init_pg.sh:/opt/app/policy/bin/db_migrator_policy_init_pg.sh:ro
-      - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
-    entrypoint: /opt/app/policy/bin/wait_for_port.sh
-    command: [
-      '-c',
-      '/opt/app/policy/bin/db_migrator_policy_init_pg.sh',
-      'postgres', '5432'
-    ]
-  api:
-    image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION}
-    container_name: policy-api
-    depends_on:
-      - policy-db-migrator-postgres
-    hostname: policy-api
-    expose:
-      - 6980
-    volumes:
-      - ./config/ks.jks:/opt/app/policy/api/etc/ssl/policy-keystore:ro
-      - ./config/policy-truststore:/opt/app/policy/api/etc/ssl/policy-truststore:ro
-      - ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh:ro
-    entrypoint: ./wait_for_port.sh
-    command: [
-      '-c', './policy-api.sh',
-      'postgres', '5432',
-      'policy-db-migrator-postgres', '6824'
-    ]
\ No newline at end of file
diff --git a/csit/db-migrator/plans/setup.sh b/csit/db-migrator/plans/setup.sh
deleted file mode 100755 (executable)
index 31d9311..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-echo "Uninstall docker-py and reinstall docker."
-python3 -m pip uninstall -y docker-py
-python3 -m pip uninstall -y docker
-python3 -m pip install -U docker
-python3 -m pip install -U robotframework-databaselibrary
-python3 -m pip install psycopg2-binary
-
-sudo apt-get -y install libxml2-utils
-
-source "${SCRIPTS}"/get-versions.sh
-
-cd "${SCRIPTS}"
-docker-compose -f "${SCRIPTS}"/compose-postgres.yml up -d
-
-sleep 15
-unset http_proxy https_proxy
-
-POSTGRES_IP=$(get-instance-ip.sh postgres)
-POLICY_API_IP=$(get-instance-ip.sh policy-api)
-
-echo POSTGRES IP IS "${POSTGRES_IP}"
-echo POLICY_API_IP IS "${POLICY_API_IP}"
-
-ROBOT_VARIABLES=""
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POSTGRES_IP:${POSTGRES_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}"
\ No newline at end of file
diff --git a/csit/db-migrator/plans/teardown.sh b/csit/db-migrator/plans/teardown.sh
deleted file mode 100755 (executable)
index 0483d84..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-# ============LICENSE_START=======================================================
-#  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.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-docker-compose -f ${SCRIPTS}/compose-postgres.yml down -v
\ No newline at end of file
diff --git a/csit/db-migrator/plans/testplan.txt b/csit/db-migrator/plans/testplan.txt
deleted file mode 100644 (file)
index 4d28117..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests.
-# Place the suites in run order.
-db-migrator-test.robot
diff --git a/csit/db-migrator/tests/db-migrator-test.robot b/csit/db-migrator/tests/db-migrator-test.robot
deleted file mode 100644 (file)
index 44cb155..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-*** Settings ***
-Suite Setup       Connect To Database    psycopg2    ${DB_NAME}    ${DB_USERNAME}    ${DB_PASSWORD}    ${POSTGRES_IP}    ${DB_PORT}
-Suite Teardown    Disconnect From Database
-Library           DatabaseLibrary
-Library           String
-Library           RequestsLibrary
-Library           OperatingSystem
-Library           json
-Resource          ${CURDIR}/../../common-library.robot
-
-*** Variables ***
-${DB_NAME} =  policyadmin
-${DB_USERNAME} =  policy_user
-${DB_PASSWORD} =  policy_user
-${DB_PORT} =  5432
-${PGPASSWORD} =  policy_user
-
-*** Keywords ***
-GetReq
-     [Arguments]  ${url}
-     ${auth}=  PolicyAdminAuth
-     ${resp}=  PerformGetRequest  ${POLICY_API_IP}  ${url}  200  null  ${auth}
-     [return]  ${resp}
-
-*** Test Cases ***
-Test Connection
-     ${output} =    Execute SQL String    SELECT datname FROM pg_database WHERE datname='policyadmin';
-     Log    ${output}
-     Should Be Equal As Strings    ${output}    None
-
-Healthcheck
-     [Documentation]  Verify policy api health check
-     ${resp}=  GetReq  /policy/api/v1/healthcheck
-     Should Be Equal As Strings  ${resp.json()['code']}  200
\ No newline at end of file
diff --git a/csit/distribution/plans/setup.sh b/csit/distribution/plans/setup.sh
deleted file mode 100755 (executable)
index 8efb935..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/bash
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2018 Ericsson. All rights reserved.
-#  Modifications Copyright (c) 2019-2023 Nordix Foundation.
-#  Modifications Copyright (C) 2020-2021 AT&T Intellectual Property.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-echo "Uninstall docker-py and reinstall docker."
-python3 -m pip uninstall -y docker-py
-python3 -m pip uninstall -y docker
-python3 -m pip install -U docker
-
-sudo apt-get -y install libxml2-utils
-
-source "${SCRIPTS}"/get-versions.sh
-
-SCRIPT_DIR=${TESTPLANDIR}/config
-
-# Remaking the csar file in case if the file got corrupted
-zip -F "${SCRIPT_DIR}"/csar/sample_csar_with_apex_policy.csar --out "${SCRIPT_DIR}"/csar/csar_temp.csar
-
-# Remake temp directory
-rm -rf "${SCRIPT_DIR}"/temp
-mkdir "${SCRIPT_DIR}"/temp
-
-docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d distribution
-
-unset http_proxy https_proxy
-
-POLICY_API_IP=$(get-instance-ip.sh policy-api)
-POLICY_PAP_IP=$(get-instance-ip.sh policy-pap)
-MARIADB_IP=$(get-instance-ip.sh mariadb)
-APEX_IP=$(get-instance-ip.sh policy-apex-pdp)
-APEX_PORT=30237
-DMAAP_IP=$(get-instance-ip.sh simulator)
-POLICY_DISTRIBUTION_IP=$(get-instance-ip.sh policy-distribution)
-POLICY_DISTRIBUTION_PORT=30238
-
-echo PAP IP IS "${POLICY_PAP_IP}"
-echo MARIADB IP IS "${MARIADB_IP}"
-echo API IP IS "${POLICY_API_IP}"
-echo APEX IP IS "${APEX_IP}"
-echo DMAAP_IP IS "${DMAAP_IP}"
-echo POLICY_DISTRIBUTION_IP IS "${POLICY_DISTRIBUTION_IP}"
-
-# wait for the app to start up
-"${SCRIPTS}"/wait_for_rest.sh localhost "${POLICY_DISTRIBUTION_PORT}"
-
-ROBOT_VARIABLES=""
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v APEX_IP:${APEX_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v APEX_PORT:${APEX_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCRIPT_DIR:${SCRIPT_DIR}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DISTRIBUTION_IP:${POLICY_DISTRIBUTION_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DISTRIBUTION_PORT:${POLICY_DISTRIBUTION_PORT}"
diff --git a/csit/distribution/plans/testplan.txt b/csit/distribution/plans/testplan.txt
deleted file mode 100644 (file)
index fa0ab03..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests.
-# Place the suites in run order.
-distribution-test.robot
diff --git a/csit/distribution/tests/data/event.json b/csit/distribution/tests/data/event.json
deleted file mode 100644 (file)
index 9dbf279..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-    "nameSpace": "org.onap.policy.apex.sample.events",
-    "name": "Event0000",
-    "version": "0.0.1",
-    "source": "REST_0",
-    "target": "apex",
-    "TestSlogan": "Test slogan for External Event0",
-    "TestMatchCase": 3,
-    "TestTimestamp": 1536363522018,
-    "TestTemperature": 9080.866
-}
diff --git a/csit/drools-applications/plans/setup.sh b/csit/drools-applications/plans/setup.sh
deleted file mode 100755 (executable)
index 5f680b4..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/bash
-#
-# ===========LICENSE_START====================================================
-#  Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
-#  Modifications Copyright 2021-2023 Nordix Foundation.
-# ============================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END=====================================================
-#
-
-echo "Uninstall docker-py and reinstall docker."
-python3 -m pip uninstall -y docker-py
-python3 -m pip uninstall -y docker
-python3 -m pip install -U docker
-
-sudo apt-get -y install libxml2-utils
-
-source "${SCRIPTS}"/get-versions.sh
-bash "${SCRIPTS}"/get-models-examples.sh
-
-docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d drools-apps
-
-unset http_proxy https_proxy
-
-DROOLS_IP=$(get-instance-ip.sh drools-apps)
-DROOLS_PORT=30221
-API_IP=$(get-instance-ip.sh policy-api)
-API_PORT=30440
-PAP_IP=$(get-instance-ip.sh policy-pap)
-PAP_PORT=30442
-XACML_IP=$(get-instance-ip.sh policy-xacml-pdp)
-XACML_PORT=30441
-SIM_IP=$(get-instance-ip.sh simulator)
-export SIM_IP
-
-echo DROOLS IP IS "${DROOLS_IP}"
-echo API IP IS "${API_IP}"
-echo PAP IP IS "${PAP_IP}"
-echo XACML IP IS "${XACML_IP}"
-echo SIMULATORS IP IS "${SIM_IP}"
-
-# wait for the app to start up
-"${SCRIPTS}"/wait_for_rest.sh localhost 30219
-
-# give enough time for the controllers to come up
-sleep 15
-
-DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies
-DATA2=${TESTPLANDIR}/tests/data
-
-ROBOT_VARIABLES=""
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCR2:${SCRIPTS}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA:${DATA}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA2:${DATA2}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DROOLS_IP:${DROOLS_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DROOLS_PORT:${DROOLS_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v API_IP:${API_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v API_PORT:${API_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v PAP_IP:${PAP_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v PAP_PORT:${PAP_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v XACML_IP:${XACML_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v XACML_PORT:${XACML_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SIM_IP:${SIM_IP}"
diff --git a/csit/drools-applications/plans/testplan.txt b/csit/drools-applications/plans/testplan.txt
deleted file mode 100644 (file)
index 6ca7384..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests.
-# Place the suites in run order.
-drools-applications-test.robot
diff --git a/csit/drools-pdp/plans/setup.sh b/csit/drools-pdp/plans/setup.sh
deleted file mode 100755 (executable)
index f08126e..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-# ============LICENSE_START=======================================================
-# Copyright 2017-2021 AT&T Intellectual Property. All rights reserved.
-# Modifications Copyright 2021-2023 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-echo "Uninstall docker-py and reinstall docker."
-python3 -m pip uninstall -y docker-py
-python3 -m pip uninstall -y docker
-python3 -m pip install -U docker
-
-sudo apt-get -y install libxml2-utils
-
-source "${SCRIPTS}"/get-versions.sh
-
-docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d drools
-
-POLICY_DROOLS_IP=$(get-instance-ip.sh drools)
-POLICY_DROOLS_PORT=30217
-MARIADB_IP=$(get-instance-ip.sh mariadb)
-
-echo DROOLS IP IS "${POLICY_DROOLS_IP}"
-echo MARIADB IP IS "${MARIADB_IP}"
-
-# wait for the app to start up - looking for telemetry service on port 30216 forwarded from 9696
-"${SCRIPTS}"/wait_for_rest.sh localhost 30216
-
-# give enough time for the controllers to come up
-sleep 15
-
-ROBOT_VARIABLES=""
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DROOLS_IP:${POLICY_DROOLS_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DROOLS_PORT:${POLICY_DROOLS_PORT}"
diff --git a/csit/drools-pdp/plans/testplan.txt b/csit/drools-pdp/plans/testplan.txt
deleted file mode 100644 (file)
index a63b6ed..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests.
-# Place the suites in run order.
-drools-pdp-test.robot
diff --git a/csit/get-branch.sh b/csit/get-branch.sh
deleted file mode 100755 (executable)
index 3ce5131..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-# ============LICENSE_START====================================================
-#  Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
-#  Modifications Copyright 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.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END======================================================
-
-export NEXUS_URL=https://nexus.onap.org/content/repositories/snapshots
-
-GIT_TOP=$(git rev-parse --show-toplevel)
-GERRIT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' \
-                    "${GIT_TOP}"/.gitreview)
-echo GERRIT_BRANCH="${GERRIT_BRANCH}"
diff --git a/csit/get-instance-ip.sh b/csit/get-instance-ip.sh
deleted file mode 100755 (executable)
index d6e055f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2016-2017 Huawei Technologies Co., Ltd.
-# Modification Copyright 2021 Â© AT&T Intellectual Property.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $1
diff --git a/csit/get-models-examples.sh b/csit/get-models-examples.sh
deleted file mode 100755 (executable)
index fe75c90..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-#
-# ============LICENSE_START===================================================
-#  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
-#  Modifications Copyright 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.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END=====================================================
-#
-
-source "${SCRIPTS}"/get-branch.sh
-
-rm -rf "${WORKSPACE}"/models
-mkdir "${WORKSPACE}"/models
-cd "${WORKSPACE}"
-
-# download models examples
-git clone -b "${GERRIT_BRANCH}" --single-branch https://github.com/onap/policy-models.git models
diff --git a/csit/pap/plans/setup.sh b/csit/pap/plans/setup.sh
deleted file mode 100755 (executable)
index 4c77acc..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019-2022 Nordix Foundation.
-#  Modifications Copyright (C) 2019-2021 AT&T Intellectual Property.
-#  Modifications Copyright (C) 2022-2023 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-echo "Uninstall docker-py and reinstall docker."
-python3 -m pip uninstall -y docker-py
-python3 -m pip uninstall -y docker
-python3 -m pip install -U docker
-
-source "${SCRIPTS}"/get-versions.sh
-
-sudo apt-get -y install libxml2-utils
-bash "${SCRIPTS}"/get-models-examples.sh
-
-echo "${POLICY_PAP_VERSION}"
-
-cd "${SCRIPTS}"
-docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d pap apex-pdp grafana
-
-sleep 10
-unset http_proxy https_proxy
-
-POLICY_PAP_PORT=30442
-POLICY_API_PORT=30440
-
-# wait for the app to start up
-"${SCRIPTS}"/wait_for_rest.sh localhost "${POLICY_PAP_PORT}"
-
-DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies
-
-NODETEMPLATES=${WORKSPACE}/models/models-examples/src/main/resources/nodetemplates
-
-ROBOT_VARIABLES=""
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_PORT:${POLICY_PAP_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_PORT:${POLICY_API_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA:${DATA}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v NODETEMPLATES:${NODETEMPLATES}"
diff --git a/csit/pap/plans/testplan.txt b/csit/pap/plans/testplan.txt
deleted file mode 100644 (file)
index 4fac102..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests.
-# Place the suites in run order.
-pap-test.robot
-pap-slas.robot
diff --git a/csit/resources/Dockerfile b/csit/resources/Dockerfile
new file mode 100644 (file)
index 0000000..6288c05
--- /dev/null
@@ -0,0 +1,14 @@
+FROM python:3
+ARG CSIT_SCRIPT=${CSIT_SCRIPT}
+ARG ROBOT_FILE=${ROBOT_FILE}
+ENV ROBOT_WORKSPACE /opt/robotworkspace
+ENV ROBOT_FILE $ROBOT_FILE
+RUN python3 -m pip install --upgrade pip
+RUN python3 -m pip install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.5.1.*' --pre
+RUN python3 -m pip freeze
+RUN mkdir -p ${ROBOT_WORKSPACE}
+COPY ${CSIT_SCRIPT} ${ROBOT_WORKSPACE}/
+COPY tests/ ${ROBOT_WORKSPACE}/
+WORKDIR ${ROBOT_WORKSPACE}
+RUN chmod +x run-test.sh
+CMD ["sh", "-c", "./run-test.sh" , "${ROBOT_FILE}"]
diff --git a/csit/resources/scripts/node-templates.sh b/csit/resources/scripts/node-templates.sh
new file mode 100755 (executable)
index 0000000..4dc19d2
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+# Copyright 2023 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+if [ -z "${WORKSPACE}" ]; then
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
+fi
+
+GERRIT_BRANCH=$(awk -F= '$1 == "defaultbranch" { print $2 }' \
+                    "${WORKSPACE}"/.gitreview)
+
+echo GERRIT_BRANCH="${GERRIT_BRANCH}"
+
+rm -rf "${WORKSPACE}"/models
+mkdir "${WORKSPACE}"/models
+
+# download models examples
+git clone -b "${GERRIT_BRANCH}" --single-branch https://github.com/onap/policy-models.git \
+    "${WORKSPACE}"/models
+
+export DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies
+
+export NODETEMPLATES=${WORKSPACE}/models/models-examples/src/main/resources/nodetemplates
+
+# create a couple of variations of the policy definitions
+sed -e 's!Measurement_vGMUX!ADifferentValue!' \
+        "${DATA}"/vCPE.policy.monitoring.input.tosca.json \
+    >"${DATA}"/vCPE.policy.monitoring.input.tosca.v1_2.json
+
+sed -e 's!"version": "1.0.0"!"version": "2.0.0"!' \
+        -e 's!"policy-version": 1!"policy-version": 2!' \
+        "${DATA}"/vCPE.policy.monitoring.input.tosca.json \
+    >"${DATA}"/vCPE.policy.monitoring.input.tosca.v2.json
similarity index 64%
rename from csit/prepare-robot-env.sh
rename to csit/resources/scripts/prepare-robot-env.sh
index 25376cd..aeab5cd 100755 (executable)
@@ -20,7 +20,8 @@
 #
 
 if [ -z "$WORKSPACE" ]; then
-    export WORKSPACE=$(git rev-parse --show-toplevel)
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
 fi
 
 ROBOT_VENV=$(mktemp -d)
@@ -29,18 +30,25 @@ echo "ROBOT_VENV=${ROBOT_VENV}" >> "${WORKSPACE}/env.properties"
 echo "Python version is: $(python3 --version)"
 
 python3 -m venv --clear "${ROBOT_VENV}"
-source "${ROBOT_VENV}/bin/activate"
+source "${ROBOT_VENV}/bin/activate" > /dev/null
 
 set -exu
 
-python3 -m pip install --upgrade pip setuptools
+python3 -m pip install -qq --upgrade pip setuptools
 echo "Installing Python Requirements"
-python3 -m pip install -r ${SCRIPTS}/pylibs.txt
-python3 -m pip freeze
+python3 -m pip install -qq -r "${SCRIPTS}"/pylibs.txt
+python3 -m pip -qq freeze
 
 # install eteutils
 mkdir -p "${ROBOT_VENV}"/src/onap
 rm -rf "${ROBOT_VENV}"/src/onap/testsuite
-python3 -m pip install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.5.1.*' --pre
+python3 -m pip install -qq --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.5.1.*' --pre
 
-python3 -m pip freeze
+echo "Uninstall docker-py and reinstall docker."
+python3 -m pip uninstall -y -qq docker-py
+python3 -m pip uninstall -y -qq docker
+python3 -m pip install -U -qq docker
+
+python3 -m pip -qq freeze
+
+sudo apt-get -y -qq install libxml2-utils
diff --git a/csit/resources/scripts/run-test.sh b/csit/resources/scripts/run-test.sh
new file mode 100755 (executable)
index 0000000..977bef7
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/bash
+#
+# ============LICENSE_START====================================================
+#  Copyright (C) 2023 Nordix Foundation.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+
+ROBOT_FILE=$1
+echo "Invoking the robot tests from: $1"
+
+export DEFAULT_PORT=6969
+export DATA=/opt/robotworkspace/models/models-examples/src/main/resources/policies
+export NODETEMPLATES=/opt/robotworkspace/models/models-examples/src/main/resources/nodetemplates
+export POLICY_RUNTIME_ACM_IP=policy-clamp-runtime-acm:${DEFAULT_PORT}
+export POLICY_API_IP=policy-api:${DEFAULT_PORT}
+export POLICY_PAP_IP=policy-pap:${DEFAULT_PORT}
+export APEX_IP=policy-apex-pdp:${DEFAULT_PORT}
+export DMAAP_IP=message-router:3904
+export SIMULATOR_IP=message-router
+export PROMETHEUS_IP=prometheus:9090
+
+export ROBOT_VARIABLES=
+ROBOT_VARIABLES="-v DATA:$DATA -v NODETEMPLATES:$NODETEMPLATES -v POLICY_RUNTIME_ACM_IP:$POLICY_RUNTIME_ACM_IP -v POLICY_API_IP:$POLICY_API_IP
+-v POLICY_PAP_IP:$POLICY_PAP_IP -v APEX_IP:$APEX_IP -v DMAAP_IP:$DMAAP_IP -v SIMULATOR_IP:$SIMULATOR_IP -v PROMETHEUS_IP:${PROMETHEUS_IP}"
+
+echo "Run Robot test"
+echo ROBOT_VARIABLES="${ROBOT_VARIABLES}"
+echo "Starting Robot test suites ..."
+python3 -m robot.run -d /tmp/ $ROBOT_VARIABLES $1
+RESULT=$?
+echo "RESULT: ${RESULT}"
similarity index 67%
rename from csit/distribution/plans/teardown.sh
rename to csit/resources/scripts/setup-apex-pdp.sh
index 9bfdfe8..acebb28 100755 (executable)
@@ -2,8 +2,9 @@
 # ============LICENSE_START=======================================================
 #  Copyright (C) 2018 Ericsson. All rights reserved.
 #
-#  Modifications copyright (c) 2019-2022 Nordix Foundation.
+#  Modifications Copyright (c) 2019-2023 Nordix Foundation.
 #  Modifications Copyright (C) 2020-2021 AT&T Intellectual Property.
+#  Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 
-docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v
+source "${SCRIPTS}"/setup-pap.sh
+
+# wait for the app to start up
+"${SCRIPTS}"/wait_for_rest.sh localhost "${APEX_PORT}"
+
+export DMAAP_IP="localhost:${DMAAP_PORT}"
+export SUITES="apex-pdp-test.robot"
+
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v APEX_IP:localhost:${APEX_PORT} -v DMAAP_IP:${DMAAP_IP}
+-v APEX_EVENTS_IP:localhost:${APEX_EVENTS_PORT}"
similarity index 60%
rename from csit/clamp/plans/teardown.sh
rename to csit/resources/scripts/setup-api.sh
index e0fc58e..2a98464 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/bash
 # ============LICENSE_START=======================================================
-#  Copyright (C) 2021 Nordix Foundation.
+# Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
+# Modifications Copyright 2021-2023 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 
-docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v
+source "${SCRIPTS}"/node-templates.sh
+
+source "${WORKSPACE}"/compose/start-compose.sh api --grafana
+
+sleep 10
+unset http_proxy https_proxy
+
+# wait for the app to start up
+bash "${SCRIPTS}"/wait_for_rest.sh localhost ${API_PORT}
+
+export SUITES="api-test.robot"
+
+ROBOT_VARIABLES="-v POLICY_API_IP:localhost:${API_PORT} -v PROMETHEUS_IP:localhost:${PROMETHEUS_PORT}
+-v DATA:${DATA} -v NODETEMPLATES:${NODETEMPLATES}"
similarity index 68%
rename from csit/api/plans/teardown.sh
rename to csit/resources/scripts/setup-clamp.sh
index 6f77caa..923b521 100755 (executable)
@@ -1,7 +1,6 @@
 #!/bin/bash
 # ============LICENSE_START=======================================================
-#  Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
-#  Modifications copyright (c) 2022 Nordix Foundation.
+#  Copyright (C) 2021-2023 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 
-docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v
+source "${WORKSPACE}"/compose/start-compose.sh policy-clamp-runtime-acm
+
+sleep 10
+unset http_proxy https_proxy
+
+# wait for the app to start up
+"${SCRIPTS}"/wait_for_rest.sh localhost "${ACM_PORT}"
+
+export SUITES="policy-clamp-test.robot"
+
+ROBOT_VARIABLES="-v POLICY_RUNTIME_ACM_IP:localhost:${ACM_PORT}
+-v POLICY_API_IP:localhost:${POLICY_API_PORT}"
similarity index 56%
rename from csit/apex-pdp/plans/teardown.sh
rename to csit/resources/scripts/setup-distribution.sh
index 9bfdfe8..3840d9d 100755 (executable)
@@ -1,8 +1,7 @@
 #!/bin/bash
 # ============LICENSE_START=======================================================
 #  Copyright (C) 2018 Ericsson. All rights reserved.
-#
-#  Modifications copyright (c) 2019-2022 Nordix Foundation.
+#  Modifications Copyright (c) 2019-2023 Nordix Foundation.
 #  Modifications Copyright (C) 2020-2021 AT&T Intellectual Property.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 
-docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v
+# Remaking the csar file in case if the file got corrupted
+DIST_TEMP_FOLDER=/tmp/distribution
+
+zip -F "${TEST_PLAN_DIR}"/data/csar/sample_csar_with_apex_policy.csar \
+    --out "${TEST_PLAN_DIR}"/data/csar/csar_temp.csar
+
+# Remake temp directory
+rm -rf "${DIST_TEMP_FOLDER}"
+mkdir "${DIST_TEMP_FOLDER}"
+
+source "${WORKSPACE}"/compose/start-compose.sh distribution
+
+sleep 10
+unset http_proxy https_proxy
+
+# wait for the app to start up
+"${SCRIPTS}"/wait_for_rest.sh localhost "${DIST_PORT}"
+
+export SUITES="distribution-test.robot"
+
+ROBOT_VARIABLES="-v APEX_EVENTS_IP:localhost:${APEX_EVENTS_PORT}
+-v DISTRIBUTION_IP:localhost:${DIST_PORT} -v TEMP_FOLDER:${DIST_TEMP_FOLDER}"
similarity index 53%
rename from csit/drools-applications/plans/teardown.sh
rename to csit/resources/scripts/setup-drools-applications.sh
index 72ade97..189fa6c 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/bash
 #
 # ===========LICENSE_START====================================================
-#  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
-#  Modifications copyright (c) 2022 Nordix Foundation.
+#  Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
+#  Modifications Copyright 2021-2023 Nordix Foundation.
 # ============================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # ============LICENSE_END=====================================================
 #
 
-docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v
+source "${SCRIPTS}"/node-templates.sh
+
+source "${WORKSPACE}"/compose/start-compose.sh drools-apps
+
+sleep 10
+unset http_proxy https_proxy
+
+export DMAAP_IP="localhost:${DMAAP_PORT}"
+export SUITES="drools-applications-test.robot"
+
+# wait for the app to start up
+"${SCRIPTS}"/wait_for_rest.sh localhost ${DROOLS_APPS_PORT}
+
+# give enough time for the controllers to come up
+sleep 15
+
+ROBOT_VARIABLES="-v DATA:${DATA} -v DROOLS_IP:localhost:${DROOLS_APPS_PORT}
+-v DROOLS_IP_2:localhost:${DROOLS_APPS_TELEMETRY_PORT} -v POLICY_API_IP:localhost:${API_PORT}
+-v POLICY_PAP_IP:localhost:${PAP_PORT}"
similarity index 61%
rename from csit/drools-pdp/plans/teardown.sh
rename to csit/resources/scripts/setup-drools-pdp.sh
index c2b6815..f634190 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # ============LICENSE_START=======================================================
 # Copyright 2017-2021 AT&T Intellectual Property. All rights reserved.
-# Modifications copyright (c) 2022 Nordix Foundation.
+# Modifications Copyright 2021-2023 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 
-docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v
+source "${WORKSPACE}"/compose/start-compose.sh drools
+
+sleep 10
+unset http_proxy https_proxy
+
+export SUITES="drools-pdp-test.robot"
+
+# wait for the app to start up - looking for telemetry service on port ${DROOLS_PORT} forwarded from 9696
+"${SCRIPTS}"/wait_for_rest.sh localhost ${DROOLS_TELEMETRY_PORT}
+
+# give enough time for the controllers to come up
+sleep 15
+
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DROOLS_IP:localhost:${DROOLS_TELEMETRY_PORT}"
similarity index 64%
rename from csit/pap/plans/teardown.sh
rename to csit/resources/scripts/setup-pap.sh
index 0d4c6ed..741f064 100755 (executable)
@@ -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-2023 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 
-docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v
+source "${SCRIPTS}"/node-templates.sh
+
+source "${WORKSPACE}"/compose/start-compose.sh apex-pdp --grafana
+
+sleep 10
+unset http_proxy https_proxy
+
+# wait for the app to start up
+bash "${SCRIPTS}"/wait_for_rest.sh localhost ${PAP_PORT}
+
+export SUITES="pap-test.robot
+pap-slas.robot"
+
+ROBOT_VARIABLES="-v POLICY_PAP_IP:localhost:${PAP_PORT} -v POLICY_API_IP:localhost:${API_PORT}
+-v PROMETHEUS_IP:localhost:${PROMETHEUS_PORT} -v DATA:${DATA} -v NODETEMPLATES:${NODETEMPLATES}"
similarity index 59%
rename from csit/xacml-pdp/plans/teardown.sh
rename to csit/resources/scripts/setup-xacml-pdp.sh
index 6f77caa..53c44cb 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # ============LICENSE_START=======================================================
-#  Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
-#  Modifications copyright (c) 2022 Nordix Foundation.
+#  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+#  Modifications Copyright 2021-2023 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 
-docker-compose -f ${SCRIPTS}/docker-compose-all.yml down -v
+source "${SCRIPTS}"/node-templates.sh
+
+source "${WORKSPACE}"/compose/start-compose.sh xacml-pdp
+
+sleep 10
+unset http_proxy https_proxy
+
+export DMAAP_IP="localhost:${DMAAP_PORT}"
+export SUITES="xacml-pdp-test.robot"
+
+# wait for the app to start up
+"${SCRIPTS}"/wait_for_rest.sh localhost "${XACML_PORT}"
+
+ROBOT_VARIABLES="-v DATA:${DATA} -v POLICY_PDPX_IP:localhost:${XACML_PORT}
+-v POLICY_API_IP:localhost:${API_PORT} -v POLICY_PAP_IP:localhost:${PAP_PORT}"
similarity index 97%
rename from csit/wait_for_rest.sh
rename to csit/resources/scripts/wait_for_rest.sh
index a64c306..e400bbd 100755 (executable)
@@ -62,8 +62,8 @@ do
         then
             break
         else
-            tmout=$((tmout-1))
-            sleep 1
+            tmout=$((tmout-5))
+            sleep 5
         fi
     done
     if [ $rc -ne 0 ]
similarity index 85%
rename from csit/apex-pdp/tests/apex-pdp-test.robot
rename to csit/resources/tests/apex-pdp-test.robot
index 3de53a9..28a5706 100644 (file)
@@ -4,7 +4,7 @@ Library     RequestsLibrary
 Library     OperatingSystem
 Library     json
 Library     Process
-Resource    ${CURDIR}/../../common-library.robot
+Resource    ${CURDIR}/common-library.robot
 
 
 *** Test Cases ***
@@ -12,13 +12,14 @@ Resource    ${CURDIR}/../../common-library.robot
 Healthcheck
      [Documentation]    Runs Apex PDP Health check
      ${hcauth}=  HealthCheckAuth
-     ${resp}=  PerformGetRequest  ${APEX_PORT}  /policy/apex-pdp/v1/healthcheck  200  null  ${hcauth}
+     ${resp}=  PerformGetRequest  ${APEX_IP}  /policy/apex-pdp/v1/healthcheck  200  null  ${hcauth}
      Should Be Equal As Strings    ${resp.json()['code']}    200
      Set Suite Variable    ${pdpName}    ${resp.json()['name']}
 
 ExecuteApexSampleDomainPolicy
      Set Test Variable    ${policyName}    onap.policies.native.apex.Sampledomain
-     ${postjson}=  Get file  ${CURDIR}/data/${policyName}.json
+     Log  ${policyName}
+     ${postjson}=  Get File  ${CURDIR}/data/${policyName}.json
      CreatePolicy  /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies  200  ${postjson}  ${policyName}  1.0.0
      Wait Until Keyword Succeeds    3 min    5 sec    VerifyPdpStatistics    0    0    0    0
      DeployPolicy
@@ -29,40 +30,40 @@ ExecuteApexSampleDomainPolicy
 
 ExecuteApexTestPnfPolicy
      Set Test Variable    ${policyName}    onap.policies.apex.pnf.Test
-     ${postjson}=  Get file  ${CURDIR}/data/${policyName}.json
+     ${postjson}=  Get File  ${CURDIR}/data/${policyName}.json
      CreatePolicy  /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies  200  ${postjson}  ${policyName}  1.0.0
      DeployPolicy
      Wait Until Keyword Succeeds    2 min    5 sec    QueryPolicyStatus  ${policyName}  defaultGroup  apex  ${pdpName}  onap.policies.native.Apex
-     ${result}=     Run Process    ${SCRIPTS}/make_topic.sh     APEX-CL-MGT
+     ${result}=     Run Process    ${CURDIR}/data/make_topic.sh     APEX-CL-MGT
      Should Be Equal As Integers    ${result.rc}    0
      Wait Until Keyword Succeeds    2 min    5 sec    TriggerAndVerifyTestPnfPolicy
 
 ExecuteApexTestVnfPolicy
      Set Test Variable    ${policyName}    onap.policies.apex.vnf.Test
-     ${postjson}=  Get file  ${CURDIR}/data/${policyName}.json
+     ${postjson}=  Get File  ${CURDIR}/data/${policyName}.json
      CreatePolicy  /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies  200  ${postjson}  ${policyName}  1.0.0
      DeployPolicy
      Wait Until Keyword Succeeds    2 min    5 sec    QueryPolicyStatus  ${policyName}  defaultGroup  apex  ${pdpName}  onap.policies.native.Apex
-     ${result}=     Run Process    ${SCRIPTS}/make_topic.sh     APEX-CL-MGT
+     ${result}=     Run Process    ${CURDIR}/data/make_topic.sh     APEX-CL-MGT
      Should Be Equal As Integers    ${result.rc}    0
      Wait Until Keyword Succeeds    2 min    5 sec    TriggerAndVerifyTestVnfPolicy
 
 ExecuteApexTestPnfPolicyWithMetadataSet
       Set Test Variable    ${policyName}    onap.policies.apex.pnf.metadataSet.Test
-      ${postjson}=  Get file  ${CURDIR}/data/${policyName}.json
+      ${postjson}=  Get File  ${CURDIR}/data/${policyName}.json
       CreatePolicy  /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies  200  ${postjson}  ${policyName}  1.0.0
-      ${postjson}=  Get file  ${CURDIR}/data/onap.pnf.metadataSet.Test.json
+      ${postjson}=  Get File  ${CURDIR}/data/onap.pnf.metadataSet.Test.json
       CreateNodeTemplate  /policy/api/v1/nodetemplates  200  ${postjson}  1
       DeployPolicy
       Wait Until Keyword Succeeds    2 min    5 sec    QueryPolicyStatus  ${policyName}  defaultGroup  apex  ${pdpName}  onap.policies.native.Apex
-      ${result}=     Run Process    ${SCRIPTS}/make_topic.sh     APEX-CL-MGT2
+      ${result}=     Run Process    ${CURDIR}/data/make_topic.sh     APEX-CL-MGT2
       Should Be Equal As Integers    ${result.rc}    0
       Wait Until Keyword Succeeds    2 min    5 sec    TriggerAndVerifyTestPnfPolicy
 
 Metrics
      [Documentation]  Verify policy-apex-pdp is exporting prometheus metrics
      ${auth}=  HealthCheckAuth
-     ${resp}=  PerformGetRequest  ${APEX_PORT}  /metrics  200  null  ${auth}
+     ${resp}=  PerformGetRequest  ${APEX_IP}  /metrics  200  null  ${auth}
      Should Contain  ${resp.text}  pdpa_policy_deployments_total{operation="deploy",status="TOTAL",} 4.0
      Should Contain  ${resp.text}  pdpa_policy_deployments_total{operation="deploy",status="SUCCESS",} 4.0
      Should Contain  ${resp.text}  pdpa_policy_executions_total{status="SUCCESS",} 3.0
@@ -83,24 +84,24 @@ Metrics
 
 DeployPolicy
      [Documentation]    Deploy the policy in apex-pdp engine
-     ${postjson}=    Get file  ${CURDIR}/data/policy_deploy.json
+     ${postjson}=    Get File  ${CURDIR}/data/policy_deploy.json
      ${postjson}=    evaluate    json.loads('''${postjson}''')    json
      set to dictionary    ${postjson['groups'][0]['deploymentSubgroups'][0]['policies'][0]}    name=${policyName}
      ${postjson}=    evaluate    json.dumps(${postjson})    json
      ${policyadmin}=  PolicyAdminAuth
-     PerformPostRequest  ${POLICY_PAP_PORT}  /policy/pap/v1/pdps/deployments/batch  202  ${postjson}  null  ${policyadmin}
+     PerformPostRequest  ${POLICY_PAP_IP}  /policy/pap/v1/pdps/deployments/batch  202  ${postjson}  null  ${policyadmin}
 
 RunEventOnApexEngine
     [Documentation]    Send event to verify policy execution
-    Create Session   apexSession  http://localhost:23324   max_retries=1
-    ${data}=    Get Binary File     ${CURDIR}${/}data${/}event.json
+    Create Session   apexSession  http://${APEX_EVENTS_IP}   max_retries=1
+    ${data}=    Get Binary File     ${CURDIR}/data/event.json
     &{headers}=  Create Dictionary    Content-Type=application/json    Accept=application/json
     ${resp}=    PUT On Session    apexSession    /apex/FirstConsumer/EventIn    data=${data}   headers=${headers}
     Should Be Equal As Strings    ${resp.status_code}   200
 
 TriggerAndVerifyTestPnfPolicy
     [Documentation]    Send TestPnf policy trigger event to DMaaP and read notifications to verify policy execution
-    Create Session   apexSession  http://localhost:30227   max_retries=1
+    Create Session   apexSession  http://${DMAAP_IP}   max_retries=1
     ${data}=    Get Binary File     ${CURDIR}/data/VesEventForPnfPolicy.json
     &{headers}=  Create Dictionary    Content-Type=application/json    Accept=application/json
     ${resp}=    POST On Session    apexSession    /events/unauthenticated.DCAE_CL_OUTPUT    data=${data}   headers=${headers}
@@ -111,7 +112,7 @@ TriggerAndVerifyTestPnfPolicy
 
 TriggerAndVerifyTestVnfPolicy
     [Documentation]    Send TestVnf policy trigger event to DMaaP and read notifications to verify policy execution
-    Create Session   apexSession  http://localhost:30227   max_retries=1
+    Create Session   apexSession  http://${DMAAP_IP}   max_retries=1
     ${data}=    Get Binary File     ${CURDIR}/data/VesEventForVnfPolicy.json
     &{headers}=  Create Dictionary    Content-Type=application/json    Accept=application/json
     ${resp}=    POST On Session    apexSession    /events/unauthenticated.DCAE_POLICY_EXAMPLE_OUTPUT    data=${data}   headers=${headers}
@@ -124,7 +125,7 @@ TriggerAndVerifyTestVnfPolicy
 CheckLogMessage
     [Documentation]    Read log messages received and check for expected content.
     [Arguments]    ${status}    ${expectedMsg}
-    ${result}=     Run Process    ${SCRIPTS}/wait_topic.sh     APEX-CL-MGT    ${status}
+    ${result}=     Run Process    ${CURDIR}/data/wait_topic.sh     APEX-CL-MGT    ${status}
     Log    Received log event on APEX-CL-MGT topic ${result.stdout}
     Should Be Equal As Integers    ${result.rc}    0
     Should Contain    ${result.stdout}    ${expectedMsg}
@@ -133,7 +134,7 @@ VerifyPdpStatistics
      [Documentation]    Verify pdp statistics after policy execution
      [Arguments]    ${deployCount}    ${deploySuccessCount}    ${executedCount}    ${executedSuccessCount}
      ${policyadmin}=  PolicyAdminAuth
-     ${resp}=  PerformGetRequest  ${POLICY_PAP_PORT}  /policy/pap/v1/pdps/statistics/defaultGroup/apex/${pdpName}  200  null  ${policyadmin}
+     ${resp}=  PerformGetRequest  ${POLICY_PAP_IP}  /policy/pap/v1/pdps/statistics/defaultGroup/apex/${pdpName}  200  null  ${policyadmin}
      Should Be Equal As Strings    ${resp.status_code}     200
      Should Be Equal As Strings    ${resp.json()['defaultGroup']['apex'][0]['pdpInstanceId']}  ${pdpName}
      Should Be Equal As Strings    ${resp.json()['defaultGroup']['apex'][0]['pdpGroupName']}  defaultGroup
similarity index 95%
rename from csit/api/tests/api-test.robot
rename to csit/resources/tests/api-test.robot
index 3384879..e8679a7 100644 (file)
@@ -3,7 +3,7 @@ Library     Collections
 Library     RequestsLibrary
 Library     OperatingSystem
 Library     json
-Resource    ${CURDIR}/../../common-library.robot
+Resource    ${CURDIR}/common-library.robot
 
 *** Test Cases ***
 
@@ -113,8 +113,8 @@ DeleteSpecificPolicyTypeV3
 Metrics
     [Documentation]  Verify policy-api is exporting prometheus metrics
     ${auth}=  PolicyAdminAuth
-    ${resp}=  GetMetrics  ${POLICY_API_PORT}  ${auth}  /policy/api/v1/
-    Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/healthcheck",} 1.0
+    ${resp}=  GetMetrics  ${POLICY_API_IP}  ${auth}  /policy/api/v1/
+    Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/healthcheck",}
     Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/statistics",} 1.0
     Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policytypes",} 1.0
     Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policies",} 1.0
@@ -137,13 +137,13 @@ Metrics
 GetReq
      [Arguments]  ${url}
      ${auth}=  PolicyAdminAuth
-     ${resp}=  PerformGetRequest  ${POLICY_API_PORT}  ${url}  200  null  ${auth}
+     ${resp}=  PerformGetRequest  ${POLICY_API_IP}  ${url}  200  null  ${auth}
      [return]  ${resp}
 
 DeleteReq
      [Arguments]  ${url}  ${expectedstatus}
      ${auth}=  PolicyAdminAuth
-     ${resp}=  PerformDeleteRequest  ${POLICY_API_PORT}  ${url}  ${expectedstatus}  ${auth}
+     ${resp}=  PerformDeleteRequest  ${POLICY_API_IP}  ${url}  ${expectedstatus}  ${auth}
      [return]  ${resp}
 
 CreatePolicyType
@@ -151,7 +151,7 @@ CreatePolicyType
      [Documentation]  Create the specific policy type
      ${postjson}=  Get file  ${CURDIR}/data/${jsonfile}
      ${auth}=  PolicyAdminAuth
-     ${resp}=  PerformPostRequest  ${POLICY_API_PORT}  ${url}  ${expectedstatus}  ${postjson}  null  ${auth}
+     ${resp}=  PerformPostRequest  ${POLICY_API_IP}  ${url}  ${expectedstatus}  ${postjson}  null  ${auth}
      Run Keyword If  ${expectedstatus}==200  List Should Contain Value  ${resp.json()['policy_types']}  ${policytypename}
      Run Keyword If  ${expectedstatus}==200  Should Be Equal As Strings  ${resp.json()['policy_types']['${policytypename}']['version']}  ${policytypeversion}
 
similarity index 78%
rename from csit/common-library.robot
rename to csit/resources/tests/common-library.robot
index 871e7ef..fb6f52f 100644 (file)
@@ -15,36 +15,36 @@ HealthCheckAuth
     [return]  ${healthcheck}
 
 PerformPostRequest
-    [Arguments]  ${port}  ${url}  ${expectedstatus}  ${postjson}  ${params}  ${auth}
-    Log  Creating session http://localhost:${port}
-    ${session}=  Create Session  policy  http://localhost:${port}  auth=${auth}
+    [Arguments]  ${domain}  ${url}  ${expectedstatus}  ${postjson}  ${params}  ${auth}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  policy  http://${domain}  auth=${auth}
     ${headers}=  Create Dictionary  Accept=application/json  Content-Type=application/json
     ${resp}=  POST On Session  policy  ${url}  data=${postjson}  params=${params}  headers=${headers}  expected_status=${expectedstatus}
     Log  Received response from policy ${resp.text}
     [return]  ${resp}
 
 PerformPutRequest
-    [Arguments]  ${port}  ${url}  ${expectedstatus}  ${params}  ${auth}
-    Log  Creating session http://localhost:${port}
-    ${session}=  Create Session  policy  http://localhost:${port}  auth=${auth}
+    [Arguments]  ${domain}  ${url}  ${expectedstatus}  ${params}  ${auth}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  policy  http://${domain}  auth=${auth}
     ${headers}=  Create Dictionary  Accept=application/json  Content-Type=application/json
     ${resp}=  PUT On Session  policy  ${url}  params=${params}  headers=${headers}  expected_status=${expectedstatus}
     Log  Received response from policy ${resp.text}
     [return]  ${resp}
 
 PerformGetRequest
-    [Arguments]  ${port}  ${url}  ${expectedstatus}  ${params}  ${auth}
-    Log  Creating session http://localhost:${port}
-    ${session}=  Create Session  policy  http://localhost:${port}  auth=${auth}
+    [Arguments]  ${domain}  ${url}  ${expectedstatus}  ${params}  ${auth}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  policy  http://${domain}  auth=${auth}
     ${headers}=  Create Dictionary  Accept=application/json  Content-Type=application/json
     ${resp}=  GET On Session  policy  ${url}  params=${params}  headers=${headers}  expected_status=${expectedstatus}
     Log  Received response from policy ${resp.text}
     [return]  ${resp}
 
 PerformDeleteRequest
-    [Arguments]  ${port}  ${url}  ${expectedstatus}  ${auth}
-    Log  Creating session http://localhost:${port}
-    ${session}=  Create Session  policy  http://localhost:${port}  auth=${auth}
+    [Arguments]  ${domain}  ${url}  ${expectedstatus}  ${auth}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  policy  http://${domain}  auth=${auth}
     ${headers}=  Create Dictionary  Accept=application/json  Content-Type=application/json
     ${resp}=  DELETE On Session  policy  ${url}  headers=${headers}  expected_status=${expectedstatus}
     Log  Received response from policy ${resp.text}
@@ -53,7 +53,7 @@ CreatePolicy
     [Arguments]  ${url}  ${expectedstatus}  ${postjson}  ${policyname}  ${policyversion}
     [Documentation]  Create the specific policy
     ${policyadmin}=  PolicyAdminAuth
-    ${resp}=  PerformPostRequest  ${POLICY_API_PORT}  ${url}  ${expectedstatus}  ${postjson}  null  ${policyadmin}
+    ${resp}=  PerformPostRequest  ${POLICY_API_IP}  ${url}  ${expectedstatus}  ${postjson}  null  ${policyadmin}
     Run Keyword If  ${expectedstatus}==200  Dictionary Should Contain Key  ${resp.json()['topology_template']['policies'][0]}  ${policyname}
     Run Keyword If  ${expectedstatus}==200  Should Be Equal As Strings  ${resp.json()['topology_template']['policies'][0]['${policyname}']['version']}  ${policyversion}
 
@@ -61,15 +61,15 @@ CreateNodeTemplate
     [Arguments]  ${url}  ${expectedstatus}  ${postjson}  ${nodeTemplateListLength}
     [Documentation]  Create the node templates
     ${policyadmin}=  PolicyAdminAuth
-    ${resp}=  PerformPostRequest  ${POLICY_API_PORT}  ${url}  ${expectedstatus}  ${postjson}  \  ${policyadmin}
+    ${resp}=  PerformPostRequest  ${POLICY_API_IP}  ${url}  ${expectedstatus}  ${postjson}  \  ${policyadmin}
     Run Keyword If  ${expectedstatus}==200  Length Should Be  ${resp.json()['topology_template']['node_templates']}  ${nodeTemplateListLength}
 
 
 QueryPdpGroups
-    [Documentation]    Verify pdp group query - supports upto 2 groups
+    [Documentation]    Verify pdp group query - suphosts upto 2 groups
     [Arguments]  ${groupsLength}  ${group1Name}  ${group1State}  ${policiesLengthInGroup1}  ${group2Name}  ${group2State}  ${policiesLengthInGroup2}
     ${policyadmin}=  PolicyAdminAuth
-    ${resp}=  PerformGetRequest  ${POLICY_PAP_PORT}  /policy/pap/v1/pdps  200  null  ${policyadmin}
+    ${resp}=  PerformGetRequest  ${POLICY_PAP_IP}  /policy/pap/v1/pdps  200  null  ${policyadmin}
     Length Should Be  ${resp.json()['groups']}  ${groupsLength}
     Should Be Equal As Strings  ${resp.json()['groups'][0]['name']}  ${group1Name}
     Should Be Equal As Strings  ${resp.json()['groups'][0]['pdpGroupState']}  ${group1State}
@@ -81,7 +81,7 @@ QueryPdpGroups
 QueryPolicyAudit
     [Arguments]  ${url}  ${expectedstatus}  ${pdpGroup}  ${pdpType}  ${policyName}  ${expectedAction}
     ${policyadmin}=  PolicyAdminAuth
-    ${resp}=  PerformGetRequest  ${POLICY_PAP_PORT}  ${url}  ${expectedstatus}  recordCount=2   ${policyadmin}
+    ${resp}=  PerformGetRequest  ${POLICY_PAP_IP}  ${url}  ${expectedstatus}  recordCount=2   ${policyadmin}
     Log  Received response from queryPolicyAudit ${resp.text}
     FOR    ${responseEntry}    IN    @{resp.json()}
     Exit For Loop IF      '${responseEntry['policy']['name']}'=='${policyName}'
@@ -97,7 +97,7 @@ QueryPolicyStatus
     [Documentation]    Verify policy deployment status
     [Arguments]  ${policyName}  ${pdpGroup}  ${pdpType}  ${pdpName}  ${policyTypeName}
     ${policyadmin}=  PolicyAdminAuth
-    ${resp}=  PerformGetRequest  ${POLICY_PAP_PORT}  /policy/pap/v1/policies/status  200  null   ${policyadmin}
+    ${resp}=  PerformGetRequest  ${POLICY_PAP_IP}  /policy/pap/v1/policies/status  200  null   ${policyadmin}
     FOR    ${responseEntry}    IN    @{resp.json()}
     Exit For Loop IF      '${responseEntry['policy']['name']}'=='${policyName}'
     END
@@ -113,9 +113,9 @@ QueryPolicyStatus
     Should Be Equal As Strings    ${responseEntry['state']}  SUCCESS
 
 GetMetrics
-    [Arguments]  ${port}  ${auth}  ${context_path}
-    Log  Creating session http://localhost:${port}
-    ${session}=  Create Session  policy  http://localhost:${port}  auth=${auth}
+    [Arguments]  ${domain}  ${auth}  ${context_path}
+    Log  Creating session http://${domain}
+    ${session}=  Create Session  policy  http://${domain}  auth=${auth}
     ${resp}=  GET On Session  policy  ${context_path}metrics  expected_status=200
     Log  Received response from policy ${resp.text}
     [return]  ${resp}
@@ -123,7 +123,7 @@ GetMetrics
 QueryPrometheus
     [Arguments]  ${query}
     ${params}=  Create Dictionary  query=${query}
-    ${resp}=  GET  http://localhost:30259/api/v1/query  ${params}
+    ${resp}=  GET  http://${PROMETHEUS_IP}/api/v1/query  ${params}
     Status Should Be    OK
     Log  Received response from Prometheus ${resp.text}
     [return]  ${resp.json()}
similarity index 93%
rename from csit/make_topic.sh
rename to csit/resources/tests/data/make_topic.sh
index f50753c..c8af564 100755 (executable)
@@ -30,5 +30,5 @@ fi
 
 topic="${1}"
 
-curl -s -k "http://localhost:30227/events/${topic}/script/1?limit=1&timeout=0"
+curl -s -k "http://${DMAAP_IP}/events/${topic}/script/1?limit=1&timeout=0"
 echo
similarity index 94%
rename from csit/onset.sh
rename to csit/resources/tests/data/onset.sh
index 6b9d900..42b0cde 100755 (executable)
@@ -29,5 +29,5 @@ then
 fi
 
 curl -k -H "Content-type: application/json" --data-binary @$1 \
-    http://localhost:30227/events/unauthenticated.DCAE_CL_OUTPUT
+    http://${DMAAP_IP}/events/unauthenticated.DCAE_CL_OUTPUT
 echo
similarity index 95%
rename from csit/wait_topic.sh
rename to csit/resources/tests/data/wait_topic.sh
index c72b728..a632ee8 100755 (executable)
@@ -40,7 +40,7 @@ matched=no
 
 while [ ${matched} = "no" ]
 do
-    msg=`curl -s -k "http://localhost:30227/events/${topic}/script/1?limit=1"`
+    msg=`curl -s -k "http://${DMAAP_IP}/events/${topic}/script/1?limit=1"`
     if [ $? -ne 0 -o "${msg}" = "[]" ]
     then
         echo not found >&2
@@ -3,26 +3,26 @@ Library     Collections
 Library     RequestsLibrary
 Library     OperatingSystem
 Library     json
-Resource    ${CURDIR}/../../common-library.robot
+Resource    ${CURDIR}/common-library.robot
 
 *** Test Cases ***
 
 Healthcheck
     [Documentation]  Verify policy distribution health check
     ${hcauth}=  HealthCheckAuth
-    ${resp}=  PerformGetRequest  ${POLICY_DISTRIBUTION_PORT}  /healthcheck  200  null  ${hcauth}
+    ${resp}=  PerformGetRequest  ${DISTRIBUTION_IP}  /healthcheck  200  null  ${hcauth}
     Should Be Equal As Strings  ${resp.json()['code']}  200
 
 Statistics
     [Documentation]  Verify policy distribution statistics
     ${hcauth}=  HealthCheckAuth
-    ${resp}=  PerformGetRequest  ${POLICY_DISTRIBUTION_PORT}  /statistics  200  null  ${hcauth}
+    ${resp}=  PerformGetRequest  ${DISTRIBUTION_IP}  /statistics  200  null  ${hcauth}
     Should Be Equal As Strings  ${resp.json()['code']}  200
 
 Metrics
     [Documentation]  Verify policy-distribution is exporting prometheus metrics
     ${hcauth}=  HealthCheckAuth
-    ${resp}=  PerformGetRequest  ${POLICY_DISTRIBUTION_PORT}  /metrics  200  null  ${hcauth}
+    ${resp}=  PerformGetRequest  ${DISTRIBUTION_IP}  /metrics  200  null  ${hcauth}
     Should Contain  ${resp.text}  total_distribution_received_count_total 0.0
     Should Contain  ${resp.text}  distribution_success_count_total 0.0
     Should Contain  ${resp.text}  distribution_failure_count_total 0.0
@@ -36,7 +36,7 @@ InvokeDistributionAndRunEventOnEngine
 MetricsAfterExecution
     [Documentation]  Verify policy-distribution is exporting prometheus metrics after execution
     ${hcauth}=  HealthCheckAuth
-    ${resp}=  PerformGetRequest  ${POLICY_DISTRIBUTION_PORT}  /metrics  200  null  ${hcauth}
+    ${resp}=  PerformGetRequest  ${DISTRIBUTION_IP}  /metrics  200  null  ${hcauth}
     Should Contain  ${resp.text}  total_distribution_received_count_total 1.0
     Should Contain  ${resp.text}  distribution_success_count_total 1.0
     Should Contain  ${resp.text}  distribution_failure_count_total 0.0
@@ -47,11 +47,12 @@ MetricsAfterExecution
 *** Keywords ***
 
 InvokeDistributionUsingFile And RunEventOnApexEngine
-    Copy File  ${SCRIPT_DIR}/csar/csar_temp.csar  ${SCRIPT_DIR}/csar/temp.csar
-    Move File  ${SCRIPT_DIR}/csar/temp.csar  ${SCRIPT_DIR}/temp/sample_csar_with_apex_policy.csar
+    Copy File  ${CURDIR}/data/csar/csar_temp.csar  ${CURDIR}/data/csar/temp.csar
+    Move File  ${CURDIR}/data/csar/temp.csar  ${TEMP_FOLDER}/sample_csar_with_apex_policy.csar
     Sleep  20 seconds  "Waiting for the Policy Distribution to call Policy API and PAP"
-    Create Session  apexSession  http://localhost:23324  max_retries=1
-    ${data}=  Get Binary File  ${CURDIR}${/}data${/}event.json
+    Create Session  apexSession  http://${APEX_EVENTS_IP}  max_retries=1
+    ${data}=  Get Binary File  ${CURDIR}/data/event.json
     &{headers}=  Create Dictionary  Content-Type=application/json  Accept=application/json
     ${resp}=  PUT On Session  apexSession  /apex/FirstConsumer/EventIn  data=${data}  headers=${headers}  expected_status=200
-    Remove Files  ${SCRIPT_DIR}/temp/sample_csar_with_apex_policy.csar
+    Remove Files  ${CURDIR}/data/temp/sample_csar_with_apex_policy.csar
+    Remove Files  ${CURDIR}/data/csar/csar_temp.csar
@@ -9,17 +9,17 @@ Library     json
 *** Test Cases ***
 Alive
     [Documentation]    Runs Policy PDP Alive Check
-    ${resp}=  PeformGetRequest  /policy/pdp/engine  30219  200
+    ${resp}=  PeformGetRequest  /policy/pdp/engine  ${DROOLS_IP_2}  200
     Should Be Equal As Strings    ${resp.json()['alive']}  True
 
 Metrics
     [Documentation]    Verify drools-apps is exporting metrics
-    ${resp}=  PeformGetRequest  /metrics  30219  200
+    ${resp}=  PeformGetRequest  /metrics  ${DROOLS_IP_2}  200
     Should Contain  ${resp.text}  jvm_threads_current
 
 Healthcheck
     [Documentation]    Runs Policy PDP-D Health check
-    ${resp}=  PeformGetRequest  /healthcheck  ${DROOLS_PORT}  200
+    ${resp}=  PeformGetRequest  /healthcheck  ${DROOLS_IP}  200
     Should Be Equal As Strings    ${resp.json()['healthy']}  True
 
 Controller
@@ -28,39 +28,39 @@ Controller
 
 MakeTopics
     [Documentation]    Creates the Policy topics
-    ${result}=     Run Process        ${SCR2}/make_topic.sh     POLICY-PDP-PAP
+    ${result}=     Run Process        ${CURDIR}/data/make_topic.sh     POLICY-PDP-PAP
     Should Be Equal As Integers        ${result.rc}    0
-    ${result}=     Run Process        ${SCR2}/make_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/make_topic.sh     POLICY-CL-MGT
     Should Be Equal As Integers        ${result.rc}    0
 
 CreateVcpeXacmlPolicy
     [Documentation]    Create VCPE Policy for Xacml
-    PerformPostRequest  /policy/api/v1/policies  null  ${API_PORT}  vCPE.policy.monitoring.input.tosca.yaml  ${DATA}  yaml  200
+    PerformPostRequest  /policy/api/v1/policies  null  ${POLICY_API_IP}  vCPE.policy.monitoring.input.tosca.yaml  ${DATA}  yaml  200
 
 CreateVcpeDroolsPolicy
     [Documentation]    Create VCPE Policy for Drools
-    PerformPostRequest  /policy/api/v1/policies  null  ${API_PORT}  vCPE.policy.operational.input.tosca.yaml  ${DATA}  yaml  200
+    PerformPostRequest  /policy/api/v1/policies  null  ${POLICY_API_IP}  vCPE.policy.operational.input.tosca.yaml  ${DATA}  yaml  200
 
 CreateVdnsXacmlPolicy
     [Documentation]    Create VDNS Policy for Xacml
-    PerformPostRequest  /policy/api/v1/policies  null  ${API_PORT}  vDNS.policy.monitoring.input.tosca.yaml  ${DATA}  yaml  200
+    PerformPostRequest  /policy/api/v1/policies  null  ${POLICY_API_IP}  vDNS.policy.monitoring.input.tosca.yaml  ${DATA}  yaml  200
 
 CreateVdnsDroolsPolicy
     [Documentation]    Create VDNS Policy for Drools
-    PerformPostRequest  /policy/api/v1/policies  null  ${API_PORT}  vDNS.policy.operational.input.tosca.json  ${DATA}  json  200
+    PerformPostRequest  /policy/api/v1/policies  null  ${POLICY_API_IP}  vDNS.policy.operational.input.tosca.json  ${DATA}  json  200
 
 CreateVfwXacmlPolicy
     [Documentation]    Create VFW Policy for Xacml
-    PerformPostRequest  /policy/api/v1/policies  null  ${API_PORT}  vFirewall.policy.monitoring.input.tosca.yaml  ${DATA}  yaml  200
+    PerformPostRequest  /policy/api/v1/policies  null  ${POLICY_API_IP}  vFirewall.policy.monitoring.input.tosca.yaml  ${DATA}  yaml  200
 
 CreateVfwDroolsPolicy
     [Documentation]    Create VFW Policy for Drools
-    PerformPostRequest  /policy/api/v1/policies  null  ${API_PORT}  vFirewall.policy.operational.input.tosca.json  ${DATA}  json  200
+    PerformPostRequest  /policy/api/v1/policies  null  ${POLICY_API_IP}  vFirewall.policy.operational.input.tosca.json  ${DATA}  json  200
 
 DeployXacmlPolicies
     [Documentation]    Deploys the Policies to Xacml
-    PerformPostRequest  /policy/pap/v1/pdps/deployments/batch  null  ${PAP_PORT}  deploy.xacml.policies.json  ${DATA2}  json  202
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-PDP-PAP
+    PerformPostRequest  /policy/pap/v1/pdps/deployments/batch  null  ${POLICY_PAP_IP}  deploy.xacml.policies.json  ${CURDIR}/data  json  202
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-PDP-PAP
     ...            responseTo    xacml    ACTIVE    restart
     Log    Received status ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
@@ -70,8 +70,8 @@ DeployXacmlPolicies
 
 DeployDroolsPolicies
     [Documentation]    Deploys the Policies to Drools
-    PerformPostRequest  /policy/pap/v1/pdps/deployments/batch  null  ${PAP_PORT}  deploy.drools.policies.json  ${DATA2}  json  202
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-PDP-PAP
+    PerformPostRequest  /policy/pap/v1/pdps/deployments/batch  null  ${POLICY_PAP_IP}  deploy.drools.policies.json  ${CURDIR}/data  json  202
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-PDP-PAP
     ...            responseTo    drools    ACTIVE
     Log    Received status ${result.stdout}
     Sleep    3s
@@ -82,39 +82,39 @@ DeployDroolsPolicies
 
 VcpeExecute
     [Documentation]    Executes VCPE Policy
-    ${result}=     Run Process        ${SCR2}/onset.sh     ${DATA2}/vcpeOnset.json
+    ${result}=     Run Process        ${CURDIR}/data/onset.sh     ${CURDIR}/data/vcpeOnset.json
     Should Be Equal As Integers        ${result.rc}    0
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
     Should Contain    ${result.stdout}    ACTIVE
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
     Should Contain    ${result.stdout}    OPERATION
     Should Contain    ${result.stdout}    Sending guard query for APPC Restart
     Should Be Equal As Integers        ${result.rc}    0
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
     Should Contain    ${result.stdout}    OPERATION
     Should Contain    ${result.stdout}    Guard result for APPC Restart is Permit
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
     Should Contain    ${result.stdout}    OPERATION
     Should Contain    ${result.stdout}    actor=APPC,operation=Restart
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
     Should Contain    ${result.stdout}    OPERATION: SUCCESS
     Should Contain    ${result.stdout}    actor=APPC,operation=Restart
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
@@ -124,38 +124,38 @@ VcpeExecute
 
 VdnsExecute
     [Documentation]    Executes VDNS Policy
-    ${result}=     Run Process        ${SCR2}/onset.sh     ${DATA2}/vdnsOnset.json
+    ${result}=     Run Process        ${CURDIR}/data/onset.sh     ${CURDIR}/data/vdnsOnset.json
     Should Be Equal As Integers        ${result.rc}    0
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
     Should Contain    ${result.stdout}    ACTIVE
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
     Should Contain    ${result.stdout}    OPERATION
     Should Contain    ${result.stdout}    Sending guard query for SO VF Module Create
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
     Should Contain    ${result.stdout}    OPERATION
     Should Contain    ${result.stdout}    Guard result for SO VF Module Create is Permit
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
     Should Contain    ${result.stdout}    OPERATION
     Should Contain    ${result.stdout}    actor=SO,operation=VF Module Create
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
     Should Contain    ${result.stdout}    OPERATION: SUCCESS
     Should Contain    ${result.stdout}    actor=SO,operation=VF Module Create
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
@@ -165,38 +165,38 @@ VdnsExecute
 
 VfwExecute
     [Documentation]    Executes VFW Policy
-    ${result}=     Run Process        ${SCR2}/onset.sh     ${DATA2}/vfwOnset.json
+    ${result}=     Run Process        ${CURDIR}/data/onset.sh     ${CURDIR}/data/vfwOnset.json
     Should Be Equal As Integers        ${result.rc}    0
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
     Should Contain    ${result.stdout}    ACTIVE
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
     Should Contain    ${result.stdout}    OPERATION
     Should Contain    ${result.stdout}    Sending guard query for APPC ModifyConfig
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
     Should Contain    ${result.stdout}    OPERATION
     Should Contain    ${result.stdout}    Guard result for APPC ModifyConfig is Permit
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
     Should Contain    ${result.stdout}    OPERATION
     Should Contain    ${result.stdout}    actor=APPC,operation=ModifyConfig
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
     Should Contain    ${result.stdout}    OPERATION: SUCCESS
     Should Contain    ${result.stdout}    actor=APPC,operation=ModifyConfig
-    ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-CL-MGT
+    ${result}=     Run Process        ${CURDIR}/data/wait_topic.sh     POLICY-CL-MGT
     ...            ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
     Log    Received notification ${result.stdout}
     Should Be Equal As Integers        ${result.rc}    0
@@ -207,25 +207,25 @@ VfwExecute
 *** Keywords ***
 
 VerifyController
-    ${resp}=  PeformGetRequest  /policy/pdp/engine/controllers/usecases/drools/facts  30219  200
+    ${resp}=  PeformGetRequest  /policy/pdp/engine/controllers/usecases/drools/facts  ${DROOLS_IP_2}  200
     Should Be Equal As Strings  ${resp.json()['usecases']}  1
 
 PeformGetRequest
-     [Arguments]  ${url}  ${port}  ${expectedstatus}
+     [Arguments]  ${url}  ${domain}  ${expectedstatus}
      ${auth}=  Create List  demo@people.osaaf.org  demo123456!
-     Log  Creating session http://localhost:${port}
-     ${session}=  Create Session  policy  http://localhost:${port}  auth=${auth}
+     Log  Creating session http://${domain}
+     ${session}=  Create Session  policy  http://${domain}  auth=${auth}
      ${headers}=  Create Dictionary  Accept=application/json  Content-Type=application/json
      ${resp}=  GET On Session  policy  ${url}  headers=${headers}  expected_status=${expectedstatus}
      Log  Received response from policy ${resp.text}
      [return]  ${resp}
 
 PerformPostRequest
-     [Arguments]  ${url}  ${params}  ${port}  ${jsonfile}  ${filepath}  ${contenttype}  ${expectedstatus}
+     [Arguments]  ${url}  ${params}  ${domain}  ${jsonfile}  ${filepath}  ${contenttype}  ${expectedstatus}
      ${auth}=  Create List  policyadmin  zb!XztG34
      ${postjson}=  Get file  ${filepath}/${jsonfile}
-     Log  Creating session http://localhost:${port}
-     ${session}=  Create Session  policy  http://localhost:${port}  auth=${auth}
+     Log  Creating session http://${domain}
+     ${session}=  Create Session  policy  http://${domain}  auth=${auth}
      ${headers}=  Create Dictionary  Accept=application/${contenttype}  Content-Type=application/${contenttype}
      ${resp}=  POST On Session  policy  ${url}  params=${params}  data=${postjson}  headers=${headers}  expected_status=${expectedstatus}
      Log  Received response from policy ${resp.text}
similarity index 78%
rename from csit/drools-pdp/tests/drools-pdp-test.robot
rename to csit/resources/tests/drools-pdp-test.robot
index b895857..a4db51e 100644 (file)
@@ -8,8 +8,8 @@ Library  json
 Alive
    [Documentation]  Runs Policy PDP Alive Check
    ${auth}=  Create List  demo@people.osaaf.org  demo123456!
-   Log  Creating session http://localhost:30216
-   ${session}=  Create Session  policy  http://localhost:30216  auth=${auth}
+   Log  Creating session http://${POLICY_DROOLS_IP}
+   ${session}=  Create Session  policy  http://${POLICY_DROOLS_IP}  auth=${auth}
    ${headers}=  Create Dictionary  Accept=application/json  Content-Type=application/json
    ${resp}=  GET On Session  policy  /policy/pdp/engine  headers=${headers}  expected_status=200
    Log  Received response from policy ${resp.text}
@@ -18,8 +18,8 @@ Alive
 Metrics
    [Documentation]  Verify drools-pdp is exporting metrics
    ${auth}=  Create List  demo@people.osaaf.org  demo123456!
-   Log  Creating session http://localhost:30216
-   ${session}=  Create Session  policy  http://localhost:30216  auth=${auth}
+   Log  Creating session http://${POLICY_DROOLS_IP}
+   ${session}=  Create Session  policy  http://${POLICY_DROOLS_IP}  auth=${auth}
    ${headers}=  Create Dictionary  Accept=application/json  Content-Type=application/json
    ${resp}=  GET On Session  policy  /metrics  headers=${headers}  expected_status=200
    Log  Received response from policy ${resp.text}
similarity index 94%
rename from csit/pap/tests/pap-slas.robot
rename to csit/resources/tests/pap-slas.robot
index 045530a..1fa1962 100644 (file)
@@ -3,7 +3,7 @@ Library    Collections
 Library    RequestsLibrary
 Library    OperatingSystem
 Library    json
-Resource    ${CURDIR}/../../common-library.robot
+Resource    ${CURDIR}/common-library.robot
 
 *** Keywords ***
 ValidateResponseTimeForPap
@@ -13,7 +13,7 @@ ValidateResponseTimeForPap
 
 *** Test Cases ***
 WaitForPrometheusServer
-    [Documentation]  Sleep time to wait for Prometheus server to gather all metrics
+    [Documentation]  Wait for Prometheus server to gather all metrics
     Sleep    1 minute
 
 ValidateResponseTimeForHealthcheck
similarity index 87%
rename from csit/pap/tests/pap-test.robot
rename to csit/resources/tests/pap-test.robot
index a4f0853..ccc16a4 100644 (file)
@@ -3,13 +3,13 @@ Library    Collections
 Library    RequestsLibrary
 Library    OperatingSystem
 Library    json
-Resource    ${CURDIR}/../../common-library.robot
+Resource    ${CURDIR}/common-library.robot
 
 *** Keywords ***
 GetReq
     [Arguments]  ${url}
     ${auth}=  PolicyAdminAuth
-    ${resp}=  PerformGetRequest  ${POLICY_PAP_PORT}  ${url}  200  null  ${auth}
+    ${resp}=  PerformGetRequest  ${POLICY_PAP_IP}  ${url}  200  null  ${auth}
     [return]  ${resp}
 
 ValidateResponseTimeForPap
@@ -53,7 +53,7 @@ Consolidated Healthcheck
 Metrics
     [Documentation]  Verify policy pap is exporting prometheus metrics
     ${auth}=  PolicyAdminAuth
-    ${resp}=  GetMetrics  ${POLICY_PAP_PORT}  ${auth}  /policy/pap/v1/
+    ${resp}=  GetMetrics  ${POLICY_PAP_IP}  ${auth}  /policy/pap/v1/
     Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/healthcheck",} 1.0
     Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/components/healthcheck",} 1.0
     Should Contain  ${resp.text}  spring_data_repository_invocations_seconds_count{exception="None",method="save",repository="PdpGroupRepository",state="SUCCESS",} 1.0
@@ -69,7 +69,7 @@ AddPdpGroup
     [Documentation]  Add a new PdpGroup named 'testGroup' in the policy database
     ${postjson}=  Get file  ${CURDIR}/data/create.group.request.json
     ${auth}=  PolicyAdminAuth
-    PerformPostRequest  ${POLICY_PAP_PORT}  /policy/pap/v1/pdps/groups/batch  200  ${postjson}  null  ${auth}
+    PerformPostRequest  ${POLICY_PAP_IP}  /policy/pap/v1/pdps/groups/batch  200  ${postjson}  null  ${auth}
 
 QueryPdpGroupsBeforeActivation
     [Documentation]  Verify PdpGroups before activation
@@ -78,7 +78,7 @@ QueryPdpGroupsBeforeActivation
 ActivatePdpGroup
     [Documentation]  Change the state of PdpGroup named 'testGroup' to ACTIVE
     ${auth}=  PolicyAdminAuth
-    PerformPutRequest  ${POLICY_PAP_PORT}  /policy/pap/v1/pdps/groups/testGroup  200  state=ACTIVE  ${auth}
+    PerformPutRequest  ${POLICY_PAP_IP}  /policy/pap/v1/pdps/groups/testGroup  200  state=ACTIVE  ${auth}
 
 QueryPdpGroupsAfterActivation
     [Documentation]  Verify PdpGroups after activation
@@ -88,7 +88,7 @@ DeployPdpGroups
     [Documentation]  Deploy policies in PdpGroups
     ${postjson}=  Get file  ${CURDIR}/data/deploy.group.request.json
     ${auth}=  PolicyAdminAuth
-    PerformPostRequest  ${POLICY_PAP_PORT}  /policy/pap/v1/pdps/deployments/batch  202  ${postjson}  null  ${auth}
+    PerformPostRequest  ${POLICY_PAP_IP}  /policy/pap/v1/pdps/deployments/batch  202  ${postjson}  null  ${auth}
 
 QueryPdpGroupsAfterDeploy
     [Documentation]  Verify PdpGroups after undeploy
@@ -105,12 +105,12 @@ QueryPolicyAuditWithMetadataSetAfterDeploy
 UndeployPolicy
     [Documentation]  Undeploy a policy named 'onap.restart.tca' from PdpGroups
     ${auth}=  PolicyAdminAuth
-    PerformDeleteRequest  ${POLICY_PAP_PORT}  /policy/pap/v1/pdps/policies/onap.restart.tca  202  ${auth}
+    PerformDeleteRequest  ${POLICY_PAP_IP}  /policy/pap/v1/pdps/policies/onap.restart.tca  202  ${auth}
 
 UndeployPolicyWithMetadataSet
     [Documentation]  Undeploy a policy named 'operational.apex.decisionMaker' from PdpGroups
     ${auth}=  PolicyAdminAuth
-    PerformDeleteRequest  ${POLICY_PAP_PORT}  /policy/pap/v1/pdps/policies/operational.apex.decisionMaker  202  ${auth}
+    PerformDeleteRequest  ${POLICY_PAP_IP}  /policy/pap/v1/pdps/policies/operational.apex.decisionMaker  202  ${auth}
 
 QueryPdpGroupsAfterUndeploy
     [Documentation]  Verify PdpGroups after undeploy
@@ -128,12 +128,12 @@ QueryPolicyAuditWithMetadataSetAfterUnDeploy
 DeactivatePdpGroup
     [Documentation]  Change the state of PdpGroup named 'testGroup' to PASSIVE
     ${auth}=  PolicyAdminAuth
-    PerformPutRequest  ${POLICY_PAP_PORT}  /policy/pap/v1/pdps/groups/testGroup  200  state=PASSIVE  ${auth}
+    PerformPutRequest  ${POLICY_PAP_IP}  /policy/pap/v1/pdps/groups/testGroup  200  state=PASSIVE  ${auth}
 
 DeletePdpGroups
     [Documentation]  Delete the PdpGroup named 'testGroup' from policy database
     ${auth}=  PolicyAdminAuth
-    PerformDeleteRequest  ${POLICY_PAP_PORT}  /policy/pap/v1/pdps/groups/testGroup  200  ${auth}
+    PerformDeleteRequest  ${POLICY_PAP_IP}  /policy/pap/v1/pdps/groups/testGroup  200  ${auth}
 
 QueryPdpGroupsAfterDelete
     [Documentation]    Verify PdpGroups after delete
similarity index 77%
rename from csit/clamp/tests/policy-clamp-test.robot
rename to csit/resources/tests/policy-clamp-test.robot
index 2c31b9a..5fa48af 100644 (file)
@@ -10,8 +10,8 @@ Library     yaml
 Healthcheck
      [Documentation]    Healthcheck on Clamp Acm
      ${auth}=    Create List    runtimeUser    zb!XztG34
-     Log    Creating session http://localhost:${POLICY_RUNTIME_ACM_PORT}
-     ${session}=    Create Session      ACM  http://localhost:${POLICY_RUNTIME_ACM_PORT}   auth=${auth}
+     Log    Creating session http://${POLICY_RUNTIME_ACM_IP}
+     ${session}=    Create Session      ACM  http://${POLICY_RUNTIME_ACM_IP}   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
      ${resp}=   GET On Session     ACM  /onap/policy/clamp/acm/health     headers=${headers}
      Log    Received response from ACM healthcheck {resp.text}
@@ -20,9 +20,9 @@ Healthcheck
 #CommissionAutomationCompositionV1
 #     [Documentation]  Commission automation composition.
 #     ${auth}=    Create List    runtimeUser    zb!XztG34
-#     Log    Creating session http://localhost:${POLICY_RUNTIME_ACM_PORT}
+#     Log    Creating session http://${POLICY_RUNTIME_ACM_IP}
 #     ${postyaml}=  Get file  ${CURDIR}/data/functional-pmsh-usecase.yaml
-#     ${session}=    Create Session      policy  http://localhost:${POLICY_RUNTIME_ACM_PORT}   auth=${auth}
+#     ${session}=    Create Session      policy  http://${POLICY_RUNTIME_ACM_IP}   auth=${auth}
 #     ${headers}=  Create Dictionary     Accept=application/yaml    Content-Type=application/yaml
 #     ${resp}=   POST On Session     policy  /onap/policy/clamp/acm/v2/compositions   data=${postyaml}  headers=${headers}
 #     Log    Received response from runtime acm ${resp.text}
@@ -33,10 +33,10 @@ Healthcheck
 #InstantiateAutomationCompositionV1
 #     [Documentation]  Instantiate automation composition.
 #     ${auth}=    Create List    runtimeUser    zb!XztG34
-#     Log    Creating session http://localhost:${POLICY_RUNTIME_ACM_PORT}
+#     Log    Creating session http://${POLICY_RUNTIME_ACM_IP}
 #     ${postjson}=  Get file  ${CURDIR}/data/AutomationComposition.json
 #     ${updatedpostjson}=   Replace String     ${postjson}     COMPOSITIONIDPLACEHOLDER       ${compositionId}
-#     ${session}=    Create Session      policy  http://localhost:${POLICY_RUNTIME_ACM_PORT}   auth=${auth}
+#     ${session}=    Create Session      policy  http://${POLICY_RUNTIME_ACM_IP}   auth=${auth}
 #     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
 #     ${resp}=   POST On Session     policy  /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances   data=${updatedpostjson}  headers=${headers}
 #     Log    Received response from runtime acm ${resp.text}
@@ -47,9 +47,9 @@ Healthcheck
 #PassivateAutomationComposition
 #     [Documentation]  Passivate automation composition.
 #     ${auth}=    Create List    runtimeUser    zb!XztG34
-#     Log    Creating session http://localhost:${POLICY_RUNTIME_ACM_PORT}
+#     Log    Creating session http://${POLICY_RUNTIME_ACM_IP}
 #     ${postjson}=  Get file  ${CURDIR}/data/PassiveCommand.json
-#     ${session}=    Create Session      policy  http://localhost:${POLICY_RUNTIME_ACM_PORT}   auth=${auth}
+#     ${session}=    Create Session      policy  http://${POLICY_RUNTIME_ACM_IP}   auth=${auth}
 #     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
 #     ${resp}=   PUT On Session     policy  /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId}   data=${postjson}  headers=${headers}
 #     Log    Received response from runtime acm ${resp.text}
@@ -58,8 +58,8 @@ Healthcheck
 #QueryPolicies
 #     [Documentation]    Runs Policy Participant Query New Policies
 #     ${auth}=    Create List    policyadmin    zb!XztG34
-#     Log    Creating session http://localhost:${POLICY_API_PORT}
-#     ${session}=    Create Session      policy  http://localhost:${POLICY_API_PORT}   auth=${auth}
+#     Log    Creating session http://${POLICY_API_IP}
+#     ${session}=    Create Session      policy  http://${POLICY_API_IP}   auth=${auth}
 #     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
 #     ${resp}=   GET On Session     policy  /policy/api/v1/policies     headers=${headers}
 #     Log    Received response from policy-api {resp.text}
@@ -68,8 +68,8 @@ Healthcheck
 #QueryPolicyTypes
 #     [Documentation]    Runs Policy Participant Query New Policy Types
 #     ${auth}=    Create List    policyadmin    zb!XztG34
-#     Log    Creating session http://localhost:${POLICY_API_PORT}}:6969
-#     ${session}=    Create Session      policy  http://localhost:${POLICY_API_PORT}   auth=${auth}
+#     Log    Creating session http://${POLICY_API_IP}}:6969
+#     ${session}=    Create Session      policy  http://${POLICY_API_IP}   auth=${auth}
 #     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
 #     ${resp}=   GET On Session     policy  /policy/api/v1/policytypes     headers=${headers}
 #     Log    Received response from policy-api ${resp.text}
@@ -78,9 +78,9 @@ Healthcheck
 #StateChangeRunningAutomationComposition
 #     [Documentation]  AutomationComposition State Change to RUNNING.
 #     ${auth}=    Create List    runtimeUser    zb!XztG34
-#     Log    Creating session http://localhost:${POLICY_RUNTIME_ACM_PORT}
+#     Log    Creating session http://${POLICY_RUNTIME_ACM_IP}
 #     ${postjson}=  Get file  ${CURDIR}/data/RunningCommand.json
-#     ${session}=    Create Session      policy  http://localhost:${POLICY_RUNTIME_ACM_PORT}   auth=${auth}
+#     ${session}=    Create Session      policy  http://${POLICY_RUNTIME_ACM_IP}   auth=${auth}
 #     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
 #     ${resp}=   PUT On Session     policy  /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId}   data=${postjson}  headers=${headers}  expected_status=400
 #     Log    Received response from runtime acm ${resp.text}
@@ -88,8 +88,8 @@ Healthcheck
 #QueryInstantiatedACs
 #     [Documentation]    Get Instantiated AutomationCompositions
 #     ${auth}=    Create List    runtimeUser    zb!XztG34
-#     Log    Creating session http://localhost:${POLICY_RUNTIME_ACM_PORT}
-#     ${session}=    Create Session      policy  http://localhost:${POLICY_RUNTIME_ACM_PORT}   auth=${auth}
+#     Log    Creating session http://${POLICY_RUNTIME_ACM_IP}
+#     ${session}=    Create Session      policy  http://${POLICY_RUNTIME_ACM_IP}   auth=${auth}
 #     ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
 #     ${resp}=   GET On Session     policy  /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId}     headers=${headers}
 #     Log    Received response from runtime acm ${resp.text}
similarity index 89%
rename from csit/xacml-pdp/tests/xacml-pdp-test.robot
rename to csit/resources/tests/xacml-pdp-test.robot
index e29200a..1ba0153 100644 (file)
@@ -4,7 +4,7 @@ Library     RequestsLibrary
 Library     OperatingSystem
 Library     Process
 Library     json
-Resource    ${CURDIR}/../../common-library.robot
+Resource    ${CURDIR}/common-library.robot
 
 *** Test Cases ***
 Healthcheck
@@ -24,7 +24,7 @@ Metrics
 
 MakeTopics
     [Documentation]    Creates the Policy topics
-    ${result}=     Run Process     ${SCR_DMAAP}/make_topic.sh   POLICY-PDP-PAP
+    ${result}=     Run Process     ${CURDIR}/data/make_topic.sh   POLICY-PDP-PAP
     Should Be Equal As Integers        ${result.rc}    0
 
 ExecuteXacmlPolicy
@@ -45,12 +45,12 @@ ExecuteXacmlPolicy
 
 CreateMonitorPolicy
     [Documentation]  Create a Monitoring policy
-    ${postjson}=  Get file  ${DATA2}/vCPE.policy.monitoring.input.tosca.json
+    ${postjson}=  Get file  ${DATA}/vCPE.policy.monitoring.input.tosca.json
     CreatePolicy  /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies  200  ${postjson}  onap.restart.tca  1.0.0
 
 CreateOptimizationPolicy
     [Documentation]  Create an Optimization policy
-    ${postjson}=  Get file  ${DATA2}/vCPE.policies.optimization.input.tosca.json
+    ${postjson}=  Get file  ${DATA}/vCPE.policies.optimization.input.tosca.json
     CreatePolicy  /policy/api/v1/policytypes/onap.policies.optimization.resource.AffinityPolicy/versions/1.0.0/policies  200  ${postjson}  OSDF_CASABLANCA.Affinity_Default  1.0.0
 
 GetDefaultDecision
@@ -64,8 +64,8 @@ DeployPolicies
     [Documentation]   Runs Policy PAP to deploy a policy
     ${postjson}=  Get file  ${CURDIR}/data/vCPE.policy.input.tosca.deploy.json
     ${policyadmin}=  PolicyAdminAuth
-    PerformPostRequest  ${POLICY_PAP_PORT}  /policy/pap/v1/pdps/policies  202  ${postjson}  null  ${policyadmin}
-    ${result}=     Run Process    ${SCR_DMAAP}/wait_topic.sh    POLICY-PDP-PAP
+    PerformPostRequest  ${POLICY_PAP_IP}  /policy/pap/v1/pdps/policies  202  ${postjson}  null  ${policyadmin}
+    ${result}=     Run Process    ${CURDIR}/data/wait_topic.sh    POLICY-PDP-PAP
     ...            responseTo    xacml    ACTIVE    onap.restart.tca
     Should Be Equal As Integers        ${result.rc}    0
 
@@ -129,7 +129,7 @@ GetStatisticsAfterDecision
 UndeployMonitorPolicy
     [Documentation]    Runs Policy PAP to undeploy a policy
     ${policyadmin}=  PolicyAdminAuth
-    PerformDeleteRequest  ${POLICY_PAP_PORT}  /policy/pap/v1/pdps/policies/onap.restart.tca  202  ${policyadmin}
+    PerformDeleteRequest  ${POLICY_PAP_IP}  /policy/pap/v1/pdps/policies/onap.restart.tca  202  ${policyadmin}
 
 GetStatisticsAfterUndeploy
     [Documentation]    Runs Policy Xacml PDP Statistics after policy is undeployed
@@ -140,11 +140,11 @@ GetStatisticsAfterUndeploy
 PdpxGetReq
     [Arguments]  ${url}
     ${hcauth}=  HealthCheckAuth
-    ${resp}=  PerformGetRequest  ${POLICY_PDPX_PORT}  ${url}  200  null  ${hcauth}
+    ${resp}=  PerformGetRequest  ${POLICY_PDPX_IP}  ${url}  200  null  ${hcauth}
     [return]  ${resp}
 
 DecisionPostReq
     [Arguments]  ${postjson}  ${abbr}
     ${hcauth}=  HealthCheckAuth
-    ${resp}=  PerformPostRequest  ${POLICY_PDPX_PORT}  /policy/pdpx/v1/decision  200  ${postjson}  ${abbr}  ${hcauth}
+    ${resp}=  PerformPostRequest  ${POLICY_PDPX_IP}  /policy/pdpx/v1/decision  200  ${postjson}  ${abbr}  ${hcauth}
     [return]  ${resp}
index 0f15c75..47ad3b1 100755 (executable)
@@ -30,22 +30,15 @@ function on_exit(){
         # Record list of active docker containers
         docker ps --format "table {{ .Names }}\t{{ .Status }}"
 
-        # Show the logs from all containers
-        docker-compose -f "${WORKSPACE}/csit/docker-compose-all.yml" logs > docker_compose.log
-
         # show memory consumption after all docker instances initialized
         docker_stats
 
+        source_safely ${WORKSPACE}/compose/stop-compose.sh
+
         if [[ ${WORKDIR} ]]; then
             rsync -av "${WORKDIR}/" "${WORKSPACE}/csit/archives/${PROJECT}"
         fi
-    fi
-    # Run teardown script plan if it exists
-    cd "${TESTPLANDIR}/plans/"
-    TEARDOWN="${TESTPLANDIR}/plans/teardown.sh"
-    if [ -f "${TEARDOWN}" ]; then
-        echo "Running teardown script ${TEARDOWN}"
-        source_safely "${TEARDOWN}"
+        rm -rf ${WORKSPACE}/models
     fi
     # TODO: do something with the output
      exit $rc
@@ -126,18 +119,6 @@ function source_safely() {
 # main
 #
 
-if $(docker images | grep -q "onap\/policy-api")
-then
-    export CONTAINER_LOCATION=$(
-        docker images |
-        grep onap/policy-api |
-        head -1 |
-        sed 's/onap\/policy-api.*$//'
-    )
-else
-    export CONTAINER_LOCATION="nexus3.onap.org:10001/"
-fi
-
 # set and save options for quick failure
 harden_set && save_set
 
@@ -152,33 +133,31 @@ then
 fi
 
 if [ -z "${WORKSPACE}" ]; then
-    export WORKSPACE=$(git rev-parse --show-toplevel)
+    WORKSPACE=$(git rev-parse --show-toplevel)
+    export WORKSPACE
 fi
 
 # Add csit scripts to PATH
 export PATH="${PATH}:${WORKSPACE}/csit:${WORKSPACE}/scripts:${ROBOT_VENV}/bin"
-export SCRIPTS="${WORKSPACE}/csit"
+export SCRIPTS="${WORKSPACE}/csit/resources/scripts"
 export ROBOT_VARIABLES=
 
-# get the plan from git clone
-source "${SCRIPTS}"/get-branch.sh
-
 export PROJECT="${1}"
 
-cd ${WORKSPACE}
-
-export TESTPLANDIR="${WORKSPACE}/csit/${PROJECT}"
-export TESTOPTIONS="${2}"
+cd "${WORKSPACE}"
 
 rm -rf "${WORKSPACE}/csit/archives/${PROJECT}"
 mkdir -p "${WORKSPACE}/csit/archives/${PROJECT}"
 
-# Run installation of prerequired libraries
+# Run installation of pre-required libraries
 source_safely "${SCRIPTS}/prepare-robot-env.sh"
 
 # Activate the virtualenv containing all the required libraries installed by prepare-robot-env.sh
 source_safely "${ROBOT_VENV}/bin/activate"
 
+export TEST_PLAN_DIR="${WORKSPACE}/csit/resources/tests"
+export TEST_OPTIONS="${2}"
+
 WORKDIR=$(mktemp -d)
 cd "${WORKDIR}"
 
@@ -186,8 +165,7 @@ cd "${WORKDIR}"
 docker login -u docker -p docker nexus3.onap.org:10001
 
 # Run setup script plan if it exists
-cd "${TESTPLANDIR}/plans/"
-SETUP="${TESTPLANDIR}/plans/setup.sh"
+SETUP="${SCRIPTS}/setup-${PROJECT}.sh"
 if [ -f "${SETUP}" ]; then
     echo "Running setup script ${SETUP}"
     source_safely "${SETUP}"
@@ -199,14 +177,14 @@ docker_stats | tee "${WORKSPACE}/csit/archives/${PROJECT}/_sysinfo-1-after-setup
 # Run test plan
 cd "${WORKDIR}"
 echo "Reading the testplan:"
-cat "${TESTPLANDIR}/plans/testplan.txt" | egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' | sed "s|^|${TESTPLANDIR}/tests/|" > testplan.txt
+echo "${SUITES}" | egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' | sed "s|^|${TEST_PLAN_DIR}/|" > testplan.txt
 cat testplan.txt
 SUITES=$( xargs < testplan.txt )
 
 echo ROBOT_VARIABLES="${ROBOT_VARIABLES}"
 echo "Starting Robot test suites ${SUITES} ..."
 relax_set
-python3 -m robot.run -N ${PROJECT} -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${SUITES}
+python3 -m robot.run -N "${PROJECT}" -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${SUITES}
 RESULT=$?
 load_set
 echo "RESULT: ${RESULT}"
diff --git a/csit/start-all.sh b/csit/start-all.sh
deleted file mode 100755 (executable)
index 15210aa..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-# ============LICENSE_START====================================================
-# 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.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END======================================================
-SCRIPTS=$(git rev-parse --show-toplevel)
-export SCRIPTS="${SCRIPTS}"/csit
-
-source "${SCRIPTS}"/get-versions.sh
-
-docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-gui
-
-echo "Clamp GUI: https://localhost:2445/clamp"
diff --git a/csit/stop-all.sh b/csit/stop-all.sh
deleted file mode 100755 (executable)
index 9adfcf3..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-#
-# ============LICENSE_START====================================================
-#  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.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END======================================================
-
-SCRIPTS=$(git rev-parse --show-toplevel)
-export SCRIPTS="${SCRIPTS}"/csit
-
-source "${SCRIPTS}"/get-versions.sh
-
-docker-compose -f "${SCRIPTS}"/docker-compose-all.yml down -v
diff --git a/csit/xacml-pdp/plans/setup.sh b/csit/xacml-pdp/plans/setup.sh
deleted file mode 100755 (executable)
index 646605f..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/bash
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
-#  Modifications Copyright 2021-2023 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-echo "Uninstall docker-py and reinstall docker."
-python3 -m pip uninstall -y docker-py
-python3 -m pip uninstall -y docker
-python3 -m pip install -U docker
-
-sudo apt-get -y install libxml2-utils
-
-source "${SCRIPTS}"/get-versions.sh
-bash "${SCRIPTS}"/get-models-examples.sh
-
-docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d xacml-pdp
-
-unset http_proxy https_proxy
-
-POLICY_API_IP=$(get-instance-ip.sh policy-api)
-POLICY_API_PORT=30440
-MARIADB_IP=$(get-instance-ip.sh mariadb)
-POLICY_PDPX_IP=$(get-instance-ip.sh policy-xacml-pdp)
-POLICY_PDPX_PORT=30441
-SIM_IP=$(get-instance-ip.sh simulator)
-POLICY_PAP_IP=$(get-instance-ip.sh policy-pap)
-POLICY_PAP_PORT=30442
-
-export SIM_IP
-
-echo XACML-PDP IP IS "${POLICY_PDPX_IP}"
-echo API IP IS "${POLICY_API_IP}"
-echo PAP IP IS "${POLICY_PAP_IP}"
-echo MARIADB IP IS "${MARIADB_IP}"
-echo SIM_IP IS "${SIM_IP}"
-
-# wait for the app to start up
-"${SCRIPTS}"/wait_for_rest.sh localhost "${POLICY_PDPX_PORT}"
-
-DATA2=${WORKSPACE}/models/models-examples/src/main/resources/policies
-
-ROBOT_VARIABLES=""
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCR_DMAAP:${SCRIPTS}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA2:${DATA2}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PDPX_IP:${POLICY_PDPX_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PDPX_PORT:${POLICY_PDPX_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_PORT:${POLICY_API_PORT}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_IP:${POLICY_PAP_IP}"
-ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_PORT:${POLICY_PAP_PORT}"
diff --git a/csit/xacml-pdp/plans/testplan.txt b/csit/xacml-pdp/plans/testplan.txt
deleted file mode 100644 (file)
index c8ffa39..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# Test suites are relative paths under [policy/docker.git]/csit/[project]/tests.
-# Place the suites in run order.
-xacml-pdp-test.robot