Merge "Fix CSIT for PMSH"
authorLasse Kaihlavirta <l.kaihlavirt@partner.samsung.com>
Thu, 11 Mar 2021 08:33:44 +0000 (08:33 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 11 Mar 2021 08:33:44 +0000 (08:33 +0000)
97 files changed:
plans/ccsdk-oran/polmansuite/config/application_configuration.json.nosdnc [deleted file]
plans/ccsdk-oran/polmansuite/config/application_configuration.json.sdnc [deleted file]
plans/ccsdk-oran/polmansuite/data/preparePmsData.sh [deleted file]
plans/ccsdk-oran/polmansuite/data/testdata/OSC/policy_type.json [deleted file]
plans/ccsdk-oran/polmansuite/data/testdata/policy.json [deleted file]
plans/ccsdk-oran/polmansuite/data/testdata/service.json [deleted file]
plans/ccsdk-oran/polmansuite/data/testdata/v2/policy_osc.json [deleted file]
plans/ccsdk-oran/polmansuite/data/testdata/v2/policy_std_v2.json [deleted file]
plans/ccsdk-oran/polmansuite/data/testdata/v2/policy_type.json [deleted file]
plans/ccsdk-oran/polmansuite/data/testdata/v2/service.json [deleted file]
plans/ccsdk-oran/polmansuite/docker-compose.yml [deleted file]
plans/ccsdk-oran/polmansuite/sdnc/config/https-props-a1controller.properties [deleted file]
plans/ccsdk-oran/polmansuite/sdnc/docker-compose.yml [deleted file]
plans/ccsdk-oran/polmansuite/setup.sh [deleted file]
plans/ccsdk-oran/polmansuite/teardown.sh [deleted file]
plans/ccsdk-oran/polmansuite/test/pms_a1sim.sh [deleted file]
plans/ccsdk-oran/polmansuite/test/pms_a1sim_sdnc.sh [deleted file]
plans/ccsdk-oran/polmansuite/testplan.txt [deleted file]
plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh
plans/sdnc/healthcheck/setup.sh
plans/sdnc/sdnc_netconf_tls_post_deploy/sdnc-csit.env
plans/sdnc/sdnc_netconf_tls_post_deploy/setup.sh
plans/sdnc/sdnc_netconf_tls_post_deploy/teardown.sh
plans/so/integration-etsi-testing/config/camunda-sql/mariadb_engine_7.10.0.sql
plans/so/integration-etsi-testing/config/distribution-test-zip/macro_zipped_sdc_csar.tar.gz [new file with mode: 0755]
plans/so/integration-etsi-testing/config/env
plans/so/integration-etsi-testing/config/override-files/bpmn-infra/onapheat/override.yaml
plans/so/integration-etsi-testing/config/override-files/openstack-adapter/onapheat/override.yaml [new file with mode: 0644]
plans/so/integration-etsi-testing/config/override-files/so-etsi-nfvo-ns-lcm/onapheat/override.yaml
plans/so/integration-etsi-testing/config/override-files/so-vnfm-adapter/onapheat/override.yaml
plans/so/integration-etsi-testing/config/override-files/vnfm-simulator/onapheat/override.yaml
plans/so/integration-etsi-testing/docker-compose.local.yml
plans/so/integration-etsi-testing/docker-compose.yml
plans/so/integration-etsi-testing/so-simulators/aai-simulator/src/main/java/org/onap/so/aaisimulator/controller/GenericVnfsController.java
plans/so/integration-etsi-testing/so-simulators/aai-simulator/src/main/java/org/onap/so/aaisimulator/service/providers/GenericVnfCacheServiceProvider.java
plans/so/integration-etsi-testing/so-simulators/aai-simulator/src/main/java/org/onap/so/aaisimulator/service/providers/GenericVnfCacheServiceProviderImpl.java
plans/so/integration-etsi-testing/so-simulators/aai-simulator/src/main/java/org/onap/so/aaisimulator/utils/Constants.java
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/HELP.md [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/mvnw [new file with mode: 0755]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/mvnw.cmd [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/pom.xml [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/MultiCloudSimulatorApplication.java [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/InstanceResponse.java [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/MulticloudCreateResponse.java [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/MulticloudInstanceRequest.java [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/MulticloudRequest.java [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/Resource.java [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/Response.java [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/configration/ApplicationConfigration.java [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/configration/WebSecurityConfigImpl.java [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/controller/MultiCloudController.java [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/utils/Constants.java [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/resources/application.properties [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/resources/application.yaml [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/test/java/org/onap/so/multicloudsimulator/MultiCloudSimulatorApplicationTests.java [new file with mode: 0644]
plans/so/integration-etsi-testing/so-simulators/package/docker/pom.xml
plans/so/integration-etsi-testing/so-simulators/pom.xml
plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/main/java/org/onap/so/sdncsimulator/controller/OperationsController.java
plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/main/java/org/onap/so/sdncsimulator/models/Output.java
plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/main/java/org/onap/so/sdncsimulator/providers/ServiceOperationsCacheServiceProvider.java
plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/main/java/org/onap/so/sdncsimulator/providers/ServiceOperationsCacheServiceProviderimpl.java
plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/services/SubscriptionManager.java
plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/resources/application.yaml
plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/test/java/org/onap/so/svnfm/simulator/controllers/TestSubscriptionNotificationController.java
plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/test/resources/application.yaml
plans/so/macroflow/cloud_owner_sql/cloud_owner.sql [new file with mode: 0644]
plans/so/macroflow/setup.sh [new file with mode: 0644]
plans/so/macroflow/teardown.sh [new file with mode: 0644]
plans/so/macroflow/testplan.txt [new file with mode: 0644]
scripts/dmaap-datarouter/remove_cert_from_ca.py
scripts/optf-has/has/has-properties/conductor.conf.onap
scripts/optf-has/has/has_script.sh
scripts/optf-has/has/simulator_script.sh
scripts/optf-has/has/simulator_teardown_script.sh
scripts/sdnc/netconf-pnp-simulator/docker-compose.yml [deleted file]
scripts/sdnc/netconf-pnp-simulator/netconf-config/data.json [deleted file]
scripts/sdnc/netconf-pnp-simulator/netconf-config/model.yang [deleted file]
scripts/sdnc/netconf-pnp-simulator/netconf-config/subscriber.py [deleted file]
scripts/sdnc/sdnc/certs/keys0.zip
scripts/sdnc/sdnc/docker-compose.yml
tests/ccsdk-oran/polmansuite/__init__.robot [deleted file]
tests/ccsdk-oran/polmansuite/test.robot [deleted file]
tests/optf-has/has/data/nsi_selection_template_with_create.json
tests/optf-has/has/data/nsi_selection_template_with_nonsi.json
tests/optf-has/has/data/nsi_selection_template_with_reuse.json
tests/optf-has/has/data/nssi_selection_template.json
tests/optf-has/has/data/nssi_selection_template_unmatched.json
tests/optf-has/has/data/nst_selection_template.json [new file with mode: 0644]
tests/optf-has/has/optf_has_test.robot
tests/sdnc/healthcheck/test1.robot
tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-keywords.robot
tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-properties.robot
tests/sdnc/sdnc_netconf_tls_post_deploy/sdnc_post_deploy_cert_check.robot
tests/so/etsi/data/responses/expectedVnfPackage.json
tests/so/sanity-check/data/macroflow.json [new file with mode: 0644]
tests/so/sanity-check/data/serviceBasicVfCnfnotification.json [new file with mode: 0644]
tests/so/sanity-check/macroflow.robot [new file with mode: 0644]

diff --git a/plans/ccsdk-oran/polmansuite/config/application_configuration.json.nosdnc b/plans/ccsdk-oran/polmansuite/config/application_configuration.json.nosdnc
deleted file mode 100644 (file)
index deb88a0..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-{
-    "config":{
-       "//description":"Application configuration",
-       "ric":[
-          {
-             "name":"ric1",
-             "baseUrl":"https://a1-sim-OSC:8185/",
-             "managedElementIds":[
-                "kista_1",
-                "kista_2"
-             ]
-          },
-          {
-            "name":"ric2",
-            "baseUrl":"https://a1-sim-STD-v2:8185/",
-            "managedElementIds":[
-               "kista_1",
-               "kista_2"
-            ]
-          }
-       ],
-       "streams_publishes":{
-          "dmaap_publisher":{
-             "type":"message_router",
-             "dmaap_info":{
-                "topic_url":"http://dmaap-mr:3904/events/A1-POLICY-AGENT-WRITE"
-             }
-          }
-       },
-       "streams_subscribes":{
-          "dmaap_subscriber":{
-             "type":"message_router",
-             "dmaap_info":{
-                "topic_url":"http://dmaap-mr:3904/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100"
-             }
-          }
-       }
-    }
- }
\ No newline at end of file
diff --git a/plans/ccsdk-oran/polmansuite/config/application_configuration.json.sdnc b/plans/ccsdk-oran/polmansuite/config/application_configuration.json.sdnc
deleted file mode 100644 (file)
index 0f05de1..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-{
-    "config":{
-       "controller": [
-         {
-           "name": "controller1",
-           "baseUrl": "https://a1-controller:8443",
-           "userName": "admin",
-           "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
-         }
-       ],
-       "ric":[
-          {
-             "name":"ric1",
-             "controller": "controller1",
-             "baseUrl":"https://a1-sim-OSC:8185/",
-             "managedElementIds":[
-                "kista_1",
-                "kista_2"
-             ]
-          },
-          {
-            "name":"ric2",
-            "controller": "controller1",
-           "baseUrl":"https://a1-sim-STD-v2:8185/",
-            "managedElementIds":[
-               "kista_1",
-               "kista_2"
-            ]
-          }
-       ],
-       "streams_publishes":{
-          "dmaap_publisher":{
-             "type":"message_router",
-             "dmaap_info":{
-                "topic_url":"http://dmaap-mr:3904/events/A1-POLICY-AGENT-WRITE"
-             }
-          }
-       },
-       "streams_subscribes":{
-          "dmaap_subscriber":{
-             "type":"message_router",
-             "dmaap_info":{
-                "topic_url":"http://dmaap-mr:3904/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100"
-             }
-          }
-       }
-    }
- }
diff --git a/plans/ccsdk-oran/polmansuite/data/preparePmsData.sh b/plans/ccsdk-oran/polmansuite/data/preparePmsData.sh
deleted file mode 100755 (executable)
index 9644a41..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-#!/bin/bash
-
-#  ============LICENSE_START===============================================
-#  Copyright (C) 2021 Nordix Foundation. 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=================================================
-#
-
-# The scripts in data/ will generate some dummy data in the running system.
-# It will create:
-# one policy type in a1-sim-OSC
-# one service in policy agent
-# one policy in a1-sim-OSC
-# one policy in a1-sim-STD
-
-# Run command:
-# ./preparePmsData.sh [policy-agent port] [a1-sim-OSC port] [a1-sim-STD port] [http/https]
-
-policy_agent_port=${1:-8081}
-a1_sim_OSC_port=${2:-30001}
-a1_sim_STD_port=${3:-30005}
-httpx=${4:-"http"}
-SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
-
-echo "using policy_agent port: "$policy_agent_port
-echo "using a1-sim-OSC port: "$a1_sim_OSC_port
-echo "using a1-sim-STD port: "$a1_sim_STD_port
-echo "using protocol: "$httpx
-echo -e "\n"
-
-checkRes (){
-  if [ "$res" != "$expect" ]; then
-      echo "$res is not expected! exit!"
-      exit 1;
-  fi
-}
-
-echo "policy agent status:"
-curlString="curl -skw %{http_code} $httpx://localhost:$policy_agent_port/status"
-res=$($curlString)
-echo "$res"
-expect="hunky dory200"
-checkRes
-echo -e "\n"
-
-echo "ric1 version:"
-curlString="curl -skw %{http_code} $httpx://localhost:$a1_sim_OSC_port/counter/interface"
-res=$($curlString)
-echo "$res"
-expect="OSC_2.1.0200"
-checkRes
-echo -e "\n"
-
-echo "ric2 version:"
-curlString="curl -skw %{http_code} $httpx://localhost:$a1_sim_STD_port/counter/interface"
-res=$($curlString)
-echo "$res"
-expect="STD_2.0.0200"
-checkRes
-echo -e "\n"
-
-echo "create policy type 1 to ric1:"
-curlString="curl -X PUT -skw %{http_code} $httpx://localhost:$a1_sim_OSC_port/policytype?id=1 -H Content-Type:application/json --data-binary @${SHELL_FOLDER}/testdata/OSC/policy_type.json"
-res=$($curlString)
-echo "$res"
-expect="Policy type 1 is OK.201"
-checkRes
-echo -e "\n"
-
-echo "create policy type 2 to ric2:"
-curlString="curl -skw %{http_code} $httpx://localhost:$a1_sim_STD_port/policytype?id=2 -X PUT -H Accept:application/json -H Content-Type:application/json -H X-Requested-With:XMLHttpRequest --data-binary @${SHELL_FOLDER}/testdata/v2/policy_type.json"
-res=$($curlString)
-echo "$res"
-expect="Policy type 2 is OK.201"
-checkRes
-echo -e "\n"
-
-for i in {1..30}; do
-       echo "policy types from policy agent:"
-    curlString="curl -skw %{http_code} $httpx://localhost:$policy_agent_port/a1-policy/v2/policy-types"
-    res=$($curlString)
-    echo "$res"
-    expect="{\"policytype_ids\":[\"1\",\"2\"]}200"
-    if [ "$res" == "$expect" ]; then
-        echo -e "\n"
-        break;
-    else
-        sleep $i
-    fi
-done
-
-echo "create service ric-registration to policy agent:"
-curlString="curl -k -X PUT -sw %{http_code} -H accept:application/json -H Content-Type:application/json "$httpx://localhost:$policy_agent_port/a1-policy/v2/services" --data-binary @${SHELL_FOLDER}/testdata/v2/service.json"
-res=$($curlString)
-echo "$res"
-expect="201"
-checkRes
-echo -e "\n"
-
-echo "create policy aa8feaa88d944d919ef0e83f2172a5000 to ric1 with type 1 and service controlpanel via policy agent:"
-curlString="curl -k -X PUT -sw %{http_code} -H accept:application/json -H Content-Type:application/json "$httpx://localhost:$policy_agent_port/a1-policy/v2/policies" --data-binary @${SHELL_FOLDER}/testdata/v2/policy_osc.json"
-res=$($curlString)
-echo "$res"
-expect="201"
-checkRes
-echo -e "\n"
-
-echo "policy numbers from ric1:"
-curlString="curl -skw %{http_code} $httpx://localhost:$a1_sim_OSC_port/counter/num_instances"
-res=$($curlString)
-echo "$res"
-expect="1200"
-checkRes
-echo -e "\n"
-
-echo "create policy aa8feaa88d944d919ef0e83f2172a5100 to ric2 with type 2 and service controlpanel via policy agent:"
-curlString="curl -k -X PUT -sw %{http_code} -H accept:application/json -H Content-Type:application/json "$httpx://localhost:$policy_agent_port/a1-policy/v2/policies" --data-binary @${SHELL_FOLDER}/testdata/v2/policy_std_v2.json"
-res=$($curlString)
-echo "$res"
-expect="201"
-checkRes
-echo -e "\n"
-
-echo "policy numbers from ric2:"
-curlString="curl -skw %{http_code} $httpx://localhost:$a1_sim_STD_port/counter/num_instances"
-res=$($curlString)
-echo "$res"
-expect="1200"
-checkRes
-echo -e "\n"
-
-echo "policy id aa8feaa88d944d919ef0e83f2172a5000 from policy agent:"
-curlString="curl -s -o /dev/null -I -w %{http_code} $httpx://localhost:$policy_agent_port/a1-policy/v2/policies/aa8feaa88d944d919ef0e83f2172a5000"
-res=$($curlString)
-echo "$res"
-expect="200"
-checkRes
-echo -e "\n"
-
-echo "policy id aa8feaa88d944d919ef0e83f2172a5100 from policy agent:"
-curlString="curl -s -o /dev/null -I -w %{http_code} $httpx://localhost:$policy_agent_port/a1-policy/v2/policies/aa8feaa88d944d919ef0e83f2172a5100"
-res=$($curlString)
-echo "$res"
-expect="200"
-checkRes
-echo -e "\n"
diff --git a/plans/ccsdk-oran/polmansuite/data/testdata/OSC/policy_type.json b/plans/ccsdk-oran/polmansuite/data/testdata/OSC/policy_type.json
deleted file mode 100644 (file)
index aeea773..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-  "name": "pt1",
-  "description": "pt1 policy type",
-  "policy_type_id": 1,
-  "create_schema": {
-    "$schema": "http://json-schema.org/draft-07/schema#",
-    "title": "OSC_Type1_1.0.0",
-    "description": "Type 1 policy type",
-    "type": "object",
-    "properties": {
-      "scope": {
-        "type": "object",
-        "properties": {
-          "ueId": {
-            "type": "string"
-          },
-          "qosId": {
-            "type": "string"
-          }
-        },
-        "additionalProperties": false,
-        "required": [
-          "ueId",
-          "qosId"
-        ]
-      },
-      "qosObjectives": {
-        "type": "object",
-        "properties": {
-          "priorityLevel": {
-            "type": "number"
-          }
-        },
-        "additionalProperties": false,
-        "required": [
-          "priorityLevel"
-        ]
-      }
-    },
-    "additionalProperties": false,
-    "required": [
-      "scope", "qosObjectives"
-    ]
-  }
-}
diff --git a/plans/ccsdk-oran/polmansuite/data/testdata/policy.json b/plans/ccsdk-oran/polmansuite/data/testdata/policy.json
deleted file mode 100644 (file)
index ac1b538..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "scope": {
-    "ueId": "ue3100",
-    "qosId": "qos3100"
-  },
-  "qosObjectives": {
-    "priorityLevel": 3100
-  }
-}
diff --git a/plans/ccsdk-oran/polmansuite/data/testdata/service.json b/plans/ccsdk-oran/polmansuite/data/testdata/service.json
deleted file mode 100644 (file)
index 7bb6651..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-    "callbackUrl": "https://callback-receiver:8091/callbacks/1",
-    "keepAliveIntervalSeconds": "3600",
-    "serviceName": "service1"
-}
diff --git a/plans/ccsdk-oran/polmansuite/data/testdata/v2/policy_osc.json b/plans/ccsdk-oran/polmansuite/data/testdata/v2/policy_osc.json
deleted file mode 100644 (file)
index 902f911..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-    "ric_id": "ric1",
-    "policy_id": "aa8feaa88d944d919ef0e83f2172a5100",
-    "service_id": "controlpanel",
-    "policytype_id": "1",
-    "status_notification_uri": "http://callback-receiver:8090/callbacks/test",
-    "policy_data": {
-        "scope": {
-            "ueId": "ue5100",
-            "qosId": "qos5100"
-        },
-        "qosObjectives": {
-            "priorityLevel": 5100
-        }
-    }
-}
\ No newline at end of file
diff --git a/plans/ccsdk-oran/polmansuite/data/testdata/v2/policy_std_v2.json b/plans/ccsdk-oran/polmansuite/data/testdata/v2/policy_std_v2.json
deleted file mode 100644 (file)
index dcb7e38..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-    "ric_id": "ric2",
-    "policy_id": "aa8feaa88d944d919ef0e83f2172a5000",
-    "service_id": "controlpanel",
-    "policytype_id": "2",
-    "status_notification_uri": "http://callback-receiver:8090/callbacks/test",
-    "policy_data": {
-        "scope": {
-            "ueId": "ue5000",
-            "qosId": "qos5000"
-        },
-        "qosObjectives": {
-            "priorityLevel": 5000
-        }
-    }
-}
\ No newline at end of file
diff --git a/plans/ccsdk-oran/polmansuite/data/testdata/v2/policy_type.json b/plans/ccsdk-oran/polmansuite/data/testdata/v2/policy_type.json
deleted file mode 100644 (file)
index 931498c..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-{
-    "policySchema": {
-      "$schema": "http://json-schema.org/draft-07/schema#",
-      "title": "STD_QOS_0_2_0",
-      "description": "STD QOS policy type",
-      "type": "object",
-      "properties": {
-        "scope": {
-          "type": "object",
-          "properties": {
-            "ueId": {
-              "type": "string"
-            },
-            "qosId": {
-              "type": "string"
-            }
-          },
-          "additionalProperties": false,
-          "required": [
-            "ueId",
-            "qosId"
-          ]
-        },
-        "qosObjectives": {
-          "type": "object",
-          "properties": {
-            "priorityLevel": {
-              "type": "number"
-            }
-          },
-          "additionalProperties": false,
-          "required": [
-            "priorityLevel"
-          ]
-        }
-      }
-    },
-    "statusSchema": {
-      "$schema": "http://json-schema.org/draft-07/schema#",
-      "title": "STD_QOS_0.2.0",
-      "description": "STD QOS policy type status",
-      "type": "object",
-      "properties": {
-        "enforceStatus": {
-          "type": "string"
-        },
-        "enforceReason": {
-          "type": "string"
-        },
-        "additionalProperties": false,
-        "required": [
-          "enforceStatus"
-        ]
-      }
-    }
-  }
\ No newline at end of file
diff --git a/plans/ccsdk-oran/polmansuite/data/testdata/v2/service.json b/plans/ccsdk-oran/polmansuite/data/testdata/v2/service.json
deleted file mode 100644 (file)
index d984cba..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-    "callback_url": "http://callback-receiver:8090/callbacks/ric-registration",
-    "keep_alive_interval_seconds": "0",
-    "service_id": "ric-registration"
-}
\ No newline at end of file
diff --git a/plans/ccsdk-oran/polmansuite/docker-compose.yml b/plans/ccsdk-oran/polmansuite/docker-compose.yml
deleted file mode 100644 (file)
index a50115f..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#  Copyright (C) 2021 Nordix Foundation. 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: '3'
-
-networks:
-  default:
-    driver: bridge
-
-services:
-  policy-agent:
-    image: nexus3.onap.org:10003/onap/ccsdk-oran-a1policymanagementservice:1.1.1-STAGING-latest
-    container_name: policy-agent
-    networks:
-      default:
-        aliases:
-          - policy-agent-container
-    ports:
-      - 8081:8081
-      - 8433:8433
-    volumes:
-      - ./config/application_configuration.json:/opt/app/policy-agent/data/application_configuration.json:ro
-    # For using own certs instead of the default ones (built into the container),
-    # place them in config/ directory, update the application-policyagent.yaml file, and uncomment the following lines
-    #  - ./config/keystore-policyagent.jks:/opt/app/policy-agent/etc/cert/keystore.jks:ro
-    #  - ./config/truststore-policyagent.jks:/opt/app/policy-agent/etc/cert/truststore.jks:ro
-    #  - ./config/application-policyagent.yaml:/opt/app/policy-agent/config/application.yaml:ro
-
-  a1-sim-OSC:
-    image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.1.0
-    container_name: a1-sim-OSC
-    networks:
-      - default
-    ports:
-      - 30001:8085
-      - 30002:8185
-    environment:
-      - A1_VERSION=OSC_2.1.0
-      - REMOTE_HOSTS_LOGGING=1
-      - ALLOW_HTTP=true
-
-  a1-sim-STD:
-    image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.1.0
-    container_name: a1-sim-STD
-    networks:
-      - default
-    ports:
-      - 30003:8085
-      - 30004:8185
-    environment:
-      - A1_VERSION=STD_1.1.3
-      - REMOTE_HOSTS_LOGGING=1
-      - ALLOW_HTTP=true
-
-  a1-sim-STD-v2:
-    image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.1.0
-    container_name: a1-sim-STD-v2
-    networks:
-      - default
-    ports:
-      - 30005:8085
-      - 30006:8185
-    environment:
-      - A1_VERSION=STD_2.0.0
-      - REMOTE_HOSTS_LOGGING=1
-      - ALLOW_HTTP=true
diff --git a/plans/ccsdk-oran/polmansuite/sdnc/config/https-props-a1controller.properties b/plans/ccsdk-oran/polmansuite/sdnc/config/https-props-a1controller.properties
deleted file mode 100644 (file)
index 7c4b1c1..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# ========================LICENSE_START=================================
-# O-RAN-SC
-# %%
-# Copyright (C) 2021 Nordix Foundation
-# %%
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ========================LICENSE_END===================================
-
-key-store=/etc/ssl/certs/java/keystore.jks
-key-password=sdnc-a1-controller
-keystore-password=sdnc-a1-controller
-isTrustStoreUsed=true
-trust-store=/etc/ssl/certs/java/truststore.jks
-truststore-password=sdnc-a1-controller
diff --git a/plans/ccsdk-oran/polmansuite/sdnc/docker-compose.yml b/plans/ccsdk-oran/polmansuite/sdnc/docker-compose.yml
deleted file mode 100644 (file)
index 86dd3a5..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#  Copyright (C) 2021 Nordix Foundation. 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: '3'
-
-networks:
-  default:
-    driver: bridge
-
-services:
-  db:
-    image: mysql/mysql-server:5.6
-    container_name: sdnc-db
-    networks:
-      - default
-    ports:
-      - "3306"
-    environment:
-      - MYSQL_ROOT_PASSWORD=openECOMP1.0
-      - MYSQL_ROOT_HOST=%
-    logging:
-      driver:   "json-file"
-      options:
-        max-size: "30m"
-        max-file: "5"
-
-  a1-controller:
-    image: onap/sdnc-image:2.1.0
-    depends_on :
-      - db
-    container_name: a1-controller
-    networks:
-      - default
-    entrypoint: ["/opt/onap/sdnc/bin/startODL.sh"]
-    ports:
-      - 8282:8181
-      - 8443:8443
-    links:
-      - db:dbhost
-      - db:sdnctldb01
-      - db:sdnctldb02
-    environment:
-      - MYSQL_ROOT_PASSWORD=openECOMP1.0
-      - SDNC_DB_INIT=true
-      - SDNC_CONFIG_DIR=/opt/onap/sdnc/data/properties
-      - A1_TRUSTSTORE_PASSWORD=a1adapter
-    # For using own certs instead of the default ones (built into the container),
-    # place them in config/ directory, update the https-props-a1controller.properties file, and uncomment the following lines
-    #volumes:
-    #  - ./sdnc/config/keystore-a1controller.jks:/etc/ssl/certs/java/keystore.jks:ro
-    #  - ./sdnc/config/truststore-a1controller.jks:/etc/ssl/certs/java/truststore.jks:ro
-    #  - ./sdnc/config/https-props-a1controller.properties:/opt/onap/sdnc/data/properties/https-props.properties:ro
-    logging:
-      driver:   "json-file"
-      options:
-        max-size: "30m"
-        max-file: "5"
diff --git a/plans/ccsdk-oran/polmansuite/setup.sh b/plans/ccsdk-oran/polmansuite/setup.sh
deleted file mode 100755 (executable)
index 188b84d..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-#  ============LICENSE_START===============================================
-#  Copyright (C) 2021 Nordix Foundation. 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=================================================
-
-
-cd $WORKSPACE/archives
-
-POLMAN_PLANS=$WORKSPACE/plans/ccsdk-oran/polmansuite
-ARCHIVES=$WORKSPACE/archives
-
-#Copy test script
-cp $POLMAN_PLANS/docker-compose.yml $WORKSPACE/archives/docker-compose.yml
-cp -rf $POLMAN_PLANS/config/ $WORKSPACE/archives/config/
-cp -rf $POLMAN_PLANS/data/ $WORKSPACE/archives/data/
-cp -rf $POLMAN_PLANS/test/ $WORKSPACE/archives/test/
-cp -rf $POLMAN_PLANS/sdnc/ $WORKSPACE/archives/sdnc/
-
-#Make the env vars availble to the robot scripts
-ROBOT_VARIABLES="-b debug.log -v ARCHIVES:${ARCHIVES}"
-
diff --git a/plans/ccsdk-oran/polmansuite/teardown.sh b/plans/ccsdk-oran/polmansuite/teardown.sh
deleted file mode 100755 (executable)
index c619d0c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-#  ============LICENSE_START===============================================
-#  Copyright (C) 2021 Nordix Foundation. 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=================================================
-
-# All started containers stopped and removed  by the test case
-docker stop $(docker ps -aq)
-docker system prune -f
diff --git a/plans/ccsdk-oran/polmansuite/test/pms_a1sim.sh b/plans/ccsdk-oran/polmansuite/test/pms_a1sim.sh
deleted file mode 100755 (executable)
index f3344cf..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-
-#  ============LICENSE_START===============================================
-#  Copyright (C) 2021 Nordix Foundation. 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=================================================
-
-SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
-docker stop $(docker ps -aq)
-docker system prune -f
-
-cd ${SHELL_FOLDER}/../config
-cp application_configuration.json.nosdnc application_configuration.json
-
-cd ${SHELL_FOLDER}/../
-docker-compose up -d
-
-checkStatus(){
-    for i in {1..20}; do
-        res=$($1)
-        echo "$res"
-        expect=$2
-        if [ "$res" == "$expect" ]; then
-            echo -e "$3 is alive!\n"
-            break;
-        else
-            sleep $i
-        fi
-    done
-}
-# Healthcheck docker containers
-
-# check SIM1 status
-echo "check SIM1 status:"
-checkStatus "curl -skw %{http_code} http://localhost:30001/" "OK200" "SIM1"
-
-# check SIM2 status
-echo "check SIM2 status:"
-checkStatus "curl -skw %{http_code} http://localhost:30003/" "OK200" "SIM2"
-
-# check SIM3 status
-echo "check SIM3 status:"
-checkStatus "curl -skw %{http_code} http://localhost:30005/" "OK200" "SIM3"
-
-# check PMS status
-echo "check PMS status:"
-checkStatus "curl -skw %{http_code} http://localhost:8081/status" "hunky dory200" "PMS"
-
-cd ${SHELL_FOLDER}/../data
-./preparePmsData.sh
-
diff --git a/plans/ccsdk-oran/polmansuite/test/pms_a1sim_sdnc.sh b/plans/ccsdk-oran/polmansuite/test/pms_a1sim_sdnc.sh
deleted file mode 100755 (executable)
index 5bf81b3..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/bash
-
-#  ============LICENSE_START===============================================
-#  Copyright (C) 2021 Nordix Foundation. 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=================================================
-
-SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
-docker stop $(docker ps -aq)
-docker system prune -f
-
-cd ${SHELL_FOLDER}/../config
-cp application_configuration.json.sdnc application_configuration.json
-
-cd ${SHELL_FOLDER}/../
-docker-compose -f docker-compose.yml -f sdnc/docker-compose.yml up -d
-
-checkStatus(){
-    for i in {1..20}; do
-        res=$($1)
-        echo "$res"
-        expect=$2
-        if [ "$res" == "$expect" ]; then
-            echo -e "$3 is alive!\n"
-            break;
-        else
-            sleep $i
-        fi
-    done
-}
-# Healthcheck docker containers
-
-# check SIM1 status
-echo "check SIM1 status:"
-checkStatus "curl -skw %{http_code} http://localhost:30001/" "OK200" "SIM1"
-
-# check SIM2 status
-echo "check SIM2 status:"
-checkStatus "curl -skw %{http_code} http://localhost:30003/" "OK200" "SIM2"
-
-# check SIM3 status
-echo "check SIM3 status:"
-checkStatus "curl -skw %{http_code} http://localhost:30005/" "OK200" "SIM3"
-
-# check PMS status
-echo "check PMS status:"
-checkStatus "curl -skw %{http_code} http://localhost:8081/status" "hunky dory200" "PMS"
-
-# check SDNC status
-echo "check SDNC status:"
-checkStatus "curl -s -o /dev/null -I -w %{http_code} http://localhost:8282/apidoc/explorer/" "200" "SDNC"
-
-cd ${SHELL_FOLDER}/../data
-./preparePmsData.sh
-
diff --git a/plans/ccsdk-oran/polmansuite/testplan.txt b/plans/ccsdk-oran/polmansuite/testplan.txt
deleted file mode 100644 (file)
index 29191bd..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-#  ============LICENSE_START===============================================
-#  Copyright (C) 2020 Nordix Foundation. 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=================================================
-
-
-# Test suites are relative paths under [integration/csit.git]/tests/.
-# Place the suites in run order.
-# Temporary change to trigger verify job.
-ccsdk-oran/polmansuite
-
index f04b230..e85c0ee 100644 (file)
@@ -58,8 +58,5 @@ cp -r ../ftpes-sftp-server/tls .
 cd ../ftpes-sftp-server
 docker build -t ftpes_vsftpd:latest -f Dockerfile-ftpes .
 
-cd ../http-https-server
-docker build -t http_https_httpd:latest -f Dockerfile-http-https .
-
 #All containers will be started and stopped via the robot tests.
 
index 99753df..2934cd5 100755 (executable)
@@ -26,6 +26,39 @@ export DMAAP_TOPIC=AUTO
 export DOCKER_IMAGE_VERSION=2.1-STAGING-latest
 export CCSDK_DOCKER_IMAGE_VERSION=1.1-STAGING-latest
 
+# Set credentials
+export MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-mySecretPassword}
+export MYSQL_USER=${MYSQL_USER:-sdnc}
+export MYSQL_PASSWORD=${MYSQL_PASSWORD:-test123}
+export MYSQL_DATABASE=${MYSQL_DATABASE:-sdncdb}
+export ODL_USER=${ODL_USER:-admin}
+export ODL_PASSWORD=${ODL_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
+export ODL_ADMIN_USER=${ODL_ADMIN_USER:-${ODL_USER}}
+export ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-${ODL_PASSWORD}}
+export DMAAP_USER=${DMAAP_USER:-admin}
+export DMAAP_PASSWORD=${DMAAP_PASSWORD:-admin}
+export DMAAP_AUTHKEY=${DMAAP_AUTHKEY:-""}
+export AAI_TRUSTSTORE_PASSWORD=${AAI_TRUSTSTORE_PASSWORD:-changeit}
+export AAI_CLIENT_NAME=${AAI_CLIENT_NAME:-sdnc@sdnc.onap.org}
+export AAI_CLIENT_PASSWORD=${AAI_CLIENT_PASSWORD:-demo123456!}
+export ANSIBLE_TRUSTSTORE_PASSWORD=${ANSIBLE_TRUSTSTURE_PASSWORD:-changeit}
+export HONEYCOMB_USER=${HONEYCOMB_USER:-admin}
+export HONEYCOMB_PASSWORD=${HONEYCOMB_PASSWORD:-admin}
+export TRUSTSTORE_PASSWORD=${TRUSTSTORE_PASSWORD:-changeit}
+export KEYSTORE_PASSWORD=${KEYSTORE_PASSWORD:-adminadmin}
+export NENG_USER=${NENG_USER:-ccsdkapps}
+export NENG_PASSWORD=${NENG_PASSWORD:-ccsdkapps}
+export SO_USER=${SO_USER:-sdncaBpmn}
+export SO_PASSWORD=${SO_PASSWORD:-password1$}
+export CDS_USER=${CDS_USER:-ccsdkapps}
+export CDS_PASSWORD=${CDS_PASSWORD:-ccsdkapps}
+export ANSIBLE_USER=${ANSIBLE_USER:-sdnc}
+export ANSIBLE_PASSWORD=${ANSIBLE_PASSWORD:-sdnc}
+export SQL_CRYPTKEY=${SQL_CRYPTKEY:-fakECryptKey}
+export ASDC_USER=${ASDC_USER:-sdnc}
+export ASDC_PASSWORD=${ASDC_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
+
+
 export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
 
 if [ "$MTU" == "" ]; then
index 45a0a20..d10b9b1 100644 (file)
@@ -2,7 +2,7 @@ GERRIT_BRANCH=master
 NEXUS_USERNAME=docker
 NEXUS_PASSWD=docker
 SDNC_CONTAINER_NAME=sdnc
-SDNC_IMAGE_TAG=1.8.3-STAGING-latest
+SDNC_IMAGE_TAG=2.1-STAGING-latest
 NEXUS_DOCKER_REPO=nexus3.onap.org:10001
 CLIENT_CONTAINER_NAME=CertServiceClient
 SDNC_CERT_PATH=${SCRIPTS}/sdnc/sdnc/certs
@@ -13,4 +13,36 @@ AAF_CERTSERVICE_SCRIPTS_PATH=${SCRIPTS}/sdnc/certservice/scripts
 TEMP_DIR_PATH=${WORKSPACE}/tests/sdnc/sdnc_netconf_tls_post_deploy/tmp
 NETCONF_CONFIG_PATH=${SCRIPTS}/sdnc/netconf-pnp-simulator/netconf-config
 AAF_INITIAL_CERTS=${WORKSPACE}/plans/sdnc/sdnc_netconf_tls_post_deploy/certs
-AAF_CERTSERVICE_CONFIG_PATH=${SCRIPTS}/sdnc/certservice/config/cmpServers.json
\ No newline at end of file
+AAF_CERTSERVICE_CONFIG_PATH=${SCRIPTS}/sdnc/certservice/config/cmpServers.json
+
+# Set vars with default credentials
+export MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-mySecretPassword}
+export MYSQL_USER=${MYSQL_USER:-sdnc}
+export MYSQL_PASSWORD=${MYSQL_PASSWORD:-test123}
+export MYSQL_DATABASE=${MYSQL_DATABASE:-sdncdb}
+export ODL_USER=${ODL_USER:-admin}
+export ODL_PASSWORD=${ODL_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
+export ODL_ADMIN_USER=${ODL_ADMIN_USER:-${ODL_USER}}
+export ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-${ODL_PASSWORD}}
+export DMAAP_USER=${DMAAP_USER:-admin}
+export DMAAP_PASSWORD=${DMAAP_PASSWORD:-admin}
+export DMAAP_AUTHKEY=${DMAAP_AUTHKEY:-""}
+export AAI_TRUSTSTORE_PASSWORD=${AAI_TRUSTSTORE_PASSWORD:-changeit}
+export AAI_CLIENT_NAME=${AAI_CLIENT_NAME:-sdnc@sdnc.onap.org}
+export AAI_CLIENT_PASSWORD=${AAI_CLIENT_PASSWORD:-demo123456!}
+export ANSIBLE_TRUSTSTORE_PASSWORD=${ANSIBLE_TRUSTSTURE_PASSWORD:-changeit}
+export HONEYCOMB_USER=${HONEYCOMB_USER:-admin}
+export HONEYCOMB_PASSWORD=${HONEYCOMB_PASSWORD:-admin}
+export TRUSTSTORE_PASSWORD=${TRUSTSTORE_PASSWORD:-changeit}
+export KEYSTORE_PASSWORD=${KEYSTORE_PASSWORD:-adminadmin}
+export NENG_USER=${NENG_USER:-ccsdkapps}
+export NENG_PASSWORD=${NENG_PASSWORD:-ccsdkapps}
+export SO_USER=${SO_USER:-sdncaBpmn}
+export SO_PASSWORD=${SO_PASSWORD:-password1$}
+export CDS_USER=${CDS_USER:-ccsdkapps}
+export CDS_PASSWORD=${CDS_PASSWORD:-ccsdkapps}
+export ANSIBLE_USER=${ANSIBLE_USER:-sdnc}
+export ANSIBLE_PASSWORD=${ANSIBLE_PASSWORD:-sdnc}
+export SQL_CRYPTKEY=${SQL_CRYPTKEY:-fakECryptKey}
+export ASDC_USER=${ASDC_USER:-sdnc}
+export ASDC_PASSWORD=${ASDC_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
index a2020ae..6f4e547 100644 (file)
@@ -2,6 +2,7 @@
 #
 # ============LICENSE_START=======================================================
 #   Copyright (C) 2020 Nordix Foundation.
+#   Modification copyright (C) 2021 Samsung Electronics, Co., Ltd.
 # ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -29,9 +30,6 @@ chmod +x "${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/libraries/config
 # Export temp directory
 export TEMP_DIR_PATH=${TEMP_DIR_PATH}
 
-# Create temp directory to bind with docker containers
-mkdir -m 755 -p "${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/certs
-mkdir -m 755 -p "${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/cert-data
 
 export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
 
@@ -59,55 +57,57 @@ pip install pyjks
 # Disable Proxy - for local run
 unset http_proxy https_proxy
 
-# Export AAF Certservice config path
-export AAF_INITIAL_CERTS
-export EJBCA_CERTPROFILE_PATH
-export AAF_CERTSERVICE_CONFIG_PATH
-export AAF_CERTSERVICE_SCRIPTS_PATH
-export CERT_PROFILE=${EJBCA_CERTPROFILE_PATH}
-export SCRIPTS_PATH=${AAF_CERTSERVICE_SCRIPTS_PATH}
-export CONFIGURATION_PATH=${AAF_CERTSERVICE_CONFIG_PATH}
-
-# Generate Keystores, Truststores, Certificates and Keys
-make all -C ./certs/
-
-cp "${WORKSPACE}"/plans/sdnc/sdnc_netconf_tls_post_deploy/certs/root.crt "${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/certs/root.crt
-openssl pkcs12 -in "${WORKSPACE}"/plans/sdnc/sdnc_netconf_tls_post_deploy/certs/certServiceServer-keystore.p12 -clcerts -nokeys -password pass:secret | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' >"${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/certs/certServiceServer.crt
-openssl pkcs12 -in "${WORKSPACE}"/plans/sdnc/sdnc_netconf_tls_post_deploy/certs/certServiceServer-keystore.p12 -nocerts -nodes -password pass:secret | sed -ne '/-BEGIN PRIVATE KEY-/,/-END PRIVATE KEY-/p' >"${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/certs/certServiceServer.key
-
-echo "Generated KeyStores, Server Certificate and Key"
-
-# Start EJBCA, AAF-CertService Containers with docker-compose and configuration from docker-compose.yml
-docker-compose -f "${SCRIPTS}"/sdnc/certservice/docker-compose.yml up -d
-
-# Check if AAF-Certservice Service is healthy and ready
-AAFCERT_IP='none'
-for i in {1..9}; do
-  AAFCERT_IP=$(get-instance-ip.sh aaf-cert-service)
-  RESP_CODE=$(curl -s https://localhost:8443/actuator/health --cacert ./certs/root.crt --cert-type p12 --cert ./certs/certServiceServer-keystore.p12 --pass secret |
-    python2 -c 'import json,sys;obj=json.load(sys.stdin);print obj["status"]')
-  if [[ "${RESP_CODE}" == "UP" ]]; then
-    echo "AAF Cert Service is Ready."
-    export AAFCERT_IP=${AAFCERT_IP}
-    docker exec aafcert-ejbca /opt/primekey/scripts/ejbca-configuration.sh
-    break
-  fi
-  echo "Waiting for AAF Cert Service to Start Up..."
-  sleep 2m
-done
+###################### Netconf Simulator Setup ######################
 
-if [[ "${AAFCERT_IP}" == "none" || "${AAFCERT_IP}" == '' ||  "${RESP_CODE}" != "UP" ]]; then
-  echo "AAF CertService not started Could cause problems for testing activities...!"
+# Get integration/simulators
+if [ -d ${SCRIPTS}/sdnc/pnf-simulator ]
+then
+    rm -rf ${SCRIPTS}/sdnc/pnf-simulator
 fi
+mkdir ${SCRIPTS}/sdnc/pnf-simulator
+git clone "https://gerrit.onap.org/r/integration/simulators/pnf-simulator" ${SCRIPTS}/sdnc/pnf-simulator
+
+# Fix docker-compose to add nexus repo for onap dockers 
+mv ${SCRIPTS}/sdnc/pnf-simulator/netconfsimulator/docker-compose.yml ${SCRIPTS}/sdnc/pnf-simulator/netconfsimulator/docker-compose.yml.orig
+cat ${SCRIPTS}/sdnc/pnf-simulator/netconfsimulator/docker-compose.yml.orig | sed -e "s/image: onap/image: nexus3.onap.org:10001\/onap/" > ${SCRIPTS}/sdnc/pnf-simulator/netconfsimulator/docker-compose.yml
+
+# Remove carriage returns (if any) from netopeer start script
+mv ${SCRIPTS}/sdnc/pnf-simulator/netconfsimulator/netconf/initialize_netopeer.sh ${SCRIPTS}/sdnc/pnf-simulator/netconfsimulator/netconf/initialize_netopeer.sh.orig
+cat ${SCRIPTS}/sdnc/pnf-simulator/netconfsimulator/netconf/initialize_netopeer.sh.orig | sed -e "s/\r$//g" > ${SCRIPTS}/sdnc/pnf-simulator/netconfsimulator/netconf/initialize_netopeer.sh
+chmod 755 ${SCRIPTS}/sdnc/pnf-simulator/netconfsimulator/netconf/initialize_netopeer.sh
+
+
+# Start Netconf Simulator Container with docker-compose and configuration from docker-compose.yml
+docker-compose -f "${SCRIPTS}"/sdnc/pnf-simulator/netconfsimulator/docker-compose.yml up -d
+
+# Add test user in netopeer container
+sleep 60
+docker exec netconfsimulator_netopeer_1 useradd --system test
+
 
 ############################## SDNC Setup ##############################
 
+# Copy client certs from netconf simulator to SDNC certs directory
+mkdir /tmp/keys0
+cp ${SCRIPTS}/sdnc/pnf-simulator/netconfsimulator/tls/client.crt /tmp/keys0
+cp ${SCRIPTS}/sdnc/pnf-simulator/netconfsimulator/tls/client.key /tmp/keys0
+cp ${SCRIPTS}/sdnc/pnf-simulator/netconfsimulator/tls/ca.crt /tmp/keys0/trustedCertificates.crt
+cwd=$(pwd)
+cd /tmp
+zip -r $SDNC_CERT_PATH/keys0.zip keys0
+rm -rf /tmp/keys0
+
 # Export Mariadb, SDNC tmp, cert directory path
 export SDNC_CERT_PATH=${SDNC_CERT_PATH}
 
 docker pull "${NEXUS_DOCKER_REPO}"/onap/sdnc-image:"${SDNC_IMAGE_TAG}"
 docker tag "${NEXUS_DOCKER_REPO}"/onap/sdnc-image:"${SDNC_IMAGE_TAG}" onap/sdnc-image:latest
 
+# Fix permissions on certs directory to guarantee directory is read/
+# writable and that files are readable
+chmod ugo+rwx ${SCRIPTS}/sdnc/sdnc/certs
+chmod ugo+r ${SCRIPTS}/sdnc/sdnc/certs/*
+
 # Start Mariadb, SDNC Containers with docker-compose and configuration from docker-compose.yml
 docker-compose -f "${SCRIPTS}"/sdnc/sdnc/docker-compose.yml up -d
 
@@ -120,47 +120,65 @@ for i in {1..10}; do
     break
   fi
   echo "Waiting for SDNC Service to Start Up..."
-  sleep 2m
+  sleep 30s
 done
 
 if [[ "${SDNC_IP}" == 'none' || "${SDNC_IP}" == '' || "${RESP_CODE}" != '200' ]]; then
-  echo "SDNC Service not started Could cause problems for testing activities...!"
+  echo "SDNC Service not started, setup failed"
+  exit 1
 fi
 
 # Check if SDNC-ODL Karaf Session started
-for i in {1..15}; do
-  EXEC_RESP=$(docker exec -it sdnc /opt/opendaylight/current/bin/client system:start-level)
-  if grep -q 'Level 100' <<<"${EXEC_RESP}"; then
-    echo "SDNC-ODL Karaf Session Started."
-    break
+TIME_OUT=300
+INTERVAL=10
+TIME=0
+while [ "$TIME" -lt "$TIME_OUT" ]; do
+
+  docker exec sdnc cat /opt/opendaylight/data/log/karaf.log | grep 'warp coils'
+
+  if [ $? == 0 ] ; then
+    echo SDNC karaf started in $TIME seconds
+    break;
   fi
-  echo "Waiting for SDNC-ODL Karaf Session to Start Up..."
-  sleep 2m
+
+  echo Sleep: $INTERVAL seconds before testing if SDNC is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds
+  sleep $INTERVAL
+  TIME=$(($TIME+$INTERVAL))
 done
 
-if ! grep -q 'Level 100' <<<"${EXEC_RESP}"; then
-  echo "SDNC-ODL Karaf Session not Started, Could cause problems for testing activities...!"
+if [ "$TIME" -ge "$TIME_OUT" ]; then
+   echo TIME OUT: karaf session not started in $TIME_OUT seconds, setup failed
+   exit 1;
 fi
 
-echo "Sleeping 5 minutes"
-sleep 5m
+# Check if certificate installation is done
+TIME_OUT=300
+INTERVAL=10
+TIME=0
+while [ "$TIME" -lt "$TIME_OUT" ]; do
 
-###################### Netconf-PNP-Simulator Setup ######################
+  docker-compose -f "${SCRIPTS}"/sdnc/sdnc/docker-compose.yml logs sdnc | grep 'Everything OK in Certificate Installation'
 
-# Export netconf-pnp simulator conf path
-export NETCONF_CONFIG_PATH=${NETCONF_CONFIG_PATH}
+  if [ $? == 0 ] ; then
+    echo SDNC karaf started in $TIME seconds
+    break;
+  fi
 
-# Start Netconf-Pnp-Simulator Container with docker-compose and configuration from docker-compose.yml
-docker-compose -f "${SCRIPTS}"/sdnc/netconf-pnp-simulator/docker-compose.yml up -d
+  echo Sleep: $INTERVAL seconds before testing if SDNC is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds
+  sleep $INTERVAL
+  TIME=$(($TIME+$INTERVAL))
+done
+
+if [ "$TIME" -ge "$TIME_OUT" ]; then
+   echo TIME OUT: karaf session not started in $TIME_OUT seconds, setup failed
+   exit 1;
+fi
 
 # Update default Networking bridge IP in mount.json file
 sed -i "s/pnfaddr/${LOCAL_IP}/g" "${REQUEST_DATA_PATH}"/mount.xml
 
 #########################################################################
 
-echo "Sleeping additional for 3 minutes to give application time to finish"
-sleep 3m
-
 # Export SDNC, AAF-Certservice-Cient, Netconf-Pnp-Simulator Continer Names
 export REQUEST_DATA_PATH="${REQUEST_DATA_PATH}"
 export SDNC_CONTAINER_NAME="${SDNC_CONTAINER_NAME}"
index b780ed4..bbf4d07 100644 (file)
 # limitations under the License.
 #
 
-docker-compose -f "${SCRIPTS}"/sdnc/certservice/docker-compose.yml down -v
+
 docker-compose -f "${SCRIPTS}"/sdnc/sdnc/docker-compose.yml down -v
-docker-compose -f "${SCRIPTS}"/sdnc/netconf-pnp-simulator/docker-compose.yml down -v
+docker-compose -f "${SCRIPTS}"/sdnc/pnf-simulator/netconfsimulator/docker-compose.yml down -v
 
-make clear -C "${WORKSPACE}"/plans/sdnc/sdnc_netconf_tls_post_deploy/certs
 
-rm -rf "${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/certs
-rm -rf "${WORKSPACE}"/tests/sdnc/sdnc_netconf_tls_post_deploy/cert-data
\ No newline at end of file
index deb0342..b806210 100644 (file)
@@ -222,7 +222,7 @@ create table ACT_RU_VARIABLE (
     BYTEARRAY_ID_ varchar(64),
     DOUBLE_ double,
     LONG_ bigint,
-    TEXT_ varchar(4000),
+    TEXT_ varchar(10000),
     TEXT2_ varchar(4000),
     VAR_SCOPE_ varchar(64) not null,
     SEQUENCE_COUNTER_ bigint,
@@ -862,7 +862,7 @@ create table ACT_HI_VARINST (
     BYTEARRAY_ID_ varchar(64),
     DOUBLE_ double,
     LONG_ bigint,
-    TEXT_ varchar(4000),
+    TEXT_ varchar(10000),
     TEXT2_ varchar(4000),
     TENANT_ID_ varchar(64),
     STATE_ varchar(20),
@@ -892,7 +892,7 @@ create table ACT_HI_DETAIL (
     BYTEARRAY_ID_ varchar(64),
     DOUBLE_ double,
     LONG_ bigint,
-    TEXT_ varchar(4000),
+    TEXT_ varchar(10000),
     TEXT2_ varchar(4000),
     SEQUENCE_COUNTER_ bigint,
     TENANT_ID_ varchar(64),
@@ -1302,7 +1302,7 @@ create table ACT_HI_DEC_IN (
     BYTEARRAY_ID_ varchar(64),
     DOUBLE_ double,
     LONG_ bigint,
-    TEXT_ varchar(4000),
+    TEXT_ varchar(10000),
     TEXT2_ varchar(4000),
     TENANT_ID_ varchar(64),
     CREATE_TIME_ datetime(3),
@@ -1324,7 +1324,7 @@ create table ACT_HI_DEC_OUT (
     BYTEARRAY_ID_ varchar(64),
     DOUBLE_ double,
     LONG_ bigint,
-    TEXT_ varchar(4000),
+    TEXT_ varchar(10000),
     TEXT2_ varchar(4000),
     TENANT_ID_ varchar(64),
     CREATE_TIME_ datetime(3),
diff --git a/plans/so/integration-etsi-testing/config/distribution-test-zip/macro_zipped_sdc_csar.tar.gz b/plans/so/integration-etsi-testing/config/distribution-test-zip/macro_zipped_sdc_csar.tar.gz
new file mode 100755 (executable)
index 0000000..f826c2e
Binary files /dev/null and b/plans/so/integration-etsi-testing/config/distribution-test-zip/macro_zipped_sdc_csar.tar.gz differ
index e5290a9..1b6a88f 100644 (file)
@@ -5,6 +5,7 @@ TIME_OUT_DEFAULT_VALUE_SEC=1200
 PROJECT_NAME=etsiintegrationtesting
 DEFAULT_NETWORK_NAME=etsiintegrationtesting_default
 ETSI_CATALOG_IMAGE_VERSION=1.0.9
-SOL_003_ADAPTER_IMAGE_VERSION=1.8.0-STAGING-latest
-ETSI_NFVO_NS_LCM_IMAGE_VERSION=1.8.0-STAGING-latest
+SOL_003_ADAPTER_IMAGE_VERSION=1.8.1
+ETSI_NFVO_NS_LCM_IMAGE_VERSION=1.8.1
+SO_ADMIN_COCKPIT_IMAGE_VERSION=1.8.1
 MARIADB_VERSION=10.5.8
index 87e3066..df831c0 100644 (file)
@@ -358,7 +358,7 @@ spring:
 so:
   vnfm:
     adapter:
-      url: http://so-vnfm-adapter.onap:9092/so/vnfm-adapter/v1/
+      url: http://so-etsi-sol003-adapter.onap:9092/so/vnfm-adapter/v1/
       auth: Basic dm5mbTpwYXNzd29yZDEk
 org:
   onap:
diff --git a/plans/so/integration-etsi-testing/config/override-files/openstack-adapter/onapheat/override.yaml b/plans/so/integration-etsi-testing/config/override-files/openstack-adapter/onapheat/override.yaml
new file mode 100644 (file)
index 0000000..7e2afa8
--- /dev/null
@@ -0,0 +1,147 @@
+server:
+  port: 8087
+
+spring:
+  datasource:
+    hikari:
+      jdbcUrl: jdbc:mariadb://mariadb:3306/catalogdb
+      username: cataloguser
+      password: catalog123
+      driver-class-name: org.mariadb.jdbc.Driver
+      pool-name: catdb-pool
+      registerMbeans: false
+
+  security:
+    usercredentials:
+    -
+      username: sdnc
+      password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
+      role: SDNC-Client
+    -
+      username: sitecontrol
+      password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
+      role: SiteControl-Client
+    -
+      username: bpel
+      password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
+      role: BPEL-Client
+    -
+      username: sniro
+      password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
+      role: SNIRO-Client
+    -
+      username: apih
+      password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
+      role: MSO-Client
+    -
+      username: mso_admin
+      password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
+      role: ACTUATOR
+
+
+org:
+  onap:
+    so:
+      adapters:
+        default_keystone_url_version: /v2.0
+        default_keystone_reg_ex: "/[vV][0-9]"
+        vnf:
+          bpelauth: D1A67FA93B6A6419132D0F83CC771AF774FD3C60853C50C22C8C6FC5088CC79E9E81EDE9EA39F22B2F66A0068E
+          checkRequiredParameters: true
+          addGetFilesOnVolumeReq: false
+          sockettimeout: 30
+          connecttimeout: 30
+          retrycount: 5
+          retryinterval: -15
+          retrylist: 408,429,500,502,503,504,900
+          valet_enabled: false
+          fail_requests_on_valet_failure: false
+        network:
+          bpelauth: D1A67FA93B6A6419132D0F83CC771AF774FD3C60853C50C22C8C6FC5088CC79E9E81EDE9EA39F22B2F66A0068E
+          sockettimeout: 5
+          connecttimeout: 5
+          retrycount: 5
+          retryinterval: -15
+          retrylist: 408,429,500,502,503,504,900
+          encryptionKey: 07a7159d3bf51a0e53be7a8f89699be7
+        tenant:
+          default_keystone_url_version: /v2.0
+          default_keystone_reg_ex: "/[vV][0-9]"
+          default_tenant_description: Tenant
+          default_region_type: single
+          default_user_role: admin
+          default_success_status_string: Success
+          default_no_regions_status_string: no regions
+          default_quota_value: 10
+          set_default_quota: false
+
+ecomp:
+  mso:
+    adapters:
+      po:
+        retryCodes: 504
+        retryDelay: 5
+        retryCount: 3
+        pollTimeout: 7500
+        pollInterval: 15
+
+mso:
+  adapters:
+    requestDb:
+      endpoint: http://so-request-db-adapter.onap:8083
+      auth: Basic YnBlbDpwYXNzd29yZDEk
+  auth: BEA8637716A7EB617DF472BA6552D22F68C1CB17B0D094D77DDA562F4ADAAC4457CAB848E1A4
+  msoKey: 07a7159d3bf51a0e53be7a8f89699be7
+  logPath: ./logs/openstack
+  msb-ip: multicloud-simulator
+  msb-port: 9996
+  msb-scheme: http
+  workflow:
+    endpoint: http://bpmn-infra:8081/sobpmnengine
+  config:
+    cadi:
+      aafId: poBpmn
+  catalog:
+    db:
+      spring:
+        endpoint: http://catalog-db-adapter:8082
+  db:
+    auth: Basic YnBlbDpwYXNzd29yZDEk
+  site-name: localDevEnv
+  async:
+    core-pool-size: 50
+    max-pool-size: 50
+    queue-capacity: 500
+
+cloud_config:
+  identity_services:
+    RAX_KEYSTONE:
+      identity_url: "https://identity.api.rackspacecloud.com/v2.0"
+      mso_id: "RACKSPACE_ACCOUNT_ID"
+      mso_pass: "RACKSPACE_ACCOUNT_APIKEY"
+      admin_tenant: "service"
+      member_role: "admin"
+      tenant_metadata: true
+      identity_server_type: "KEYSTONE"
+      identity_authentication_type: "RACKSPACE_APIKEY"
+  cloud_sites:
+    Dallas:
+      region_id: "DFW"
+      clli: "DFW"
+      aic_version: "2.5"
+      identity_service_id: "RAX_KEYSTONE"
+    Northern Virginia:
+      region_id: "IAD"
+      clli: "IAD"
+      aic_version: "2.5"
+      identity_service_id: "RAX_KEYSTONE"
+    Chicago:
+      region_id: "ORD"
+      clli: "ORD"
+      aic_version: "2.5"
+      identity_service_id: "RAX_KEYSTONE"
+    DEFAULT:
+      region_id: "DFW"
+      clli: "DFW"
+      aic_version: "2.5"
+      identity_service_id: "RAX_KEYSTONE"
index bb35d1f..8b1a72c 100644 (file)
@@ -33,7 +33,7 @@ mso:
 so:
   adapters:
     sol003-adapter:
-      url: http://so-vnfm-adapter:9092/so/vnfm-adapter/v1
+      url: http://so-etsi-sol003-adapter:9092/so/vnfm-adapter/v1
       auth: Basic dm5mbTpwYXNzd29yZDEk
 etsi-catalog-manager:
   base:
index 38c2f6d..ee93902 100644 (file)
@@ -28,7 +28,7 @@ sdc:
   endpoint: http://sdc-simulator:9991/
   toscametapath: Artifacts/Deployment/OTHER/TOSCA.meta
 vnfmadapter:
-  endpoint: http://so-vnfm-adapter.onap:9092
+  endpoint: http://so-etsi-sol003-adapter.onap:9092
 etsi-catalog-manager:
   vnfpkgm:
     endpoint: http://modeling-etsicatalog:8806/api/vnfpkgm/v1
index f92aa15..1f07a03 100644 (file)
@@ -22,11 +22,11 @@ services:
   api-handler-infra:
     image: onap/so/api-handler-infra:${TAG}
 #############################################################################
-  so-monitoring:
-    image: onap/so/so-monitoring:${TAG}
+  so-admin-cockpit:
+    image: onap/so/so-admin-cockpit:${SO_ADMIN_COCKPIT_IMAGE_VERSION}
 ################################################################################
-  so-vnfm-adapter:
-    image: onap/so/vnfm-adapter:${SOL_003_ADAPTER_IMAGE_VERSION}
+  so-etsi-sol003-adapter:
+    image: onap/so/so-etsi-sol003-adapter:${SOL_003_ADAPTER_IMAGE_VERSION}
 ################################################################################
   modeling-etsicatalog:
     image: ${NEXUS_DOCKER_REPO_MSO}/onap/modeling/etsicatalog:${ETSI_CATALOG_IMAGE_VERSION}
index f7b56c0..0c4d03f 100644 (file)
@@ -108,6 +108,36 @@ services:
         max-file: "5"
     user: root
     entrypoint: /bin/sh -c '/app/wait-for.sh -q -t "300" request-db-adapter:8083 -- "/app/start-app.sh"'
+################################################################################
+  openstack-adapter:
+    image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/openstack-adapter:1.8.0-STAGING-latest
+    ports:
+      - "8087:8087"
+    volumes:
+      - ${TEST_LAB_DIR}/volumes/so/ca-certificates/onapheat:/app/ca-certificates
+      - ${CONFIG_DIR_PATH}/override-files/openstack-adapter/onapheat:/app/config
+    environment:
+      - APP=openstack-adapter
+      - JVM_ARGS=-Xms64m -Xmx512m
+      - DB_HOST=mariadb
+      - DB_PORT=3306
+      - DB_USERNAME=so_user
+      - DB_PASSWORD=so_User123
+      - DB_ADMIN_USERNAME=so_admin
+      - DB_ADMIN_PASSWORD=so_Admin123
+    hostname:
+      openstack-adapter.so.testlab.onap.org
+    depends_on:
+      - mariadb
+      - catalog-db-adapter
+      - request-db-adapter
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "30m"
+        max-file: "5"
+    user: root
+    entrypoint: /bin/sh -c '/app/wait-for.sh -q -t "300" request-db-adapter:8083 -- "/app/start-app.sh"'
 ################################################################################
   sdc-controller:
     image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/sdc-controller:${TAG}
@@ -115,7 +145,7 @@ services:
       - "8085:8085"
     volumes:
       - ${TEST_LAB_DIR}/volumes/so/ca-certificates/onapheat:/app/ca-certificates
-      - ${CONFIG_DIR_PATH}/distribution-test-zip/zipped_sdc_csar.tar.gz:/distribution-test-zip/zipped_sdc_csar.tar.gz
+      - ${CONFIG_DIR_PATH}/distribution-test-zip:/distribution-test-zip
       - ${CONFIG_DIR_PATH}/override-files/sdc-controller/onapheat:/app/config
     environment:
       - APP=sdc-controller
@@ -138,7 +168,7 @@ services:
         max-size: "30m"
         max-file: "5"
     user: root
-    entrypoint: /bin/sh -c 'mkdir -p /distribution-test-zip/unzipped && tar -xvzf /distribution-test-zip/zipped_sdc_csar.tar.gz -C /distribution-test-zip/unzipped && chmod 777 -R /distribution-test-zip/ && /app/wait-for.sh -q -t "300" request-db-adapter:8083 -- "/app/start-app.sh"'
+    entrypoint: /bin/sh -c 'mkdir -p /distribution-test-zip/unzipped && tar -xvzf /distribution-test-zip/zipped_sdc_csar.tar.gz -C /distribution-test-zip/unzipped && tar -xvzf /distribution-test-zip/macro_zipped_sdc_csar.tar.gz -C /distribution-test-zip/unzipped && chmod 777 -R /distribution-test-zip/ && /app/wait-for.sh -q -t "300" request-db-adapter:8083 -- "/app/start-app.sh"'
 ################################################################################
   bpmn-infra:
     image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/bpmn-infra:${TAG}
@@ -160,7 +190,7 @@ services:
     hostname:
       bpmn-infra.so.testlab.onap.org
     links:
-      - "so-vnfm-adapter:so-vnfm-adapter.onap"
+      - "so-etsi-sol003-adapter:so-etsi-sol003-adapter.onap"
     depends_on:
       - mariadb
       - catalog-db-adapter
@@ -203,24 +233,24 @@ services:
     user: root
     entrypoint: /bin/sh -c '/app/wait-for.sh -q -t "300" request-db-adapter:8083 -- "/app/start-app.sh"'
 #############################################################################
-  so-monitoring:
-    image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/so-monitoring:${TAG}
+  so-admin-cockpit:
+    image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/so-admin-cockpit:${SO_ADMIN_COCKPIT_IMAGE_VERSION}
     ports:
       - "30224:30224"
     volumes:
       - ${CONFIG_DIR_PATH}/override-files/so-monitoring/onapheat:/app/config
     environment:
-      - APP=so-monitoring
+      - APP=so-admin-cockpit
       - JVM_ARGS=-Xms64m -Xmx512m
     hostname:
-      so-monitoring.so.testlab.onap.org
+      so-admin-cockpit.so.testlab.onap.org
     depends_on:
       - mariadb
       - catalog-db-adapter
       - request-db-adapter
 ################################################################################
-  so-vnfm-adapter:
-    image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/vnfm-adapter:${SOL_003_ADAPTER_IMAGE_VERSION}
+  so-etsi-sol003-adapter:
+    image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/so-etsi-sol003-adapter:${SOL_003_ADAPTER_IMAGE_VERSION}
     ports:
       - "9092:9092"
     volumes:
@@ -228,10 +258,10 @@ services:
       - ${CONFIG_DIR_PATH}/certificates/so-vnfm-adapter-certs:/app/so-vnfm-adapter-certs
       - ${CONFIG_DIR_PATH}/certificates/truststore/root-ca.crt:/app/ca-certificates/root-ca.crt
     environment:
-    - APP=so-vnfm-adapter
+    - APP=so-etsi-sol003-adapter
     - JVM_ARGS=-Xms64m -Xmx512m
     hostname:
-      so-vnfm-adapter
+      so-etsi-sol003-adapter
     depends_on:
       - request-db-adapter
     logging:
@@ -253,7 +283,7 @@ services:
       sdc-simulator
     depends_on:
       - mariadb
-      - so-vnfm-adapter
+      - so-etsi-sol003-adapter
     logging:
       driver: "json-file"
       options:
@@ -271,7 +301,7 @@ services:
       aai-simulator
     depends_on:
       - mariadb
-      - so-vnfm-adapter
+      - so-etsi-sol003-adapter
     logging:
       driver: "json-file"
       options:
@@ -291,10 +321,10 @@ services:
     hostname:
       so-vnfm-simulator
     links:
-      - "so-vnfm-adapter:so-vnfm-adapter.onap"
+      - "so-etsi-sol003-adapter:so-etsi-sol003-adapter.onap"
     depends_on:
       - mariadb
-      - so-vnfm-adapter
+      - so-etsi-sol003-adapter
     logging:
       driver: "json-file"
       options:
@@ -314,7 +344,7 @@ services:
       - CATALOG_DB=catalogdb
     depends_on:
       - mariadb
-      - so-vnfm-adapter
+      - so-etsi-sol003-adapter
     command:
       - "/config/apply-workarounds.sh"
 #################################################################################
@@ -329,7 +359,25 @@ services:
       sdnc-simulator
     depends_on:
       - mariadb
-      - so-vnfm-adapter
+      - so-etsi-sol003-adapter
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "30m"
+        max-file: "5"
+#################################################################################
+  multicloud-simulator:
+    image: simulators/multicloud-simulator:latest
+    ports:
+    - "9996:9996"
+    environment:
+    - APP=MULTICLOUD-SIMULATOR
+    - JVM_ARGS=-Xms64m -Xmx512m
+    hostname:
+      multicloud-simulator
+    depends_on:
+    - mariadb
+    - so-etsi-sol003-adapter
     logging:
       driver: "json-file"
       options:
@@ -366,7 +414,7 @@ services:
     hostname:
       modeling-etsicatalog
     links:
-      - "so-vnfm-adapter:so-vnfm-adapter.onap"
+      - "so-etsi-sol003-adapter:so-etsi-sol003-adapter.onap"
     depends_on:
       - mariadb
       - sdc-simulator
@@ -401,6 +449,6 @@ services:
       - aai-simulator
       - sdc-simulator
       - modeling-etsicatalog
-      - so-vnfm-adapter
+      - so-etsi-sol003-adapter
     user: root
     entrypoint: /bin/sh -c '/app/wait-for.sh -q -t "300" mariadb:3306 -- "/app/start-app.sh"'
index 43fe47d..27a0e79 100644 (file)
@@ -22,6 +22,7 @@ package org.onap.so.aaisimulator.controller;
 import static org.onap.so.aaisimulator.utils.Constants.APPLICATION_MERGE_PATCH_JSON;
 import static org.onap.so.aaisimulator.utils.Constants.BI_DIRECTIONAL_RELATIONSHIP_LIST_URL;
 import static org.onap.so.aaisimulator.utils.Constants.GENERIC_VNF;
+import static org.onap.so.aaisimulator.utils.Constants.VF_MODULE;
 import static org.onap.so.aaisimulator.utils.Constants.GENERIC_VNFS_URL;
 import static org.onap.so.aaisimulator.utils.Constants.RELATIONSHIP_LIST_RELATIONSHIP_URL;
 import static org.onap.so.aaisimulator.utils.Constants.X_HTTP_METHOD_OVERRIDE;
@@ -35,6 +36,8 @@ import javax.ws.rs.core.MediaType;
 import org.onap.aai.domain.yang.GenericVnf;
 import org.onap.aai.domain.yang.GenericVnfs;
 import org.onap.aai.domain.yang.Relationship;
+import org.onap.aai.domain.yang.VfModule;
+import org.onap.aai.domain.yang.VfModules;
 import org.onap.so.aaisimulator.service.providers.GenericVnfCacheServiceProvider;
 import org.onap.so.aaisimulator.utils.HttpServiceUtils;
 import org.onap.so.aaisimulator.utils.RequestErrorResponseUtils;
@@ -47,6 +50,7 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PatchMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
@@ -211,5 +215,66 @@ public class GenericVnfsController {
         return getRequestErrorResponseEntity(request, GENERIC_VNF);
 
     }
+    
+    
+    @GetMapping(value = "/generic-vnf/{vnf-id}/vf-modules/vf-module/{vf-module-id}", produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
+    public ResponseEntity<?> getVfModule(@PathVariable("vnf-id") final String vnfId, @PathVariable("vf-module-id") final String vfModuleId,
+            @RequestParam(name = "depth", required = false) final Integer depth,
+            @RequestParam(name = "resultIndex", required = false) final Integer resultIndex,
+            @RequestParam(name = "resultSize", required = false) final Integer resultSize,
+            @RequestParam(name = "format", required = false) final String format, final HttpServletRequest request) {
+        LOGGER.info(
+                "Will get VfModule for 'vf-module-id': {} with depth: {}, resultIndex: {}, resultSize:{}, format: {} ...",
+                vnfId, vfModuleId, depth, resultIndex, resultSize, format);
+
+        final Optional<VfModule> optional = cacheServiceProvider.getVfModule(vnfId, vfModuleId);
+
+        if (optional.isPresent()) {
+            final VfModule vfModule = optional.get();
+            LOGGER.info("found VfModule {} in cache", vfModule);
+            return ResponseEntity.ok(vfModule);
+        }
+
+        LOGGER.error(
+                "Unable to find VfModule in cache for 'vf-module-id': {} with depth: {}, resultIndex: {}, resultSize:{}, format:{} ...",
+                vnfId, vfModuleId, depth, resultIndex, resultSize, format);
+        return getRequestErrorResponseEntity(request, VF_MODULE);
+
+    }
+    
+    
+    
+    @PutMapping(value = "/generic-vnf/{vnf-id}/vf-modules/vf-module/{vf-module-id}", consumes = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML},
+            produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
+    public ResponseEntity<?> putVfModule(@RequestBody final VfModule vfModule,
+            @PathVariable("vnf-id") final String vnfId, @PathVariable("vf-module-id") final String vfModuleId, final HttpServletRequest request) {
+        LOGGER.info("Will add VfModule to cache with 'vf-module-id': {} ...", vfModuleId);
+
+        cacheServiceProvider.putVfModule(vnfId, vfModuleId, vfModule);
+        return ResponseEntity.accepted().build();
+    }
+    
+    @PostMapping(value = "/generic-vnf/{vnf-id}/vf-modules/vf-module/{vf-module-id}",
+            consumes = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, APPLICATION_MERGE_PATCH_JSON},
+            produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
+    public ResponseEntity<?> patchVfModule(@RequestBody final VfModule vfModule,
+            @PathVariable("vnf-id") final String vnfId, @PathVariable("vf-module-id") final String vfModuleId,
+            @RequestHeader(value = X_HTTP_METHOD_OVERRIDE, required = false) final String xHttpHeaderOverride,
+            final HttpServletRequest request) {
+
+        LOGGER.info("Will post VfModule to cache with 'vf-module-id': {} and '{}': {} ...", vfModuleId, X_HTTP_METHOD_OVERRIDE,
+                xHttpHeaderOverride);
+        
+        if (HttpMethod.PATCH.toString().equalsIgnoreCase(xHttpHeaderOverride)) {
+            if (cacheServiceProvider.patchVfModule(vnfId, vfModuleId, vfModule)) {
+                return ResponseEntity.accepted().build();
+            }
+            LOGGER.error("Unable to apply patch to VmModule using 'vf-module-id': {} ... ", vfModule);
+            return getRequestErrorResponseEntity(request, VF_MODULE);
+        }
+        LOGGER.error("{} not supported ... ", xHttpHeaderOverride);
+
+        return getRequestErrorResponseEntity(request, VF_MODULE);
+    }
 
 }
index 901c259..0ee2d00 100644 (file)
@@ -23,6 +23,9 @@ import java.util.List;
 import java.util.Optional;
 import org.onap.aai.domain.yang.GenericVnf;
 import org.onap.aai.domain.yang.Relationship;
+import org.onap.aai.domain.yang.VfModule;
+import org.onap.aai.domain.yang.VfModules;
+import org.onap.aai.domain.yang.v10.VolumeGroup;
 import org.springframework.http.HttpHeaders;
 
 /**
@@ -49,5 +52,9 @@ public interface GenericVnfCacheServiceProvider extends Clearable {
 
     boolean deleteGenericVnf(final String vnfId, final String resourceVersion);
 
+       void putVfModule(String vnfId, String vfModuleId, VfModule vfModule);
 
+       Optional<VfModule> getVfModule(final String vnfId, final String vfModuleId);
+
+       boolean patchVfModule(String vnfId, String vfModuleId, VfModule vfModule);
 }
index e7a4210..5a0423b 100644 (file)
@@ -24,6 +24,7 @@ import static org.onap.so.aaisimulator.utils.Constants.COMPOSED_OF;
 import static org.onap.so.aaisimulator.utils.Constants.GENERIC_VNF;
 import static org.onap.so.aaisimulator.utils.Constants.GENERIC_VNF_VNF_ID;
 import static org.onap.so.aaisimulator.utils.Constants.GENERIC_VNF_VNF_NAME;
+import static org.onap.so.aaisimulator.utils.Constants.X_HTTP_METHOD_OVERRIDE;
 import static org.onap.so.aaisimulator.utils.HttpServiceUtils.getBiDirectionalRelationShipListRelatedLink;
 import static org.onap.so.aaisimulator.utils.HttpServiceUtils.getRelationShipListRelatedLink;
 import static org.onap.so.aaisimulator.utils.HttpServiceUtils.getTargetUrl;
@@ -37,6 +38,10 @@ import org.onap.aai.domain.yang.RelatedToProperty;
 import org.onap.aai.domain.yang.Relationship;
 import org.onap.aai.domain.yang.RelationshipData;
 import org.onap.aai.domain.yang.RelationshipList;
+import org.onap.aai.domain.yang.VfModule;
+import org.onap.aai.domain.yang.v10.VfModules;
+import org.onap.aai.domain.yang.VolumeGroup;
+import org.onap.aai.domain.yang.v10.VolumeGroups;
 import org.onap.so.aaisimulator.utils.ShallowBeanCopy;
 import org.onap.so.simulator.cache.provider.AbstractCacheServiceProvider;
 import org.slf4j.Logger;
@@ -58,6 +63,7 @@ public class GenericVnfCacheServiceProviderImpl extends AbstractCacheServiceProv
     private static final Logger LOGGER = LoggerFactory.getLogger(GenericVnfCacheServiceProviderImpl.class);
 
     private final HttpRestServiceProvider httpRestServiceProvider;
+    final org.onap.aai.domain.yang.VfModules vfModules = new org.onap.aai.domain.yang.VfModules();
 
     @Autowired
     public GenericVnfCacheServiceProviderImpl(final CacheManager cacheManager,
@@ -255,4 +261,61 @@ public class GenericVnfCacheServiceProviderImpl extends AbstractCacheServiceProv
         clearCache(GENERIC_VNF_CACHE.getName());
     }
 
-}
+       @Override
+       public Optional<org.onap.aai.domain.yang.VfModule> getVfModule(final String vnfId, final String vfModuleId) {
+               LOGGER.info("Getting vfModule from cache for vnfId: {} and vfModuleId: {}",
+                               vnfId, vfModuleId);
+        final Cache cache = getCache(GENERIC_VNF_CACHE.getName());
+        final GenericVnf value = cache.get(vnfId, GenericVnf.class);
+        LOGGER.info("Getting vfModule from cache for vnfId: {} and vfModuleId: {}",
+                vnfId, vfModuleId);
+        if (value.getVfModules() != null) {
+            for (int i=0; i<value.getVfModules().getVfModule().size(); i++)
+            {
+                if(value.getVfModules().getVfModule().get(i).getVfModuleId().equalsIgnoreCase(vfModuleId)){
+                    return Optional.of(value.getVfModules().getVfModule().get(i));
+                }
+            }
+        }
+               return Optional.empty();
+       }
+
+       @Override
+       public void putVfModule(String vnfId, String vfModuleId, VfModule vfModule) {
+        LOGGER.info("Adding vfModule from cache for vnfId: {} and vfModuleId: {}",
+                vnfId, vfModuleId);
+        final Optional<GenericVnf> genericVnfOptional = getGenericVnf(vnfId);
+        final Cache cache = getCache(GENERIC_VNF_CACHE.getName());
+        if (genericVnfOptional.isPresent()) {
+            final GenericVnf genericVnf = genericVnfOptional.get();
+
+            vfModules.getVfModule().add(vfModule);
+            genericVnf.setVfModules(vfModules);
+            cache.put(vfModuleId, vfModule);
+        }
+       }
+
+       @Override
+       public boolean patchVfModule(String vnfId, String vfModuleId, VfModule vfModule) {
+               final Optional<GenericVnf> genericVnfOptional = getGenericVnf(vnfId);
+        LOGGER.info("Create vfModule for vnfId: {} and vfModuleId: {}",
+                vnfId, vfModuleId);
+        if (genericVnfOptional.isPresent()) {
+               final GenericVnf cachedGenericVnf = genericVnfOptional.get();
+            LOGGER.info("vfModuleId is Matched");
+            try {
+                for (int i=0; i<cachedGenericVnf.getVfModules().getVfModule().size(); i++)
+                {
+                          if(cachedGenericVnf.getVfModules().getVfModule().get(i).getVfModuleId().equalsIgnoreCase(vfModuleId)){
+                              cachedGenericVnf.getVfModules().getVfModule().get(i).setOrchestrationStatus(vfModule.getOrchestrationStatus());
+                      }
+                }
+                return true;
+            } catch (final Exception exception) {
+                LOGGER.error("Unable to update VfModule for vfModuleId: {}", vfModule, exception);
+            }
+        }
+        LOGGER.error("Unable to find VfModule ...");
+        return false;
+       }
+}
\ No newline at end of file
index 4099c2a..4cd5b25 100644 (file)
@@ -89,6 +89,8 @@ public class Constants {
     public static final String COMPOSED_OF = "org.onap.relationships.inventory.ComposedOf";
 
     public static final String GENERIC_VNF = "generic-vnf";
+    
+    public static final String VF_MODULE = "vf-module";
 
     public static final String PLATFORM = "platform";
 
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/HELP.md b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/HELP.md
new file mode 100644 (file)
index 0000000..c8c1987
--- /dev/null
@@ -0,0 +1,9 @@
+# Getting Started
+
+### Reference Documentation
+For further reference, please consider the following sections:
+
+* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
+* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.4.2/maven-plugin/reference/html/)
+* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.4.2/maven-plugin/reference/html/#build-image)
+
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/mvnw b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/mvnw
new file mode 100755 (executable)
index 0000000..a16b543
--- /dev/null
@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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
+#
+#    https://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.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="`which javac`"
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=`which readlink`
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+      if $darwin ; then
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+      else
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+      fi
+      javaHome="`dirname \"$javaExecutable\"`"
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`which java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=`cd "$wdir/.."; pwd`
+    fi
+    # end of workaround
+  done
+  echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
+    fi
+else
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+    fi
+    if [ -n "$MVNW_REPOURL" ]; then
+      jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    else
+      jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    fi
+    while IFS="=" read key value; do
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+      esac
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Downloading from: $jarUrl"
+    fi
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+    if $cygwin; then
+      wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+    fi
+
+    if command -v wget > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found wget ... using wget"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            wget "$jarUrl" -O "$wrapperJarPath"
+        else
+            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+        fi
+    elif command -v curl > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found curl ... using curl"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            curl -o "$wrapperJarPath" "$jarUrl" -f
+        else
+            curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+        fi
+
+    else
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Falling back to using Java to download"
+        fi
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+        # For Cygwin, switch paths to Windows format before running javac
+        if $cygwin; then
+          javaClass=`cygpath --path --windows "$javaClass"`
+        fi
+        if [ -e "$javaClass" ]; then
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Compiling MavenWrapperDownloader.java ..."
+                fi
+                # Compiling the Java class
+                ("$JAVA_HOME/bin/javac" "$javaClass")
+            fi
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                # Running the downloader
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Running MavenWrapperDownloader.java ..."
+                fi
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+            fi
+        fi
+    fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/mvnw.cmd b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/mvnw.cmd
new file mode 100644 (file)
index 0000000..c8d4337
--- /dev/null
@@ -0,0 +1,182 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Found %WRAPPER_JAR%
+    )
+) else (
+    if not "%MVNW_REPOURL%" == "" (
+        SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    )
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Couldn't find %WRAPPER_JAR%, downloading it ...
+        echo Downloading from: %DOWNLOAD_URL%
+    )
+
+    powershell -Command "&{"^
+               "$webclient = new-object System.Net.WebClient;"^
+               "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+               "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+               "}"^
+               "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+               "}"
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Finished downloading %WRAPPER_JAR%
+    )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/pom.xml b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/pom.xml
new file mode 100644 (file)
index 0000000..926ea14
--- /dev/null
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.onap.so.simulators</groupId>
+               <artifactId>so-simulators</artifactId>
+               <version>1.0-SNAPSHOT</version>
+       </parent>
+       <artifactId>multicloud-simulator</artifactId>
+       <name>${project.artifactId}</name>
+       <description>Demo project for Spring Boot</description>
+       <properties>
+               <java.version>11</java.version>
+       </properties>
+       <dependencies>
+           <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter</artifactId>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-test</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-security</artifactId>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>org.springframework.boot</groupId>
+                                       <artifactId>spring-boot-starter-tomcat</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <dependency>
+                   <groupId>com.googlecode.json-simple</groupId>  
+                   <artifactId>json-simple</artifactId>  
+                   <version>1.1</version>  
+               </dependency>
+
+               <dependency>
+                       <groupId>org.pacesys</groupId>
+                              <artifactId>openstack4j-core</artifactId>
+                       <version>3.2.0</version>
+               </dependency>
+               <dependency>
+            <groupId>org.pacesys.openstack4j.connectors</groupId>
+                       <artifactId>openstack4j-httpclient</artifactId>
+                       <version>3.2.0</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.onap.so.adapters</groupId>
+                       <artifactId>mso-adapters-rest-interface</artifactId>
+                       <version>1.7.1-SNAPSHOT</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.security.oauth.boot</groupId>
+                       <artifactId>spring-security-oauth2-autoconfigure</artifactId>
+                       <version>2.1.1.RELEASE</version>
+               </dependency>
+       </dependencies>
+
+       <build>
+               <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <mainClass>org.onap.so.multicloudsimulator.MultiCloudSimulatorApplication</mainClass>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+                       <plugin>
+                               <groupId>org.springframework.boot</groupId>
+                               <artifactId>spring-boot-maven-plugin</artifactId>
+                       </plugin>
+               </plugins>
+       </build>
+
+</project>
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/MultiCloudSimulatorApplication.java b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/MultiCloudSimulatorApplication.java
new file mode 100644 (file)
index 0000000..949cd9b
--- /dev/null
@@ -0,0 +1,13 @@
+package org.onap.so.multicloudsimulator;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication(scanBasePackages = {"org.onap"})
+public class MultiCloudSimulatorApplication {
+
+       public static void main(String[] args) {
+               SpringApplication.run(MultiCloudSimulatorApplication.class, args);
+       }
+
+}
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/InstanceResponse.java b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/InstanceResponse.java
new file mode 100644 (file)
index 0000000..e8f9e12
--- /dev/null
@@ -0,0 +1,93 @@
+
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2020 Huawei Technologies Co., Ltd. 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=========================================================
+ */
+package org.onap.so.multicloudsimulator.beans;
+
+import java.util.List;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({"id", "request", "namespace", "resources"})
+@JsonIgnoreProperties(value = "true")
+public class InstanceResponse extends Response {
+
+    @JsonProperty("id")
+    private String id;
+    @JsonProperty("request")
+    private MulticloudInstanceRequest request;
+    @JsonProperty("namespace")
+    private String namespace;
+    @JsonProperty("resources")
+    private List<Resource> resources = null;
+
+    public InstanceResponse(String errorMsg) {
+        super(errorMsg);
+    }
+
+    public InstanceResponse() {
+       super("");
+       //new Response("");
+    } 
+    @JsonProperty("id")
+    public String getId() {
+        return id;
+    }
+
+    @JsonProperty("id")
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    @JsonProperty("request")
+    public MulticloudInstanceRequest getRequest() {
+        return request;
+    }
+
+    @JsonProperty("request")
+    public void setRequest(MulticloudInstanceRequest request) {
+        this.request = request;
+    }
+
+    @JsonProperty("namespace")
+    public String getNamespace() {
+        return namespace;
+    }
+
+    @JsonProperty("namespace")
+    public void setNamespace(String namespace) {
+        this.namespace = namespace;
+    }
+
+    @JsonProperty("resources")
+    public List<Resource> getResources() {
+        return resources;
+    }
+
+    @JsonProperty("resources")
+    public void setResources(List<Resource> resources) {
+        this.resources = resources;
+    }
+
+}
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/MulticloudCreateResponse.java b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/MulticloudCreateResponse.java
new file mode 100644 (file)
index 0000000..f524aa9
--- /dev/null
@@ -0,0 +1,99 @@
+package org.onap.so.multicloudsimulator.beans;
+
+import java.io.Serializable;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.databind.JsonNode;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonPropertyOrder({"template_type", "workload_id", "template_response", "workload_status_reason", "workload_status"})
+public class MulticloudCreateResponse implements Serializable {
+    private static final long serialVersionUID = -5215028275577848311L;
+
+    @JsonProperty("template_type")
+    private String templateType;
+    @JsonProperty("workload_id")
+    private String workloadId;
+    @JsonProperty("template_response")
+    private JsonNode templateResponse;
+    @JsonProperty("workload_status_reason")
+    private JsonNode workloadStatusReason;
+    @JsonProperty("workload_status")
+    private String workloadStatus;
+
+    @JsonCreator
+    public MulticloudCreateResponse(@JsonProperty("template_type") String templateType,
+                                    @JsonProperty("workload_id") String workloadId,
+                                    @JsonProperty("template_response") JsonNode templateResponse) {
+        this.templateType = templateType;
+        this.workloadId = workloadId;
+        this.templateResponse = templateResponse;
+    }
+    public MulticloudCreateResponse() {
+
+    }
+
+    @JsonProperty("template_type")
+    public String getTemplateType() {
+        return templateType;
+    }
+
+    @JsonProperty("template_type")
+    public void setTemplateType(String templateType) {
+        this.templateType = templateType;
+    }
+
+    @JsonProperty("workload_id")
+    public String getWorkloadId() {
+        return workloadId;
+    }
+
+    @JsonProperty("workload_id")
+    public void setWorkloadId(String workloadId) {
+        this.workloadId = workloadId;
+    }
+
+    @JsonProperty("template_response")
+    public void setTemplateResponse(JsonNode templateResponse) {
+        this.templateResponse = templateResponse;
+    }
+
+    @JsonProperty("template_response")
+    public JsonNode getTemplateResponse() {
+        return templateResponse;
+    }
+
+    @JsonProperty("workload_status_reason")
+    public void setWorkloadStatusReason(JsonNode workloadStatusReason) {
+        this.workloadStatusReason = workloadStatusReason;
+    }
+
+    @JsonProperty("workload_status_reason")
+    public JsonNode getWorkloadStatusReason() {
+        return workloadStatusReason;
+    }
+
+    @JsonProperty("workload_status")
+    public String getWorkloadSstatus() {
+        return workloadStatus;
+    }
+
+    @JsonProperty("workload_status")
+    public void setWorkloadStatus(String workloadStatus) {
+        this.workloadStatus = workloadStatus;
+    }
+
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this).append("templateType", templateType).append("workloadId", workloadId)
+                .append("templateResponse", templateResponse)
+                .append("workload_status_reason", workloadStatusReason.toString())
+                .append("workload_status", workloadStatus).toString();
+    }
+}
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/MulticloudInstanceRequest.java b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/MulticloudInstanceRequest.java
new file mode 100644 (file)
index 0000000..c88e7f1
--- /dev/null
@@ -0,0 +1,87 @@
+package org.onap.so.multicloudsimulator.beans;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(value = "true")
+public class MulticloudInstanceRequest {
+
+    @JsonProperty(value = "cloud-region")
+    private String cloudRegion;
+
+    @JsonProperty(value = "rb-name")
+    private String rbName;
+
+    @JsonProperty(value = "rb-version")
+    private String rbVersion;
+
+    @JsonProperty(value = "profile-name")
+    private String profileName;
+
+    @JsonProperty(value = "labels")
+    private Map<String, String> labels;
+
+    @JsonProperty(value = "override-values")
+    private Map<String, String> overrideValues;
+
+    @JsonProperty(value = "release-name")
+    private String vfModuleUuid;
+
+    public String getCloudRegion() {
+        return cloudRegion;
+    }
+
+    public void setCloudRegion(String cloudRegion) {
+        this.cloudRegion = cloudRegion;
+    }
+
+    public String getRbName() {
+        return rbName;
+    }
+
+    public void setRbName(String rbName) {
+        this.rbName = rbName;
+    }
+
+    public String getRbVersion() {
+        return rbVersion;
+    }
+
+    public void setRbVersion(String rbVersion) {
+        this.rbVersion = rbVersion;
+    }
+
+    public String getProfileName() {
+        return profileName;
+    }
+
+    public void setProfileName(String profileName) {
+        this.profileName = profileName;
+    }
+
+    public Map<String, String> getLabels() {
+        return labels;
+    }
+
+    public void setLabels(Map<String, String> labels) {
+        this.labels = labels;
+    }
+
+    public Map<String, String> getOverrideValues() {
+        return overrideValues;
+    }
+
+    public void setOverrideValues(Map<String, String> overrideValues) {
+        this.overrideValues = overrideValues;
+    }
+
+    public String getVfModuleUuid() {
+        return vfModuleUuid;
+    }
+
+    public void setVfModuleUuid(String vfModuleUuid) {
+        this.vfModuleUuid = vfModuleUuid;
+    }
+
+}
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/MulticloudRequest.java b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/MulticloudRequest.java
new file mode 100644 (file)
index 0000000..c2ec191
--- /dev/null
@@ -0,0 +1,171 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 Intel Corp. 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=========================================================
+ */
+
+package org.onap.so.multicloudsimulator.beans;
+
+import java.io.Serializable;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.woorea.openstack.heat.model.CreateStackParam;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({"generic-vnf-id", "vf-module-id", "vf-module-model-invariant-id", "vf-module-model-version-id",
+        "vf-module-model-customization-id", "oof_directives", "sdnc_directives", "user_directives", "template_type",
+        "template_data"})
+public class MulticloudRequest implements Serializable {
+    private static final long serialVersionUID = -5215028275577848311L;
+
+    @JsonProperty("generic-vnf-id")
+    private String genericVnfId;
+    @JsonProperty("vf-module-id")
+    private String vfModuleId;
+    @JsonProperty("vf-module-model-invariant-id")
+    private String vfModuleModelInvariantId;
+    @JsonProperty("vf-module-model-version-id")
+    private String vfModuleModelVersionId;
+    @JsonProperty("vf-module-model-customization-id")
+    private String vfModuleModelCustomizationId;
+    @JsonProperty("oof_directives")
+    private JsonNode oofDirectives;
+    @JsonProperty("sdnc_directives")
+    private JsonNode sdncDirectives;
+    @JsonProperty("user_directives")
+    private JsonNode userDirectives;
+    @JsonProperty("template_type")
+    private String templateType;
+    @JsonProperty("template_data")
+    private CreateStackParam templateData;
+
+
+    @JsonProperty("generic-vnf-id")
+    public String getGenericVnfId() {
+        return genericVnfId;
+    }
+
+    @JsonProperty("generic-vnf-id")
+    public void setGenericVnfId(String genericVnfId) {
+        this.genericVnfId = genericVnfId;
+    }
+
+    @JsonProperty("vf-module-id")
+    public String getVfModuleId() {
+        return vfModuleId;
+    }
+
+    @JsonProperty("vf-module-id")
+    public void setVfModuleId(String vfModuleId) {
+        this.vfModuleId = vfModuleId;
+    }
+
+    @JsonProperty("vf-module-model-invariant-id")
+    public String getVfModuleModelInvariantId() {
+        return vfModuleModelInvariantId;
+    }
+
+    @JsonProperty("vf-module-model-invariant-id")
+    public void setVfModuleModelInvariantId(String vfModuleModelInvariantId) {
+        this.vfModuleModelInvariantId = vfModuleModelInvariantId;
+    }
+
+    @JsonProperty("vf-module-model-version-id")
+    public String getVfModuleModelVersionId() {
+        return vfModuleModelVersionId;
+    }
+
+    @JsonProperty("vf-module-model-version-id")
+    public void setVfModuleModelVersionId(String vfModuleModelVersionId) {
+        this.vfModuleModelVersionId = vfModuleModelVersionId;
+    }
+
+    @JsonProperty("vf-module-model-customization-id")
+    public String getVfModuleModelCustomizationId() {
+        return vfModuleModelCustomizationId;
+    }
+
+    @JsonProperty("vf-module-model-customization-id")
+    public void setVfModuleModelCustomizationId(String vfModuleModelCustomizationId) {
+        this.vfModuleModelCustomizationId = vfModuleModelCustomizationId;
+    }
+
+    @JsonProperty("oof_directives")
+    public JsonNode getOofDirectives() {
+        return oofDirectives;
+    }
+
+    @JsonProperty("oof_directives")
+    public void setOofDirectives(JsonNode oofDirectives) {
+        this.oofDirectives = oofDirectives;
+    }
+
+    @JsonProperty("sdnc_directives")
+    public JsonNode getSdncDirectives() {
+        return sdncDirectives;
+    }
+
+    @JsonProperty("sdnc_directives")
+    public void setSdncDirectives(JsonNode sdncDirectives) {
+        this.sdncDirectives = sdncDirectives;
+    }
+
+    @JsonProperty("user_directives")
+    public JsonNode getUserDirectives() {
+        return userDirectives;
+    }
+
+    @JsonProperty("user_directives")
+    public void setUserDirectives(JsonNode userDirectives) {
+        this.userDirectives = userDirectives;
+    }
+
+    @JsonProperty("template_type")
+    public String getTemplateType() {
+        return templateType;
+    }
+
+    @JsonProperty("template_type")
+    public void setTemplateType(String templateType) {
+        this.templateType = templateType;
+    }
+
+    @JsonProperty("template_data")
+    public CreateStackParam getTemplateData() {
+        return templateData;
+    }
+
+    @JsonProperty("template_data")
+    public void setTemplateData(CreateStackParam templateData) {
+        this.templateData = templateData;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this).append("genericVnfId", genericVnfId).append("vfModuleId", vfModuleId)
+                .append("vfModuleModelInvariantId", vfModuleModelInvariantId)
+                .append("vfModuleModelVersionId", vfModuleModelVersionId)
+                .append("vfModuleModelCustomizationId", vfModuleModelCustomizationId)
+                .append("oofDirectives", oofDirectives).append("sdncDirectives", sdncDirectives)
+                .append("userDirectives", userDirectives).append("templateType", templateType)
+                .append("templateData", templateData).toString();
+    }
+
+}
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/Resource.java b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/Resource.java
new file mode 100644 (file)
index 0000000..368ab6d
--- /dev/null
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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=========================================================
+ */
+
+package org.onap.so.multicloudsimulator.beans;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({"resource-type", "resource-link"})
+public class Resource {
+
+    @JsonProperty("resource-type")
+    private String resourceType;
+    @JsonProperty("resource-link")
+    private String resourceLink;
+
+    @JsonProperty("resource-type")
+    public String getResourceType() {
+        return resourceType;
+    }
+
+    @JsonProperty("resource-type")
+    public void setResourceType(String resourceType) {
+        this.resourceType = resourceType;
+    }
+
+    @JsonProperty("resource-link")
+    public String getResourceLink() {
+        return resourceLink;
+    }
+
+    //@JsonProperty("resource-link")
+    public void setResourceLink(String resourceLink) {
+        this.resourceLink = resourceLink;
+    }
+
+}
+
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/Response.java b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/beans/Response.java
new file mode 100644 (file)
index 0000000..77a6150
--- /dev/null
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2020 Huawei Technologies Co., Ltd. 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=========================================================
+ */
+
+package org.onap.so.multicloudsimulator.beans;
+
+public class Response {
+
+    private String errorMsg;
+
+    public Response(String errorMsg) {
+        this.errorMsg = errorMsg;
+    }
+    
+    public Response() {
+    }
+
+    public String getErrorMsg() {
+        return errorMsg;
+    }
+
+    public void setErrorMsg(String errorMsg) {
+        this.errorMsg = errorMsg;
+    }
+
+}
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/configration/ApplicationConfigration.java b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/configration/ApplicationConfigration.java
new file mode 100644 (file)
index 0000000..34015ea
--- /dev/null
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.multicloudsimulator.configration;
+
+import static org.onap.so.multicloudsimulator.utils.Constants.SERVICE_TOPOLOGY_OPERATION_CACHE;
+import java.util.Arrays;
+import org.springframework.cache.Cache;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.concurrent.ConcurrentMapCache;
+import org.springframework.cache.support.SimpleCacheManager;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author Waqas Ikram (waqas.ikram@est.tech)
+ *
+ */
+@Configuration
+public class ApplicationConfigration {
+
+    @Bean
+    public CacheManager cacheManager() {
+        final SimpleCacheManager manager = new SimpleCacheManager();
+        manager.setCaches(Arrays.asList(getCache(SERVICE_TOPOLOGY_OPERATION_CACHE)));
+        return manager;
+    }
+
+    private Cache getCache(final String name) {
+        return new ConcurrentMapCache(name);
+    }
+}
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/configration/WebSecurityConfigImpl.java b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/configration/WebSecurityConfigImpl.java
new file mode 100644 (file)
index 0000000..a0c1f75
--- /dev/null
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.multicloudsimulator.configration;
+
+import static org.onap.so.multicloudsimulator.utils.Constants.OPERATIONS_URL;
+import org.onap.so.simulator.configuration.SimulatorSecurityConfigurer;
+import org.onap.so.simulator.model.UserCredentials;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+
+/**
+ * @author waqas.ikram@ericsson.com
+ *
+ */
+@Configuration
+@EnableWebSecurity
+public class WebSecurityConfigImpl extends SimulatorSecurityConfigurer {
+
+    @Autowired
+    public WebSecurityConfigImpl(final UserCredentials userCredentials) {
+        super(userCredentials.getUsers());
+    }
+
+    @Override
+    protected void configure(final HttpSecurity http) throws Exception {
+        http.csrf().disable().authorizeRequests().antMatchers(OPERATIONS_URL + "/**/**").authenticated().and()
+                .httpBasic();
+    }
+
+}
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/controller/MultiCloudController.java b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/controller/MultiCloudController.java
new file mode 100644 (file)
index 0000000..b0e1336
--- /dev/null
@@ -0,0 +1,171 @@
+package org.onap.so.multicloudsimulator.controller;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.MediaType;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.onap.so.multicloudsimulator.beans.InstanceResponse;
+import org.onap.so.multicloudsimulator.beans.MulticloudInstanceRequest;
+import org.onap.so.multicloudsimulator.beans.MulticloudCreateResponse;
+import org.onap.so.multicloudsimulator.beans.MulticloudRequest;
+import org.onap.so.openstack.beans.HeatStatus;
+
+import org.springframework.http.ResponseEntity;
+
+import org.springframework.web.bind.annotation.*;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.URI;
+
+import static org.onap.so.multicloudsimulator.utils.Constants.BASE_URL;
+@RestController
+@RequestMapping(path = BASE_URL)
+public class MultiCloudController {
+
+       public static final String X_HTTP_METHOD_OVERRIDE = "X-HTTP-Method-Override";
+       private static final Logger LOGGER = LoggerFactory.getLogger(MultiCloudController.class);
+       public MulticloudCreateResponse multicloudCreateResponse = new MulticloudCreateResponse();
+
+       @PostMapping(value="/v1/instance")
+       public ResponseEntity<?> createInstance(@RequestBody MulticloudInstanceRequest req){
+          System.out.println("MultiCloud createInstance ");
+               InstanceResponse InstanceResponse = new InstanceResponse();
+               
+               return ResponseEntity.ok(InstanceResponse);
+       }
+       
+       @GetMapping(value = "/{cloud-owner}/{cloud-region-id}/infra_workload", produces = {
+                       MediaType.APPLICATION_JSON })
+    public ResponseEntity<?> getInstance(
+               @PathVariable("cloud-owner") String cloudOwner, @PathVariable("cloud-region-id") String cloudRegionId,
+               @RequestParam(value = "depth", required = false, defaultValue = "0") Integer depth,
+               @RequestParam(name = "format", required = false) final String name, final HttpServletRequest request) throws IOException {
+               
+               LOGGER.info("found CloudOwner {} in cache", cloudOwner);
+               LOGGER.info("found cloudRegionId {} in cache", cloudRegionId);
+               LOGGER.info("found name {} in cache", name);
+                       JSONObject json = new JSONObject();
+
+                       json.put("template_type", "heat");
+                       json.put("workload_id", "");
+                       json.put("workload_status", "GET_COMPLETE");
+                       JSONObject workload = new JSONObject();
+                       workload.put("stacks", HeatStatus.NOTFOUND);
+                       json.put("workload_status_reason", workload);
+
+                       return ResponseEntity.ok(json);
+       }
+
+       @PostMapping(value = "/{cloud-owner}/{cloud-region-id}/infra_workload",
+                       consumes = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML},
+                       produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
+       public ResponseEntity<?> postCreateInstance(
+                       @RequestBody final MulticloudRequest inputRequest, @PathVariable("cloud-owner") final String cloudOwner,
+                       @PathVariable("cloud-region-id") final String cloudRegionId,
+                       @RequestHeader(value = X_HTTP_METHOD_OVERRIDE, required = false) final String xHttpHeaderOverride,
+                       final HttpServletRequest request) throws IOException {
+
+                       LOGGER.info("input request {}: ",inputRequest.toString());
+               String input = "{\n" +
+                               "   \"template_type\": \"heat\",\n" +
+                               "   \"workload_id\": \"sad_sammet\",\n" +
+                               "   \"template_response\": [\n" +
+                               "      {\n" +
+                               "         \"GVK\": {\n" +
+                               "            \"Group\": \"k8s.plugin.opnfv.org\",\n" +
+                               "            \"Version\": \"v1alpha1\",\n" +
+                               "            \"Kind\": \"Network\"\n" +
+                               "         },\n" +
+                               "         \"Name\": \"k8s-region-2-onap-nf-20210120t221126760z-management-network\"\n" +
+                               "      },\n" +
+                               "      {\n" +
+                               "         \"GVK\": {\n" +
+                               "            \"Group\": \"k8s.plugin.opnfv.org\",\n" +
+                               "            \"Version\": \"v1alpha1\",\n" +
+                               "            \"Kind\": \"Network\"\n" +
+                               "         },\n" +
+                               "         \"Name\": \"k8s-region-2-onap-nf-20210120t221126760z-protected-network\"\n" +
+                               "      },\n" +
+                               "      {\n" +
+                               "         \"GVK\": {\n" +
+                               "            \"Group\": \"k8s.plugin.opnfv.org\",\n" +
+                               "            \"Version\": \"v1alpha1\",\n" +
+                               "            \"Kind\": \"Network\"\n" +
+                               "         },\n" +
+                               "         \"Name\": \"k8s-region-2-onap-nf-20210120t221126760z-unprotected-network\"\n" +
+                               "      },\n" +
+                               "      {\n" +
+                               "         \"GVK\": {\n" +
+                               "            \"Group\": \"k8s.cni.cncf.io\",\n" +
+                               "            \"Version\": \"v1\",\n" +
+                               "            \"Kind\": \"NetworkAttachmentDefinition\"\n" +
+                               "         },\n" +
+                               "         \"Name\": \"k8s-region-2-onap-nf-20210120t221126760z-ovn-nat\"\n" +
+                               "      }\n" +
+                               "   ],\n" +
+                               "   \"workload_status\": \"CREATE_COMPLETE\",\n" +
+                               "   \"workload_status_reason\": \"test\"\n" +
+                               "}";
+
+               ObjectMapper objectMapper = new ObjectMapper();
+               JSONObject workload = new JSONObject();
+
+               workload.put("stack",true);
+
+               JsonNode jsonNode = objectMapper.readTree(workload.toJSONString());
+               MulticloudCreateResponse multiResponse = objectMapper.readValue(input, MulticloudCreateResponse.class);
+               multiResponse.setWorkloadStatusReason(null);
+
+               LOGGER.info("workload reason: {}",multiResponse.getWorkloadStatusReason());
+               multiResponse.setWorkloadId("sad_sammet");
+               multiResponse.setTemplateType("heat");
+               multiResponse.setWorkloadStatus("CREATE_COMPLETE");
+
+               return ResponseEntity.status(201).body(multiResponse);
+       }
+
+       @GetMapping(value = "/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}", produces = {
+                       MediaType.APPLICATION_JSON })
+       public ResponseEntity<?> getInstanceName(
+                       @PathVariable("cloud-owner") String cloudOwner, @PathVariable("cloud-region-id") String cloudRegionId,
+                       @PathVariable("workload-id") String workloadId,
+                       @RequestParam(value = "depth", required = false, defaultValue = "0") Integer depth,
+                       @RequestParam(name = "format", required = false) final String name, final HttpServletRequest request) throws IOException {
+
+               LOGGER.info("Calling getInstanceName");
+               LOGGER.info("found CloudOwner {} in cache", cloudOwner);
+               LOGGER.info("found cloudRegionId {} in cache", cloudRegionId);
+               LOGGER.info("found name {} in cache", name);
+               JSONObject json = new JSONObject();
+
+                       json.put("template_type", "heat");
+                       json.put("workload_id", "sad_sammet");
+                       json.put("workload_status", "CREATE_COMPLETE");
+                       JSONObject workload = new JSONObject();
+                       workload.put("stacks", true);
+                       json.put("workload_status_reason", null);
+
+                       return ResponseEntity.ok(json);
+       }
+
+       @PostMapping(value = "/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}",
+                       consumes = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML},
+                       produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
+       public ResponseEntity<?> postCreateInstanceName(
+                       @RequestBody final MulticloudRequest inputRequest, @PathVariable("cloud-owner") final String cloudOwner,
+                       @PathVariable("workload-id") String workloadId,
+                       @PathVariable("cloud-region-id") final String cloudRegionId,
+                       @RequestHeader(value = X_HTTP_METHOD_OVERRIDE, required = false) final String xHttpHeaderOverride,
+                       final HttpServletRequest request) throws IOException {
+
+                       LOGGER.info("Calling postCreateInstanceName");
+
+                       return ResponseEntity.status(405).build();
+       }
+}
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/utils/Constants.java b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/utils/Constants.java
new file mode 100644 (file)
index 0000000..5f54f5d
--- /dev/null
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.multicloudsimulator.utils;
+
+/**
+ * @author Waqas Ikram (waqas.ikram@est.tech)
+ *
+ */
+public class Constants {
+
+    public static final String BASE_URL = "/api/multicloud/v1";
+
+    public static final String OPERATIONS_URL = BASE_URL + "/operations";
+
+    public static final String SERVICE_TOPOLOGY_OPERATION_CACHE = "service-topology-operation-cache";
+
+    public static final String HEALTHY = "healthy";
+
+    public static final String YES = "Y";
+
+    public static final String SERVICE_TOPOLOGY_OPERATION = "service-topology-operation";
+
+    public static final String RESTCONF_CONFIG_END_POINT = "restconf/config/GENERIC-RESOURCE-API:services/service/";
+
+    public static final String VNF_DATA_VNF_TOPOLOGY = "/vnf-data/vnf-topology/";
+
+    public static final String SERVICE_DATA_VNFS_VNF = "/service-data/vnfs/vnf/";
+
+    private Constants() {}
+}
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/resources/application.properties b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/resources/application.properties
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/resources/application.yaml b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/resources/application.yaml
new file mode 100644 (file)
index 0000000..7299ff9
--- /dev/null
@@ -0,0 +1,18 @@
+server:
+   port: 9996
+   tomcat:
+      max-threads: 4
+ssl-enable: false
+spring:
+   security:
+      users:
+      -  username: mso
+         #password: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+         password: $2a$04$f8SB6cW/VI26QvYM6z.GXu7hlEmwnFtePenD8zF18mS3Atu3QNqr2
+         role: VID
+      -  username: admin
+         #password: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+         password: $2a$04$f8SB6cW/VI26QvYM6z.GXu7hlEmwnFtePenD8zF18mS3Atu3QNqr2
+         role: VID
+   main:
+      allow-bean-definition-overriding: true
\ No newline at end of file
diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/test/java/org/onap/so/multicloudsimulator/MultiCloudSimulatorApplicationTests.java b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/test/java/org/onap/so/multicloudsimulator/MultiCloudSimulatorApplicationTests.java
new file mode 100644 (file)
index 0000000..ccce88c
--- /dev/null
@@ -0,0 +1,13 @@
+package org.onap.so.multicloudsimulator;
+
+import org.junit.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class MultiCloudSimulatorApplicationTests {
+
+       @Test
+       void contextLoads() {
+       }
+
+}
index 9334a09..9173439 100644 (file)
                                 </assembly>
                             </build>
                         </image>
+                        <image>
+                            <name>simulators/multicloud-simulator</name>
+                            <build>
+                                <cleanup>try</cleanup>
+                                <dockerFileDir>docker-files</dockerFileDir>
+                                <dockerFile>Dockerfile.so-simulator-base-image</dockerFile>
+                                <tags>
+                                    <tag>${project.version}</tag>
+                                </tags>
+                                <assembly>
+                                    <inline>
+                                        <dependencySets>
+                                            <dependencySet>
+                                                <includes>
+                                                    <include>org.onap.so.simulators:multicloud-simulator</include>
+                                                </includes>
+                                                <outputFileNameMapping>app.jar</outputFileNameMapping>
+                                            </dependencySet>
+                                        </dependencySets>
+                                    </inline>
+                                </assembly>
+                            </build>
+                        </image>
                         <image>
                             <name>simulators/vnfm-simulator</name>
                             <build>
             <artifactId>sdnc-simulator</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>${project.parent.groupId}</groupId>
+            <artifactId>multicloud-simulator</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.onap.so.simulators.vnfm</groupId>
             <artifactId>vnfm-service</artifactId>
index fb08bbb..352c18b 100644 (file)
@@ -18,6 +18,7 @@
     </properties>
     <modules>
         <module>common</module>
+        <module>multicloud-simulator</module>
         <module>sdc-simulator</module>
         <module>aai-simulator</module>
         <module>sdnc-simulator</module>
index 2f24ef6..6077bdd 100644 (file)
@@ -23,14 +23,24 @@ import static org.onap.sdnc.northbound.client.model.GenericResourceApiRequestAct
 import static org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration.DELETEVNFINSTANCE;
 import static org.onap.sdnc.northbound.client.model.GenericResourceApiSvcActionEnumeration.DELETE;
 import static org.onap.so.sdncsimulator.utils.Constants.OPERATIONS_URL;
+import static org.onap.so.sdncsimulator.utils.Constants.BASE_URL;
+import static org.onap.so.sdncsimulator.utils.Constants.RESTCONF_CONFIG_END_POINT;
+
+import java.util.ArrayList;
+import java.util.List;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.core.MediaType;
+
 import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestinformationRequestInformation;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiSdncrequestheaderSdncRequestHeader;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceOperationInformation;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiSvcActionEnumeration;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfOperationInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleOperationInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfTopology;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleTopology;
 import org.onap.so.sdncsimulator.models.InputRequest;
 import org.onap.so.sdncsimulator.models.Output;
 import org.onap.so.sdncsimulator.models.OutputRequest;
@@ -41,6 +51,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -50,7 +62,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
  *
  */
 @Controller
-@RequestMapping(path = OPERATIONS_URL)
+@RequestMapping(path = BASE_URL)
 public class OperationsController {
     private static final String HTTP_STATUS_OK = HttpStatus.OK.value() + "";
 
@@ -63,7 +75,7 @@ public class OperationsController {
         this.cacheServiceProvider = cacheServiceProvider;
     }
 
-    @PostMapping(value = "/GENERIC-RESOURCE-API:service-topology-operation/",
+    @PostMapping(value = "/operations/GENERIC-RESOURCE-API:service-topology-operation/",
             consumes = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML},
             produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
     public ResponseEntity<?> postServiceOperationInformation(
@@ -90,7 +102,7 @@ public class OperationsController {
 
     }
 
-    @PostMapping(value = "/GENERIC-RESOURCE-API:vnf-topology-operation/",
+    @PostMapping(value = "/operations/GENERIC-RESOURCE-API:vnf-topology-operation/",
             consumes = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML},
             produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
     public ResponseEntity<?> postVnfOperationInformation(
@@ -147,4 +159,60 @@ public class OperationsController {
         return cacheServiceProvider.putVnfOperationInformation(apiVnfOperationInformation);
     }
 
+    @PostMapping(value = "/operations/GENERIC-RESOURCE-API:vf-module-topology-operation/",
+            consumes = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML},
+            produces = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
+    public ResponseEntity<?> postVfModuleOperationInformation(
+            @RequestBody final InputRequest<GenericResourceApiVfModuleOperationInformation> inputRequest,
+            final HttpServletRequest request) {
+        LOGGER.info("Request Received for VfModule : {}  ...", inputRequest);
+
+        final GenericResourceApiVfModuleOperationInformation apiVfModuleperationInformation = inputRequest.getInput();
+        if (apiVfModuleperationInformation == null) {
+            LOGGER.error("Invalid input request: {}", inputRequest);
+            return ResponseEntity.badRequest().build();
+        }
+
+        final Output output = getOutput(apiVfModuleperationInformation);
+        final OutputRequest outputRequest = new OutputRequest(output);
+
+        if (output.getResponseCode().equals(HTTP_STATUS_OK)) {
+            LOGGER.info("Sucessfully executed request vnf sending response: {}", outputRequest);
+            return ResponseEntity.ok(outputRequest);
+        }
+
+        LOGGER.error("Unable to execute input request: {}, will send OutputRequest: {}", inputRequest, outputRequest);
+        return ResponseEntity.badRequest().body(outputRequest);
+
+    }
+
+    private Output getOutput(final GenericResourceApiVfModuleOperationInformation apiVfModuleOperationInformation) {
+
+        return cacheServiceProvider.putVfModuleOperationInformation(apiVfModuleOperationInformation);
+    }
+
+    
+    @GetMapping(value = "/config/GENERIC-RESOURCE-API:services/service/{service-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-topology/")
+       public ResponseEntity<?> getVNf(@PathVariable("service-id") String serviceId,
+                       @PathVariable("vnf-id") String vnfId) {
+
+       LOGGER.info("Get vnf-topology with serviceId {} and vnfId {}",serviceId, vnfId);
+               GenericResourceApiVnfTopology genericResourceApiVnfTopology = new GenericResourceApiVnfTopology();
+               
+               genericResourceApiVnfTopology = cacheServiceProvider.getGenericResourceApiVnfTopology();
+               return ResponseEntity.ok(genericResourceApiVnfTopology);
+       }
+
+       @GetMapping(value = "/config/GENERIC-RESOURCE-API:services/service/{service-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/vf-module-data/vf-module-topology/", produces = {
+                       MediaType.APPLICATION_JSON })
+       public ResponseEntity<?> getVFmodule(@PathVariable("service-id") String serviceId,
+                       @PathVariable("vnf-id") String vnfId, @PathVariable("vf-module-id") String vfModuleId) {
+               LOGGER.info("Get vfModule-topology with serviceId {}, vnfId {} and vfModuleId {}",serviceId, vnfId,vfModuleId);
+
+               GenericResourceApiVfModuleTopology genericResourceApiVfModuleTopology = new GenericResourceApiVfModuleTopology();
+
+               genericResourceApiVfModuleTopology = cacheServiceProvider.getGenericResourceApiVfModuleTopology();
+               return ResponseEntity.ok(genericResourceApiVfModuleTopology);
+
+       }
 }
index d64b0b0..7cc0bda 100644 (file)
@@ -48,7 +48,10 @@ public class Output implements Serializable {
     private GenericResourceApiInstanceReference serviceResponseInformation = null;
 
     @JsonProperty("vnf-response-information")
-    private GenericResourceApiInstanceReference vnfResponseInformation = null;
+    private GenericResourceApiInstanceReference vnfResponseInformation = null; 
+    
+    @JsonProperty("vf-module-response-information")
+    private GenericResourceApiInstanceReference vfModuleResponseInformation = null;
 
     /**
      * @return the responseMessage
@@ -164,6 +167,11 @@ public class Output implements Serializable {
         this.vnfResponseInformation = vnfResponseInformation;
         return this;
 
+    }
+    public Output vfModuleResponseInformation(final GenericResourceApiInstanceReference vfModuleResponseInformation) {
+        this.vfModuleResponseInformation = vfModuleResponseInformation;
+        return this;
+
     }
 
     @JsonIgnore
@@ -177,6 +185,7 @@ public class Output implements Serializable {
         sb.append("    responseCode: ").append(responseCode).append("\n");
         sb.append("    serviceResponseInformation: ").append(serviceResponseInformation).append("\n");
         sb.append("    vnfResponseInformation: ").append(vnfResponseInformation).append("\n");
+        sb.append("    vfModuleResponseInformation: ").append(vfModuleResponseInformation).append("\n");
         sb.append("}");
         return sb.toString();
     }
index c3a80ec..d7dbec8 100644 (file)
  */
 package org.onap.so.sdncsimulator.providers;
 
+import java.util.List;
 import java.util.Optional;
+
 import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceOperationInformation;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiServicemodelinfrastructureService;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfOperationInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleOperationInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleTopology;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfTopology;
 import org.onap.so.sdncsimulator.models.Output;
 
 /**
@@ -44,6 +49,11 @@ public interface ServiceOperationsCacheServiceProvider {
 
     Output deleteVnfOperationInformation(final GenericResourceApiVnfOperationInformation apiVnfOperationInformation);
 
-    void clearAll();
+    Output putVfModuleOperationInformation(final GenericResourceApiVfModuleOperationInformation apiVfModuleOperationInformation);
+
+    public GenericResourceApiVfModuleTopology getGenericResourceApiVfModuleTopology();
 
-}
+    public GenericResourceApiVnfTopology getGenericResourceApiVnfTopology();
+
+    void clearAll();
+}
\ No newline at end of file
index 88db4c1..90255de 100644 (file)
@@ -36,6 +36,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
 import javax.validation.Valid;
+
 import org.onap.sdnc.northbound.client.model.GenericResourceApiInstanceReference;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiLastActionEnumeration;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiLastRpcActionEnumeration;
@@ -60,6 +61,17 @@ import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfinformationVnf
 import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfrequestinputVnfRequestInput;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiVnftopologyVnfTopology;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiVnftopologyidentifierstructureVnfTopologyIdentifierStructure;
+
+import org.onap.sdnc.northbound.client.model.GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfmoduleVfModuleData;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleTopology;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfTopology;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleOperationInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduleinformationVfModuleInformation;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduletopologyVfModuleTopology;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduletopologyidentifierVfModuleTopologyIdentifier;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiParam;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam;
+
 import org.onap.so.sdncsimulator.models.Output;
 import org.onap.so.simulator.cache.provider.AbstractCacheServiceProvider;
 import org.slf4j.Logger;
@@ -82,6 +94,9 @@ public class ServiceOperationsCacheServiceProviderimpl extends AbstractCacheServ
     private static final String HTTP_STATUS_OK = Integer.toString(HttpStatus.OK.value());
     private static final String EMPTY_STRING = "";
     private static final Logger LOGGER = LoggerFactory.getLogger(ServiceOperationsCacheServiceProviderimpl.class);
+    private static List<GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfmoduleVfModuleData> vfModuleList;
+    GenericResourceApiVfModuleTopology genericResourceApiVfModuleTopology = new GenericResourceApiVfModuleTopology();
+    GenericResourceApiVnfTopology genericResourceApiVnfTopology = new GenericResourceApiVnfTopology();
 
     @Autowired
     public ServiceOperationsCacheServiceProviderimpl(final CacheManager cacheManager) {
@@ -198,7 +213,7 @@ public class ServiceOperationsCacheServiceProviderimpl extends AbstractCacheServ
 
                     if (ifVnfNotExists(vnfId, svcAction, vnfsList)) {
                         vnfsList.add(getGenericResourceApiServicedataVnf(serviceInstanceId, vnfId, input));
-
+                        getVnfsList(vnfsList);
                         final GenericResourceApiServicestatusServiceStatus serviceStatus = service.getServiceStatus();
 
                         return new Output().ackFinalIndicator(serviceStatus.getFinalIndicator())
@@ -507,4 +522,128 @@ public class ServiceOperationsCacheServiceProviderimpl extends AbstractCacheServ
 
     }
 
-}
+       @Override
+       public Output putVfModuleOperationInformation(
+                       GenericResourceApiVfModuleOperationInformation input) {
+
+               final GenericResourceApiServiceinformationServiceInformation serviceInformation = input.getServiceInformation();
+        final GenericResourceApiVnfinformationVnfInformation vnfInformation = input.getVnfInformation();
+        final GenericResourceApiVfmoduleinformationVfModuleInformation vfModuleInformation = input.getVfModuleInformation();
+        // Call getVfModule to make a vfList for get the vf-module-information while GET reqest
+        vfModuleList = getVfModule(input);
+
+        final GenericResourceApiSdncrequestheaderSdncRequestHeader requestHeader = input.getSdncRequestHeader();
+        final String svcRequestId = getSvcRequestId(requestHeader);
+
+        if (serviceInformation != null && isValid(serviceInformation.getServiceInstanceId()) && vnfInformation != null
+                && isValid(vnfInformation.getVnfId()) && vfModuleInformation !=null && isValid(vfModuleInformation.getVfModuleId())) {
+
+
+            final String serviceInstanceId = serviceInformation.getServiceInstanceId();
+            final String vnfId = vnfInformation.getVnfId();
+            final String vfModuleId =  vfModuleInformation.getVfModuleId();
+
+            final Optional<GenericResourceApiServicemodelinfrastructureService> optional =
+                    getGenericResourceApiServicemodelinfrastructureService(serviceInstanceId);
+            if (optional.isPresent()) {
+                final GenericResourceApiServicemodelinfrastructureService service = optional.get();
+                final GenericResourceApiServicedataServiceData serviceData = service.getServiceData();
+                if (serviceData != null) {
+                  
+                        final GenericResourceApiServicestatusServiceStatus serviceStatus = service.getServiceStatus();
+
+                        return new Output().ackFinalIndicator(serviceStatus.getFinalIndicator())
+                                .responseCode(serviceStatus.getResponseCode())
+                                .responseMessage(serviceStatus.getResponseMessage()).svcRequestId(svcRequestId)
+                                .serviceResponseInformation(new GenericResourceApiInstanceReference()
+                                        .instanceId(serviceInstanceId).objectPath(getObjectPath(serviceInstanceId)))
+                                .vnfResponseInformation(new GenericResourceApiInstanceReference().instanceId(vnfId)
+                                        .objectPath(getObjectPath(serviceInstanceId, vnfId)))
+                                .vfModuleResponseInformation(new GenericResourceApiInstanceReference().instanceId(vfModuleId)
+                                               .objectPath(getObjectPath(vnfId, vfModuleId)));
+                }
+            }
+            LOGGER.error(
+                    "Unable to find existing GenericResourceApiServiceModelInfrastructure in cache using service instance id: {}",
+                    serviceInstanceId);
+        }
+        LOGGER.error(
+                "Unable to add GenericResourceApiServiceOperationInformation in cache due to invalid input: {}... ",
+                input);
+        return new Output().ackFinalIndicator(YES).responseCode(HTTP_STATUS_BAD_REQUEST)
+                .responseMessage("Unable to add vfModule").svcRequestId(svcRequestId);
+       }
+
+    private List<GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfmoduleVfModuleData> getVfModule(GenericResourceApiVfModuleOperationInformation input) {
+        
+       final GenericResourceApiVfmoduletopologyVfModuleTopology apiVfModuletopologyVfModuleTopology =
+                new GenericResourceApiVfmoduletopologyVfModuleTopology();
+       
+       GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfmoduleVfModuleData vfModuleData =
+                new GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfmoduleVfModuleData();
+        vfModuleData.setVfModuleInformation(input.getVfModuleInformation());
+        vfModuleData.setVfModuleRequestInput(input.getVfModuleRequestInput());
+               GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology = new GenericResourceApiVfmoduletopologyVfModuleTopology();
+               
+               vfModuleTopology.setSdncGeneratedCloudResources(true);
+               GenericResourceApiParam vfModuleParametersData = new GenericResourceApiParam();
+               List<GenericResourceApiParamParam> params = new ArrayList<GenericResourceApiParamParam>();
+               GenericResourceApiParamParam param = new GenericResourceApiParamParam();
+               param.setName("k8s-rb-profile-name");
+               param.setValue("k8s-rb-profile-value");
+       
+               params.add(param);
+               vfModuleParametersData.setParam(params);
+               vfModuleTopology.setVfModuleParameters(vfModuleParametersData);
+        
+        vfModuleTopology.setOnapModelInformation(vfModuleData.getVfModuleInformation().getOnapModelInformation());
+        vfModuleTopology.setVfModuleParameters(vfModuleData.getVfModuleRequestInput().getVfModuleInputParameters());
+        vfModuleTopology.setAicClli(vfModuleData.getVfModuleRequestInput().getAicClli());
+        vfModuleTopology.setAicCloudRegion(vfModuleData.getVfModuleRequestInput().getAicCloudRegion());
+        vfModuleTopology.setCloudOwner(vfModuleData.getVfModuleRequestInput().getCloudOwner());
+        
+        apiVfModuletopologyVfModuleTopology.vfModuleTopologyIdentifier(getVfModuleTopologyIdentifierStructure(input));
+        
+        vfModuleTopology.setVfModuleTopologyIdentifier(apiVfModuletopologyVfModuleTopology.getVfModuleTopologyIdentifier());
+        vfModuleTopology.setTenant(vfModuleData.getVfModuleRequestInput().getTenant());
+
+        genericResourceApiVfModuleTopology.setVfModuleTopology(vfModuleTopology);
+   
+       return null;
+
+    }
+
+       public GenericResourceApiVfModuleTopology getGenericResourceApiVfModuleTopology() {
+               return genericResourceApiVfModuleTopology;
+       }
+       
+       private GenericResourceApiVfmoduletopologyidentifierVfModuleTopologyIdentifier getVfModuleTopologyIdentifierStructure(
+            @Valid final GenericResourceApiVfModuleOperationInformation input) {
+               
+               final GenericResourceApiVfmoduleinformationVfModuleInformation vfModuleInformation = input.getVfModuleInformation();
+        return new GenericResourceApiVfmoduletopologyidentifierVfModuleTopologyIdentifier()
+                .vfModuleId(vfModuleInformation.getVfModuleId()).vfModuleType(vfModuleInformation.getVfModuleType()).vfModuleName(input.getVfModuleRequestInput().getVfModuleName());
+    }
+       
+       public GenericResourceApiVnfTopology getGenericResourceApiVnfTopology() {
+               return genericResourceApiVnfTopology;
+       }
+
+       public void getVnfsList(List<GenericResourceApiServicedataServicedataVnfsVnf> vnfsList) {
+               
+               GenericResourceApiVnftopologyVnfTopology vnfTopology = new GenericResourceApiVnftopologyVnfTopology();
+               LOGGER.info(String.valueOf(vnfsList));
+               vnfTopology.setOnapModelInformation(vnfsList.get(0).getVnfData().getVnfInformation().getOnapModelInformation());
+        vnfTopology.setAicClli(String.valueOf(vnfsList.get(0).getVnfData().getVnfRequestInput().getAicClli()));
+        vnfTopology.setAicCloudRegion(String.valueOf(vnfsList.get(0).getVnfData().getVnfRequestInput().getAicCloudRegion()));
+        vnfTopology.setCloudOwner(String.valueOf(vnfsList.get(0).getVnfData().getVnfRequestInput().getCloudOwner()));
+        vnfTopology.setTenant(String.valueOf(vnfsList.get(0).getVnfData().getVnfRequestInput().getTenant()));
+        vnfTopology.setVnfResourceAssignments(vnfsList.get(0).getVnfData().getVnfTopology().getVnfResourceAssignments());
+        vnfTopology.setVnfTopologyIdentifierStructure(vnfsList.get(0).getVnfData().getVnfTopology().getVnfTopologyIdentifierStructure());
+        vnfTopology.setVnfParametersData(vnfsList.get(0).getVnfData().getVnfTopology().getVnfParametersData());
+        vnfTopology.setSdncGeneratedCloudResources(vnfsList.get(0).getVnfData().getVnfTopology().getSdncGeneratedCloudResources());
+               
+        genericResourceApiVnfTopology.setVnfTopology(vnfTopology);
+       }
+}
\ No newline at end of file
index d886da9..ddda7b6 100644 (file)
@@ -37,7 +37,7 @@ public class SubscriptionManager {
     @Value("${vnfm-adapter.auth.password}")
     private String password;
 
-    @Value("${vnfm-adapter.base.endpoint:http://so-vnfm-adapter.onap:9092}")
+    @Value("${vnfm-adapter.base.endpoint:http://so-etsi-sol003-adapter.onap:9092}")
     private String baseEndpoint;
 
     @Autowired
index 6079a79..5d655b8 100644 (file)
@@ -48,7 +48,7 @@ vnfm-adapter:
       name: vnfm
       password: password1$
    base:
-      endpoint: http://so-vnfm-adapter.onap:9092
+      endpoint: http://so-etsi-sol003-adapter.onap:9092
 vnfds:
    vnfdlist:
       -  vnfdid: 1
index ba8ec00..c35bbaf 100644 (file)
@@ -80,7 +80,7 @@ import static org.springframework.test.web.client.response.MockRestResponseCreat
 public class TestSubscriptionNotificationController {
 
     private static final Logger LOGGER = getLogger(TestSubscriptionNotificationController.class);
-    private static final String SOL003_SUBSCRIPTION_URL = "http://so-vnfm-adapter.onap:9092" + VNFM_ADAPTER_SUBSCRIPTION_ENDPOINT;
+    private static final String SOL003_SUBSCRIPTION_URL = "http://so-etsi-sol003-adapter.onap:9092" + VNFM_ADAPTER_SUBSCRIPTION_ENDPOINT;
 
     @LocalServerPort
     private int port;
index 2f84beb..5e5aba8 100644 (file)
@@ -41,7 +41,7 @@ vnfm-adapter:
       name: vnfm
       password: password1$
    base:
-      endpoint: http://so-vnfm-adapter.onap:9092
+      endpoint: http://so-etsi-sol003-adapter.onap:9092
 vnfds:
    vnfdlist:
    -  vnfdid: 1
diff --git a/plans/so/macroflow/cloud_owner_sql/cloud_owner.sql b/plans/so/macroflow/cloud_owner_sql/cloud_owner.sql
new file mode 100644 (file)
index 0000000..e514799
--- /dev/null
@@ -0,0 +1,2 @@
+Use catalogdb; 
+insert into cloud_sites(ID, REGION_ID, IDENTITY_SERVICE_ID, CLOUD_VERSION, CLLI, ORCHESTRATOR) values("EtsiCloudRegion", "EtsiCloudRegion", "DEFAULT_KEYSTONE", "2.5", "clli2", "multicloud");
\ No newline at end of file
diff --git a/plans/so/macroflow/setup.sh b/plans/so/macroflow/setup.sh
new file mode 100644 (file)
index 0000000..8255562
--- /dev/null
@@ -0,0 +1,194 @@
+#!/bin/bash
+
+MAVEN_VERSION_DIR="apache-maven-3.3.9"
+MAVEN_TAR_FILE="$MAVEN_VERSION_DIR-bin.tar.gz"
+MAVEN_TAR_LOCATION="https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/$MAVEN_TAR_FILE"
+
+# SCRIPT_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+# Integration-Etsi Path
+SCRIPT_HOME=$WORKSPACE/plans/so/integration-etsi-testing
+SCRIPT_NAME=$(basename $0)
+CONFIG_DIR=$SCRIPT_HOME/config
+ENV_FILE=$CONFIG_DIR/env
+TEMP_DIR_PATH=$SCRIPT_HOME/temp
+TEST_LAB_DIR_PATH=$TEMP_DIR_PATH/test_lab
+DOCKER_COMPOSE_FILE_PATH=$SCRIPT_HOME/docker-compose.yml
+DOCKER_COMPOSE_LOCAL_OVERRIDE_FILE=$SCRIPT_HOME/docker-compose.local.yml
+TEAR_DOWN_SCRIPT=$SCRIPT_HOME/teardown.sh
+CAMUNDA_SQL_SCRIPT_NAME=mariadb_engine_7.10.0.sql
+CAMUNDA_SQL_SCRIPT_DIR=$CONFIG_DIR/camunda-sql
+TEST_LAB_SQL_SCRIPTS_DIR=$TEST_LAB_DIR_PATH/volumes/mariadb/docker-entrypoint-initdb.d/db-sql-scripts
+
+MAVEN_DIR=$TEMP_DIR_PATH/maven
+INSTALLED_MAVEN_DIR=$MAVEN_DIR/$MAVEN_VERSION_DIR
+MVN=$INSTALLED_MAVEN_DIR/bin/mvn
+MVN_VERSION="$MVN -v"
+MVN_SETTINGS_XML="$SCRIPT_HOME/settings.xml"
+MVN_CLEAN_INSTALL="$MVN clean install"
+SIMULATOR_MAVEN_PROJECT_POM="$SCRIPT_HOME/so-simulators/pom.xml"
+WAIT_FOR_WORKAROUND_SCRIPT=$CONFIG_DIR/"wait-for-workaround-job.sh"
+WAIT_FOR_POPULATE_AAI_SCRIPT=$CONFIG_DIR/"wait-for-aai-config-job.sh"
+WAIT_FOR_CONTAINER_SCRIPT=$CONFIG_DIR/"wait-for-container.sh"
+
+# Macroflow Path
+MACRO_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+SQL_PATH=$MACRO_HOME/cloud_owner_sql
+
+
+
+echo "Running $SCRIPT_HOME/$SCRIPT_NAME ..."
+
+export $(egrep -v '^#' $ENV_FILE | xargs)
+
+MANDATORY_VARIABLES_NAMES=( "NEXUS_DOCKER_REPO_MSO" "DOCKER_ENVIRONMENT" "TAG" "TIME_OUT_DEFAULT_VALUE_SEC" "PROJECT_NAME" "DEFAULT_NETWORK_NAME", "ETSI_CATALOG_IMAGE_VERSION", "SOL_003_ADAPTER_IMAGE_VERSION", "ETSI_NFVO_NS_LCM_IMAGE_VERSION", "MARIADB_VERSION")
+
+for var in "${MANDATORY_VARIABLES_NAMES[@]}"
+ do
+   if [ -z "${!var}" ]; then
+     echo "Missing mandatory attribute $var in $ENV_FILE"
+     exit 1
+  fi
+done
+
+if [[ ! "$TEMP_DIR_PATH" || ! -d "$TEMP_DIR_PATH" ]]; then
+        echo "Creating temporary directory $TEMP_DIR_PATH"
+        mkdir $TEMP_DIR_PATH
+
+        if [ $? -ne 0 ]; then
+                echo "Could not create $TEMP_DIR_PATH"
+                exit 1
+        fi
+
+fi
+echo "Will use ${TEMP_DIR_PATH} directory"
+
+if [[ ! "$MAVEN_DIR" || ! -d "$MAVEN_DIR" ]]; then
+        echo "Creating temporary maven directory $MAVEN_DIR"
+        mkdir $MAVEN_DIR
+
+        if [ $? -ne 0 ]; then
+                echo "Could not create $MAVEN_DIR"
+                exit 1
+        fi
+fi
+echo "Will use ${MAVEN_DIR} directory for maven install"
+
+if [[ ! "$INSTALLED_MAVEN_DIR" || ! -d "$INSTALLED_MAVEN_DIR" ]]; then
+        echo "Installing maven ..."
+        cd $MAVEN_DIR
+
+        CURL=`which curl`
+        if [[ ! "$CURL" ]]; then
+                echo "curl command is not installed"
+                echo "Unable to execute test plan"
+                exit 1
+        fi
+        curl -O $MAVEN_TAR_LOCATION
+
+        TAR=`which tar`
+        if [[ ! "$TAR" ]]; then
+                echo "tar command is not installed"
+                echo "Unable to execute test plan"
+                exit 1
+        fi
+
+        tar -xzvf $MAVEN_TAR_FILE
+
+        echo "Finished installing maven ..."
+fi
+
+echo "Maven installed under directory $INSTALLED_MAVEN_DIR"
+
+$MVN_VERSION
+
+if [ $? -ne 0 ]; then
+        echo "Unable to run mvn -v command"
+        exit 1
+fi
+
+cd $SCRIPT_HOME
+
+echo "Will build simulator project using $MVN_CLEAN_INSTALL -f $SIMULATOR_MAVEN_PROJECT_POM --settings $MVN_SETTINGS_XML"
+$MVN_CLEAN_INSTALL -f $SIMULATOR_MAVEN_PROJECT_POM --settings $MVN_SETTINGS_XML
+
+if [ $? -ne 0 ]; then
+        echo "Maven build failed"
+        exit 1
+fi
+
+echo "Will clone docker-config project ... "
+
+
+if [[ -d "$TEST_LAB_DIR_PATH" ]]; then
+       echo "$TEST_LAB_DIR_PATH already exists"
+       echo "Removing $TEST_LAB_DIR_PATH directory ..."
+       rm -rf $TEST_LAB_DIR_PATH
+fi
+
+git clone http://gerrit.onap.org/r/so/docker-config.git $TEST_LAB_DIR_PATH
+
+echo "Replacing $CAMUNDA_SQL_SCRIPT_NAME ..."
+rm -rf $TEST_LAB_SQL_SCRIPTS_DIR/$CAMUNDA_SQL_SCRIPT_NAME
+cp $CAMUNDA_SQL_SCRIPT_DIR/$CAMUNDA_SQL_SCRIPT_NAME $TEST_LAB_SQL_SCRIPTS_DIR
+
+export TEST_LAB_DIR=$TEST_LAB_DIR_PATH
+export CONFIG_DIR_PATH=$CONFIG_DIR
+
+if [ "$DOCKER_ENVIRONMENT" == "remote" ]; then
+  echo "Starting docker containers with remote images ..."
+  docker-compose -f $DOCKER_COMPOSE_FILE_PATH -p $PROJECT_NAME up -d
+elif [ "$DOCKER_ENVIRONMENT" == "local" ]; then
+  echo "Starting docker containers with local images ..."
+  docker-compose -f $DOCKER_COMPOSE_FILE_PATH -f $DOCKER_COMPOSE_LOCAL_OVERRIDE_FILE -p $PROJECT_NAME up -d
+else
+  echo "DOCKER_ENVIRONMENT not set correctly in $ENV_FILE.  Allowed values: local | remote"
+  exit 1
+fi
+
+echo "Sleeping for 3m"
+sleep 3m
+
+docker ps -a
+export SQL_DIR_PATH=$SQL_PATH
+docker cp $SQL_DIR_PATH/cloud_owner.sql $(docker container ls | grep mariadb | awk '{ print $1 }'):/
+docker exec $(docker container ls | grep mariadb | awk '{ print $1 }') sh -c 'mysql -u root -ppassword <  /cloud_owner.sql'
+
+echo "Will execute $WAIT_FOR_WORKAROUND_SCRIPT script"
+$WAIT_FOR_WORKAROUND_SCRIPT
+
+if [ $? -ne 0 ]; then
+   echo "ERROR: $WAIT_FOR_WORKAROUND_SCRIPT failed"
+   echo "Will stop running docker containers . . ."
+   $TEAR_DOWN_SCRIPT
+   exit 1
+fi
+
+echo "Will execute $WAIT_FOR_POPULATE_AAI_SCRIPT script"
+$WAIT_FOR_POPULATE_AAI_SCRIPT
+
+if [ $? -ne 0 ]; then
+   echo "ERROR: $WAIT_FOR_POPULATE_AAI_SCRIPT failed"
+   echo "Will stop running docker containers . . ."
+   $TEAR_DOWN_SCRIPT
+   exit 1
+fi
+
+PODS_NAMES=( "api-handler-infra" "bpmn-infra")
+
+for pod in "${PODS_NAMES[@]}"
+ do
+     echo "Will execute $WAIT_FOR_CONTAINER_SCRIPT to wait for $pod container to start up"
+     $WAIT_FOR_CONTAINER_SCRIPT -c "$pod" -t "300" -n "$DEFAULT_NETWORK_NAME"
+
+     if [ $? -ne 0 ]; then
+        echo "ERROR: $WAIT_FOR_CONTAINER_SCRIPT for pod: $pod failed"
+        echo "Will stop running docker containers . . ."
+        $TEAR_DOWN_SCRIPT
+        exit 1
+     fi
+done
+
+REPO_IP='127.0.0.1'
+ROBOT_VARIABLES="-v REPO_IP:${REPO_IP}"
+
+echo "Finished executing $SCRIPT_HOME/$SCRIPT_NAME"
diff --git a/plans/so/macroflow/teardown.sh b/plans/so/macroflow/teardown.sh
new file mode 100644 (file)
index 0000000..8296688
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# SCRIPT_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+SCRIPT_HOME=$WORKSPACE/plans/so/integration-etsi-testing
+SCRIPT_NAME=$(basename $0)
+CONFIG_DIR=$SCRIPT_HOME/config
+ENV_FILE=$CONFIG_DIR/env
+TEMP_DIR_PATH=$SCRIPT_HOME/temp
+TEST_LAB_DIR_PATH=$TEMP_DIR_PATH/test_lab
+DOCKER_COMPOSE_FILE_PATH=$SCRIPT_HOME/docker-compose.yml
+DOCKER_COMPOSE_LOCAL_OVERRIDE_FILE=$SCRIPT_HOME/docker-compose.local.yml
+
+
+echo "Running $SCRIPT_HOME/$SCRIPT_NAME ..."
+export $(egrep -v '^#' $ENV_FILE | xargs)
+export TEST_LAB_DIR=$TEST_LAB_DIR_PATH
+export CONFIG_DIR_PATH=$CONFIG_DIR
+
+echo "Sleeping 2m for completing the macroflow task"
+sleep 2m
+
+if [ "$DOCKER_ENVIRONMENT" == "remote" ]; then
+  echo "Tearing down docker containers from remote images ..."
+  docker-compose -f $DOCKER_COMPOSE_FILE_PATH -p $PROJECT_NAME down
+elif [ "$DOCKER_ENVIRONMENT" == "local" ]; then
+  echo "Tearing down docker containers from local images ..."
+  docker-compose -f $DOCKER_COMPOSE_FILE_PATH -f $DOCKER_COMPOSE_LOCAL_OVERRIDE_FILE -p $PROJECT_NAME down
+else
+  echo "Couldn't find valid property for DOCKER_ENVIRONMENT in $ENV_FILE."
+  echo "Attempting normal teardown ..."
+  docker-compose -f $DOCKER_COMPOSE_FILE_PATH -p $PROJECT_NAME down
+fi
+
+echo "Finished executing $SCRIPT_HOME/$SCRIPT_NAME"
diff --git a/plans/so/macroflow/testplan.txt b/plans/so/macroflow/testplan.txt
new file mode 100644 (file)
index 0000000..00a8d8b
--- /dev/null
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration/csit.git]/tests/.
+# Place the suites in run order.
+so/sanity-check/macroflow.robot
index 192e274..4ed9b77 100644 (file)
@@ -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)
index 3ce7fa0..b8b0a0a 100644 (file)
@@ -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"
+
index 3b24d47..b845dda 100755 (executable)
@@ -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}"
 
index c52535c..a3e4faa 100755 (executable)
@@ -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/
index eb29445..14b3886 100755 (executable)
@@ -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/sdnc/netconf-pnp-simulator/docker-compose.yml b/scripts/sdnc/netconf-pnp-simulator/docker-compose.yml
deleted file mode 100755 (executable)
index d8e723b..0000000
+++ /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 (file)
index 63872ee..0000000
+++ /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 (file)
index 6c8c36a..0000000
+++ /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 (executable)
index 6127296..0000000
+++ /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()
index 48b4d90..6f7f756 100644 (file)
Binary files a/scripts/sdnc/sdnc/certs/keys0.zip and b/scripts/sdnc/sdnc/certs/keys0.zip differ
index c47fab5..61bf8b6 100755 (executable)
@@ -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
diff --git a/tests/ccsdk-oran/polmansuite/__init__.robot b/tests/ccsdk-oran/polmansuite/__init__.robot
deleted file mode 100644 (file)
index bf52713..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-*** Settings ***
-Documentation    Non-RT RIC Policy Management - polmansuite
diff --git a/tests/ccsdk-oran/polmansuite/test.robot b/tests/ccsdk-oran/polmansuite/test.robot
deleted file mode 100644 (file)
index 59d73eb..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-*** Settings ***
-Library       OperatingSystem
-Library       Process
-
-*** Test Cases ***
-
-Functional Test Case 1
-    [Documentation]                 Deploy PMS without SDNC
-    Start Process                   ${ARCHIVES}/test/pms_a1sim.sh
-    ${cli_cmd_output}=              Wait For Process    timeout=3600
-    Should Be Equal as Integers     ${cli_cmd_output.rc}    0
-
-Functional Test Case 2
-    [Documentation]                 Deploy PMS with SDNC
-    Start Process                   ${ARCHIVES}/test/pms_a1sim_sdnc.sh
-    ${cli_cmd_output}=              Wait For Process    timeout=3600
-    Should Be Equal as Integers     ${cli_cmd_output.rc}    0
index 6d659f9..acf53ff 100644 (file)
                                 "get_param": "reliability"
                             },
                             "unit": ""
-                        },
-                        {
-                            "attribute": "coverage_area_ta_list",
-                            "operator": "eq",
-                            "threshold": {
-                                "get_param": "coverage_area_ta_list"
-                            },
-                            "unit": ""
                         }
                     ]
                 },
@@ -63,8 +55,7 @@
                     "filtering_attributes": {
                         "service_profile": {
                                         "latency": {"value": {"get_param": "latency"}, "operator": "lte"},
-                                        "reliability": {"value": {"get_param": "reliability"}, "operator": "gte"},
-                                        "coverage_area_ta_list": {"value": {"get_param": "coverage_area_ta_list"}, "operator": "eq"}
+                                        "reliability": {"value": {"get_param": "reliability"}, "operator": "gte"}
                                   },
                         "subnets":{
                         "core": {
                             }
                         },
                         "ran": {
-                            "coverage_area_ta_list": {
-                                "values": [
-                                    {
-                                        "get_param": "coverage_area_ta_list"
-                                    }
-                                ]
-                            },
                             "latency": {
                                 "max": {
                                     "get_param": "latency"
         "parameters": {
             "core_latency": 10,
             "core_reliability": 99.9,
-            "coverage_area_ta_list": "Chennai",
             "latency": 30,
             "ran_latency": 7,
             "ran_reliability": 99.9,
index 1b5b99e..b4e625a 100644 (file)
                                 "get_param": "reliability"
                             },
                             "unit": ""
-                        },
-                        {
-                            "attribute": "coverage_area_ta_list",
-                            "operator": "eq",
-                            "threshold": {
-                                "get_param": "coverage_area_ta_list"
-                            },
-                            "unit": ""
                         }
                     ]
                 },
@@ -63,8 +55,7 @@
                     "filtering_attributes": {
                         "service_profile": {
                                         "latency": {"value": {"get_param": "latency"}, "operator": "lte"},
-                                        "reliability": {"value": {"get_param": "reliability"}, "operator": "gte"},
-                                        "coverage_area_ta_list": {"value": {"get_param": "coverage_area_ta_list"}, "operator": "eq"}
+                                        "reliability": {"value": {"get_param": "reliability"}, "operator": "gte"}
                                   },
                         "subnets":{
                         "core": {
                             }
                         },
                         "ran": {
-                            "coverage_area_ta_list": {
-                                "values": [
-                                    {
-                                        "get_param": "coverage_area_ta_list"
-                                    }
-                                ]
-                            },
                             "latency": {
                                 "max": {
                                     "get_param": "latency"
         "parameters": {
             "core_latency": 10,
             "core_reliability": 99.9,
-            "coverage_area_ta_list": "Chennai",
             "latency": 30,
             "ran_latency": 7,
             "ran_reliability": 99.9,
index ff66b2d..3cce5f9 100644 (file)
                                 "get_param": "reliability"
                             },
                             "unit": ""
-                        },
-                        {
-                            "attribute": "coverage_area_ta_list",
-                            "operator": "eq",
-                            "threshold": {
-                                "get_param": "coverage_area_ta_list"
-                            },
-                            "unit": ""
                         }
                     ]
                 },
@@ -63,8 +55,7 @@
                     "filtering_attributes": {
                         "service_profile": {
                                         "latency": {"value": {"get_param": "latency"}, "operator": "lte"},
-                                        "reliability": {"value": {"get_param": "reliability"}, "operator": "gte"},
-                                        "coverage_area_ta_list": {"value": {"get_param": "coverage_area_ta_list"}, "operator": "eq"}
+                                        "reliability": {"value": {"get_param": "reliability"}, "operator": "gte"}
                                   },
                         "subnets":{
                         "core": {
                             }
                         },
                         "ran": {
-                            "coverage_area_ta_list": {
-                                "values": [
-                                    {
-                                        "get_param": "coverage_area_ta_list"
-                                    }
-                                ]
-                            },
+          
                             "latency": {
                                 "max": {
                                     "get_param": "latency"
         "parameters": {
             "core_latency": 10,
             "core_reliability": 99.9,
-            "coverage_area_ta_list": "Chennai",
             "latency": 30,
             "ran_latency": 7,
             "ran_reliability": 99.9,
index a498ca0..e165694 100644 (file)
@@ -7,7 +7,6 @@
    "template": {
       "homing_template_version": "2020-08-13",
       "parameters": {
-         "coverage_area_ta_list": "Chennai",
          "latency": 30,
          "reliability": 99.9
       },
                         "get_param": "reliability"
                      },
                      "unit": ""
-                  },
-                  {
-                     "attribute": "coverage_area_ta_list",
-                     "operator": "eq",
-                     "threshold": {
-                        "get_param": "coverage_area_ta_list"
-                     },
-                     "unit": ""
                   }
                ]
             },
index 4930280..23500c5 100644 (file)
@@ -7,7 +7,6 @@
    "template": {
       "homing_template_version": "2020-08-13",
       "parameters": {
-         "coverage_area_ta_list": "Chennai",
          "latency": 5,
          "reliability": 99.9
       },
                         "get_param": "reliability"
                      },
                      "unit": ""
-                  },
-                  {
-                     "attribute": "coverage_area_ta_list",
-                     "operator": "eq",
-                     "threshold": {
-                        "get_param": "coverage_area_ta_list"
-                     },
-                     "unit": ""
                   }
+     
                ]
             },
             "type": "threshold"
diff --git a/tests/optf-has/has/data/nst_selection_template.json b/tests/optf-has/has/data/nst_selection_template.json
new file mode 100644 (file)
index 0000000..4181914
--- /dev/null
@@ -0,0 +1,55 @@
+{
+   "name":"urllc_sample",
+   "files":{
+   },
+   "limit":10,
+   "num_solution":"1",
+   "timeout":1200,
+   "template":{
+      "homing_template_version":"2020-08-13",
+      "demands":{
+         "nst_demand":[
+            {
+               "inventory_provider":"aai",
+               "inventory_type":"nst",
+               "unique":"true",
+               "region":"RegionOne",
+               "filtering_attributes":{
+                  "model-role":"nst"
+               }
+            }
+         ]
+      },
+      "constraints":{
+         "nst_Threshold":{
+            "type":"threshold",
+            "demands":[
+               "nst_demand"
+            ],
+            "properties":{
+               "evaluate":[
+                  {
+                     "attribute":"latency",
+                     "operator":"lte",
+                     "threshold":30,
+                     "unit":"ms"
+                  }
+               ]
+            }
+         }      },
+      "optimization":{
+         "goal": "minimize",
+         "operation_function": {
+            "operator": "sum",
+            "operands": [{
+               "function": "attribute",
+               "params": {
+                  "demand": "nst_demand",
+                  "attribute": "latency"
+               }
+            }]
+         }
+      }
+   }
+}
\ No newline at end of file
index 9185fce..6085bce 100644 (file)
@@ -686,6 +686,40 @@ GetPlanWithNssiSelectionUnmatched
     Should Be Equal As Integers    ${resp.status_code}    200
     Should Be Equal    not found    ${resultStatus}
 
+# NST selection template
+SendPlanWithNSTSelection
+    [Documentation]    It sends a POST request to conductor
+    Create Session   optf-cond            ${COND_HOSTNAME}:${COND_PORT}
+    ${data}=         Get Binary File     ${CURDIR}${/}data${/}nst_selection_template.json
+    &{headers}=      Create Dictionary    Authorization=${HAS_Auth}    Content-Type=application/json  Accept=application/json
+    ${resp}=         Post Request        optf-cond   /v1/plans     data=${data}     headers=${headers}
+    Log To Console              *********************
+    Log To Console              response = ${resp}
+    Log To Console              body = ${resp.text}
+    ${response_json}    json.loads    ${resp.content}
+    ${generatedPlanId}=    Convert To String      ${response_json['id']}
+    Set Global Variable     ${generatedPlanId}
+    Log To Console              generatedPlanId = ${generatedPlanId}
+    Should Be Equal As Integers    ${resp.status_code}    201
+    Sleep    60s    Wait Plan Resolution
+
+GetPlanWithNsTSelection
+    [Documentation]    It sends a REST GET request to capture recommendations
+    Create Session   optf-cond            ${COND_HOSTNAME}:${COND_PORT}
+    &{headers}=      Create Dictionary    Authorization=${HAS_Auth}    Content-Type=application/json  Accept=application/json
+    ${resp}=         Get Request        optf-cond   /v1/plans/${generatedPlanId}    headers=${headers}
+    Log To Console              *********************
+    Log To Console              response = ${resp}
+    ${response_json}    json.loads    ${resp.content}
+    ${resultStatus}=    Convert To String      ${response_json['plans'][0]['status']}
+    ${instance_name}=    Convert To String      ${response_json['plans'][0]['recommendations'][0]['nst_demand']['candidate']['model_name']}
+    Set Global Variable     ${resultStatus}
+    Log To Console              resultStatus = ${resultStatus}
+    Log To Console              body = ${resp.text}
+    Should Be Equal As Integers    ${resp.status_code}    200
+    Should Be Equal    done    ${resultStatus}
+    Should Be Equal    EmbbNst    ${instance_name}
+
 
 *** Keywords ***
 
index 3648a8e..85783a7 100644 (file)
@@ -6,7 +6,7 @@ Library     json
 Library     String
 
 *** Variables ***
-${SDN_APIDOCS_URI}    /apidoc/apis
+${SDN_APIDOCS_URI}    /apidoc/openapi3/18/apis/single
 ${SDN_HEALTHCHECK_OPERATION_PATH}    /operations/SLI-API:healthcheck
 
 *** Test Cases ***
index 52cc5d2..3ea6164 100644 (file)
@@ -55,8 +55,6 @@ Send Get Request And Validate TLS Connection Response
     &{headers1}=  Create Dictionary    Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==    Content-Type=application/json    Accept=application/json
     ${resp1}=    Get Request    sdnc_restconf    ${PNFSIM_MOUNT_PATH}    headers=${headers1}
     Should Be Equal As Strings    ${resp1.status_code}    ${resp_code}
-    Should Contain  ${resp1.content}     netconf-id
-    Should Contain  ${resp1.content}     netconf-param
 
 Send Delete Request And Validate PNF Mount Deleted
     [Documentation]   Send request to passed url and validate received response
index 131a52f..2f2d6f5 100644 (file)
@@ -28,10 +28,10 @@ ${SDNC_NETWORK_TOPOLOGY}                 /config/network-topology:network-topolo
 ${MOUNT_PATH}                            %{WORKSPACE}/tests/sdnc/sdnc_netconf_tls_post_deploy/cert-data
 ${SDNC_CSR_FILE}                         %{WORKSPACE}/tests/sdnc/sdnc_netconf_tls_post_deploy/csr/sdnc_csr.env
 ${SDNC_MOUNT_PATH}                       /config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo
-${PNFSIM_MOUNT_PATH}                     /config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo/yang-ext:mount/mynetconf:netconflist
+${PNFSIM_MOUNT_PATH}                     /config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo/yang-ext:mount/turing-machine:turing-machine
 
 # Netconf-Pnp-Simulator
 ${NETCONF_PNP_SIM_CONTAINER_NAME}        %{NETCONF_PNP_SIM_CONTAINER_NAME}
 ${NETCONF_PNP_SIM_CSR_FILE}              %{WORKSPACE}/tests/sdnc/sdnc_netconf_tls_post_deploy/csr/netconf_pnp_simulator_csr.env
 ${CONF_SCRIPT}                           %{WORKSPACE}/tests/sdnc/sdnc_netconf_tls_post_deploy/libraries/config.sh
-${CONF_TLS_SCRIPT}                       %{WORKSPACE}/tests/sdnc/sdnc_netconf_tls_post_deploy/libraries/config_tls.sh
\ No newline at end of file
+${CONF_TLS_SCRIPT}                       %{WORKSPACE}/tests/sdnc/sdnc_netconf_tls_post_deploy/libraries/config_tls.sh
index c2b35e1..4d93597 100644 (file)
@@ -9,52 +9,19 @@ Suite Setup       Create sessions
 
 *** Test Cases ***
 
-Health Check AAF CertService
-    [Tags]      AAF-CERT-SERVICE
-    [Documentation]   Service is Up and Running
-    Run health check
-
-Reload AAF CertService Configuration
-    [Tags]      AAF-CERT-SERVICE
-    [Documentation]   Configuration is Reloaded
-    Send Get Request And Validate Response  /reload  200
-
-Check AAF CertService Container Is Ready
-    [Tags]      AAF-CERT-SERVICE
-    [Documentation]   Send Request to /ready Endpoint and Expect 200
-    Send Get Request And Validate Response  /ready  200
-
 Check SDNC Keystore For Netopeer2 Certificates
     [Tags]      SDNC-NETOPEER2-CERT-DEPLOYMENT
     [Documentation]    Checking Keystore after SDNC istallation
     Send Get Request And Validate Response Sdnc  ${SDNC_KEYSTORE_CONFIG_PATH}  200
 
+
 Check SDNC And PNF TLS Connection Over Netopeer2 Certificates
     [Tags]      SDNC-PNF-TLS-CONNECTION-CHECK
-    [Documentation]    Checking PNF Mount after SDNC Installation
+   [Documentation]    Checking PNF Mount after SDNC Installation
     Send Get Request And Validate TLS Connection Response  ${SDNC_MOUNT_PATH}  200
 
 Check PNF Delete And Remove Netopeer2 Certificates From Keystore
     [Tags]      SDNC-PNF-MOUNT-DELETE-CLEAR-KEYSTORE
     [Documentation]    Checking PNF Mount Delete from SDNC
-    Send Delete Request And Validate PNF Mount Deleted  ${SDNC_MOUNT_PATH}  200
-
-Check AAF-CertService Successfully Creates Certificates for SDNC
-    [Tags]      AAF-CERT-SERVICE-SDNC
-    [Documentation]  Run with SDNC CSR and Expected Exit Code 0
-    Run Cert Service Client And Validate JKS File Creation And Client Exit Code  ${SDNC_CSR_FILE}  ${SDNC_CONTAINER_NAME}  0
-
-Check SDNC-ODL Certificates Installation In Keystore And Truststore
-    [Tags]      SDNC-ODL-CERTIFICATE-KEYSTORE-VALIDATE
-    [Documentation]  Validate Certificates Got Installed in SDNC-ODL Keystore
-    Send Get Request And Validate Response Sdnc  ${SDNC_KEYSTORE_CONFIG_PATH}  200
-
-Check AAF-CertService Successfully Creates Certificates for Netconf-Pnp-Simulator
-    [Tags]      AAF-CERT-SERVICE-NETCONF_PNP_SIMULATOR
-    [Documentation]  Run with NETCONF-PNP-SIMULATOR CSR and Expect Exit Code 0
-    Run Cert Service Client And Validate JKS File Creation And Client Exit Code  ${NETCONF_PNP_SIM_CSR_FILE}  ${NETCONF_PNP_SIM_CONTAINER_NAME}  0
+   Send Delete Request And Validate PNF Mount Deleted  ${SDNC_MOUNT_PATH}  200
 
-Check SDNC-ODL Netconf-Pnp-Simulatore TLS Connection Establishment
-    [Tags]      SDNC-ODL-NETCONF-PNP_SIMULATION-TLS-CONNECTION
-    [Documentation]  Validate SDNC-ODL and Netconf-Pnp-Simulation TLS Connection Establishment
-    Send Get Request And Validate TLS Connection Response  ${SDNC_MOUNT_PATH}  200
\ No newline at end of file
index 41eeb8b..c97865e 100644 (file)
   "operationalState": "ENABLED",
   "_links": {
     "self": {
-      "href": "http://so-vnfm-adapter.onap:9092/so/vnfm-adapter/v1/vnfpkgm/v1/vnf_packages/73522444-e8e9-49c1-be29-d355800aa349"
+      "href": "http://so-etsi-sol003-adapter.onap:9092/so/vnfm-adapter/v1/vnfpkgm/v1/vnf_packages/73522444-e8e9-49c1-be29-d355800aa349"
     },
     "vnfd": {
-      "href": "http://so-vnfm-adapter.onap:9092/so/vnfm-adapter/v1/vnfpkgm/v1/vnf_packages/73522444-e8e9-49c1-be29-d355800aa349/vnfd"
+      "href": "http://so-etsi-sol003-adapter.onap:9092/so/vnfm-adapter/v1/vnfpkgm/v1/vnf_packages/73522444-e8e9-49c1-be29-d355800aa349/vnfd"
     },
     "packageContent": {
-      "href": "http://so-vnfm-adapter.onap:9092/so/vnfm-adapter/v1/vnfpkgm/v1/vnf_packages/73522444-e8e9-49c1-be29-d355800aa349/package_content"
+      "href": "http://so-etsi-sol003-adapter.onap:9092/so/vnfm-adapter/v1/vnfpkgm/v1/vnf_packages/73522444-e8e9-49c1-be29-d355800aa349/package_content"
     }
   }
 }
diff --git a/tests/so/sanity-check/data/macroflow.json b/tests/so/sanity-check/data/macroflow.json
new file mode 100644 (file)
index 0000000..87f782a
--- /dev/null
@@ -0,0 +1,161 @@
+{
+  "requestDetails": {
+    "requestInfo": {
+      "suppressRollback": false,
+      "productFamilyId": "1234",
+      "requestorId": "demo",
+      "instanceName": "CsitEtsiInstance",
+      "source": "VID"
+    },
+    "modelInfo": {
+      "modelType": "service",
+      "modelInvariantId": "b9202a74-4c16-4245-83ad-1cd53c813214",
+      "modelVersionId": "6f2c7614-571c-4482-aa2c-5eac0308aa16",
+      "modelName": "vfw_k8s_demo_CNF",
+      "modelVersion": "1.0"
+    },
+    "cloudConfiguration": {
+      "tenantId": "693c7729b2364a26a3ca602e6f66187d",
+      "cloudOwner": "CloudOwner",
+      "lcpCloudRegionId": "EtsiCloudRegion"
+    },
+    "subscriberInfo": {
+      "globalSubscriberId": "DemoCustomer"
+    },
+    "requestParameters": {
+      "subscriptionServiceType": "vCPE",
+      "userParams": [{
+        "Homing_Solution": "none"
+      }, {
+        "service": {
+          "instanceParams": [],
+          "instanceName": "CsitEtsiInstance",
+          "resources": {
+            "vnfs": [
+              {
+                "modelInfo": {
+                  "modelName": "VF_vfw_k8s_demo_CNF",
+                  "modelVersionId": "daeb6a5c-3a8a-40b0-a575-8cca71dd0b7c",
+                  "modelInvariantUuid": "517403c8-fab8-4cfe-9bc5-d94f5e34b257",
+                  "modelVersion": "1.0",
+                  "modelCustomizationId": "8b8b67bd-01a4-42f7-b0fc-1d3a0f2765fd",
+                  "modelInstanceName": "VF_vfw_k8s_demo_CNF 0"
+                },
+                "cloudConfiguration": {
+                  "tenantId": "693c7729b2364a26a3ca602e6f66187d",
+                  "cloudOwner": "CloudOwner",
+                  "lcpCloudRegionId": "EtsiCloudRegion"
+                },
+                "platform": {
+                  "platformName": "test"
+                },
+                "lineOfBusiness": {
+                  "lineOfBusinessName": "LOB-Demonstration"
+                },
+                "productFamilyId": "1234",
+                "instanceName": "VF_frankfurt_vfw_k8s_demo_final",
+                "instanceParams": [{
+                  "sdnc_model_name": "vFW_CNF_CDS",
+                  "sdnc_model_version": "1.0.45",
+                  "sdnc_artifact_name": "vnf"
+                }
+                ],
+                "vfModules": [
+                  {
+                    "modelInfo": {
+                      "modelName": "VfVfwK8sDemoCnf..base_template..module-0",
+                      "modelVersionId": "86224a10-c17e-42c9-9809-f3c31ba1b781",
+                      "modelInvariantUuid": "2bc34946-d57d-4053-9e9f-d60587c9aa12",
+                      "modelVersion": "1",
+                      "modelCustomizationId": "905ffa63-7011-4cbe-943c-237f303b4e9f"
+                    },
+                    "instanceName": "vf_frankfurt_vfw_k8s_demo_final0..VfFrankfurtVfwK8sDemoFinal..base_template..module-0",
+                    "instanceParams": [{
+                      "k8s-rb-profile-name": "vfw-cnf-cds-base-profile",
+                      "k8s-rb-profile-namespace": "test-vfw1",
+                      "sdnc_model_name": "vFW_CNF_CDS",
+                      "sdnc_model_version": "1.0.45",
+                      "vf_module_label": "base_template"
+                    }
+                    ]
+                  },
+                  {
+                    "modelInfo": {
+                      "modelName": "VfVfwK8sDemoCnf..vsn..module-1",
+                      "modelVersionId": "3c50323b-5f8c-4b31-938f-8e996a2e0001",
+                      "modelInvariantUuid": "11e50367-a4c9-4203-a838-518446ec816a",
+                      "modelVersion": "1",
+                      "modelCustomizationId": "1812807a-9f6b-42e4-b78c-814c3fea5a4c"
+                    },
+                    "instanceName": "vf_frankfurt_vfw_k8s_demo_final0..VfFrankfurtVfwK8sDemoFinal..vsn..module-1",
+                    "instanceParams": [{
+                      "k8s-rb-profile-name": "vfw-cnf-cds-base-profile",
+                      "k8s-rb-profile-namespace": "vfirewall",
+                      "sdnc_model_name": "vFW_CNF_CDS",
+                      "sdnc_model_version": "7.0.0",
+                      "vf_module_label": "vsn"
+                    }
+                    ]
+                  },
+                  {
+                    "modelInfo": {
+                      "modelName": "VfVfwK8sDemoCnf..vpkg..module-2",
+                      "modelVersionId": "104e8b4e-d404-4a5b-9beb-f92a217fd6ee",
+                      "modelInvariantUuid": "1782dcdb-2a4c-4665-8d04-be6b989fea8e",
+                      "modelVersion": "1",
+                      "modelCustomizationId": "02fb0319-f37d-4e8b-9009-263fffdb2549"
+                    },
+                    "instanceName": "vf_frankfurt_vfw_k8s_demo_final0..VfFrankfurtVfwK8sDemoFinal..vpkg..module-2",
+                    "instanceParams": [{
+                      "k8s-rb-profile-name": "vfw-cnf-cds-base-profile",
+                      "k8s-rb-profile-namespace": "vfirewall",
+                      "sdnc_model_name": "vFW_CNF_CDS",
+                      "sdnc_model_version": "7.0.0",
+                      "vf_module_label": "vpkg"
+                    }
+                    ]
+                  },
+                  {
+                    "modelInfo": {
+                      "modelName": "VfVfwK8sDemoCnf..vfw..module-3",
+                      "modelVersionId": "a5f678db-2e5f-47be-8fab-1540bc7482d8",
+                      "modelInvariantUuid": "c0869243-7667-4434-b9cc-84791f07a13a",
+                      "modelVersion": "1",
+                      "modelCustomizationId": "f144c7c8-da93-4e06-ba93-d26e69eba509"
+                    },
+                    "instanceName": "vf_frankfurt_vfw_k8s_demo_final0..VfFrankfurtVfwK8sDemoFinal..vfw..module-3",
+                    "instanceParams": [{
+                      "k8s-rb-profile-name": "vfw-cnf-cds-base-profile",
+                      "k8s-rb-profile-namespace": "vfirewall",
+                      "sdnc_model_name": "vFW_CNF_CDS",
+                      "sdnc_model_version": "7.0.0",
+                      "vf_module_label": "vfw"
+                    }
+                    ]
+                  }
+
+                ]
+              }
+            ]
+          },
+          "modelInfo": {
+            "modelVersion": "1.0",
+            "modelVersionId": "6f2c7614-571c-4482-aa2c-5eac0308aa16",
+            "modelInvariantId": "b9202a74-4c16-4245-83ad-1cd53c813214",
+            "modelName": "vfw_k8s_demo_CNF",
+            "modelType": "service"
+          }
+        }
+      }
+      ],
+      "aLaCarte": false
+    },
+    "project": {
+      "projectName": "etsiCsitProject"
+    },
+    "owningEntity": {
+      "owningEntityId": "f2e1071e-3d47-4a65-94d4-e473ec03326a",
+      "owningEntityName": "OE-Demonstration"
+    }
+  }
+}
diff --git a/tests/so/sanity-check/data/serviceBasicVfCnfnotification.json b/tests/so/sanity-check/data/serviceBasicVfCnfnotification.json
new file mode 100644 (file)
index 0000000..02485e1
--- /dev/null
@@ -0,0 +1,294 @@
+{
+  "distributionID": "2d6c5aa8-b644-4f30-a632-5577801ef959",
+  "serviceName": "vfw_k8s_demo_CNF",
+  "serviceVersion": "1.0",
+  "serviceUUID": "6f2c7614-571c-4482-aa2c-5eac0308aa16",
+  "serviceDescription": "service",
+  "serviceInvariantUUID": "b9202a74-4c16-4245-83ad-1cd53c813214",
+  "resources": [
+    {
+      "resourceInstanceName": "VF_vfw_k8s_demo_CNF 0",
+      "resourceName": "VF_vfw_k8s_demo_CNF",
+      "resourceVersion": "1.0",
+      "resoucreType": "VF",
+      "resourceUUID": "daeb6a5c-3a8a-40b0-a575-8cca71dd0b7c",
+      "resourceInvariantUUID": "517403c8-fab8-4cfe-9bc5-d94f5e34b257",
+      "resourceCustomizationUUID": "8b8b67bd-01a4-42f7-b0fc-1d3a0f2765fd",
+      "category": "Generic",
+      "subcategory": "Abstract",
+      "artifacts": [{
+          "artifactName": "vf_vfw_k8s_demo_cnf0_modules.json",
+          "artifactType": "VF_MODULES_METADATA",
+          "artifactURL": "/unzipped_sdc_csar/vf_vfw_k8s_demo_cnf0_modules.json",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "86224a10-c17e-42c9-9809-f3c31ba1b781",
+          "artifactVersion": "1"
+        },
+{
+          "artifactName": "vf_vfw_k8s_demo_cnf1_modules.json",
+          "artifactType": "VF_MODULES_METADATA",
+          "artifactURL": "/unzipped_sdc_csar/vf_vfw_k8s_demo_cnf0_modules.json",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "3c50323b-5f8c-4b31-938f-8e996a2e0001",
+          "artifactVersion": "1"
+        }, 
+
+{
+          "artifactName": "base_template.env",
+          "artifactType": "HEAT_ENV",
+          "artifactURL": "/unzipped_sdc_csar/base_template.env",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "ede4c2de-133f-49e3-9daa-8c56b65b5c6b",
+          "artifactVersion": "1"
+        }, 
+{
+          "artifactName": "base_template_cloudtech_k8s_charts.env",
+          "artifactType": "HEAT_ENV",
+          "artifactURL": "/unzipped_sdc_csar/base_template_cloudtech_k8s_charts.env",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "6833f47d-e91b-4887-8b55-f68ef25bccf3",
+          "artifactVersion": "1"
+        },
+
+{
+          "artifactName": "base_template.env",
+          "artifactType": "HEAT_ENV",
+          "artifactURL": "/unzipped_sdc_csar/base_template.env",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "7f1dbc99-849e-4af8-bdcb-6c214f939428",
+          "artifactVersion": "1"
+        }, 
+{
+          "artifactName": "base_template_cloudtech_k8s_charts.env",
+          "artifactType": "HEAT_ENV",
+          "artifactURL": "/unzipped_sdc_csar/base_template_cloudtech_k8s_charts.env",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "71607418-af27-4712-8e0c-cfe992b95a38",
+          "artifactVersion": "1"
+        },
+{
+          "artifactName": "vfw.env",
+          "artifactType": "HEAT_ENV",
+          "artifactURL": "/unzipped_sdc_csar/vfw.env",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "406fe9df-aa4c-42c1-8f83-c7ac11169fd4",
+          "artifactVersion": "1"
+        },
+{
+          "artifactName": "vfw_cloudtech_k8s_charts.env",
+          "artifactType": "HEAT_ENV",
+          "artifactURL": "/unzipped_sdc_csar/vfw_cloudtech_k8s_charts.env",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "33f7aab2-3324-4523-b37a-625b0cf77dfe",
+          "artifactVersion": "1"
+        },
+{
+          "artifactName": "vpkg_cloudtech_k8s_charts.env",
+          "artifactType": "HEAT_ENV",
+          "artifactURL": "/unzipped_sdc_csar/vpkg_cloudtech_k8s_charts.env",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "8ab17b5a-3fbd-4142-a75f-c55ffd4c5af5",
+          "artifactVersion": "1"
+        },
+{
+          "artifactName": "vsn.env",
+          "artifactType": "HEAT_ENV",
+          "artifactURL": "/unzipped_sdc_csar/vsn.env",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "e17c1e60-f7da-4767-9a0e-02c8ff9c0f2e",
+          "artifactVersion": "1"
+        },
+{
+          "artifactName": "vsn_cloudtech_k8s_charts.env",
+          "artifactType": "HEAT_ENV",
+          "artifactURL": "/unzipped_sdc_csar/vsn_cloudtech_k8s_charts.env",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "989dbc01-2fa5-463b-abaa-cf73996ea12b",
+          "artifactVersion": "1"
+        },
+{
+          "artifactName": "base_template_cloudtech_k8s_charts.tgz",
+          "artifactType": "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT",
+          "artifactURL": "/unzipped_sdc_csar/base_template_cloudtech_k8s_charts.env",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "406fe9df-aa4c-42c1-8f83-c7ac11169fd4",
+          "artifactVersion": "1"
+        },
+{
+          "artifactName": "vfw_cloudtech_k8s_charts.tgz",
+          "artifactType": "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT",
+          "artifactURL": "/unzipped_sdc_csar/vfw_cloudtech_k8s_charts.env",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "6833f47d-e91b-4887-8b55-f68ef25bccf3",
+          "artifactVersion": "1"
+        },
+{
+          "artifactName": "vpkg_cloudtech_k8s_charts.tgz",
+          "artifactType": "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT",
+          "artifactURL": "/unzipped_sdc_csar/vpkg_cloudtech_k8s_charts.env",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "406fe9df-aa4c-42c1-8f83-c7ac11169fd4",
+          "artifactVersion": "1"
+        },
+{
+          "artifactName": "vsn_cloudtech_k8s_charts.tgz",
+          "artifactType": "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT",
+          "artifactURL": "/unzipped_sdc_csar/vsn_cloudtech_k8s_charts.tgz",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "8ab17b5a-3fbd-4142-a75f-c55ffd4c5af5",
+          "artifactVersion": "1"
+        }
+
+,
+{
+          "artifactName": "vsn_cloudtech_k8s_charts.tgz",
+          "artifactType": "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT",
+          "artifactURL": "/unzipped_sdc_csar/vsn_cloudtech_k8s_charts.tgz",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "aaeee885-5821-4e08-8da6-0bb3b74f24e9",
+          "artifactVersion": "1"
+        },
+{
+          "artifactName": "vsn_cloudtech_k8s_charts.tgz",
+          "artifactType": "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT",
+          "artifactURL": "/unzipped_sdc_csar/vsn_cloudtech_k8s_charts.tgz",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "b4510b34-e39c-4239-bacc-7dd2f3c2a418",
+          "artifactVersion": "1"
+        }
+
+,
+{
+          "artifactName": "base_template.yaml",
+          "artifactType": "HEAT",
+          "artifactURL": "/unzipped_sdc_csar/base_template.yaml",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "33f7aab2-3324-4523-b37a-625b0cf77dfe",
+          "artifactVersion": "1"
+        }
+
+,
+{
+          "artifactName": "vfw.yaml",
+          "artifactType": "HEAT",
+          "artifactURL": "/unzipped_sdc_csar/vfw.yaml",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "6833f47d-e91b-4887-8b55-f68ef25bccf3",
+          "artifactVersion": "1"
+        }
+
+,
+{
+          "artifactName": "vpkg.yaml",
+          "artifactType": "HEAT",
+          "artifactURL": "/unzipped_sdc_csar/vpkg.yaml",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "42b80d18-69ec-4233-8844-f0df6ebb6e3d",
+          "artifactVersion": "1"
+        }
+,
+{
+          "artifactName": "vsn.yaml",
+          "artifactType": "HEAT",
+          "artifactURL": "/unzipped_sdc_csar/vsn.yaml",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "406fe9df-aa4c-42c1-8f83-c7ac11169fd4",
+          "artifactVersion": "1"
+        }
+
+,
+{
+          "artifactName": "vendor-license-model.xml",
+          "artifactType": "VENDOR_LICENSE",
+          "artifactURL": "/unzipped_sdc_csar/vendor-license-model.xml",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "6e1dbc99-849e-4af8-bdcb-6c214f939491",
+          "artifactVersion": "1"
+        }
+
+,
+{
+          "artifactName": "vf-license-model.xml",
+          "artifactType": "VF_LICENSE",
+          "artifactURL": "/unzipped_sdc_csar/vf-license-model.xml",
+          "artifactChecksum": "MDJkYjNmNjEzM2Y1ZDgzNzZiZWUxMjZkMzA3YzkwZDI\u003d",
+          "artifactDescription": "Auto-generated VF Modules information artifact",
+          "artifactTimeout": 120,
+          "artifactUUID": "ede4c2de-133f-49e3-9daa-8c56b65b5c6b",
+          "artifactVersion": "1"
+        }
+
+]
+    }
+   
+   
+  ],
+  "serviceArtifacts": [
+    {
+      "artifactName": "service-VfwK8sDemoCnf-template.yml",
+      "artifactType": "TOSCA_TEMPLATE",
+      "artifactURL": "/unzipped_sdc_csar/service-VfwK8sDemoCnf-template.yml",
+      "artifactChecksum": "NTUzMDU5YzM3MTk4OGNiNjQ2OGRlMWY2YjU3MjE2YjM\u003d",
+      "artifactDescription": "TOSCA representation of the asset",
+      "artifactTimeout": 0,
+      "artifactUUID": "6f2c7614-571c-4482-aa2c-5eac0308aa16",
+      "artifactVersion": "1"
+    },
+    {
+      "artifactName": "service-VfwK8sDemoCnf-csar.csar",
+      "artifactType": "TOSCA_CSAR",
+      "artifactURL": "/unzipped_sdc_csar/service-VfwK8sDemoCnf-csar.csar",
+      "artifactChecksum": "ZTRhOGI0M2UxN2ZhYjQ0ODI5ZDZhZTExZTFkMGU3N2Y\u003d",
+      "artifactDescription": "TOSCA definition package of the asset",
+      "artifactTimeout": 0,
+      "artifactUUID": "6f2c7614-571c-4482-aa2c-5eac0308aa16",
+      "artifactVersion": "1"
+    }
+  ],
+  "workloadContext": "Production"
+}
+
diff --git a/tests/so/sanity-check/macroflow.robot b/tests/so/sanity-check/macroflow.robot
new file mode 100644 (file)
index 0000000..92224ea
--- /dev/null
@@ -0,0 +1,25 @@
+*** Settings ***
+Library     Collections
+Library     RequestsLibrary
+Library     OperatingSystem
+Library     json
+
+*** Test Cases ***
+Distribute Service Template
+    Create Session   sdc_controller_session  http://${REPO_IP}:8085
+    ${data}=    Get Binary File     ${CURDIR}${/}data${/}serviceBasicVfCnfnotification.json
+    &{headers}=  Create Dictionary    Authorization=Basic bXNvX2FkbWluOnBhc3N3b3JkMSQ=    resource-location=/distribution-test-zip/unzipped/    Content-Type=application/json    Accept=application/json
+    ${resp}=    Post Request    sdc_controller_session    /test/treatNotification/v1    data=${data}    headers=${headers}
+    Log To Console     Received status code: ${resp.status_code}
+    Run Keyword If  '${resp.status_code}' == '200'  log to console  \nexecuted with expected result
+    Should Be Equal As Strings    '${resp.status_code}'    '200'
+
+
+Macroflow
+    Create Session   api_handler_session  http://${REPO_IP}:8080
+    ${data}=    Get Binary File     ${CURDIR}${/}data${/}macroflow.json
+    &{headers}=  Create Dictionary    Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==    Content-Type=application/json    Accept=application/json
+    ${service_instantiation_request}=    Post Request    api_handler_session    /onap/so/infra/serviceInstantiation/v7/serviceInstances    data=${data}    headers=${headers}
+    Log To Console     Received status code: ${service_instantiation_request.status_code}
+    Run Keyword If  '${service_instantiation_request.status_code}' == '202'  log to console   \nexecuted with expected result
+    Should Be Equal As Strings    '${service_instantiation_request.status_code}'    '202'