diff options
Diffstat (limited to 'scripts')
40 files changed, 122 insertions, 1528 deletions
diff --git a/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh b/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh index 38b78f2d..b7a595c1 100755 --- a/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh +++ b/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh @@ -26,6 +26,16 @@ DOCKER_SIM_NWNAME="dfcnet" echo "Creating docker network $DOCKER_SIM_NWNAME, if needed" docker network ls | grep $DOCKER_SIM_NWNAME >/dev/null || docker network create $DOCKER_SIM_NWNAME +if [ $HTTP_TYPE = "HTTPS" ] + then + docker run \ + --name oom-certservice-post-processor \ + --env-file $SIMGROUP_ROOT/../certservice/merger/merge-certs.env \ + --mount type=bind,src=$SIMGROUP_ROOT/tls,dst=/opt/app/datafile/etc/cert \ + --mount type=bind,src=$SIMGROUP_ROOT/../certservice/generated-certs/dfc-p12,dst=/opt/app/datafile/etc/ \ + nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-post-processor:latest +fi + docker-compose up -d DFC_APP="$(docker ps -q --filter='name=dfc_app0')" diff --git a/scripts/dmaap-datarouter/remove_cert_from_ca.py b/scripts/dmaap-datarouter/remove_cert_from_ca.py index 192e274f..4ed9b777 100644 --- a/scripts/dmaap-datarouter/remove_cert_from_ca.py +++ b/scripts/dmaap-datarouter/remove_cert_from_ca.py @@ -28,7 +28,7 @@ dr_cert_exists = False with open(cafile, 'r+b', buffering=0) as outfile: for line in outfile.readlines()[-35:-34]: - if "# Serial: 0x9EAEEDC0A7CEB59D" in line: + if '# Serial: 0x9EAEEDC0A7CEB59D'.encode() in line: dr_cert_exists = True if dr_cert_exists: outfile.seek(0, os.SEEK_END) diff --git a/scripts/optf-has/has/has-properties/conductor.conf.onap b/scripts/optf-has/has/has-properties/conductor.conf.onap index 3ce7fa05..b8b0a0ad 100644 --- a/scripts/optf-has/has/has-properties/conductor.conf.onap +++ b/scripts/optf-has/has/has-properties/conductor.conf.onap @@ -585,3 +585,51 @@ concurrent = true # Extensions list to use (list value) #extensions = multicloud + + +[sdc] + +# +# From conductor +# + + +# Data Store table prefix. (string value) +#table_prefix = sdc + +# Base URL for SDC, up to and not including the version, and without a +# trailing slash. (string value) +#server_url = https://controller:8443/sdc +server_url = http://localhost:9595/sdc + +# Timeout for SDC Rest Call (string value) +#sdc_rest_timeout = 30 + +# Number of retry for SDC Rest Call (string value) +#sdc_retries = 3 + +# The version of A&AI in v# format. (string value) +server_url_version = v1 + +# SSL/TLS certificate file in pem format. This certificate must be registered +# with the SDC endpoint. (string value) +#certificate_file = certificate.pem +certificate_file = + +# Private Certificate Key file in pem format. (string value) +#certificate_key_file = certificate_key.pem +certificate_key_file = + +# Certificate Authority Bundle file in pem format. Must contain the appropriate +# trust chain for the Certificate file. (string value) +#certificate_authority_bundle_file = certificate_authority_bundle.pem +certificate_authority_bundle_file = /usr/local/bin/AAF_RootCA.cer + +# Username for SDC. (string value) +#username = + +# Password for SDC. (string value) +#password = + +temp_path = "/tmp/nsttemplates" + diff --git a/scripts/optf-has/has/has_script.sh b/scripts/optf-has/has/has_script.sh index 3b24d47a..b845dda5 100755 --- a/scripts/optf-has/has/has_script.sh +++ b/scripts/optf-has/has/has_script.sh @@ -31,7 +31,7 @@ cd ${DIR} COND_CONF=/tmp/conductor/properties/conductor.conf LOG_CONF=/tmp/conductor/properties/log.conf IMAGE_NAME=nexus3.onap.org:10001/onap/optf-has -IMAGE_VER=2.1.2-SNAPSHOT-latest +IMAGE_VER=2.1.3-SNAPSHOT-latest BUNDLE=/tmp/conductor/properties/AAF_RootCA.cer mkdir -p /tmp/conductor/properties @@ -57,6 +57,13 @@ echo "AAISIM_IP=${AAISIM_IP}" # change AAI reference to the local instance sed -i -e "s%localhost:8081/%${AAISIM_IP}:8081/%g" /tmp/conductor/properties/conductor.conf +SDCSIM_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' sdcsim` +echo "SDCSIM_IP=${SDCSIM_IP}" + +# change SDC reference to the local instance +sed -i -e "s%localhost:9595/%${SDCSIM_IP}:9595/%g" /tmp/conductor/properties/conductor.conf + + MULTICLOUDSIM_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' multicloudsim` echo "MULTICLOUDSIM_IP=${MULTICLOUDSIM_IP}" diff --git a/scripts/optf-has/has/simulator_script.sh b/scripts/optf-has/has/simulator_script.sh index c52535cb..a3e4faa6 100755 --- a/scripts/optf-has/has/simulator_script.sh +++ b/scripts/optf-has/has/simulator_script.sh @@ -71,6 +71,25 @@ echo "MULTICLOUDSIM_IP=${MULTICLOUDSIM_IP}" ${WORKSPACE}/scripts/optf-has/has/wait_for_port.sh ${MULTICLOUDSIM_IP} 8082 + +# prepare sdcsim +cd ${WORK_DIR}/has/conductor/conductor/tests/functional/simulators/sdcsim/ + +# check Dockerfile content +cat ./Dockerfile + +# build multicloudsim +docker build -t sdcsim . + +# run multicloudsim +docker run -d --name sdcsim -p 9595:9595 sdcsim + +SDCSIM_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' sdcsim` +echo "SDCSIM_IP=${SDCSIM_IP}" + +${WORKSPACE}/scripts/optf-has/has/wait_for_port.sh ${SDCSIM_IP} 9595 + + # prepare aafsim echo "simulator_script: prepare aafsim " cd ${WORK_DIR}/has/conductor/conductor/tests/functional/simulators/aafsim/ diff --git a/scripts/optf-has/has/simulator_teardown_script.sh b/scripts/optf-has/has/simulator_teardown_script.sh index eb29445a..14b38868 100755 --- a/scripts/optf-has/has/simulator_teardown_script.sh +++ b/scripts/optf-has/has/simulator_teardown_script.sh @@ -18,7 +18,9 @@ echo "optf/has scripts docker containers killing"; docker stop aaisim docker stop multicloudsim docker stop aafsim +docker stop sdcsim docker rm aaisim docker rm multicloudsim docker rm aafsim +docker rm sdcsim
\ No newline at end of file diff --git a/scripts/policy/config/apex-pdp/OnapPfConfig.json b/scripts/policy/config/apex-pdp/OnapPfConfig.json deleted file mode 100644 index 59ba604d..00000000 --- a/scripts/policy/config/apex-pdp/OnapPfConfig.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name":"OnapPfParameterGroup", - "restServerParameters": { - "host": "0.0.0.0", - "port": 6969, - "userName": "healthcheck", - "password": "zb!XztG34", - "https": true - }, - "pdpStatusParameters":{ - "pdpGroup": "defaultGroup", - "timeIntervalMs": 120000, - "pdpType":"apex", - "description":"Pdp Heartbeat", - "supportedPolicyTypes": [ - { - "name": "onap.policies.controlloop.operational.common.Apex", - "version": "1.0.0" - }, - { - "name": "onap.policies.native.Apex", - "version": "1.0.0" - } - ] - }, - "topicParameterGroup": { - "topicSources" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "policy.api.simpledemo.onap.org" ], - "topicCommInfrastructure" : "dmaap", - "useHttps" : true, - "allowSelfSignedCerts" : true - }], - "topicSinks" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "policy.api.simpledemo.onap.org" ], - "topicCommInfrastructure" : "dmaap", - "useHttps" : true, - "allowSelfSignedCerts" : true - }] - } -} diff --git a/scripts/policy/config/db/db.conf b/scripts/policy/config/db/db.conf deleted file mode 100644 index d6764f97..00000000 --- a/scripts/policy/config/db/db.conf +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2019 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. -# 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. -MYSQL_ROOT_PASSWORD=secret -MYSQL_USER=policy_user -MYSQL_PASSWORD=policy_user diff --git a/scripts/policy/config/db/db.sh b/scripts/policy/config/db/db.sh deleted file mode 100755 index 24b04003..00000000 --- a/scripts/policy/config/db/db.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -xv -# Copyright 2019 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. -# 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. - -for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory -do - mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};" - mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;" -done - -mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;" diff --git a/scripts/policy/config/distribution/defaultConfig.json b/scripts/policy/config/distribution/defaultConfig.json deleted file mode 100644 index facee9bc..00000000 --- a/scripts/policy/config/distribution/defaultConfig.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name":"SDCDistributionGroup", - "restServerParameters":{ - "host":"0.0.0.0", - "port":6969, - "userName":"healthcheck", - "password":"zb!XztG34", - "https": true - }, - "receptionHandlerParameters":{ - "FileReceptionHandler":{ - "receptionHandlerType":"File", - "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.file.FileSystemReceptionHandler", - "receptionHandlerConfigurationName":"fileConfiguration", - "pluginHandlerParameters":{ - "policyDecoders":{ - "ApexDecoder":{ - "decoderType":"ApexDecoder", - "decoderClassName":"org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicy", - "decoderConfigurationName": "apexDecoderConfiguration" - } - }, - "policyForwarders":{ - "LifeCycleApiForwarder":{ - "forwarderType":"LifeCycleAPI", - "forwarderClassName":"org.onap.policy.distribution.forwarding.lifecycle.api.LifecycleApiPolicyForwarder", - "forwarderConfigurationName": "lifecycleApiConfiguration" - } - } - } - } - }, - "receptionHandlerConfigurationParameters":{ - "fileConfiguration":{ - "parameterClassName":"org.onap.policy.distribution.reception.handling.file.FileSystemReceptionHandlerConfigurationParameterGroup", - "parameters":{ - "watchPath": "/opt/app/policy/distribution/etc/temp/", - "maxThread": 1 - } - } - }, - "policyDecoderConfigurationParameters":{ - "apexDecoderConfiguration":{ - "parameterClassName":"org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicyParameterGroup", - "parameters":{ - "policyFileName": "apex_policy.json", - "policyTypeFileName": "apex_policy_type.json" - } - } - }, - "policyForwarderConfigurationParameters":{ - "lifecycleApiConfiguration":{ - "parameterClassName":"org.onap.policy.distribution.forwarding.lifecycle.api.LifecycleApiForwarderParameters", - "parameters":{ - "apiParameters": { - "hostName": "policy-api", - "port": 6969, - "userName": "healthcheck", - "password": "zb!XztG34" - }, - "papParameters": { - "hostName": "policy-pap", - "port": 6969, - "userName": "healthcheck", - "password": "zb!XztG34" - }, - "isHttps": true, - "deployPolicies": true - } - } - } -} diff --git a/scripts/policy/config/drools-apps/custom/features.pre.sh b/scripts/policy/config/drools-apps/custom/features.pre.sh deleted file mode 100755 index fd7b5b91..00000000 --- a/scripts/policy/config/drools-apps/custom/features.pre.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# ============LICENSE_START=================================================== -# Copyright (C) 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. -# 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===================================================== - -sh -c "features disable distributed-locking" diff --git a/scripts/policy/config/drools-apps/custom/standalone-settings.xml b/scripts/policy/config/drools-apps/custom/standalone-settings.xml deleted file mode 100644 index ebd6dd2a..00000000 --- a/scripts/policy/config/drools-apps/custom/standalone-settings.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ============LICENSE_START======================================================= - Base Package - ================================================================================ - Copyright (C) 2017-2019 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. - 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========================================================= - --> - - -<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> - - <offline>true</offline> - - <profiles> - - <profile> - <id>policy-local</id> - - <repositories> - <repository> - <id>file-repository</id> - <url>file:${user.home}/.m2/file-repository</url> - <releases> - <enabled>true</enabled> - <updatePolicy>always</updatePolicy> - </releases> - <snapshots> - <enabled>true</enabled> - <updatePolicy>always</updatePolicy> - </snapshots> - </repository> - </repositories> - - </profile> - - </profiles> - - <activeProfiles> - <activeProfile>policy-local</activeProfile> - </activeProfiles> - -</settings> diff --git a/scripts/policy/config/drools-apps/env/base.conf b/scripts/policy/config/drools-apps/env/base.conf deleted file mode 100644 index 673cfaf3..00000000 --- a/scripts/policy/config/drools-apps/env/base.conf +++ /dev/null @@ -1,132 +0,0 @@ -# ============LICENSE_START================================================== -# Copyright (C) 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. -# 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==================================================== - -# JVM options - -JVM_OPTIONS=-server -Xms512m -Xmx512m - -# SYSTEM software configuration - -DEBUG=y -POLICY_HOME=/opt/app/policy -POLICY_LOGS=/var/log/onap/policy/pdpd -KEYSTORE_PASSWD=Pol1cy_0nap -TRUSTSTORE_PASSWD=Pol1cy_0nap - -# Telemetry credentials - -TELEMETRY_PORT=9696 -TELEMETRY_HOST=0.0.0.0 -TELEMETRY_USER=demo@people.osaaf.org -TELEMETRY_PASSWORD=demo123456! - -# nexus repository - -SNAPSHOT_REPOSITORY_ID= -SNAPSHOT_REPOSITORY_URL= -RELEASE_REPOSITORY_ID= -RELEASE_REPOSITORY_URL= -REPOSITORY_USERNAME= -REPOSITORY_PASSWORD= -REPOSITORY_OFFLINE=true - -# Relational (SQL) DB access - -SQL_HOST=mariadb -SQL_USER=policy_user -SQL_PASSWORD=policy_user - -# AAF - -AAF=false -AAF_NAMESPACE=org.onap.policy -AAF_HOST=aaf.api.simpledemo.onap.org - -# PDP-D DMaaP configuration channel - -PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION -PDPD_CONFIGURATION_API_KEY= -PDPD_CONFIGURATION_API_SECRET= -PDPD_CONFIGURATION_CONSUMER_GROUP= -PDPD_CONFIGURATION_CONSUMER_INSTANCE= -PDPD_CONFIGURATION_PARTITION_KEY= - -# PAP-PDP configuration channel - -POLICY_PDP_PAP_TOPIC=POLICY-PDP-PAP -POLICY_PDP_PAP_API_KEY= -POLICY_PDP_PAP_API_SECRET= - -# PAP - -PAP_HOST=pap -PAP_USERNAME=testpap -PAP_PASSWORD=alpha123 - -# PDP-X - -GUARD_DISABLED=false -PDP_HOST=policy-xacml-pdp -PDP_PORT=6969 -PDP_CONTEXT_URI=policy/pdpx/v1/ -PDP_USERNAME=healthcheck -PDP_PASSWORD=zb!XztG34 -PDP_CLIENT_USERNAME=python -PDP_CLIENT_PASSWORD=test -PDP_ENVIRONMENT=TEST - -# DCAE DMaaP - -DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT -DCAE_SERVERS=policy.api.simpledemo.onap.org -DCAE_CONSUMER_GROUP=dcae.policy.shared - -# Open DMaaP - -DMAAP_SERVERS=policy.api.simpledemo.onap.org - -# AAI - -AAI_HOST=policy.api.simpledemo.onap.org -AAI_PORT=6666 -AAI_CONTEXT_URI= -AAI_USERNAME=policy@policy.onap.org -AAI_PASSWORD=demo123456! - -# MSO - -SO_HOST=policy.api.simpledemo.onap.org -SO_PORT=6669 -SO_CONTEXT_URI= -SO_URL=https://policy.api.simpledemo.onap.org:6669/ -SO_USERNAME=InfraPortalClient -SO_PASSWORD=password1$ - -# VFC - -VFC_HOST=policy.api.simpledemo.onap.org -VFC_PORT=6670 -VFC_CONTEXT_URI= -VFC_USERNAME= -VFC_PASSWORD= - -# SDNC - -SDNC_HOST=policy.api.simpledemo.onap.org -SDNC_PORT=6668 -SDNC_CONTEXT_URI= -SDNC_USERNAME= -SDNC_PASSWORD= diff --git a/scripts/policy/config/drools-apps/env/feature-healthcheck.conf b/scripts/policy/config/drools-apps/env/feature-healthcheck.conf deleted file mode 100644 index 1c710547..00000000 --- a/scripts/policy/config/drools-apps/env/feature-healthcheck.conf +++ /dev/null @@ -1,18 +0,0 @@ -# ============LICENSE_START======================================================= -# Copyright (C) 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. -# 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========================================================= - -HEALTHCHECK_USER=demo@people.osaaf.org -HEALTHCHECK_PASSWORD=demo123456! diff --git a/scripts/policy/config/drools-apps/env/feature-pooling-dmaap.conf b/scripts/policy/config/drools-apps/env/feature-pooling-dmaap.conf deleted file mode 100644 index 3808e3d9..00000000 --- a/scripts/policy/config/drools-apps/env/feature-pooling-dmaap.conf +++ /dev/null @@ -1,17 +0,0 @@ -# ============LICENSE_START======================================================= -# Copyright (C) 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. -# 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========================================================= - -POOLING_TOPIC=POOLING diff --git a/scripts/policy/config/drools/custom/noop.pre.sh b/scripts/policy/config/drools/custom/noop.pre.sh deleted file mode 100755 index 63bdc4cf..00000000 --- a/scripts/policy/config/drools/custom/noop.pre.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -x -# ============LICENSE_START======================================================= -# Copyright (C) 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. -# 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========================================================= - -sed -i "s/^dmaap/noop/g" \ - ${POLICY_HOME}/config/engine.properties \ - ${POLICY_HOME}/config/feature-lifecycle.properties - -chmod 644 ${POLICY_HOME}/config/engine.properties ${POLICY_HOME}/config/feature-lifecycle.properties diff --git a/scripts/policy/config/drools/env/base.conf b/scripts/policy/config/drools/env/base.conf deleted file mode 100644 index 891de49f..00000000 --- a/scripts/policy/config/drools/env/base.conf +++ /dev/null @@ -1,132 +0,0 @@ -# ============LICENSE_START======================================================= -# Copyright (C) 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. -# 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========================================================= - -# JVM options - -JVM_OPTIONS=-server -Xms512m -Xmx512m - -# SYSTEM software configuration - -DEBUG=y -POLICY_HOME=/opt/app/policy -POLICY_LOGS=/var/log/onap/policy/pdpd -KEYSTORE_PASSWD=Pol1cy_0nap -TRUSTSTORE_PASSWD=Pol1cy_0nap - -# Telemetry credentials - -TELEMETRY_PORT=9696 -TELEMETRY_HOST=0.0.0.0 -TELEMETRY_USER=demo@people.osaaf.org -TELEMETRY_PASSWORD=demo123456! - -# nexus repository - -SNAPSHOT_REPOSITORY_ID=policy-nexus-snapshots -SNAPSHOT_REPOSITORY_URL=http://nexus:8081/nexus/content/repositories/snapshots/ -RELEASE_REPOSITORY_ID=policy-nexus-releases -RELEASE_REPOSITORY_URL=http://nexus:8081/nexus/content/repositories/releases/ -REPOSITORY_USERNAME=admin -REPOSITORY_PASSWORD=admin123 -REPOSITORY_OFFLINE=false - -# Relational (SQL) DB access - -SQL_HOST=mariadb -SQL_USER=policy_user -SQL_PASSWORD=policy_user - -# AAF - -AAF=false -AAF_NAMESPACE=org.onap.policy -AAF_HOST=aaf.api.simpledemo.onap.org - -# PDP-D DMaaP configuration channel - -PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION -PDPD_CONFIGURATION_API_KEY= -PDPD_CONFIGURATION_API_SECRET= -PDPD_CONFIGURATION_CONSUMER_GROUP= -PDPD_CONFIGURATION_CONSUMER_INSTANCE= -PDPD_CONFIGURATION_PARTITION_KEY= - -# PAP-PDP configuration channel - -POLICY_PDP_PAP_TOPIC=POLICY-PDP-PAP -POLICY_PDP_PAP_API_KEY= -POLICY_PDP_PAP_API_SECRET= - -# PAP - -PAP_HOST= -PAP_USERNAME= -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 - -DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT -DCAE_SERVERS= -DCAE_CONSUMER_GROUP=dcae.policy.shared - -# Open DMaaP - -DMAAP_SERVERS=mr.api.simpledemo.onap.org - -# AAI - -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_HOST= -VFC_PORT= -VFC_CONTEXT_URI=api/nslcm/v1/ -VFC_USERNAME= -VFC_PASSWORD= - -# SDNC - -SDNC_HOST= -SDNC_PORT= -SDNC_CONTEXT_URI=restconf/operations/ -SDNC_USERNAME= -SDNC_PASSWORD= diff --git a/scripts/policy/config/pap/defaultConfig.json b/scripts/policy/config/pap/defaultConfig.json deleted file mode 100644 index 1e47c7e7..00000000 --- a/scripts/policy/config/pap/defaultConfig.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "PapGroup", - "restServerParameters": { - "host": "0.0.0.0", - "port": 6969, - "userName": "healthcheck", - "password": "zb!XztG34", - "https": true, - "aaf": false - }, - "pdpParameters": { - "heartBeatMs": 120000, - "updateParameters": { - "maxRetryCount": 1, - "maxWaitMs": 30000 - }, - "stateChangeParameters": { - "maxRetryCount": 1, - "maxWaitMs": 30000 - } - }, - "databaseProviderParameters": { - "name": "PolicyProviderParameterGroup", - "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", - "databaseDriver": "org.mariadb.jdbc.Driver", - "databaseUrl": "jdbc:mariadb://mariadb:3306/policyadmin", - "databaseUser": "policy_user", - "databasePassword": "policy_user", - "persistenceUnit": "PolicyMariaDb" - }, - "topicParameterGroup": { - "topicSources" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "policy.api.simpledemo.onap.org" ], - "topicCommInfrastructure" : "dmaap", - "useHttps": true, - "allowSelfSignedCerts" : true - }], - "topicSinks" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "policy.api.simpledemo.onap.org" ], - "topicCommInfrastructure" : "dmaap", - "useHttps": true, - "allowSelfSignedCerts" : true - }, - { - "topic" : "POLICY-NOTIFICATION", - "servers" : [ "policy.api.simpledemo.onap.org" ], - "topicCommInfrastructure" : "dmaap", - "useHttps": true, - "allowSelfSignedCerts" : true - }] - }, - "healthCheckRestClientParameters":[{ - "clientName": "api", - "hostname": "policy-api", - "port": 6969, - "userName": "healthcheck", - "password": "zb!XztG34", - "useHttps": true, - "allowSelfSignedCerts" : true, - "basePath": "policy/api/v1/healthcheck" - }] -} diff --git a/scripts/policy/config/policy-csit.conf b/scripts/policy/config/policy-csit.conf deleted file mode 100644 index 95c14504..00000000 --- a/scripts/policy/config/policy-csit.conf +++ /dev/null @@ -1,7 +0,0 @@ -POLICY_MARIADB_VER=10.2.25 -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/scripts/policy/config/sim-all/simParameters.json b/scripts/policy/config/sim-all/simParameters.json deleted file mode 100644 index 4b009b6f..00000000 --- a/scripts/policy/config/sim-all/simParameters.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "dmaapProvider": { - "name": "DMaaP simulator", - "topicSweepSec": 300 - }, - "restServers": [ - { - "name": "DMaaP simulator", - "providerClass": "org.onap.policy.models.sim.dmaap.rest.DmaapSimRestControllerV1", - "host": "0.0.0.0", - "port": 3905, - "https": true - }, - { - "name": "A&AI simulator", - "providerClass": "org.onap.policy.simulators.AaiSimulatorJaxRs", - "host": "0.0.0.0", - "port": 6666, - "https": true, - "userName": "policy@policy.onap.org", - "password": "demo123456!" - }, - { - "name": "SDNC simulator", - "providerClass": "org.onap.policy.simulators.SdncSimulatorJaxRs", - "host": "0.0.0.0", - "port": 6668, - "https": true - }, - { - "name": "SO simulator", - "providerClass": "org.onap.policy.simulators.SoSimulatorJaxRs", - "host": "0.0.0.0", - "port": 6669, - "https": false, - "userName": "InfraPortalClient", - "password": "password1$" - }, - { - "name": "VFC simulator", - "providerClass": "org.onap.policy.simulators.VfcSimulatorJaxRs", - "host": "0.0.0.0", - "port": 6670, - "https": true - } - ], - "topicSinks": [ - { - "topic": "APPC-CL", - "servers": ["${HOST_NAME}"], - "topicCommInfrastructure": "DMAAP", - "useHttps": true, - "apiKey": "some-key", - "apiSecret": "some-secret" - }, - { - "topic": "APPC-LCM-WRITE", - "servers": ["${HOST_NAME}"], - "topicCommInfrastructure": "DMAAP", - "useHttps": true, - "apiKey": "some-key", - "apiSecret": "some-secret" - } - ], - "topicSources": [ - { - "topic": "APPC-CL", - "servers": ["${HOST_NAME}"], - "topicCommInfrastructure": "DMAAP", - "useHttps": true, - "apiKey": "some-key", - "apiSecret": "some-secret" - }, - { - "topic": "APPC-LCM-READ", - "servers": ["${HOST_NAME}"], - "topicCommInfrastructure": "DMAAP", - "useHttps": true, - "apiKey": "some-key", - "apiSecret": "some-secret" - } - ], - "topicServers": [ - { - "name": "APPC Legacy simulator", - "providerClass": "org.onap.policy.simulators.AppcLegacyTopicServer", - "sink": "APPC-CL", - "source": "APPC-CL" - }, - { - "name": "APPC-LCM simulator", - "providerClass": "org.onap.policy.simulators.AppcLcmTopicServer", - "sink": "APPC-LCM-WRITE", - "source": "APPC-LCM-READ" - } - ], - "grpcServer": { - "name": "CDS simulator", - "providerClass": "org.onap.policy.simulators.CdsSimulator", - "host": "0.0.0.0", - "port": 6680, - "timeout": 30, - "username": "ccsdkapps", - "password": "ccsdkapps", - "resourceLocation": "org/onap/policy/simulators/cds/", - "successRepeatCount": 0, - "requestedResponseDelayMs": 0 - } -} diff --git a/scripts/policy/config/xacml-pdp/defaultConfig.json b/scripts/policy/config/xacml-pdp/defaultConfig.json deleted file mode 100644 index 5a6573a3..00000000 --- a/scripts/policy/config/xacml-pdp/defaultConfig.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "XacmlPdpParameters", - "pdpGroup": "defaultGroup", - "restServerParameters": { - "host": "0.0.0.0", - "port": 6969, - "userName": "healthcheck", - "password": "zb!XztG34", - "https": true, - "aaf": false - }, - "policyApiParameters": { - "host": "policy-api", - "port": 6969, - "userName": "healthcheck", - "password": "zb!XztG34", - "https": true, - "aaf": false - }, - "applicationPath": "/opt/app/policy/pdpx/apps", - "topicParameterGroup": { - "topicSources" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "policy.api.simpledemo.onap.org" ], - "topicCommInfrastructure" : "dmaap", - "useHttps" : true, - "allowSelfSignedCerts" : true - }], - "topicSinks" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "policy.api.simpledemo.onap.org" ], - "topicCommInfrastructure" : "dmaap", - "useHttps" : true, - "allowSelfSignedCerts" : true - }] - } -} diff --git a/scripts/policy/detmVers.sh b/scripts/policy/detmVers.sh deleted file mode 100644 index d37b4792..00000000 --- a/scripts/policy/detmVers.sh +++ /dev/null @@ -1,80 +0,0 @@ -# ============LICENSE_START==================================================== -# Copyright (C) 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. -# 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="${SCRIPTS-scripts}" - -source ${SCRIPTS}/policy/config/policy-csit.conf -export POLICY_MARIADB_VER - -echo POLICY_MARIADB_VER=${POLICY_MARIADB_VER} - -POLICY_MODELS_VERSION=$( - curl -q --silent \ - https://git.onap.org/policy/models/plain/pom.xml?h=${GERRIT_BRANCH} | - xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -) -export POLICY_MODELS_VERSION=${POLICY_MODELS_VERSION:0:3}-SNAPSHOT-latest -echo POLICY_MODELS_VERSION=${POLICY_MODELS_VERSION} - -POLICY_API_VERSION=$( - curl -q --silent \ - https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | - xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -) -export POLICY_API_VERSION=${POLICY_API_VERSION:0:3}-SNAPSHOT-latest -echo POLICY_API_VERSION=${POLICY_API_VERSION} - -POLICY_PAP_VERSION=$( - curl -q --silent \ - https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | - xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -) -export POLICY_PAP_VERSION=${POLICY_PAP_VERSION:0:3}-SNAPSHOT-latest -echo POLICY_PAP_VERSION=${POLICY_PAP_VERSION} - -POLICY_XACML_PDP_VERSION=$( - curl -q --silent \ - https://git.onap.org/policy/xacml-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | - xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -) -export POLICY_XACML_PDP_VERSION=${POLICY_XACML_PDP_VERSION:0:3}-SNAPSHOT-latest -echo POLICY_XACML_PDP_VERSION=${POLICY_XACML_PDP_VERSION} - -POLICY_DROOLS_VERSION=$( - curl -q --silent \ - https://git.onap.org/policy/drools-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | - xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -) -export POLICY_DROOLS_VERSION=${POLICY_DROOLS_VERSION:0:3}-SNAPSHOT-latest -echo POLICY_DROOLS_VERSION=${POLICY_DROOLS_VERSION} - -POLICY_DROOLS_APPS_VERSION=$( - curl -q --silent \ - https://git.onap.org/policy/drools-applications/plain/pom.xml?h=${GERRIT_BRANCH} | - xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -) -export POLICY_DROOLS_APPS_VERSION=${POLICY_DROOLS_APPS_VERSION:0:3}-SNAPSHOT-latest -echo POLICY_DROOLS_APPS_VERSION=${POLICY_DROOLS_APPS_VERSION} - -POLICY_APEX_PDP_VERSION=$( - curl -q --silent \ - https://git.onap.org/policy/apex-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | - xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -) -export POLICY_APEX_PDP_VERSION=${POLICY_APEX_PDP_VERSION:0:3}-SNAPSHOT-latest -echo POLICY_APEX_PDP_VERSION=${POLICY_APEX_PDP_VERSION} - -POLICY_DISTRIBUTION_VERSION=$( - curl -q --silent \ - https://git.onap.org/policy/distribution/plain/pom.xml?h=${GERRIT_BRANCH} | - xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -) -export POLICY_DISTRIBUTION_VERSION=${POLICY_DISTRIBUTION_VERSION:0:3}-SNAPSHOT-latest -echo POLICY_DISTRIBUTION_VERSION=${POLICY_DISTRIBUTION_VERSION} diff --git a/scripts/policy/docker-compose-all.yml b/scripts/policy/docker-compose-all.yml deleted file mode 100644 index 00f76350..00000000 --- a/scripts/policy/docker-compose-all.yml +++ /dev/null @@ -1,190 +0,0 @@ -# -# ===========LICENSE_START==================================================== -# Copyright (C) 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. -# 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: - mariadb: - image: nexus3.onap.org:10001/mariadb:${POLICY_MARIADB_VER} - container_name: mariadb - hostname: mariadb - command: ['--lower-case-table-names=1', '--wait_timeout=28800'] - env_file: config/db/db.conf - volumes: - - ./config/db:/docker-entrypoint-initdb.d:ro - expose: - - 3306 - policy.api.simpledemo.onap.org: - image: nexus3.onap.org:10001/onap/policy-models-simulator:${POLICY_MODELS_VERSION} - container_name: policy.api.simpledemo.onap.org - hostname: policy.api.simpledemo.onap.org - volumes: - - ./config/sim-all:/opt/app/policy/simulators/etc/mounted:ro - expose: - - 6666 - - 6668 - - 6669 - - 6670 - - 3905 - api: - image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION} - container_name: policy-api - depends_on: - - mariadb - hostname: policy-api - expose: - - 6969 - volumes: - - ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh:ro - entrypoint: ./wait_for_port.sh - command: [ - '-c', './policy-api.sh', - 'mariadb', '3306' - ] - pap: - image: nexus3.onap.org:10001/onap/policy-pap:${POLICY_PAP_VERSION} - container_name: policy-pap - depends_on: - - mariadb - - policy.api.simpledemo.onap.org - - api - hostname: policy-pap - expose: - - 6969 - volumes: - - ./config/pap/defaultConfig.json:/opt/app/policy/pap/etc/defaultConfig.json:ro - - ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh:ro - entrypoint: ./wait_for_port.sh - command: [ - '-c', './policy-pap.sh', - 'mariadb', '3306', - 'policy.api.simpledemo.onap.org', '3905', - 'api', '6969' - ] - xacml-pdp: - image: nexus3.onap.org:10001/onap/policy-xacml-pdp:${POLICY_XACML_PDP_VERSION} - container_name: policy-xacml-pdp - depends_on: - - mariadb - - policy.api.simpledemo.onap.org - - pap - hostname: policy-xacml-pdp - expose: - - 6969 - volumes: - - ./config/xacml-pdp/defaultConfig.json:/opt/app/policy/pdpx/etc/defaultConfig.json:ro - - ./wait_for_port.sh:/opt/app/policy/pdpx/bin/wait_for_port.sh:ro - entrypoint: ./wait_for_port.sh - command: [ - '-c', './policy-pdpx.sh', - 'mariadb', '3306', - 'policy.api.simpledemo.onap.org', '3905', - 'pap', '6969' - ] - drools: - image: nexus3.onap.org:10001/onap/policy-drools:${POLICY_DROOLS_VERSION} - container_name: drools - depends_on: - - mariadb - - policy.api.simpledemo.onap.org - - pap - hostname: drools - expose: - - 6969 - - 9696 - volumes: - - ./config/drools/custom:/tmp/policy-install/config:ro - - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro - env_file: - - config/drools/env/base.conf - entrypoint: /opt/app/policy/bin/wait_for_port.sh - command: [ - '-c', '/opt/app/policy/bin/pdpd-entrypoint.sh boot', - 'mariadb', '3306', - 'policy.api.simpledemo.onap.org', '3905' - ] - drools-apps: - image: nexus3.onap.org:10001/onap/policy-pdpd-cl:${POLICY_DROOLS_APPS_VERSION} - container_name: drools-apps - depends_on: - - mariadb - - policy.api.simpledemo.onap.org - - pap - - xacml-pdp - hostname: drools-apps - expose: - - 6969 - - 9696 - volumes: - - ./config/drools-apps/custom:/tmp/policy-install/config:ro - - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro - env_file: - - config/drools-apps/env/base.conf - - config/drools-apps/env/feature-healthcheck.conf - - config/drools-apps/env/feature-pooling-dmaap.conf - entrypoint: /opt/app/policy/bin/wait_for_port.sh - command: [ - '-c', '/opt/app/policy/bin/pdpd-cl-entrypoint.sh boot', - 'mariadb', '3306', - 'policy.api.simpledemo.onap.org', '3905', - 'pap', '6969', - 'policy.api.simpledemo.onap.org', '6666', - 'policy.api.simpledemo.onap.org', '6668', - 'policy.api.simpledemo.onap.org', '6669', - 'policy.api.simpledemo.onap.org', '6670' - ] - apex-pdp: - image: nexus3.onap.org:10001/onap/policy-apex-pdp:${POLICY_APEX_PDP_VERSION} - container_name: policy-apex-pdp - depends_on: - - mariadb - - policy.api.simpledemo.onap.org - - pap - hostname: policy-apex-pdp - expose: - - 6969 - - 23324 - volumes: - - ./config/apex-pdp/OnapPfConfig.json:/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json: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/apex-pdp/bin/apexOnapPf.sh -c /opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json', - 'mariadb', '3306', - 'policy.api.simpledemo.onap.org', '3905', - 'pap', '6969' - ] - distribution: - image: nexus3.onap.org:10001/onap/policy-distribution:${POLICY_DISTRIBUTION_VERSION} - container_name: policy-distribution - depends_on: - - mariadb - - api - - pap - - apex-pdp - hostname: policy-distribution - volumes: - - ./config/distribution/defaultConfig.json:/opt/app/policy/distribution/etc/defaultConfig.json:ro - - ./policy-distribution/config/distribution/temp/:/opt/app/policy/distribution/etc/temp/: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', './policy-dist.sh', - 'mariadb', '3306', - 'policy.api.simpledemo.onap.org', '3905', - 'pap', '6969', - 'apex-pdp', '6969' - ] diff --git a/scripts/policy/drools-apps/deploy.drools.policies.json b/scripts/policy/drools-apps/deploy.drools.policies.json deleted file mode 100644 index 24c90d0d..00000000 --- a/scripts/policy/drools-apps/deploy.drools.policies.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "groups": [ - { - "name": "defaultGroup", - "deploymentSubgroups": [ - { - "pdpType": "drools", - "action": "POST", - "policies": [ - { - "name": "operational.restart", - "version": "1.0.0" - }, - { - "name": "operational.scaleout", - "version": "1.0.0" - }, - { - "name": "operational.modifyconfig", - "version": "1.0.0" - } - ] - } - ] - } - ] -} diff --git a/scripts/policy/drools-apps/deploy.xacml.policies.json b/scripts/policy/drools-apps/deploy.xacml.policies.json deleted file mode 100644 index 46da9021..00000000 --- a/scripts/policy/drools-apps/deploy.xacml.policies.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "groups": [ - { - "name": "defaultGroup", - "deploymentSubgroups": [ - { - "pdpType": "xacml", - "action": "POST", - "policies": [ - { - "name": "onap.restart.tca", - "version": "1.0.0" - }, - { - "name": "onap.scaleout.tca", - "version": "1.0.0" - }, - { - "name": "onap.vfirewall.tca", - "version": "1.0.0" - } - ] - } - ] - } - ] -} diff --git a/scripts/policy/drools-apps/make_topic.sh b/scripts/policy/drools-apps/make_topic.sh deleted file mode 100755 index 36d43e9d..00000000 --- a/scripts/policy/drools-apps/make_topic.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# -# ===========LICENSE_START==================================================== -# Copyright (C) 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. -# 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===================================================== -# - -# -# Creates a topic, which happens as a side-effect of polling it. -# - -if [ $# -ne 1 ] -then - echo "arg(s): topic-name" >&2 - exit 1 -fi - -topic="${1}" - -curl -s -k "https://${SIM_IP}:3905/events/${topic}/script/1?limit=1&timeout=0" -echo diff --git a/scripts/policy/drools-apps/onset.sh b/scripts/policy/drools-apps/onset.sh deleted file mode 100755 index f2918a68..00000000 --- a/scripts/policy/drools-apps/onset.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# -# ===========LICENSE_START==================================================== -# Copyright (C) 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. -# 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===================================================== -# - -# -# Injects an ONSET event on the DCAE_CL_OUTPUT topic. -# - -if [ $# -ne 1 ] -then - echo "arg(s): json-message-file-name" >&2 - exit 1 -fi - -curl -k -H "Content-type: application/json" --data-binary @$1 \ - https://${SIM_IP}:3905/events/unauthenticated.DCAE_CL_OUTPUT -echo diff --git a/scripts/policy/drools-apps/vcpeOnset.json b/scripts/policy/drools-apps/vcpeOnset.json deleted file mode 100644 index 7dd9d5a0..00000000 --- a/scripts/policy/drools-apps/vcpeOnset.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", - "closedLoopAlarmStart": 1463679805324, - "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca", - "closedLoopEventStatus": "ONSET", - "requestID": "664be3d2-6c12-4f4b-a3e7-c349acced200", - "target_type": "VNF", - "target": "generic-vnf.vnf-id", - "AAI": { - "vserver.is-closed-loop-disabled": "false", - "vserver.prov-status": "ACTIVE", - "generic-vnf.vnf-id": "vCPE_Infrastructure_vGMUX_demo_app" - }, - "from": "DCAE", - "version": "1.0.2" -} diff --git a/scripts/policy/drools-apps/vdnsOnset.json b/scripts/policy/drools-apps/vdnsOnset.json deleted file mode 100644 index 13f69095..00000000 --- a/scripts/policy/drools-apps/vdnsOnset.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", - "closedLoopAlarmStart": 1463679805324, - "closedLoopEventClient": "microservice.stringmatcher", - "closedLoopEventStatus": "ONSET", - "requestID": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65", - "target_type": "VNF", - "target": "vserver.vserver-name", - "AAI": { - "vserver.is-closed-loop-disabled": "false", - "vserver.prov-status": "ACTIVE", - "vserver.vserver-name": "OzVServer" - }, - "from": "DCAE", - "version": "1.0.2" -} diff --git a/scripts/policy/drools-apps/vfwOnset.json b/scripts/policy/drools-apps/vfwOnset.json deleted file mode 100644 index 7782867a..00000000 --- a/scripts/policy/drools-apps/vfwOnset.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a", - "closedLoopAlarmStart": 1463679805324, - "closedLoopEventClient": "microservice.stringmatcher", - "closedLoopEventStatus": "ONSET", - "requestID": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65", - "target_type": "VNF", - "target": "generic-vnf.vnf-name", - "AAI": { - "vserver.is-closed-loop-disabled": "false", - "vserver.prov-status": "ACTIVE", - "generic-vnf.vnf-name": "fw0002vm002fw002", - "vserver.vserver-name": "OzVServer" - }, - "from": "DCAE", - "version": "1.0.2" -} diff --git a/scripts/policy/drools-apps/wait_topic.sh b/scripts/policy/drools-apps/wait_topic.sh deleted file mode 100755 index 4271abc6..00000000 --- a/scripts/policy/drools-apps/wait_topic.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -# -# ===========LICENSE_START==================================================== -# Copyright (C) 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. -# 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===================================================== -# - -# -# Polls a topic for a message. Additional text items can be specified, -# in which case, it discards messages that do not contain all of the -# specified text items. -# -# Exits with a non-zero status if no matching message is received on the -# topic before the timeout. -# - -if [ $# -lt 1 ] -then - echo "arg(s): topic-name [text-to-match1 [text-to-match2 ...]]" >&2 - exit 1 -fi - -topic="${1}" -shift - -matched=no - -while [ ${matched} = "no" ] -do - msg=`curl -s -k "https://${SIM_IP}:3905/events/${topic}/script/1?limit=1"` - if [ $? -ne 0 -o "${msg}" = "[]" ] - then - echo not found >&2 - exit 2 - fi - - matched=yes - for text in "$@" - do - echo "${msg}" | grep -q "${text}" - if [ $? -ne 0 ] - then - matched=no - break - fi - done -done - -echo "${msg}" diff --git a/scripts/policy/get-models-examples.sh b/scripts/policy/get-models-examples.sh deleted file mode 100644 index 1860511e..00000000 --- a/scripts/policy/get-models-examples.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# ============LICENSE_START=================================================== -# Copyright (C) 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. -# 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}/policy/config/policy-csit.conf - -rm -rf ${WORKSPACE}/models -mkdir ${WORKSPACE}/models -cd ${WORKSPACE} - -# download models examples -git clone --depth 1 https://gerrit.onap.org/r/policy/models -b ${GERRIT_BRANCH} diff --git a/scripts/policy/policy-distribution/config/distribution/csar/sample_csar_with_apex_policy.csar b/scripts/policy/policy-distribution/config/distribution/csar/sample_csar_with_apex_policy.csar Binary files differdeleted file mode 100644 index 4d293e42..00000000 --- a/scripts/policy/policy-distribution/config/distribution/csar/sample_csar_with_apex_policy.csar +++ /dev/null diff --git a/scripts/policy/wait_for_port.sh b/scripts/policy/wait_for_port.sh deleted file mode 100755 index 1d2f5155..00000000 --- a/scripts/policy/wait_for_port.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -tmout=120 -cmd= -while getopts c:t: opt; do - case "$opt" in - c) cmd="$OPTARG" ;; - t) tmout="$OPTARG" ;; - esac -done -nargs=$(expr $OPTIND - 1) -shift $nargs - -even_args=$(expr $# % 2) -if [ $# -lt 2 -o $even_args -ne 0 ]; then - echo "args: [-t timeout] [-c command] hostname1 port1 hostname2 port2 ..." >&2 - exit 1 -fi - -while [ $# -ge 2 ]; do - export host=$1 - export port=$2 - shift - shift - - echo "Waiting for $host port $port..." - timeout $tmout sh -c 'until nc -vz "$host" "$port"; do echo -n "."; - sleep 1; done' - rc=$? - - if [ $rc != 0 ]; then - echo "$host port $port cannot be reached" - exit $rc - fi -done - -$cmd - -exit 0 diff --git a/scripts/sdnc/netconf-pnp-simulator/docker-compose.yml b/scripts/sdnc/netconf-pnp-simulator/docker-compose.yml deleted file mode 100755 index d8e723ba..00000000 --- a/scripts/sdnc/netconf-pnp-simulator/docker-compose.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: '3' - -services: - netconf-pnp-simulator: - image: nexus3.onap.org:10001/onap/integration/simulators/netconf-pnp-simulator:2.8.6 - container_name: netconf-simulator - restart: always - ports: - - "830:830" - - "6513:6513" - volumes: - - ${NETCONF_CONFIG_PATH}:/config/modules/mynetconf diff --git a/scripts/sdnc/netconf-pnp-simulator/netconf-config/data.json b/scripts/sdnc/netconf-pnp-simulator/netconf-config/data.json deleted file mode 100644 index 63872eef..00000000 --- a/scripts/sdnc/netconf-pnp-simulator/netconf-config/data.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "mynetconf:netconflist": { - "netconf": [ - { - "netconf-id": 3, - "netconf-param": 3 - } - ] - } -} diff --git a/scripts/sdnc/netconf-pnp-simulator/netconf-config/model.yang b/scripts/sdnc/netconf-pnp-simulator/netconf-config/model.yang deleted file mode 100644 index 6c8c36ab..00000000 --- a/scripts/sdnc/netconf-pnp-simulator/netconf-config/model.yang +++ /dev/null @@ -1,29 +0,0 @@ -module mynetconf { - yang-version 1.1; - namespace "urn:mynetconf:test"; - - prefix nft; - - organization - "mynetconf"; - contact - "my netconf address"; - description - "yang model for mynetconf"; - revision "2019-03-01" { - description - "initial version"; - } - - container netconflist { - list netconf { - key netconf-id; - leaf netconf-id { - type uint16; - } - leaf netconf-param { - type uint32; - } - } - } -} diff --git a/scripts/sdnc/netconf-pnp-simulator/netconf-config/subscriber.py b/scripts/sdnc/netconf-pnp-simulator/netconf-config/subscriber.py deleted file mode 100755 index 61272967..00000000 --- a/scripts/sdnc/netconf-pnp-simulator/netconf-config/subscriber.py +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/env python3 - -__author__ = "Mislav Novakovic <mislav.novakovic@sartura.hr>" -__copyright__ = "Copyright 2018, Deutsche Telekom AG" -__license__ = "Apache 2.0" - -# 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. - -# This sample application demonstrates use of Python programming language bindings for sysrepo library. -# Original c application was rewritten in Python to show similarities and differences -# between the two. -# -# Most notable difference is in the very different nature of languages, c is weakly statically typed language -# while Python is strongly dynamically typed. Python code is much easier to read and logic easier to comprehend -# for smaller scripts. Memory safety is not an issue but lower performance can be expected. -# -# The original c implementation is also available in the source, so one can refer to it to evaluate trade-offs. - -import sysrepo as sr -import sys - - -# Helper function for printing changes given operation, old and new value. -def print_change(op, old_val, new_val): - if op == sr.SR_OP_CREATED: - print(f"CREATED: {new_val.to_string()}") - elif op == sr.SR_OP_DELETED: - print(f"DELETED: {old_val.to_string()}") - elif op == sr.SR_OP_MODIFIED: - print(f"MODIFIED: {old_val.to_string()} to {new_val.to_string()}") - elif op == sr.SR_OP_MOVED: - print(f"MOVED: {new_val.xpath()} after {old_val.xpath()}") - - -# Helper function for printing events. -def ev_to_str(ev): - if ev == sr.SR_EV_VERIFY: - return "verify" - elif ev == sr.SR_EV_APPLY: - return "apply" - elif ev == sr.SR_EV_ABORT: - return "abort" - else: - return "unknown" - - -# Function to print current configuration state. -# It does so by loading all the items of a session and printing them out. -def print_current_config(session, module_name): - select_xpath = f"/{module_name}:*//*" - - values = session.get_items(select_xpath) - - if values is not None: - print("========== BEGIN CONFIG ==========") - for i in range(values.val_cnt()): - print(values.val(i).to_string(), end='') - print("=========== END CONFIG ===========") - - -# Function to be called for subscribed client of given session whenever configuration changes. -def module_change_cb(sess, module_name, event, private_ctx): - try: - print("========== Notification " + ev_to_str(event) + " =============================================") - if event == sr.SR_EV_APPLY: - print_current_config(sess, module_name) - - print("========== CHANGES: =============================================") - - change_path = f"/{module_name}:*" - - it = sess.get_changes_iter(change_path) - - while True: - change = sess.get_change_next(it) - if change is None: - break - print_change(change.oper(), change.old_val(), change.new_val()) - - print("========== END OF CHANGES =======================================") - except Exception as e: - print(e) - - return sr.SR_ERR_OK - - -def main(): - # Notable difference between c implementation is using exception mechanism for open handling unexpected events. - # Here it is useful because `Connection`, `Session` and `Subscribe` could throw an exception. - try: - module_name = "ietf-interfaces" - if len(sys.argv) > 1: - module_name = sys.argv[1] - else: - print("\nYou can pass the module name to be subscribed as the first argument") - - print(f"Application will watch for changes in {module_name}") - - # connect to sysrepo - conn = sr.Connection(module_name) - - # start session - sess = sr.Session(conn) - - # subscribe for changes in running config */ - subscribe = sr.Subscribe(sess) - - subscribe.module_change_subscribe(module_name, module_change_cb) - - try: - print_current_config(sess, module_name) - except Exception as e: - print(e) - - print("========== STARTUP CONFIG APPLIED AS RUNNING ==========") - - sr.global_loop() - - print("Application exit requested, exiting.") - - except Exception as e: - print(e) - - -if __name__ == '__main__': - main() diff --git a/scripts/sdnc/sdnc/certs/keys0.zip b/scripts/sdnc/sdnc/certs/keys0.zip Binary files differindex 48b4d90a..6f7f756b 100644 --- a/scripts/sdnc/sdnc/certs/keys0.zip +++ b/scripts/sdnc/sdnc/certs/keys0.zip diff --git a/scripts/sdnc/sdnc/docker-compose.yml b/scripts/sdnc/sdnc/docker-compose.yml index c47fab50..61bf8b6e 100755 --- a/scripts/sdnc/sdnc/docker-compose.yml +++ b/scripts/sdnc/sdnc/docker-compose.yml @@ -9,7 +9,10 @@ services: volumes: - /etc/localtime:/etc/localtime:ro environment: - - MYSQL_ROOT_PASSWORD=password + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} + - MYSQL_USER=${MYSQL_USER} + - MYSQL_PASSWORD=${MYSQL_PASSWORD} + - MYSQL_DATABASE=${MYSQL_DATABASE} hostname: mariadb.so.testlab.onap.org logging: @@ -29,12 +32,38 @@ services: - "8282:8181" hostname: sdnc + links: + - mariadb:dbhost + - mariadb:sdnctldb01 + - mariadb:sdnctldb02 environment: - - MYSQL_ROOT_PASSWORD=password + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} + - MYSQL_USER=${MYSQL_USER} + - MYSQL_PASSWORD=${MYSQL_PASSWORD} + - MYSQL_DATABASE=${MYSQL_DATABASE} - SDNC_CONFIG_DIR=/opt/onap/sdnc/data/properties - - MYSQL_PASSWD=password - - ODL_ADMIN_USERNAME=admin - - ODL_ADMIN_PASSWORD=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + - SDNC_BIN=/opt/onap/sdnc/bin + - ODL_CERT_DIR=/tmp + - ODL_ADMIN_USERNAME=${ODL_USER} + - ODL_ADMIN_PASSWORD=${ODL_PASSWORD} + - ODL_USER=${ODL_USER} + - ODL_PASSWORD=${ODL_PASSWORD} + - ODL_CERT_DIR=/opt/opendaylight/current/certs + - SDNC_DB_INIT=true + - HONEYCOMB_USER=${HONEYCOMB_USER} + - HONEYCOMB_PASSWORD=${HONEYCOMB_PASSWORD} + - TRUSTSTORE_PASSWORD=${TRUSTSTORE_PASSWORD} + - KEYSTORE_PASSWORD=${KEYSTORE_PASSWORD} + - SO_USER=${SO_USER} + - SO_PASSWORD=${SO_PASSWORD} + - NENG_USER=${NENG_USER} + - NENG_PASSWORD=${NENG_PASSWORD} + - CDS_USER=${CDS_USER} + - CDS_PASSWORD=${CDS_PASSWORD} + - ANSIBLE_USER=${ANSIBLE_USER} + - ANSIBLE_PASSWORD=${ANSIBLE_PASSWORD} + - SQL_CRYPTKEY=${SQL_CRYPTKEY} + - A1_TRUSTSTORE_PASSWORD=a1adapter depends_on: - mariadb dns: @@ -44,7 +73,3 @@ services: options: max-size: "30m" max-file: "5" - extra_hosts: - - sdnctldb02:${LOCAL_IP} - - sdnctldb01:${LOCAL_IP} - - dbhost:${LOCAL_IP}
\ No newline at end of file |