aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/policy
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/policy')
-rwxr-xr-xscripts/policy/config/drools-apps/custom/noop.pre.sh6
-rw-r--r--scripts/policy/config/drools-apps/env/base.conf9
-rw-r--r--scripts/policy/config/drools/env/base.conf18
-rw-r--r--scripts/policy/config/pap/onap.policies.monitoring.cdap.tca.hi.lo.app.json210
-rw-r--r--scripts/policy/config/pap/vCPE.policy.monitoring.input.tosca.json51
-rw-r--r--scripts/policy/docker-compose-api.yml13
-rw-r--r--scripts/policy/docker-compose-pap.yml17
-rw-r--r--scripts/policy/policy-xacml-pdp/docker-compose-pdpx.yml17
8 files changed, 42 insertions, 299 deletions
diff --git a/scripts/policy/config/drools-apps/custom/noop.pre.sh b/scripts/policy/config/drools-apps/custom/noop.pre.sh
index 909d8f48..4b0c2199 100755
--- a/scripts/policy/config/drools-apps/custom/noop.pre.sh
+++ b/scripts/policy/config/drools-apps/custom/noop.pre.sh
@@ -18,10 +18,8 @@
sed -i "s/^dmaap/noop/g" \
${POLICY_HOME}/config/engine.properties \
${POLICY_HOME}/config/feature-lifecycle.properties \
- ${POLICY_HOME}/config/frankfurt-controller.properties \
- ${POLICY_HOME}/config/usecases-controller.properties
+ ${POLICY_HOME}/config/frankfurt-controller.properties
chmod 644 ${POLICY_HOME}/config/engine.properties \
${POLICY_HOME}/config/feature-lifecycle.properties \
- ${POLICY_HOME}/config/frankfurt-controller.properties \
- ${POLICY_HOME}/config/usecases-controller.properties
+ ${POLICY_HOME}/config/frankfurt-controller.properties
diff --git a/scripts/policy/config/drools-apps/env/base.conf b/scripts/policy/config/drools-apps/env/base.conf
index c11e7e98..b5e7cbd1 100644
--- a/scripts/policy/config/drools-apps/env/base.conf
+++ b/scripts/policy/config/drools-apps/env/base.conf
@@ -80,11 +80,13 @@ PAP_PASSWORD=alpha123
PDP_HOST=pdp
PDP_PORT=6969
+PDP_CONTEXT_URI=policy/pdpx/v1/
PDP_USERNAME=testpdp
PDP_PASSWORD=alpha123
PDP_CLIENT_USERNAME=python
PDP_CLIENT_PASSWORD=test
PDP_ENVIRONMENT=TEST
+GUARD_DISABLED=false
# DCAE DMaaP
@@ -100,7 +102,7 @@ DMAAP_SERVERS=mr.api.simpledemo.onap.org
AAI_HOST=aai.api.simpledemo.onap.org
AAI_PORT=8443
-AAI_URL=https://aai.api.simpledemo.onap.org:8443
+AAI_CONTEXT_URI=
AAI_USERNAME=policy@policy.onap.org
AAI_PASSWORD=demo123456!
@@ -108,6 +110,7 @@ AAI_PASSWORD=demo123456!
SO_HOST=vm1.mso.simpledemo.onap.org
SO_PORT=8080
+SO_CONTEXT_URI=onap/so/infra/
SO_URL=http://vm1.mso.simpledemo.onap.org:8080/onap/so/infra
SO_USERNAME=InfraPortalClient
SO_PASSWORD=password1$
@@ -116,7 +119,7 @@ SO_PASSWORD=password1$
VFC_HOST=
VFC_PORT=
-VFC_URL=
+VFC_CONTEXT_URI=api/nslcm/v1/
VFC_USERNAME=
VFC_PASSWORD=
@@ -124,6 +127,6 @@ VFC_PASSWORD=
SDNC_HOST=
SDNC_PORT=
-SDNC_URL=
+SDNC_CONTEXT_URI=restconf/operations/
SDNC_USERNAME=
SDNC_PASSWORD=
diff --git a/scripts/policy/config/drools/env/base.conf b/scripts/policy/config/drools/env/base.conf
index 8fef8a28..891de49f 100644
--- a/scripts/policy/config/drools/env/base.conf
+++ b/scripts/policy/config/drools/env/base.conf
@@ -79,11 +79,14 @@ PAP_PASSWORD=
# PDP-X
PDP_HOST=
+PDP_PORT=
+PDP_CONTEXT_URI=policy/pdpx/v1/
PDP_USERNAME=
PDP_PASSWORD=
PDP_CLIENT_USERNAME=
PDP_CLIENT_PASSWORD=
PDP_ENVIRONMENT=
+GUARD_DISABLED=false
# DCAE DMaaP
@@ -97,24 +100,33 @@ DMAAP_SERVERS=mr.api.simpledemo.onap.org
# AAI
-AAI_URL=https://aai.api.simpledemo.onap.org:8443
+AAI_HOST=aai.api.simpledemo.onap.org
+AAI_PORT=8443
+AAI_CONTEXT_URI=
AAI_USERNAME=policy@policy.onap.org
AAI_PASSWORD=demo123456!
# MSO
+SO_HOST=vm1.mso.simpledemo.onap.org
+SO_PORT=8080
+SO_CONTEXT_URI=onap/so/infra/
SO_URL=http://vm1.mso.simpledemo.onap.org:8080/onap/so/infra
SO_USERNAME=InfraPortalClient
SO_PASSWORD=password1$
# VFC
-VFC_URL=
+VFC_HOST=
+VFC_PORT=
+VFC_CONTEXT_URI=api/nslcm/v1/
VFC_USERNAME=
VFC_PASSWORD=
# SDNC
-SDNC_URL=
+SDNC_HOST=
+SDNC_PORT=
+SDNC_CONTEXT_URI=restconf/operations/
SDNC_USERNAME=
SDNC_PASSWORD=
diff --git a/scripts/policy/config/pap/onap.policies.monitoring.cdap.tca.hi.lo.app.json b/scripts/policy/config/pap/onap.policies.monitoring.cdap.tca.hi.lo.app.json
deleted file mode 100644
index 06574735..00000000
--- a/scripts/policy/config/pap/onap.policies.monitoring.cdap.tca.hi.lo.app.json
+++ /dev/null
@@ -1,210 +0,0 @@
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
- "policy_types": {
- "onap.policies.Monitoring": {
- "derived_from": "tosca.policies.Root",
- "description": "a base policy type for all policies that governs monitoring provisioning"
- },
- "onap.policies.monitoring.cdap.tca.hi.lo.app": {
- "derived_from": "onap.policies.Monitoring",
- "version": "1.0.0",
- "properties": {
- "tca_policy": {
- "type": "onap.datatypes.monitoring.tca_policy",
- "description": "TCA Policy JSON"
- }
- }
- }
- },
- "data_types": {
- "onap.datatypes.monitoring.metricsPerEventName": {
- "derived_from": "tosca.datatypes.Root",
- "properties": {
- "controlLoopSchemaType": {
- "type": "string",
- "required": true,
- "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
- "constraints": [
- {
- "valid_values": [
- "VM",
- "VNF"
- ]
- }
- ]
- },
- "eventName": {
- "type": "string",
- "required": true,
- "description": "Event name to which thresholds need to be applied"
- },
- "policyName": {
- "type": "string",
- "required": true,
- "description": "TCA Policy Scope Name"
- },
- "policyScope": {
- "type": "string",
- "required": true,
- "description": "TCA Policy Scope"
- },
- "policyVersion": {
- "type": "string",
- "required": true,
- "description": "TCA Policy Scope Version"
- },
- "thresholds": {
- "type": "list",
- "required": true,
- "description": "Thresholds associated with eventName",
- "entry_schema": {
- "type": "onap.datatypes.monitoring.thresholds"
- }
- }
- }
- },
- "onap.datatypes.monitoring.tca_policy": {
- "derived_from": "tosca.datatypes.Root",
- "properties": {
- "domain": {
- "type": "string",
- "required": true,
- "description": "Domain name to which TCA needs to be applied",
- "default": "measurementsForVfScaling",
- "constraints": [
- {
- "equal": "measurementsForVfScaling"
- }
- ]
- },
- "metricsPerEventName": {
- "type": "list",
- "required": true,
- "description": "Contains eventName and threshold details that need to be applied to given eventName",
- "entry_schema": {
- "type": "onap.datatypes.monitoring.metricsPerEventName"
- }
- }
- }
- },
- "onap.datatypes.monitoring.thresholds": {
- "derived_from": "tosca.datatypes.Root",
- "properties": {
- "closedLoopControlName": {
- "type": "string",
- "required": true,
- "description": "Closed Loop Control Name associated with the threshold"
- },
- "closedLoopEventStatus": {
- "type": "string",
- "required": true,
- "description": "Closed Loop Event Status of the threshold",
- "constraints": [
- {
- "valid_values": [
- "ONSET",
- "ABATED"
- ]
- }
- ]
- },
- "direction": {
- "type": "string",
- "required": true,
- "description": "Direction of the threshold",
- "constraints": [
- {
- "valid_values": [
- "LESS",
- "LESS_OR_EQUAL",
- "GREATER",
- "GREATER_OR_EQUAL",
- "EQUAL"
- ]
- }
- ]
- },
- "fieldPath": {
- "type": "string",
- "required": true,
- "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
- "constraints": [
- {
- "valid_values": [
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
- "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
- "$.event.measurementsForVfScalingFields.meanRequestLatency",
- "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
- "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
- "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
- "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
- "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
- "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
- ]
- }
- ]
- },
- "severity": {
- "type": "string",
- "required": true,
- "description": "Threshold Event Severity",
- "constraints": [
- {
- "valid_values": [
- "CRITICAL",
- "MAJOR",
- "MINOR",
- "WARNING",
- "NORMAL"
- ]
- }
- ]
- },
- "thresholdValue": {
- "type": "integer",
- "required": true,
- "description": "Threshold value for the field Path inside CEF message"
- },
- "version": {
- "type": "string",
- "required": true,
- "description": "Version number associated with the threshold"
- }
- }
- }
- }
-}
diff --git a/scripts/policy/config/pap/vCPE.policy.monitoring.input.tosca.json b/scripts/policy/config/pap/vCPE.policy.monitoring.input.tosca.json
deleted file mode 100644
index 3003d9a8..00000000
--- a/scripts/policy/config/pap/vCPE.policy.monitoring.input.tosca.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
- "topology_template": {
- "policies": [
- {
- "onap.restart.tca": {
- "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
- "version": "1.0.0",
- "type_version": "1.0.0",
- "metadata": {
- "policy-id": "onap.restart.tca"
- },
- "properties": {
- "tca_policy": {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "eventName": "Measurement_vGMUX",
- "controlLoopSchemaType": "VNF",
- "policyScope": "DCAE",
- "policyName": "DCAE.Config_tca-hi-lo",
- "policyVersion": "v0.0.1",
- "thresholds": [
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "EQUAL",
- "severity": "MAJOR",
- "closedLoopEventStatus": "ABATED"
- },
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "GREATER",
- "severity": "CRITICAL",
- "closedLoopEventStatus": "ONSET"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
- }
-}
diff --git a/scripts/policy/docker-compose-api.yml b/scripts/policy/docker-compose-api.yml
index 1bab1894..e32190f1 100644
--- a/scripts/policy/docker-compose-api.yml
+++ b/scripts/policy/docker-compose-api.yml
@@ -1,4 +1,4 @@
-# Copyright 2019 AT&T Intellectual Property. All rights reserved
+# Copyright 2019-2020 AT&T Intellectual Property. 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.
@@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
version: '2'
-networks:
- default:
- driver: bridge
services:
mariadb:
image: mariadb:${POLICY_MARIADB_VER}
@@ -24,16 +21,16 @@ services:
env_file: config/db/db.conf
volumes:
- ./config/db:/docker-entrypoint-initdb.d
- ports:
- - "3306:3306"
+ expose:
+ - 3306
api:
image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION}
container_name: policy-api
depends_on:
- mariadb
hostname: policy-api
- ports:
- - "6969:6969"
+ expose:
+ - 6969
start_dependencies:
image: dadarek/wait-for-dependencies
environment:
diff --git a/scripts/policy/docker-compose-pap.yml b/scripts/policy/docker-compose-pap.yml
index 970f1168..5438557b 100644
--- a/scripts/policy/docker-compose-pap.yml
+++ b/scripts/policy/docker-compose-pap.yml
@@ -1,4 +1,4 @@
-# Copyright 2019 AT&T Intellectual Property. All rights reserved
+# Copyright 2019-2020 AT&T Intellectual Property. 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.
@@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
version: '2'
-networks:
- default:
- driver: bridge
services:
mariadb:
image: mariadb:${POLICY_MARIADB_VER}
@@ -24,24 +21,24 @@ services:
env_file: config/db/db.conf
volumes:
- ./config/db:/docker-entrypoint-initdb.d
- ports:
- - "3306:3306"
+ expose:
+ - 3306
pap:
image: nexus3.onap.org:10001/onap/policy-pap:${POLICY_PAP_VERSION}
container_name: policy-pap
depends_on:
- mariadb
hostname: policy-pap
- ports:
- - "6969:6969"
+ expose:
+ - 6969
api:
image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION}
container_name: policy-api
depends_on:
- mariadb
hostname: policy-api
- ports:
- - "9969:6969"
+ expose:
+ - 6969
start_dependencies:
image: dadarek/wait-for-dependencies
environment:
diff --git a/scripts/policy/policy-xacml-pdp/docker-compose-pdpx.yml b/scripts/policy/policy-xacml-pdp/docker-compose-pdpx.yml
index af1cbaee..caf8315b 100644
--- a/scripts/policy/policy-xacml-pdp/docker-compose-pdpx.yml
+++ b/scripts/policy/policy-xacml-pdp/docker-compose-pdpx.yml
@@ -1,5 +1,5 @@
# ============LICENSE_START=======================================================
-# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2019-2020 AT&T Intellectual Property. 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.
@@ -16,9 +16,6 @@
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
version: '2'
-networks:
- default:
- driver: bridge
services:
mariadb:
image: mariadb:${POLICY_MARIADB_VER}
@@ -28,14 +25,14 @@ services:
env_file: config/db/db.conf
volumes:
- ./config/db:/docker-entrypoint-initdb.d
- ports:
- - "3306:3306"
+ expose:
+ - 3306
message-router:
image: dmaap/simulator
container_name: dmaap-simulator
hostname: dmaap-simulator
- ports:
- - "3904:3904"
+ expose:
+ - 3904
pap:
image: nexus3.onap.org:10001/onap/policy-pap:${POLICY_PAP_VERSION}
container_name: policy-pap
@@ -57,8 +54,8 @@ services:
- message-router
- pap
hostname: policy-xacml-pdp
- ports:
- - "6969:6969"
+ expose:
+ - 6969
start_dependencies:
image: dadarek/wait-for-dependencies
environment: