aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/clamp/clone_clamp_and_change_dockercompose.sh6
-rwxr-xr-xscripts/clamp/kill_and_remove_clamp_and_db_containers.sh5
-rwxr-xr-xscripts/dcaegen2-collectors-datafile/dfc-containers-clean.sh18
-rwxr-xr-xscripts/dcaegen2-collectors-datafile/dfc-management/dfc-kill.sh2
-rwxr-xr-xscripts/dcaegen2-collectors-datafile/dfc-management/dfc-restart.sh6
-rwxr-xr-xscripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh29
-rw-r--r--scripts/dcaegen2-collectors-datafile/dfc-management/docker-compose.yml17
-rwxr-xr-xscripts/kill-instance.sh13
-rw-r--r--scripts/multicloud-ocata/generic_sim/Dockerfile12
-rw-r--r--scripts/multicloud-ocata/generic_sim/aai/responses.yml189
-rw-r--r--scripts/multicloud-ocata/generic_sim/cinder/responses.yml5
-rw-r--r--scripts/multicloud-ocata/generic_sim/generic_sim.py109
-rw-r--r--scripts/multicloud-ocata/generic_sim/glance/responses.yml73
-rw-r--r--scripts/multicloud-ocata/generic_sim/keystone/responses.yml44
-rw-r--r--scripts/multicloud-ocata/generic_sim/log_parser.py61
-rw-r--r--scripts/multicloud-ocata/generic_sim/nova/responses.yml177
-rw-r--r--scripts/multicloud-ocata/generic_sim/requirements.txt2
-rwxr-xr-xscripts/optf-has/has/has_script.sh2
-rw-r--r--scripts/policy/config/pap/onap.policies.monitoring.cdap.tca.hi.lo.app.json412
-rw-r--r--scripts/policy/policy-distribution/config/db/db.conf16
-rw-r--r--scripts/policy/policy-distribution/config/db/db.sh22
-rw-r--r--scripts/policy/policy-distribution/config/distribution/csar/sample_csar_with_apex_policy.csarbin0 -> 85909 bytes
-rw-r--r--scripts/policy/policy-distribution/config/distribution/defaultConfig.json72
-rw-r--r--scripts/policy/policy-distribution/config/distribution/temp/sample_csar_with_apex_policy.csarbin0 -> 85909 bytes
-rw-r--r--scripts/policy/policy-distribution/docker-compose-distribution.yml109
25 files changed, 483 insertions, 918 deletions
diff --git a/scripts/clamp/clone_clamp_and_change_dockercompose.sh b/scripts/clamp/clone_clamp_and_change_dockercompose.sh
index 5970ab2f..0c30b26a 100755
--- a/scripts/clamp/clone_clamp_and_change_dockercompose.sh
+++ b/scripts/clamp/clone_clamp_and_change_dockercompose.sh
@@ -35,10 +35,8 @@ git clone --depth 1 http://gerrit.onap.org/r/clamp -b $GERRIT_BRANCH
cd clamp/extra/docker/clamp/
# Pull the Clamp docker image from nexus instead of local image by default in the docker-compose.yml
-sed -i '/image: onap\/clamp/c\ image: nexus3.onap.org:10001\/onap\/clamp:4.0-STAGING-latest' docker-compose.yml
-
-# Change config to take third_party_proxy:8085 for SDC, Policy and DCAE simulator
-sed -i 's/}/,\"clamp.config.policy.pdpUrl1\":\"http:\/\/third_party_proxy:8085\/pdp\/ , testpdp, alpha123\",\"clamp.config.policy.pdpUrl2\":\"http:\/\/third_party_proxy:8085\/pdp\/ , testpdp, alpha123\",\"clamp.config.policy.papUrl\":\"http:\/\/third_party_proxy:8085\/pap\/ , testpap, alpha123\",\"clamp.config.policy.clientId\":\"python\",\"clamp.config.policy.clientKey\":\"dGVzdA==\",\"clamp.config.sdc.catalog.url\":\"http:\/\/third_party_proxy:8085\/sdc\/v1\/catalog\/\",\"clamp.config.sdc.hostUrl\":\"http:\/\/third_party_proxy:8085\",\"clamp.config.sdc.serviceUrl\":\"http:\/\/third_party_proxy:8085\/sdc\/v1\/catalog\/services\",\"clamp.config.dcae.inventory.url\":\"http:\/\/third_party_proxy:8085\",\"clamp.config.dcae.dispatcher.url\":\"http:\/\/third_party_proxy:8085\",\"spring.profiles.active\":\"clamp-default,clamp-default-user,clamp-sdc-controller\",\"server.ssl.client-auth\":\"want\"}/g' clamp.env
+sed -i '/image: onap\/clamp-backend/c\ image: nexus3.onap.org:10001\/onap\/clamp-backend:4.1-STAGING-latest' docker-compose.yml
+sed -i '/image: onap\/clamp-frontend/c\ image: nexus3.onap.org:10001\/onap\/clamp-frontend:4.1-STAGING-latest' docker-compose.yml
# Add the sql to create template so it is played by docker-compose later
cp ../../../src/test/resources/sql/loop-examples.sql ../../sql/bulkload/
diff --git a/scripts/clamp/kill_and_remove_clamp_and_db_containers.sh b/scripts/clamp/kill_and_remove_clamp_and_db_containers.sh
index 31eb7560..bc796787 100755
--- a/scripts/clamp/kill_and_remove_clamp_and_db_containers.sh
+++ b/scripts/clamp/kill_and_remove_clamp_and_db_containers.sh
@@ -19,8 +19,9 @@
echo "This is ${WORKSPACE}/scripts/clamp/kill_and_remove_clamp_and_db_containers.sh"
-kill-instance.sh clamp_clamp_1
+kill-instance.sh clamp_clamp-backend_1
+kill-instance.sh clamp_clamp-frontend_1
kill-instance.sh clamp_db_1
-kill-instance.sh clamp_third_party_proxy_1
+kill-instance.sh clamp_third-party-proxy_1
# $WORKSPACE/archives/clamp-clone deleted with archives folder when tests starts so we keep it at the end for debugging
diff --git a/scripts/dcaegen2-collectors-datafile/dfc-containers-clean.sh b/scripts/dcaegen2-collectors-datafile/dfc-containers-clean.sh
index 03919343..0e7c34ea 100755
--- a/scripts/dcaegen2-collectors-datafile/dfc-containers-clean.sh
+++ b/scripts/dcaegen2-collectors-datafile/dfc-containers-clean.sh
@@ -1,11 +1,15 @@
#!/bin/bash
-
# Kill dfc and all simulator
-docker kill dfc_app
-docker kill dfc_dr-sim
-docker kill dfc_dr-redir-sim
-docker kill dfc_mr-sim
-docker kill dfc_sftp-server
-docker kill dfc_ftpes-server-vsftpd
+running_containers=$(docker ps --filter name=dfc_ -q)
+
+
+if [ -z "$running_containers" ]
+then
+ echo "No container requires termination"
+else
+ echo "Stopping and removing containers"
+ docker stop $running_containers
+ docker rm $running_containers
+fi
diff --git a/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-kill.sh b/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-kill.sh
index 39f2d0d7..491b6405 100755
--- a/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-kill.sh
+++ b/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-kill.sh
@@ -1,4 +1,4 @@
#!/bin/bash
-docker kill dfc_app \ No newline at end of file
+docker kill dfc_app0 \ No newline at end of file
diff --git a/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-restart.sh b/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-restart.sh
index 8478bcb0..c79467a4 100755
--- a/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-restart.sh
+++ b/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-restart.sh
@@ -1,10 +1,10 @@
#!/bin/bash
-#Restart DFC app
+#Restart DFC app
-docker restart dfc_app
+docker restart dfc_app0
-DFC_APP="$(docker ps -q --filter='name=dfc_app')"
+DFC_APP="$(docker ps -q --filter='name=dfc_app0')"
#Wait for initialization of docker container for dfc app
diff --git a/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh b/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh
index 4bec4ff8..c63eaf68 100755
--- a/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh
+++ b/scripts/dcaegen2-collectors-datafile/dfc-management/dfc-start.sh
@@ -1,20 +1,25 @@
#!/bin/bash
-#Start DFC app
+set -x
-docker-compose up -d
+#Start DFC app
-DFC_APP="$(docker ps -q --filter='name=dfc_app')"
+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
+
+docker-compose up -d
+
+DFC_APP="$(docker ps -q --filter='name=dfc_app0')"
#Wait for initialization of docker containers for dfc app and all simulators
for i in {1..10}; do
-if [ $(docker inspect --format '{{ .State.Running }}' $DFC_APP) ]
- then
- echo "DFC app Running"
- break
- else
- echo sleep $i
- sleep $i
- fi
+ if [ $(docker inspect --format '{{ .State.Running }}' $DFC_APP) ]
+ then
+ echo "DFC app Running"
+ break
+ else
+ echo sleep $i
+ sleep $i
+ fi
done
-
diff --git a/scripts/dcaegen2-collectors-datafile/dfc-management/docker-compose.yml b/scripts/dcaegen2-collectors-datafile/dfc-management/docker-compose.yml
index 28dfbbf8..9e15ccf0 100644
--- a/scripts/dcaegen2-collectors-datafile/dfc-management/docker-compose.yml
+++ b/scripts/dcaegen2-collectors-datafile/dfc-management/docker-compose.yml
@@ -1,9 +1,22 @@
version: '2'
+networks:
+ dfcnet:
+ external:
+ name: dfcnet
services:
dfc:
- network_mode: "host"
+ #image fron Nexus
image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:latest
- container_name: dfc_app
+ #local image for test purposes
+ #image: org.onap.dcaegen2.collectors.datafile.datafile-app-server:latest
+ container_name: dfc_app0
ports:
- "8100:8100"
- "8433:8433"
+ networks:
+ dfcnet: null
+ environment:
+ CONSUL_HOST: "consul-server"
+ CONSUL_PORT: 8500
+ CONFIG_BINDING_SERVICE: "config-binding-service"
+ HOSTNAME: "dfc_app0"
diff --git a/scripts/kill-instance.sh b/scripts/kill-instance.sh
index 525f96e4..59970986 100755
--- a/scripts/kill-instance.sh
+++ b/scripts/kill-instance.sh
@@ -18,7 +18,14 @@
mkdir -p $WORKSPACE/archives
-docker logs $1 >> $WORKSPACE/archives/$1.log
-docker kill $1
-docker rm $1
+running_containers=$(docker ps --filter name=$1 -q)
+if [ -z "$running_containers" ]
+then
+ echo "$1 already terminated"
+else
+ echo "Stopping and removing containers"
+ docker logs $running_containers >> $WORKSPACE/archives/$1.log
+ docker stop $running_containers
+ docker rm $running_containers
+fi
diff --git a/scripts/multicloud-ocata/generic_sim/Dockerfile b/scripts/multicloud-ocata/generic_sim/Dockerfile
deleted file mode 100644
index 724b9d7c..00000000
--- a/scripts/multicloud-ocata/generic_sim/Dockerfile
+++ /dev/null
@@ -1,12 +0,0 @@
-FROM python:2.7-alpine
-
-EXPOSE 8080
-
-RUN mkdir -p /{tmp,etc}/generic_sim
-
-WORKDIR /opt/generic_sim/
-
-COPY . .
-RUN pip install --no-cache-dir -r requirements.txt
-
-CMD [ "python", "generic_sim.py" ]
diff --git a/scripts/multicloud-ocata/generic_sim/aai/responses.yml b/scripts/multicloud-ocata/generic_sim/aai/responses.yml
deleted file mode 100644
index f6d5fcd0..00000000
--- a/scripts/multicloud-ocata/generic_sim/aai/responses.yml
+++ /dev/null
@@ -1,189 +0,0 @@
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne:
- GET:
- body: '{"cloud-owner":"CloudOwner","cloud-region-id":"RegionOne","cloud-type":"openstack","owner-defined-type":"t1","cloud-region-version":"RegionOne","identity-url":"http://keystone:8080/v3","cloud-zone":"z1","complex-name":"clli1","sriov-automation":false,"cloud-extra-info":"","resource-version":"1524845154715"}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/availability-zones/availability-zone/internal:
- GET:
- body: '{"requestError":{"serviceException":{"messageId":"SVC3001","text":"Resource
- not found for %1 using id %2 (msg=%3) (ec=%4)","variables":["GET","cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/availability-zones/availability-zone/internal","Node
- Not Found:No Node of type availability-zone found at: cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/availability-zones/availability-zone/internal","ERR.5.4.6114"]}}}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/availability-zones/availability-zone/nova:
- GET:
- body: '{"requestError":{"serviceException":{"messageId":"SVC3001","text":"Resource
- not found for %1 using id %2 (msg=%3) (ec=%4)","variables":["GET","cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/availability-zones/availability-zone/nova","Node
- Not Found:No Node of type availability-zone found at: cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/availability-zones/availability-zone/nova","ERR.5.4.6114"]}}}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/100:
- GET:
- body: '{"requestError":{"serviceException":{"messageId":"SVC3001","text":"Resource
- not found for %1 using id %2 (msg=%3) (ec=%4)","variables":["GET","cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/100","Node
- Not Found:No Node of type flavor found at: cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/100","ERR.5.4.6114"]}}}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/110:
- GET:
- body: '{"requestError":{"serviceException":{"messageId":"SVC3001","text":"Resource
- not found for %1 using id %2 (msg=%3) (ec=%4)","variables":["GET","cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/110","Node
- Not Found:No Node of type flavor found at: cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/110","ERR.5.4.6114"]}}}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/111:
- GET:
- body: '{"requestError":{"serviceException":{"messageId":"SVC3001","text":"Resource
- not found for %1 using id %2 (msg=%3) (ec=%4)","variables":["GET","cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/111","Node
- Not Found:No Node of type flavor found at: cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/111","ERR.5.4.6114"]}}}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/112:
- GET:
- body: '{"requestError":{"serviceException":{"messageId":"SVC3001","text":"Resource
- not found for %1 using id %2 (msg=%3) (ec=%4)","variables":["GET","cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/112","Node
- Not Found:No Node of type flavor found at: cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/112","ERR.5.4.6114"]}}}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/113:
- GET:
- body: '{"requestError":{"serviceException":{"messageId":"SVC3001","text":"Resource
- not found for %1 using id %2 (msg=%3) (ec=%4)","variables":["GET","cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/113","Node
- Not Found:No Node of type flavor found at: cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/113","ERR.5.4.6114"]}}}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/114:
- GET:
- body: '{"requestError":{"serviceException":{"messageId":"SVC3001","text":"Resource
- not found for %1 using id %2 (msg=%3) (ec=%4)","variables":["GET","cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/114","Node
- Not Found:No Node of type flavor found at: cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/114","ERR.5.4.6114"]}}}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/115:
- GET:
- body: '{"requestError":{"serviceException":{"messageId":"SVC3001","text":"Resource
- not found for %1 using id %2 (msg=%3) (ec=%4)","variables":["GET","cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/115","Node
- Not Found:No Node of type flavor found at: cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/115","ERR.5.4.6114"]}}}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/116:
- GET:
- body: '{"requestError":{"serviceException":{"messageId":"SVC3001","text":"Resource
- not found for %1 using id %2 (msg=%3) (ec=%4)","variables":["GET","cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/116","Node
- Not Found:No Node of type flavor found at: cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/116","ERR.5.4.6114"]}}}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/117:
- GET:
- body: '{"requestError":{"serviceException":{"messageId":"SVC3001","text":"Resource
- not found for %1 using id %2 (msg=%3) (ec=%4)","variables":["GET","cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/117","Node
- Not Found:No Node of type flavor found at: cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/flavors/flavor/117","ERR.5.4.6114"]}}}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/660709df-e90b-471f-ac57-d8c2555e573d:
- GET:
- body: '{"requestError":{"serviceException":{"messageId":"SVC3001","text":"Resource
- not found for %1 using id %2 (msg=%3) (ec=%4)","variables":["GET","cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/660709df-e90b-471f-ac57-d8c2555e573d","Node
- Not Found:No Node of type image found at: cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/660709df-e90b-471f-ac57-d8c2555e573d","ERR.5.4.6114"]}}}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/3543226ffed44daf90a2f71f36c00b8d:
- GET:
- body: '{"requestError":{"serviceException":{"messageId":"SVC3001","text":"Resource
- not found for %1 using id %2 (msg=%3) (ec=%4)","variables":["GET","cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/3543226ffed44daf90a2f71f36c00b8d","Node
- Not Found:No Node of type tenant found at: cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/3543226ffed44daf90a2f71f36c00b8d","ERR.5.4.6114"]}}}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/b8f5d85bbcd84af28d7caa62d39f05c7:
- GET:
- body: '{"requestError":{"serviceException":{"messageId":"SVC3001","text":"Resource
- not found for %1 using id %2 (msg=%3) (ec=%4)","variables":["GET","cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/b8f5d85bbcd84af28d7caa62d39f05c7","Node
- Not Found:No Node of type tenant found at: cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/b8f5d85bbcd84af28d7caa62d39f05c7","ERR.5.4.6114"]}}}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne:
- GET:
- body: '{"cloud-owner":"CloudOwner","cloud-region-id":"RegionOne","cloud-type":"openstack","owner-defined-type":"t1","cloud-region-version":"RegionOne","identity-url":"http://multicloud-ocata:80/api/multicloud-titanium_cloud/v0/CloudOwner_RegionOne/identity/v2.0","cloud-zone":"z1","complex-name":"clli1","sriov-automation":false,"cloud-extra-info":"","resource-version":"1524845276291"}'
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/esr-system-info-list:
- GET:
- body: '{"esr-system-info":[{"esr-system-info-id":"4ce895ad-82f7-4476-b5eb-d19d19585da2","service-url":"http://keystone:8080/v3","user-name":"admin","password":"secret","system-type":"VIM","ssl-insecure":true,"cloud-domain":"Default","default-tenant":"admin","resource-version":"1524845155617"}]}'
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/pservers/pserver/compute-0:
- GET:
- body: '{"requestError":{"serviceException":{"messageId":"SVC3001","text":"Resource
- not found for %1 using id %2 (msg=%3) (ec=%4)","variables":["GET","cloud-infrastructure/pservers/pserver/compute-0","Node
- Not Found:No Node of type pserver found at: cloud-infrastructure/pservers/pserver/compute-0","ERR.5.4.6114"]}}}'
- content_type: application/json
- status_code: 200
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
-aai/v13/cloud-infrastructure/pservers/pserver/compute-0/relationship-list/relationship:
- PUT:
- body: ''
- content_type: application/json
- status_code: 200
diff --git a/scripts/multicloud-ocata/generic_sim/cinder/responses.yml b/scripts/multicloud-ocata/generic_sim/cinder/responses.yml
deleted file mode 100644
index d9657a5d..00000000
--- a/scripts/multicloud-ocata/generic_sim/cinder/responses.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-/snapshots/detail:
- get:
- body: '{"snapshots": []}'
- content_type: application/json
- status_code: 200
diff --git a/scripts/multicloud-ocata/generic_sim/generic_sim.py b/scripts/multicloud-ocata/generic_sim/generic_sim.py
deleted file mode 100644
index 4392b652..00000000
--- a/scripts/multicloud-ocata/generic_sim/generic_sim.py
+++ /dev/null
@@ -1,109 +0,0 @@
-# Copyright 2018 Intel Corporation, Inc
-# 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.
-
-import json
-import logging
-
-import web
-from web import webapi
-import yaml
-
-urls = (
- '/(.*)','MockController'
-)
-
-def setup_logger(name, log_file, level=logging.DEBUG):
- print("Configuring the logger...")
- handler = logging.FileHandler(log_file)
- formatter = logging.Formatter('%(message)s')
- handler.setFormatter(formatter)
-
- logger = logging.getLogger(name)
- logger.setLevel(level)
- logger.addHandler(handler)
-
- return logger
-
-
-class MockResponse:
- def __init__(self, http_verb, status_code,
- content_type="application/json", body="{}",
- headers={}):
- self.http_verb = http_verb.lower()
- self.status_code = status_code
- self.content_type = content_type
- self.body = body
- self.headers = headers
-
-def _parse_responses(parsed_responses):
- result = {}
- for path, responses in parsed_responses.iteritems():
- new_path = path
- if path.startswith("/"):
- new_path = path[1:]
-
- result[new_path] = []
- for http_verb, response in responses.iteritems():
- result[new_path].append(MockResponse(http_verb, **response))
- return result
-
-def load_responses(filename):
- print("Loading responses from configuration file..")
- with open(filename) as yaml_file:
- responses_file = yaml.safe_load(yaml_file)
- responses_map = _parse_responses(responses_file)
- return responses_map
-
-
-class MockController:
-
- def _do_action(self, action):
- logger.info('{}'.format(web.ctx.env.get('wsgi.input').read()))
- action = action.lower()
- url = web.ctx['fullpath']
- try:
- if url.startswith("/"):
- url = url[1:]
- response = [ r for r in responses_map[url] if r.http_verb == action][0]
- for header, value in response.headers.iteritems():
- web.header(header, value)
- web.header('Content-Type', response.content_type)
- print(response.body)
- return response.body
- except:
- webapi.NotFound()
-
- def DELETE(self, url):
- return self._do_action("delete")
-
- def HEAD(self, url):
- return self._do_action("head")
-
- def PUT(self, url):
- return self._do_action("put")
-
- def GET(self, url):
- return self._do_action("get")
-
- def POST(self, url):
- return self._do_action("post")
-
- def PATCH(self, url):
- return self._do_action("patch")
-
-
-logger = setup_logger('mock_controller', '/tmp/generic_sim/output.log')
-responses_map = load_responses('/etc/generic_sim/responses.yml')
-app = web.application(urls, globals())
-if __name__ == "__main__":
- app.run()
diff --git a/scripts/multicloud-ocata/generic_sim/glance/responses.yml b/scripts/multicloud-ocata/generic_sim/glance/responses.yml
deleted file mode 100644
index d8422352..00000000
--- a/scripts/multicloud-ocata/generic_sim/glance/responses.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-/v2/images:
- get:
- body: '{"images": [{"status": "active", "schema": "/v2/schemas/image",
- "virtual_size": null, "description": "", "tags": [], "container_format":
- "bare", "created_at": "2018-04-21T06:12:13Z", "disk_format": "raw",
- "updated_at": "2018-04-21T06:12:24Z", "visibility": "public", "id":
- "660709df-e90b-471f-ac57-d8c2555e573d", "owner": "b8f5d85bbcd84af28d7caa62d39f05c7",
- "protected": false, "min_ram": 0, "file": "/v2/images/660709df-e90b-471f-ac57-d8c2555e573d/file",
- "checksum": "683f86920d4c922cb5c55d99d646b895", "min_disk": 0, "size":
- 1697597440, "self": "/v2/images/660709df-e90b-471f-ac57-d8c2555e573d", "store":
- "file", "name": "tis4-centos-guest"}], "first": "/v2/images", "schema":
- "/v2/schemas/images"}'
- content_type: application/json
- status_code: 200
-/v2/schemas/image:
- get:
- body: '{"additionalProperties": {"type": "string"}, "name": "image",
- "links": [{"href": "{self}", "rel": "self"}, {"href": "{file}",
- "rel": "enclosure"}, {"href": "{schema}", "rel": "describedby"}],
- "properties": {"container_format": {"enum": [null, "ami", "ari", "aki",
- "bare", "ovf", "ova", "docker"], "type": ["null", "string"], "description":
- "Format of the container"}, "min_ram": {"type": "integer", "description":
- "Amount of ram (in MB) required to boot image."}, "ramdisk_id": {"pattern":
- "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$",
- "type": ["null", "string"], "description": "ID of image stored in Glance
- that should be used as the ramdisk when booting an AMI-style image.", "is_base":
- false}, "locations": {"items": {"required": ["url", "metadata"], "type":
- "object", "properties": {"url": {"type": "string", "maxLength":
- 255}, "metadata": {"type": "object"}}}, "type": "array", "description":
- "A set of URLs to access the image file kept in external store"}, "file":
- {"readOnly": true, "type": "string", "description": "An image file
- url"}, "owner": {"type": ["null", "string"], "description": "Owner
- of the image", "maxLength": 255}, "id": {"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$",
- "type": "string", "description": "An identifier for the image"}, "size":
- {"readOnly": true, "type": ["null", "integer"], "description": "Size
- of image file in bytes"}, "os_distro": {"type": "string", "description":
- "Common name of operating system distribution as specified in https://docs.openstack.org/python-glanceclient/latest/cli/property-keys.html",
- "is_base": false}, "self": {"readOnly": true, "type": "string", "description":
- "An image self url"}, "disk_format": {"enum": [null, "ami", "ari",
- "aki", "vhd", "vhdx", "vmdk", "raw", "qcow2", "vdi", "iso",
- "ploop"], "type": ["null", "string"], "description": "Format of the
- disk"}, "os_version": {"type": "string", "description": "Operating
- system version as specified by the distributor", "is_base": false}, "direct_url":
- {"readOnly": true, "type": "string", "description": "URL to access
- the image file kept in external store"}, "schema": {"readOnly": true, "type":
- "string", "description": "An image schema url"}, "status": {"readOnly":
- true, "enum": ["queued", "saving", "active", "killed", "deleted",
- "pending_delete", "deactivated"], "type": "string", "description":
- "Status of the image"}, "tags": {"items": {"type": "string", "maxLength":
- 255}, "type": "array", "description": "List of strings related to the
- image"}, "kernel_id": {"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$",
- "type": ["null", "string"], "description": "ID of image stored in Glance
- that should be used as the kernel when booting an AMI-style image.", "is_base":
- false}, "visibility": {"enum": ["community", "public", "private",
- "shared"], "type": "string", "description": "Scope of image accessibility"},
- "updated_at": {"readOnly": true, "type": "string", "description":
- "Date and time of the last image modification"}, "min_disk": {"type":
- "integer", "description": "Amount of disk space (in GB) required to boot
- image."}, "virtual_size": {"readOnly": true, "type": ["null", "integer"],
- "description": "Virtual size of image in bytes"}, "instance_uuid": {"type":
- "string", "description": "Metadata which can be used to record which instance
- this image is associated with. (Informational only, does not create an instance
- snapshot.)", "is_base": false}, "name": {"type": ["null", "string"],
- "description": "Descriptive name for the image", "maxLength": 255}, "checksum":
- {"readOnly": true, "type": ["null", "string"], "description": "md5
- hash of image contents.", "maxLength": 32}, "created_at": {"readOnly":
- true, "type": "string", "description": "Date and time of image registration"},
- "protected": {"type": "boolean", "description": "If true, image will
- not be deletable."}, "architecture": {"type": "string", "description":
- "Operating system architecture as specified in https://docs.openstack.org/python-glanceclient/latest/cli/property-keys.html",
- "is_base": false}}}'
- content_type: application/json
- status_code: 200
diff --git a/scripts/multicloud-ocata/generic_sim/keystone/responses.yml b/scripts/multicloud-ocata/generic_sim/keystone/responses.yml
deleted file mode 100644
index 422ec7b7..00000000
--- a/scripts/multicloud-ocata/generic_sim/keystone/responses.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-projects:
- get:
- body: '{"projects": [{"is_domain": false, "description": "admin tenant",
- "links": {"self": "http://keystone:8080/v3/projects/b8f5d85bbcd84af28d7caa62d39f05c7"},
- "enabled": true, "domain_id": "default", "parent_id": "default", "id":
- "b8f5d85bbcd84af28d7caa62d39f05c7", "name": "admin"}, {"is_domain":
- false, "description": "Tenant for the openstack services", "links": {"self":
- "http://keystone:8080/v3/projects/3543226ffed44daf90a2f71f36c00b8d"},
- "enabled": true, "domain_id": "default", "parent_id": "default", "id":
- "3543226ffed44daf90a2f71f36c00b8d", "name": "services"}], "links": {"self":
- "http://keystone:8080/v3/projects", "next": null, "previous": null}}'
- content_type: application/json
- status_code: 200
-v3/auth/tokens:
- post:
- body: '{"token": {"methods": ["password"], "expires_at": "2019-11-06T15:32:17.893769Z",
- "user": { "domain": {"id": "default", "name": "Default"},
- "id": "423f19a4ac1e4f48bbb4180756e6eb6c", "name": "admin", "password_expires_at": null },
- "audit_ids": [ "ZzZwkUflQfygX7pdYDBCQQ"], "catalog": [
- { "endpoints": [
- { "id": "1", "interface": "public", "region": "RegionOne", "url": "http://keystone:8080" },
- { "id": "2", "interface": "internal", "region": "RegionOne", "url": "http://keystone:8080" },
- { "id": "3", "interface": "admin", "region": "RegionOne", "url": "http://keystone:8080" }
- ], "id": "1", "type": "identity", "name": "keystone"},
- { "endpoints": [
- { "id": "1", "interface": "public", "region": "RegionOne", "url": "http://glance:8080" },
- { "id": "2", "interface": "internal", "region": "RegionOne", "url": "http://glance:8080" },
- { "id": "3", "interface": "admin", "region": "RegionOne", "url": "http://glance:8080" }
- ], "id": "2", "type": "image", "name": "glance"},
- { "endpoints": [
- { "id": "1", "interface": "public", "region": "RegionOne", "url": "http://cinder:8080" },
- { "id": "2", "interface": "internal", "region": "RegionOne", "url": "http://cinder:8080" },
- { "id": "3", "interface": "admin", "region": "RegionOne", "url": "http://cinder:8080" }
- ], "id": "2", "type": "volumev3", "name": "cinder"},
- { "endpoints": [
- { "id": "1", "interface": "public", "region": "RegionOne", "url": "http://nova:8080" },
- { "id": "2", "interface": "internal", "region": "RegionOne", "url": "http://nova:8080" },
- { "id": "3", "interface": "admin", "region": "RegionOne", "url": "http://nova:8080" }
- ], "id": "3", "type": "compute", "name": "nova"}],
- "issued_at": "2015-11-06T14:32:17.893797Z"}}'
- content_type: application/json
- status_code: 200
- headers:
- X-Subject-Token: 423f19a4ac1e4f48bbb4180756e6eb6c
diff --git a/scripts/multicloud-ocata/generic_sim/log_parser.py b/scripts/multicloud-ocata/generic_sim/log_parser.py
deleted file mode 100644
index 1334e608..00000000
--- a/scripts/multicloud-ocata/generic_sim/log_parser.py
+++ /dev/null
@@ -1,61 +0,0 @@
-import argparse
-
-import yaml
-
-
-def _find_aai_response_content(inp):
- return inp.split("||||")[1].split("with response content = ")[1]
-
-def _find_openstack_url(inp):
- return inp.split("||||")[1].split("making request with URI:")[1]
-
-def _find_openstack_response_content(inp):
- return inp.split("||||")[1].split("with content:")[1].replace("u'", "'")
-
-def _add_response(all_responses, url, http_verb, body, status_code=200, content_type="application/json"):
- if url not in all_responses.keys():
- all_responses[url] = {
- http_verb: {
- "status_code": status_code,
- "content_type": content_type,
- "body": body
- }
- }
- elif http_verb not in all_responses[url].keys():
- all_responses[url][http_verb] = {
- "status_code": status_code,
- "content_type": content_type,
- "body": body
- }
-
-def parse_lines(content, aai_ip):
- aai_pattern = "https://%s:30233/" % aai_ip
- openstack_pattern = "making request with URI:"
-
- openstack_responses = {}
- aai_responses = {}
- for i, line in enumerate(content):
- current_line = line.strip()
- if aai_pattern in current_line and "DEBUG" not in current_line:
- url = current_line.split(" ")[8][:-1].replace(aai_pattern, "")
- _add_response(aai_responses, url, current_line.split(" ")[9][:-1],
- _find_aai_response_content(content[i + 3]))
- elif openstack_pattern in current_line:
- _add_response(openstack_responses,
- _find_openstack_url(current_line), "get",
- _find_openstack_response_content(content[i + 2]))
-
- return [
- { "file": "nova.yml", "responses": openstack_responses },
- { "file": "aai.yml", "responses": aai_responses }
- ]
-
-if __name__ == "__main__":
- parser = argparse.ArgumentParser(description='Convert logs to responses YAML tree file.')
- parser.add_argument('--log-file', type=argparse.FileType('r'), help="Log file to be parsed", required=True)
- parser.add_argument('--aai-ip', help="A&AI IP Address", required=True)
- args = parser.parse_args()
-
- for mock_responses in parse_lines(args.log_file.readlines(), args.aai_ip):
- with open(mock_responses["file"], 'w') as yaml_file:
- yaml.dump(mock_responses["responses"], yaml_file, default_flow_style=False)
diff --git a/scripts/multicloud-ocata/generic_sim/nova/responses.yml b/scripts/multicloud-ocata/generic_sim/nova/responses.yml
deleted file mode 100644
index 94469711..00000000
--- a/scripts/multicloud-ocata/generic_sim/nova/responses.yml
+++ /dev/null
@@ -1,177 +0,0 @@
-/flavors/110/os-extra_specs:
- get:
- body: '{"extra_specs": {"hw:cpu_policy": "dedicated", "hw:mem_page_size":
- "large", "hw:cpu_sockets": "2", "hw:cpu_threads": "8", "hw:numa_mem.1":
- "2048", "hw:numa_mem.0": "2048", "hw:capabilities:cpu_info:features":
- "avx,acpi", "aggregate_instance_extra_specs:storage": "local_image", "hw:numa_nodes":
- "2", "hw:numa_cpus.0": "0,1", "hw:numa_cpus.1": "2,3,4,5", "hw:cpu_cores":
- "4", "hw:cpu_thread_policy": "prefer", "pci_passthrough:alias": "sriov-vf-intel-8086-15b3:4"}}'
- content_type: application/json
- status_code: 200
-/flavors/111/os-extra_specs:
- get:
- body: '{"extra_specs": {"aggregate_instance_extra_specs:storage": "local_image"}}'
- content_type: application/json
- status_code: 200
-/flavors/112/os-extra_specs:
- get:
- body: '{"extra_specs": {"hw:cpu_policy": "dedicated", "hw:cpu_thread_policy":
- "isolate", "aggregate_instance_extra_specs:storage": "local_image"}}'
- content_type: application/json
- status_code: 200
-/flavors/113/os-extra_specs:
- get:
- body: '{"extra_specs": {"hw:cpu_cores": "8", "hw:cpu_threads": "16",
- "aggregate_instance_extra_specs:storage": "local_image", "hw:cpu_sockets":
- "2"}}'
- content_type: application/json
- status_code: 200
-/flavors/114/os-extra_specs:
- get:
- body: '{"extra_specs": {"aggregate_instance_extra_specs:storage": "local_image",
- "hw:mem_page_size": "small"}}'
- content_type: application/json
- status_code: 200
-/flavors/115/os-extra_specs:
- get:
- body: '{"extra_specs": {"hw:numa_mem.1": "1024", "hw:numa_mem.0": "1024",
- "aggregate_instance_extra_specs:storage": "local_image", "hw:numa_nodes":
- "2", "hw:numa_cpus.0": "0,1", "hw:numa_cpus.1": "2,3"}}'
- content_type: application/json
- status_code: 200
-/flavors/116/os-extra_specs:
- get:
- body: '{"extra_specs": {"hw:capabilities:cpu_info:features": "avx,aes",
- "aggregate_instance_extra_specs:storage": "local_image"}}'
- content_type: application/json
- status_code: 200
-/flavors/117/os-extra_specs:
- get:
- body: '{"extra_specs": {"aggregate_instance_extra_specs:storage": "local_image",
- "pci_passthrough:alias": "sriov-vf-intel-8086-15b3:6"}}'
- content_type: application/json
- status_code: 200
-/flavors/detail:
- get:
- body: '{"flavors": [{"name": "f.small", "links": [{"href": "http://nova:8080/v2.1/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/100",
- "rel": "self"}, {"href": "http://nova:8080/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/100",
- "rel": "bookmark"}], "ram": 2048, "OS-FLV-DISABLED:disabled": false,
- "vcpus": 2, "swap": "", "os-flavor-access:is_public": true, "rxtx_factor":
- 1.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 0, "id": "100"}, {"name":
- "onap.hpa.all", "links": [{"href": "http://nova:8080/v2.1/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/110",
- "rel": "self"}, {"href": "http://nova:8080/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/110",
- "rel": "bookmark"}], "ram": 4096, "OS-FLV-DISABLED:disabled": false,
- "vcpus": 6, "swap": "", "os-flavor-access:is_public": true, "rxtx_factor":
- 1.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 0, "id": "110"}, {"name":
- "onap.hpa.basic", "links": [{"href": "http://nova:8080/v2.1/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/111",
- "rel": "self"}, {"href": "http://nova:8080/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/111",
- "rel": "bookmark"}], "ram": 2048, "OS-FLV-DISABLED:disabled": false,
- "vcpus": 4, "swap": "", "os-flavor-access:is_public": true, "rxtx_factor":
- 1.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 0, "id": "111"}, {"name":
- "onap.hpa.cpupinning", "links": [{"href": "http://nova:8080/v2.1/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/112",
- "rel": "self"}, {"href": "http://nova:8080/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/112",
- "rel": "bookmark"}], "ram": 2048, "OS-FLV-DISABLED:disabled": false,
- "vcpus": 4, "swap": "", "os-flavor-access:is_public": true, "rxtx_factor":
- 1.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 0, "id": "112"}, {"name":
- "onap.hpa.cputopology", "links": [{"href": "http://nova:8080/v2.1/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/113",
- "rel": "self"}, {"href": "http://nova:8080/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/113",
- "rel": "bookmark"}], "ram": 2048, "OS-FLV-DISABLED:disabled": false,
- "vcpus": 2, "swap": "", "os-flavor-access:is_public": true, "rxtx_factor":
- 1.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 0, "id": "113"}, {"name":
- "onap.hpa.hugepage", "links": [{"href": "http://nova:8080/v2.1/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/114",
- "rel": "self"}, {"href": "http://nova:8080/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/114",
- "rel": "bookmark"}], "ram": 2048, "OS-FLV-DISABLED:disabled": false,
- "vcpus": 2, "swap": "", "os-flavor-access:is_public": true, "rxtx_factor":
- 1.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 0, "id": "114"}, {"name":
- "onap.hpa.numa", "links": [{"href": "http://nova:8080/v2.1/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/115",
- "rel": "self"}, {"href": "http://nova:8080/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/115",
- "rel": "bookmark"}], "ram": 2048, "OS-FLV-DISABLED:disabled": false,
- "vcpus": 4, "swap": "", "os-flavor-access:is_public": true, "rxtx_factor":
- 1.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 0, "id": "115"}, {"name":
- "onap.hpa.instruction", "links": [{"href": "http://nova:8080/v2.1/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/116",
- "rel": "self"}, {"href": "http://nova:8080/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/116",
- "rel": "bookmark"}], "ram": 2048, "OS-FLV-DISABLED:disabled": false,
- "vcpus": 2, "swap": "", "os-flavor-access:is_public": true, "rxtx_factor":
- 1.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 0, "id": "116"}, {"name":
- "onap.hpa.passthrough", "links": [{"href": "http://nova:8080/v2.1/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/117",
- "rel": "self"}, {"href": "http://nova:8080/b8f5d85bbcd84af28d7caa62d39f05c7/flavors/117",
- "rel": "bookmark"}], "ram": 2048, "OS-FLV-DISABLED:disabled": false,
- "vcpus": 2, "swap": "", "os-flavor-access:is_public": true, "rxtx_factor":
- 1.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 0, "id": "117"}]}'
- content_type: application/json
- status_code: 200
-/os-availability-zone/detail:
- get:
- body: '{"availabilityZoneInfo": [{"zoneState": {"available": true}, "hosts":
- {"controller-0": {"nova-conductor": {"available": true, "active": true,
- "updated_at": "2018-04-27T16:05:25.272674"}, "nova-consoleauth": {"available":
- true, "active": true, "updated_at": "2018-04-27T16:05:21.875274"}, "nova-scheduler":
- {"available": true, "active": true, "updated_at": "2018-04-27T16:05:25.286846"}}},
- "zoneName": "internal"}, {"zoneState": {"available": false}, "hosts":
- null, "zoneName": "nova"}]}'
- content_type: application/json
- status_code: 200
-/os-hypervisors/detail:
- get:
- body: '{
- "hypervisors": [{
- "status": "disabled",
- "service": {
- "host": "compute-0",
- "disabled_reason": null,
- "id": 11
- },
- "vcpus_used": 0.0,
- "hypervisor_type": "QEMU",
- "id": 1,
- "local_gb_used": 0,
- "state": "down",
- "hypervisor_hostname": "compute-0",
- "host_ip": "192.168.204.162",
- "memory_mb": 51562,
- "current_workload": 0,
- "vcpus": 42,
- "free_ram_mb": 51562,
- "running_vms": 0,
- "free_disk_gb": 1740,
- "hypervisor_version": 2010000,
- "disk_available_least": 1740,
- "local_gb": 1833,
- "cpu_info": "{\"vendor\": \"Intel\", \"model\": \"IvyBridge\", \"arch\": \"x86_64\", \"features\": [\"pge\", \"avx\", \"xsaveopt\", \"clflush\", \"sep\", \"syscall\",\"tsc-deadline\",\"dtes64\",\"msr\",\"fsgsbase\",\"xsave\",\"vmx\",\"erms\",\"xtpr\",\"cmov\",\"smep\",\"pcid\",\"est\",\"pat\",\"monitor\",\"smx\",\"pbe\",\"lm\",\"tsc\",\"nx\",\"fxsr\",\"tm\",\"sse4.1\",\"pae\",\"sse4.2\",\"pclmuldq\",\"acpi\",\"vme\",\"popcnt\",\"mmx\",\"osxsave\",\"cx8\",\"mce\",\"de\",\"rdtscp\",\"ht\",\"dca\",\"lahf_lm\",\"pdcm\",\"mca\",\"pdpe1gb\",\"a pic\",\"sse\",\"f16c\",\"pse\",\"ds\",\"invtsc\",\"pni\",\"tm2\",\"aes\",\"sse2\",\"ss\",\"ds_cpl\",\"arat\",\"ssse3\",\"fpu\",\"cx16\",\"pse36\",\"mtrr\",\"rdrand\",\"x2apic\"],\"topology\": {\"cores\": 12,\"cells\": 2,\"threads\": 2,\"sockets\": 1}}",
- "memory_mb_used ": 0
- }]
-}'
- content_type: application/json
- status_code: 200
-/os-hypervisors/detail?hypervisor_hostname_pattern=controller-0:
- get:
- body: '{
- "hypervisors": [{
- "status": "disabled",
- "service": {
- "host": "compute-0",
- "disabled_reason": null,
- "id": 11
- },
- "vcpus_used": 0.0,
- "hypervisor_type": "QEMU",
- "id": 1,
- "local_gb_used": 0,
- "state": "down",
- "hypervisor_hostname": "compute-0",
- "host_ip": "192.168.204.162",
- "memory_mb": 51562,
- "current_workload": 0,
- "vcpus": 42,
- "free_ram_mb": 51562,
- "running_vms": 0,
- "free_disk_gb": 1740,
- "hypervisor_version": 2010000,
- "disk_available_least": 1740,
- "local_gb": 1833,
- "cpu_info": "{\"vendor\": \"Intel\", \"model\": \"IvyBridge\", \"arch\": \"x86_64\", \"features\": [\"pge\", \"avx\", \"xsaveopt\", \"clflush\", \"sep\", \"syscall\",\"tsc-deadline\",\"dtes64\",\"msr\",\"fsgsbase\",\"xsave\",\"vmx\",\"erms\",\"xtpr\",\"cmov\",\"smep\",\"pcid\",\"est\",\"pat\",\"monitor\",\"smx\",\"pbe\",\"lm\",\"tsc\",\"nx\",\"fxsr\",\"tm\",\"sse4.1\",\"pae\",\"sse4.2\",\"pclmuldq\",\"acpi\",\"vme\",\"popcnt\",\"mmx\",\"osxsave\",\"cx8\",\"mce\",\"de\",\"rdtscp\",\"ht\",\"dca\",\"lahf_lm\",\"pdcm\",\"mca\",\"pdpe1gb\",\"a pic\",\"sse\",\"f16c\",\"pse\",\"ds\",\"invtsc\",\"pni\",\"tm2\",\"aes\",\"sse2\",\"ss\",\"ds_cpl\",\"arat\",\"ssse3\",\"fpu\",\"cx16\",\"pse36\",\"mtrr\",\"rdrand\",\"x2apic\"],\"topology\": {\"cores\": 12,\"cells\": 2,\"threads\": 2,\"sockets\": 1}}",
- "memory_mb_used ": 0
- }]
-}'
- content_type: application/json
- status_code: 200
diff --git a/scripts/multicloud-ocata/generic_sim/requirements.txt b/scripts/multicloud-ocata/generic_sim/requirements.txt
deleted file mode 100644
index ac1d7dd7..00000000
--- a/scripts/multicloud-ocata/generic_sim/requirements.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-PyYAML
-web.py
diff --git a/scripts/optf-has/has/has_script.sh b/scripts/optf-has/has/has_script.sh
index 475f9301..9aa7606f 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=1.2.5-SNAPSHOT-latest
+IMAGE_VER=1.3.2-SNAPSHOT-latest
BUNDLE=/tmp/conductor/properties/AAF_RootCA.cer
mkdir -p /tmp/conductor/properties
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
index 1d1a4d64..f06247d7 100644
--- 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
@@ -1,223 +1,213 @@
{
- "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
- "policy_types": [
- {
- "onap.policies.Monitoring": {
- "derived_from": "tosca.policies.Root",
- "description": "a base policy type for all policies that governs monitoring provisioning"
+ "tosca_definitions_version": "tosca_simple_yaml_1_0_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": "map",
+ "description": "TCA Policy JSON",
+ "entry_schema": {
+ "type": "onap.datatypes.monitoring.tca_policy"
+ }
+ }
+ }
+ }
+ },
+ "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"
},
- {
- "onap.policies.monitoring.cdap.tca.hi.lo.app": {
- "derived_from": "onap.policies.Monitoring",
- "version": "1.0.0",
- "properties": {
- "tca_policy": {
- "type": "map",
- "description": "TCA Policy JSON",
- "entry_schema": {
- "type": "onap.datatypes.monitoring.tca_policy"
- }
- }
- }
+ "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"
+ }
}
- ],
- "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.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"
+ ]
}
+ ]
},
- {
- "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"
- }
- }
- }
+ "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"
+ ]
}
+ ]
},
- {
- "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"
- }
- }
+ "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"
}
- ]
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/scripts/policy/policy-distribution/config/db/db.conf b/scripts/policy/policy-distribution/config/db/db.conf
new file mode 100644
index 00000000..4768bfc4
--- /dev/null
+++ b/scripts/policy/policy-distribution/config/db/db.conf
@@ -0,0 +1,16 @@
+# Copyright (C) 2019 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.
+MYSQL_ROOT_PASSWORD=secret
+MYSQL_USER=policy_user
+MYSQL_PASSWORD=policy_user
diff --git a/scripts/policy/policy-distribution/config/db/db.sh b/scripts/policy/policy-distribution/config/db/db.sh
new file mode 100644
index 00000000..660f2c5a
--- /dev/null
+++ b/scripts/policy/policy-distribution/config/db/db.sh
@@ -0,0 +1,22 @@
+#!/bin/bash -xv
+# Copyright (C) 2019 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.
+
+for db in policyadmin
+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/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
new file mode 100644
index 00000000..82e4a48d
--- /dev/null
+++ b/scripts/policy/policy-distribution/config/distribution/csar/sample_csar_with_apex_policy.csar
Binary files differ
diff --git a/scripts/policy/policy-distribution/config/distribution/defaultConfig.json b/scripts/policy/policy-distribution/config/distribution/defaultConfig.json
new file mode 100644
index 00000000..facee9bc
--- /dev/null
+++ b/scripts/policy/policy-distribution/config/distribution/defaultConfig.json
@@ -0,0 +1,72 @@
+{
+ "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/policy-distribution/config/distribution/temp/sample_csar_with_apex_policy.csar b/scripts/policy/policy-distribution/config/distribution/temp/sample_csar_with_apex_policy.csar
new file mode 100644
index 00000000..82e4a48d
--- /dev/null
+++ b/scripts/policy/policy-distribution/config/distribution/temp/sample_csar_with_apex_policy.csar
Binary files differ
diff --git a/scripts/policy/policy-distribution/docker-compose-distribution.yml b/scripts/policy/policy-distribution/docker-compose-distribution.yml
new file mode 100644
index 00000000..f2398908
--- /dev/null
+++ b/scripts/policy/policy-distribution/docker-compose-distribution.yml
@@ -0,0 +1,109 @@
+# Copyright (C) 2019 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.
+version: '2'
+networks:
+ default:
+ driver: bridge
+services:
+ mariadb:
+ image: 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
+ ports:
+ - "3306:3306"
+ message-router:
+ image: dmaap/simulator
+ container_name: dmaap-simulator
+ hostname: dmaap-simulator
+ ports:
+ - "3904:3904"
+ policy-pap:
+ image: nexus3.onap.org:10001/onap/policy-pap:${POLICY_PAP_VERSION}
+ container_name: policy-pap
+ depends_on:
+ - mariadb
+ - message-router
+ hostname: policy-pap
+
+
+ policy-api:
+ image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION}
+ container_name: policy-api
+ depends_on:
+ - mariadb
+ hostname: policy-api
+
+
+ distribution:
+ image: nexus3.onap.org:10001/onap/policy-distribution:${POLICY_DISTRIBUTION_VERSION}
+ container_name: policy-distribution
+ hostname: policy-distribution
+ volumes:
+ - ./config/distribution/defaultConfig.json:/opt/app/policy/distribution/etc/defaultConfig.json
+ - ./config/distribution/temp/:/opt/app/policy/distribution/etc/temp/
+ depends_on:
+ - mariadb
+ - message-router
+ - policy-pap
+ - policy-api
+ - apex
+
+ apex:
+ image: nexus3.onap.org:10001/onap/policy-apex-pdp:${POLICY_APEX_PDP_VERSION}
+ container_name: policy-apex-pdp
+ depends_on:
+ - mariadb
+ - message-router
+ - policy-pap
+ hostname: policy-apex-pdp
+ command: ['/opt/app/policy/apex-pdp/bin/apexOnapPf.sh', '-c', '/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json']
+ ports:
+ - "6969:6969"
+ - "23324:23324"
+ start_dependencies:
+ image: dadarek/wait-for-dependencies
+ environment:
+ TIMEOUT_LENGTH: 60
+ container_name: policy-wait
+ depends_on:
+ - mariadb
+ - message-router
+ hostname: policy-wait
+ command:
+ mariadb:3306
+ message-router:3904
+ start_all:
+ image: dadarek/wait-for-dependencies
+ environment:
+ TIMEOUT_LENGTH: 60
+ container_name: policy-wait-all
+ depends_on:
+ - mariadb
+ - message-router
+ - policy-api
+ - policy-pap
+ - apex
+ - distribution
+ hostname: policy-wait-all
+ command:
+ mariadb:3306
+ message-router:3904
+ policy-api:6969
+ policy-pap:6969
+ apex:6969
+ distribution:6969