diff options
author | denilson.l65 <denilson.l65@wipro.com> | 2021-10-28 05:35:37 +0000 |
---|---|---|
committer | denilson.l65 <denilson.l65@wipro.com> | 2021-10-28 09:25:39 +0000 |
commit | e774d8e154736681f8bb918b581bcd2d3fd87eb3 (patch) | |
tree | 9bcf313335c605f1ca56fc2932c488ffff6722dc | |
parent | 85321a52e56422c1bb552c10387d27066decee84 (diff) |
Add CPS & AAI components in slice-analysis-ms csit
Issue-ID: DCAEGEN2-2956
Signed-off-by: denilson.l65 <denilson.l65@wipro.com>
Change-Id: I5b687b7a76a91e96d2934c9c17f8f72d6097485b
22 files changed, 1607 insertions, 5 deletions
@@ -13,7 +13,6 @@ env.properties .vagrant /archives/ *.jar -*.zip *.tar *.gz *.log diff --git a/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/config_all.json b/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/config_all.json index 75938019..7504ca86 100644 --- a/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/config_all.json +++ b/plans/dcaegen2-services-slice-analysis-ms/testsuites/config/sliceanalysisms/config_all.json @@ -64,9 +64,9 @@ "sliceanalysisms.pollingTimeout": 60, "sliceanalysisms.cid": "sliceanalysisms-cid", "sliceanalysisms.configDb.service": "http://configdb_sim:5000", - "sliceanalysisms.aai.url": "http://configdb_sim:5000/aai/v21", - "sliceanalysisms.cps.url": "http://configdb_sim:5000", - "sliceanalysisms.configDbEnabled": "true", + "sliceanalysisms.aai.url": "https://aai-resources:8447/aai/v21", + "sliceanalysisms.cps.url": "http://cps-tbdmt:8080/execute/ran-network", + "sliceanalysisms.configDbEnabled": "false", "service_calls": { "policy-req": [] }, diff --git a/plans/dcaegen2-services-slice-analysis-ms/testsuites/setup.sh b/plans/dcaegen2-services-slice-analysis-ms/testsuites/setup.sh index 1c52d718..b75df561 100644 --- a/plans/dcaegen2-services-slice-analysis-ms/testsuites/setup.sh +++ b/plans/dcaegen2-services-slice-analysis-ms/testsuites/setup.sh @@ -5,6 +5,7 @@ docker login -u docker -p docker nexus3.onap.org:10001 TEST_PLANS_DIR=$WORKSPACE/plans/dcaegen2-services-slice-analysis-ms/testsuites TEST_SCRIPTS_DIR=$WORKSPACE/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms TEST_ROBOT_DIR=$WORKSPACE/tests/dcaegen2-services-slice-analysis-ms/testcases +TEST_SCRIPTS_CPS_DIR=$WORKSPACE/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai docker-compose up -d @@ -56,5 +57,9 @@ sleep 10 CONFIGDB_SIM_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' configdb_sim) echo "CONFIGDB_SIM_IP=${CONFIGDB_SIM_IP}" +# CPS & AAI set up +cd $TEST_SCRIPTS_CPS_DIR +sh cps-aai-setup.sh ROBOT_VARIABLES="-v ZOOKEEPER_IP:${ZOOKEEPER_IP} -v KAFKA_IP:${KAFKA_IP} -v DMAAP_IP:${DMAAP_IP} -v SLICE_ANALYSIS_MS_POSTGRES_IP:${SLICE_ANALYSIS_MS_POSTGRES_IP} -v SLICE_ANALYSIS_MS_IP:${SLICE_ANALYSIS_MS_IP} -v CONFIGDB_SIM_IP:${CONFIGDB_SIM_IP} -v TEST_ROBOT_DIR:${TEST_ROBOT_DIR}" + diff --git a/plans/dcaegen2-services-slice-analysis-ms/testsuites/teardown.sh b/plans/dcaegen2-services-slice-analysis-ms/testsuites/teardown.sh index 516bf8cb..2ac53527 100644 --- a/plans/dcaegen2-services-slice-analysis-ms/testsuites/teardown.sh +++ b/plans/dcaegen2-services-slice-analysis-ms/testsuites/teardown.sh @@ -1,9 +1,12 @@ #!/bin/bash echo "Starting teardown script" TEST_PLANS_DIR=$WORKSPACE/plans/dcaegen2-services-slice-analysis-ms/testsuites +TEST_SCRIPTS_DIR=$WORKSPACE/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai mkdir -p $WORKSPACE/archives docker container stop configdb_sim docker container rm configdb_sim docker-compose -f $TEST_PLANS_DIR/docker-compose.yaml logs > $WORKSPACE/archives/sonhandler-docker-compose.log +docker-compose -f $TEST_SCRIPTS_DIR/docker-compose.yaml down -v docker-compose -f $TEST_PLANS_DIR/docker-compose.yaml down -v + diff --git a/plans/dcaegen2-services-slice-analysis-ms/testsuites/testplan.txt b/plans/dcaegen2-services-slice-analysis-ms/testsuites/testplan.txt index a8b2bdab..d8708f41 100644 --- a/plans/dcaegen2-services-slice-analysis-ms/testsuites/testplan.txt +++ b/plans/dcaegen2-services-slice-analysis-ms/testsuites/testplan.txt @@ -1,3 +1,4 @@ # Test suites are relative paths under [integration/csit.git]/tests/. # Place the suites in run order. -dcaegen2-services-slice-analysis-ms/testcases +#dcaegen2-services-slice-analysis-ms/testcases/slice-analysis-ms-test.robot +dcaegen2-services-slice-analysis-ms/testcases/slice-analysis-ms-test-cps-aai.robot diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/application.properties b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/application.properties new file mode 100644 index 00000000..ee768055 --- /dev/null +++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/application.properties @@ -0,0 +1,132 @@ +# The following info parameters are being referenced by ajsc6 +info.build.artifact=aai-resources +info.build.name=resources +info.build.description=Resources Microservice +info.build.version=1.1.0 + +spring.application.name=Resources Microservice +spring.jersey.type=filter +spring.main.allow-bean-definition-overriding=true + +server.servlet.context-path=/ +spring.autoconfigure.exclude=\ + org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,\ + org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration,\ + org.keycloak.adapters.springboot.KeycloakAutoConfiguration,\ + org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration,\ + org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration + +spring.jersey.application-path=${schema.uri.base.path} + +spring.profiles.active=production +#The max number of active threads in this pool +jetty.threadPool.maxThreads=200 +#The minimum number of threads always kept alive +jetty.threadPool.minThreads=8 +#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads +server.tomcat.max-idle-time=60000 + +# If you get an application startup failure that the port is already taken +# If thats not it, please check if the key-store file path makes sense +server.local.startpath=/opt/aai-resources/resources +server.basic.auth.location=${server.local.startpath}/etc/auth/realm.properties +server.certs.location=${server.local.startpath}etc/auth/ +#server.keystore.name=keystore.jks +server.keystore.name=aai_keystore +server.truststore.name=aai_keystore +server.port=8447 +server.ssl.enabled-protocols=TLSv1.1,TLSv1.2 +server.ssl.key-store=${server.certs.location}${server.keystore.name} +server.ssl.key-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.trust-store=${server.certs.location}${server.truststore.name} +server.ssl.trust-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.client-auth=want +server.ssl.key-store-type=JKS + +null.db.serialization.enabled=true + +# JMS bind address host port +jms.bind.address=tcp://localhost:61647 + +dmaap.ribbon.listOfServers=localhost:3904 + +# Schema related attributes for the oxm and edges +# Any additional schema related attributes should start with prefix schema +schema.configuration.location=N/A +schema.source.name=onap +schema.nodes.location=${server.local.startpath}/schema/${schema.source.name}/oxm/ +schema.edges.location=${server.local.startpath}/schema/${schema.source.name}/dbedgerules/ + +schema.ingest.file=${server.local.startpath}/application.properties + +# Schema Version Related Attributes + +schema.uri.base.path=/aai +# Lists all of the versions in the schema +schema.version.list=v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24 +# Specifies from which version should the depth parameter to default to zero +schema.version.depth.start=v10 +# Specifies from which version should the related link be displayed in response payload +schema.version.related.link.start=v10 +# Specifies from which version should the client see only the uri excluding host info +# Before this version server base will also be included +schema.version.app.root.start=v11 +# Specifies from which version should the namespace be changed +schema.version.namespace.change.start=v12 +# Specifies from which version should the client start seeing the edge label in payload +schema.version.edge.label.start=v12 +# Specifies the version that the application should default to +schema.version.api.default=v24 + + +#schema.translator.list=schema-service +schema.translator.list=config +schema.service.base.url=https://localhost:8452/aai/schema-service/v1/ +schema.service.nodes.endpoint=nodes?version= +schema.service.edges.endpoint=edgerules?version= +schema.service.versions.endpoint=versions + +schema.service.ssl.key-store=${server.certs.location}${server.keystore.name} +schema.service.ssl.trust-store=${server.certs.location}${server.truststore.name} +schema.service.ssl.key-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +schema.service.ssl.trust-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +schema.service.versions.override=false + +#To Expose the Prometheus scraping endpoint +management.server.port=8448 +#To Enable Actuator Endpoint, you can override this to True in OOM charts +management.endpoints.enabled-by-default=true +#To Enable Actuator Endpoint, you can override this in OOM Charts +management.endpoints.web.exposure.include=info, health, prometheus +management.metrics.web.server.auto-time-requests=false +management.metrics.tags.group_id=aai +# management.metrics.tags.app_id=${info.build.artifact} +# management.metrics.tags.aai_uri=${schema.uri.base.path} +#It is not advisable to use labels to store dimensions with high cardinality. +#Enable this option only for debug purposes. For more information: https://github.com/micrometer-metrics/micrometer/issues/1584 +scrape.uri.metrics=false + +# Location of the cadi properties file should be specified here +aaf.cadi.file=${server.local.startpath}/cadi.properties + +delta.events.enabled=false + +# Specifies what type of request should it be: one-way-ssl, two-way-ssl, no-auth +validation.service.client=one-way-ssl +# Base url for the validation service +validation.service.base.url=https://localhost:9501/services/validation-service +# Client certificate to use to make the request to validation +validation.service.ssl.key-store=${server.local.startpath}/etc/auth/aai-client-cert.p12 +# Truststore to use to make the request to validation +validation.service.ssl.trust-store=${server.local.startpath}/etc/auth/tomcat_keystore +# Client certificate password for the validation +validation.service.ssl.key-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +# Truststore password for the validation +validation.service.ssl.trust-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +# Amount of time that the client should wait in milliseconds before request failing +validation.service.timeout-in-milliseconds=3000 +# List of aai node types that should be send to the validation microservice +validation.service.node-types=generic-vnf,lag-interface,l-interface,logical-link,newvce,nos-server,p-interface,pnf,pserver,vce,vlan,vnfc,vpls-pe,vserver +# List of X-FromAppId regexes seperated by comma to ignore the pre validation for +# Note: please don't add any client id here as this is only for testing tools such as robot +validation.service.exclusion-regexes= diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/application.yml b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/application.yml new file mode 100644 index 00000000..7d0aae81 --- /dev/null +++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/application.yml @@ -0,0 +1,51 @@ +############################################################################### +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2021 Wipro Limited. +# ============================================================================== +# 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========================================================= +# +############################################################################### + +spring: + datasource: + initialization-mode: always + initialize: true + url: jdbc:postgresql://postgres:5432/cps_template_db + username: postgres + password: postgres + continue-on-error: true + jpa: + hibernate: + ddl-auto: update + properties: + hibernate: + temp: + use_jdbc_metadata_defaults: false + database-platform: org.hibernate.dialect.PostgreSQLDialect +app: + cpsCoreConfiguration: + url: http://cps-and-ncmp:8080/cps/api/v1/dataspaces/E2EDemo + username: cpsuser + password: cpsr0cks! + ncmpConfiguration: + url: http://cps-and-ncmp:8080/cps/api/v1 + username: cpsuser + password: cpsr0cks! + cpsClient: cpsCore + schemaToAnchor: + ran-coverage-area: coverage-area-onap + e2e-cavsta-schemaset: e2e-cavsta1 + ran-network: ran-network-anchor diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/cps-aai-setup.sh b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/cps-aai-setup.sh new file mode 100644 index 00000000..4cd5e447 --- /dev/null +++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/cps-aai-setup.sh @@ -0,0 +1,77 @@ +#!/bin/bash + +#Building cps-tbdmt image +git clone "https://gerrit.onap.org/r/cps/cps-tbdmt" +mvn -f cps-tbdmt/ -Dmaven.test.skip clean install --settings settings.xml +sudo rm -r cps-tbdmt/ + +#Creating containers for cps, cps-tbdmt & aai-resources +docker-compose up -d + +sleep 50 + +# uploading data to cps & cps-tbdmt +CPS_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' cps-and-ncmp ) +echo $CPS_IP +CPS_TBDMT_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' cps-tbdmt ) +echo $CPS_TBDMT_IP + +echo "Creating dataspace: " +curl --location --user cpsuser:cpsr0cks! -H "Accept: application/json" -H "Content-Type: application/json" \ +--request POST \ +http://$CPS_IP:8080/cps/api/v1/dataspaces?dataspace-name=E2EDemo + +echo "\nCreating schema set: " +curl --location --user cpsuser:cpsr0cks! \ +--request POST \ +http://$CPS_IP:8080/cps/api/v1/dataspaces/E2EDemo/schema-sets --form 'file=@"ran-network.zip"' --form 'schema-set-name="ran-network"' + +echo "\nCreating anchor: " +curl --location --user cpsuser:cpsr0cks! --request POST \ +http://$CPS_IP:8080/cps/api/v1/dataspaces/E2EDemo/anchors?schema-set-name=ran-network \ +-d anchor-name=ran-network-anchor + +echo "\nUploading cps payload " +curl --location --user cpsuser:cpsr0cks! --request POST \ +http://$CPS_IP:8080/cps/api/v1/dataspaces/E2EDemo/anchors/ran-network-anchor/nodes \ +--header 'Content-Type: application/json' \ +-d @sim-data/payload-ran-network.json + + +echo "\nuploading tbdmt-templates" +curl --location --request POST \ +http://$CPS_TBDMT_IP:8080/templates \ +--header 'Content-Type: application/json' \ +--data-raw '{"templateId": "get-nearrtric-config","model": "ran-network","requestType": "query-cps-path","xpathTemplate": "//sNSSAIList[@sNssai='\''{{sNssai}}'\'']/ancestor::NearRTRIC","includeDescendants": true}' + +curl --location --request POST \ +http://$CPS_TBDMT_IP:8080/templates \ +--header 'Content-Type: application/json' \ +--data-raw '{"templateId": "get-gnbdufunction-by-snssai","model": "ran-network","requestType": "query-cps-path","xpathTemplate": "//sNSSAIList[@sNssai='\''{{sNssai}}'\'']/ancestor::GNBDUFunction","includeDescendants": true}' + +curl --location --request POST \ +http://$CPS_TBDMT_IP:8080/templates \ +--header 'Content-Type: application/json' \ +--data-raw '{"templateId": "get-nrcelldu-by-snssai","model": "ran-network","requestType": "query-cps-path","xpathTemplate": "//sNSSAIList[@sNssai='\''{{sNssai}}'\'']/ancestor::NearRTRIC","includeDescendants": true}' + + +##Uploading aai data +AAI_RESOURCES_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' aai-resources ) + +echo "\nUploading data to aai-resources" +curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k \ +https://$AAI_RESOURCES_IP:8447/aai/v21/business/customers/customer/5GCustomer \ +-d @sim-data/customers.json + +curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k \ +https://$AAI_RESOURCES_IP:8447/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G \ +-d @sim-data/service_subscriptions.json + +curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k \ +https://$AAI_RESOURCES_IP:8447/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/3f2f23fa-c567-4dd8-8f15-f95ae3e6fd84 \ +-d @sim-data/service_instances.json + +curl --request PUT -H "X-FromAppId:AAI " -H "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k \ +https://$AAI_RESOURCES_IP:8447/aai/v24/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/3f2f23fa-c567-4dd8-8f15-f95ae3e6fd84/slice-profiles/slice-profile/684hf846f-863b-4901-b202-0ab86a638555 \ +-d @sim-data/slice_profile.json + diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/docker-compose.yaml b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/docker-compose.yaml new file mode 100644 index 00000000..ec44ba72 --- /dev/null +++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/docker-compose.yaml @@ -0,0 +1,103 @@ +# ============LICENSE_START======================================================= +# cps-tdmt +# ================================================================================ +# Copyright (C) 2021 Wipro Limited. +# ============================================================================== +# 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.3" +networks: + testsuites_slice-analysis-ms-default: + external: true +services: + cps-and-ncmp: + container_name: cps-and-ncmp + hostname: cps-and-ncmp + image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/cps-and-ncmp:${VERSION:-latest} + ports: + - "8883:8080" + - "8887:8081" + networks: + - testsuites_slice-analysis-ms-default + environment: + CPS_USERNAME: ${CPS_USERNAME:-cpsuser} + CPS_PASSWORD: ${CPS_PASSWORD:-cpsr0cks!} + DB_HOST: dbpostgresql + DB_USERNAME: ${DB_USERNAME:-cps} + DB_PASSWORD: ${DB_PASSWORD:-cps} + DMI_USERNAME: ${DMI_USERNAME:-cpsuser} + DMI_PASSWORD: ${DMI_PASSWORD:-cpsr0cks!} + #KAFKA_BOOTSTRAP_SERVER: kafka:9092 + #notification.data-updated.enabled: 'true' + #NOTIFICATION_DATASPACE_FILTER_PATTERNS: '.*' + restart: unless-stopped + depends_on: + - dbpostgresql + + dbpostgresql: + container_name: dbpostgresql + image: postgres:13.2-alpine + ports: + - '5432:5432' + networks: + - testsuites_slice-analysis-ms-default + environment: + POSTGRES_DB: cpsdb + POSTGRES_USER: ${DB_USERNAME:-cps} + POSTGRES_PASSWORD: ${DB_PASSWORD:-cps} + postgres: + image: 'postgres:12.4-alpine' + container_name: cps-tbdmt-postgres + hostname: postgres + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=postgres + - POSTGRES_DB=cps_template_db + ports: + - 5432 + healthcheck: + test: ["CMD", "nc", "-z", "localhost", "5432"] + interval: 30s + timeout: 10s + retries: 5 + networks: + - testsuites_slice-analysis-ms-default + cps-tdmt: + image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/cps-tbdmt:${VERSION:-latest} + container_name: cps-tbdmt + hostname: cps-tbdmt + ports: + - "8088:8080" + volumes: + - "./application.yml:/app/resources/application.yml" + depends_on: + - postgres + restart: on-failure:10 + networks: + - testsuites_slice-analysis-ms-default + aai-resources: + image: ${DOCKER_REPO:-nexus3.onap.org:10001}/onap/aai-resources:1.9.1 + hostname: aai-resources + container_name: aai-resources + networks: + - testsuites_slice-analysis-ms-default + ports: + - "8447:8447" + volumes: + - ./application.properties:/opt/app/aai-resources/resources/application.properties + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/ran-network.zip b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/ran-network.zip Binary files differnew file mode 100755 index 00000000..806c022b --- /dev/null +++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/ran-network.zip diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/settings.xml b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/settings.xml new file mode 100755 index 00000000..e645b41b --- /dev/null +++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/settings.xml @@ -0,0 +1,171 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2016-2018 Huawei Technologies Co., Ltd. and others. 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. +--> +<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> + +<localRepository>${user.home}/.m2/repository</localRepository> + <profiles> + <profile> + <id>onap-settings</id> + <properties> + <onap.nexus.url>https://nexus.onap.org</onap.nexus.url> + <onap.nexus.rawrepo.baseurl.upload>https://nexus.onap.org/content/sites/raw</onap.nexus.rawrepo.baseurl.upload> + <onap.nexus.rawrepo.baseurl.download>https://nexus.onap.org/service/local/repositories/raw/content</onap.nexus.rawrepo.baseurl.download> + <onap.nexus.rawrepo.serverid>ecomp-raw</onap.nexus.rawrepo.serverid> + + <!-- properties for Nexus Docker registry --> + <onap.nexus.dockerregistry.daily>nexus3.onap.org:10003</onap.nexus.dockerregistry.daily> + <onap.nexus.dockerregistry.release>nexus3.onap.org:10002</onap.nexus.dockerregistry.release> + <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry> + <docker.push.registry>nexus3.onap.org:10003</docker.push.registry> + </properties> + </profile> + <profile> + <id>onap-snapshots</id> + <repositories> + <repository> + <id>onap-snapshots</id> + <name>onap-snapshots</name> + <url>https://nexus.onap.org/content/repositories/snapshots/</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>onap-snapshots</id> + <name>onap-snapshots</name> + <url>https://nexus.onap.org/content/repositories/snapshots/</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </pluginRepository> + </pluginRepositories> + </profile> + <profile> + <id>onap-releases</id> + <repositories> + <repository> + <id>onap-releases</id> + <name>onap-releases</name> + <url>https://nexus.onap.org/content/repositories/releases/</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>onap-releases</id> + <name>onap-releases</name> + <url>https://nexus.onap.org/content/repositories/releases/</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </pluginRepository> + </pluginRepositories> + </profile> + <profile> + <id>onap-public</id> + <repositories> + <repository> + <id>central</id> + <url>https://repo1.maven.org/maven2/</url> + </repository> + <repository> + <id>onap-public</id> + <name>onap-public</name> + <url>https://nexus.onap.org/content/repositories/public/</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>central</id> + <url>https://repo1.maven.org/maven2/</url> + </pluginRepository> + <pluginRepository> + <id>onap-public</id> + <name>onap-public</name> + <url>https://nexus.onap.org/content/repositories/public/</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </pluginRepository> + </pluginRepositories> + </profile> + <profile> + <!-- Configure this profile if you have a local nexus cache --> + <id>local-public</id> + <repositories> + <repository> + <id>local-public</id> + <name>local-public</name> + <url>http://nexus-proxy:8081/nexus/content/repositories/public/</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>local-public</id> + <name>local-public</name> + <url>http://nexus-proxy:8081/nexus/content/repositories/public/</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </pluginRepository> + </pluginRepositories> + </profile> + </profiles> + + <activeProfiles> + <activeProfile>onap-settings</activeProfile> + <activeProfile>onap-snapshots</activeProfile> + <activeProfile>onap-releases</activeProfile> + <activeProfile>onap-public</activeProfile> + <!-- <activeProfile>local-public</activeProfile> --> + </activeProfiles> + +</settings> + diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/customers.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/customers.json new file mode 100644 index 00000000..29072fa0 --- /dev/null +++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/customers.json @@ -0,0 +1,5 @@ +{ + "global-customer-id": "5GCustomer", + "subscriber-name": "5GCustomer", + "subscriber-type": "INFRA" +} diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/payload-ran-network.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/payload-ran-network.json new file mode 100644 index 00000000..d72ac241 --- /dev/null +++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/payload-ran-network.json @@ -0,0 +1,704 @@ +{ + "ran-network": { + "NearRTRIC": [ + { + "idNearRTRIC": 11, + "attributes": { + "near-rt-ric-url": "10.165.160.47:6080", + "trackingArea": "Kingston", + "rANNFNSSIList": [ + "e893-e93r-c0f2-kj76", + "m93ed-e93e-c0f2-9i7y" + ], + "RRMPolicyRatio": [ + { + "id": "33", + "attributes": { + "resourceType": "sharing", + "rRMPolicyMemberList": [ + { + "idx": 33, + "mcc": "310", + "mnc": "410", + "sNSSAI": 101 + } + ], + "quotaType": "STRICT", + "rRMPolicyMaxRatio": 22, + "rRMPolicyMinRatio": 3, + "rRMPolicyDedicatedRatio": 4 + } + } + ], + "pLMNInfoList": [ + { + "mcc": "310", + "mnc": "410", + "sNSSAIList": [ + { + "sNssai": "001-00110", + "status": "ACTIVE", + "configData": [ + { + "configParameter": "maxNumberOfConns", + "configValue": 10 + }, + { + "configParameter": "uLThptPerSlice", + "configValue": 10 + }, + { + "configParameter": "dLThptPerSlice", + "configValue": 10 + } + ] + } + ] + } + ], + "sliceProfilesList": [ + { + "sliceProfileId": "b594-e98r-c7f2-ij79", + "sNSSAI": 101, + "maxNumberofUEs": 24, + "latency": 2, + "uLThptPerSlice": 30, + "dLThptPerSlice": 60, + "maxNumberofConns": 22, + "uEMobilityLevel": "high", + "coverageAreaList": [ + "CA1", + "CA2" + ], + "resourceSharingLevel": "Shared" + } + ] + }, + "GNBDUFunction": [ + { + "idGNBDUFunction": "1", + "attributes": { + "gNBDUFunction-url": "10.165.160.13:6080", + "gNBIdLength": 23, + "gNBDUName": "gnbdu1", + "gNBDUId": "1", + "gNBId": 98763, + "RRMPolicyRatio": [ + { + "id": "34", + "attributes": { + "resourceType": "sharing", + "rRMPolicyMemberList": [ + { + "idx": 34, + "mcc": "211", + "mnc": "111", + "sNSSAI": 102 + } + ], + "quotaType": "STRICT", + "rRMPolicyMaxRatio": 23, + "rRMPolicyMinRatio": 4, + "rRMPolicyDedicatedRatio": 5 + } + } + ], + "userLabel": "user", + "sAP": [ + { + "host": "localhost", + "port": 8080 + } + ] + }, + "NRCellDU": [ + { + "idNRCellDU": "11220", + "attributes": { + "nRCellDU-url": "10.165.160.15:8083", + "cellLocalId": 11220, + "operationalState": "ENABLED", + "administrativeState": "UNLOCKED", + "cellState": "ACTIVE", + "RRMPolicyRatio": [ + { + "id": "34", + "attributes": { + "resourceType": "sharing", + "rRMPolicyMemberList": [ + { + "idx": 34, + "mcc": "211", + "mnc": "111", + "sNSSAI": 102 + } + ], + "quotaType": "STRICT", + "rRMPolicyMaxRatio": 23, + "rRMPolicyMinRatio": 4, + "rRMPolicyDedicatedRatio": 5 + } + } + ], + "pLMNInfoList": [ + { + "mcc": "211", + "mnc": "211", + "sNSSAIList": [ + { + "sNssai": "001-00110", + "status": "active", + "configData": [ + { + "configParameter": "maxNumberOfConns", + "configValue": 11 + }, + { + "configParameter": "dLThptPerSlice", + "configValue": 12 + }, + { + "configParameter": "uLThptPerSlice", + "configValue": 13 + } + ] + } + ] + } + ], + "nRPCI": 11, + "nRTAC": 14777, + "arfcnDL": 1, + "arfcnUL": 2, + "arfcnSUL": 3, + "bSChannelBwDL": 4, + "bSChannelBwUL": 5, + "bSChannelBwSUL": 6, + "ssbFrequency": 7, + "ssbSubCarrierSpacing": 15, + "ssbOffset": 9, + "ssbDuration": 4, + "nRSectorCarrierRef": [ + "OU=Sales" + ], + "userLabel": "user", + "sAP": [ + { + "host": "localhost", + "port": 8080 + } + ] + } + }, + { + "idNRCellDU": "11221", + "attributes": { + "nRCellDU-url": "10.165.160.15:8083", + "cellLocalId": 11221, + "operationalState": "ENABLED", + "administrativeState": "UNLOCKED", + "cellState": "ACTIVE", + "RRMPolicyRatio": [ + { + "id": "34", + "attributes": { + "resourceType": "sharing", + "rRMPolicyMemberList": [ + { + "idx": 34, + "mcc": "211", + "mnc": "111", + "sNSSAI": 102 + } + ], + "quotaType": "STRICT", + "rRMPolicyMaxRatio": 23, + "rRMPolicyMinRatio": 4, + "rRMPolicyDedicatedRatio": 5 + } + } + ], + "pLMNInfoList": [ + { + "mcc": "211", + "mnc": "211", + "sNSSAIList": [ + { + "sNssai": "001-00110", + "status": "active", + "configData": [ + { + "configParameter": "maxNumberOfConns", + "configValue": 11 + }, + { + "configParameter": "dLThptPerSlice", + "configValue": 12 + }, + { + "configParameter": "uLThptPerSlice", + "configValue": 13 + } + ] + } + ] + } + ], + "nRPCI": 11, + "nRTAC": 14777, + "arfcnDL": 1, + "arfcnUL": 2, + "arfcnSUL": 3, + "bSChannelBwDL": 4, + "bSChannelBwUL": 5, + "bSChannelBwSUL": 6, + "ssbFrequency": 7, + "ssbSubCarrierSpacing": 15, + "ssbOffset": 9, + "ssbDuration": 4, + "nRSectorCarrierRef": [ + "OU=Sales" + ], + "userLabel": "user", + "sAP": [ + { + "host": "localhost", + "port": 8080 + } + ] + } + }, + { + "idNRCellDU": "11222", + "attributes": { + "nRCellDU-url": "10.165.160.15:8083", + "cellLocalId": 11222, + "operationalState": "ENABLED", + "administrativeState": "UNLOCKED", + "cellState": "ACTIVE", + "RRMPolicyRatio": [ + { + "id": "34", + "attributes": { + "resourceType": "sharing", + "rRMPolicyMemberList": [ + { + "idx": 34, + "mcc": "211", + "mnc": "111", + "sNSSAI": 102 + } + ], + "quotaType": "STRICT", + "rRMPolicyMaxRatio": 23, + "rRMPolicyMinRatio": 4, + "rRMPolicyDedicatedRatio": 5 + } + } + ], + "pLMNInfoList": [ + { + "mcc": "211", + "mnc": "211", + "sNSSAIList": [ + { + "sNssai": "001-00110", + "status": "active", + "configData": [ + { + "configParameter": "maxNumberOfConns", + "configValue": 11 + }, + { + "configParameter": "dLThptPerSlice", + "configValue": 12 + }, + { + "configParameter": "uLThptPerSlice", + "configValue": 13 + } + ] + } + ] + } + ], + "nRPCI": 11, + "nRTAC": 14777, + "arfcnDL": 1, + "arfcnUL": 2, + "arfcnSUL": 3, + "bSChannelBwDL": 4, + "bSChannelBwUL": 5, + "bSChannelBwSUL": 6, + "ssbFrequency": 7, + "ssbSubCarrierSpacing": 15, + "ssbOffset": 9, + "ssbDuration": 4, + "nRSectorCarrierRef": [ + "OU=Sales" + ], + "userLabel": "user", + "sAP": [ + { + "host": "localhost", + "port": 8080 + } + ] + } + } + ] + } + ] + }, + { + "idNearRTRIC": 22, + "attributes": { + "near-rt-ric-url": "10.165.160.47:6080", + "trackingArea": "Kingston", + "rANNFNSSIList": [ + "e893-e93r-c0f2-kj76", + "m93ed-e93e-c0f2-9i7y" + ], + "RRMPolicyRatio": [ + { + "id": "33", + "attributes": { + "resourceType": "sharing", + "rRMPolicyMemberList": [ + { + "idx": 33, + "mcc": "310", + "mnc": "410", + "sNSSAI": 101 + } + ], + "quotaType": "STRICT", + "rRMPolicyMaxRatio": 22, + "rRMPolicyMinRatio": 3, + "rRMPolicyDedicatedRatio": 4 + } + } + ], + "pLMNInfoList": [ + { + "mcc": "311", + "mnc": "411", + "sNSSAIList": [ + { + "sNssai": "111-1111", + "status": "ACTIVE", + "configData": [ + { + "configParameter": "maxNumberOfConns", + "configValue": 20 + }, + { + "configParameter": "uLThptPerSlice", + "configValue": 20 + }, + { + "configParameter": "dLThptPerSlice", + "configValue": 20 + } + ] + } + ] + } + ], + "sliceProfilesList": [ + { + "sliceProfileId": "b594-e98r-c7f2-ij79", + "sNSSAI": 101, + "maxNumberofUEs": 24, + "latency": 2, + "uLThptPerSlice": 30, + "dLThptPerSlice": 60, + "maxNumberofConns": 22, + "uEMobilityLevel": "high", + "coverageAreaList": [ + "CA1", + "CA2" + ], + "resourceSharingLevel": "Shared" + } + ] + }, + "GNBDUFunction": [ + { + "idGNBDUFunction": "2", + "attributes": { + "gNBDUFunction-url": "10.165.160.13:6080", + "gNBIdLength": 23, + "gNBDUName": "gnbdu1", + "gNBDUId": "2", + "gNBId": 98763, + "RRMPolicyRatio": [ + { + "id": "34", + "attributes": { + "resourceType": "sharing", + "rRMPolicyMemberList": [ + { + "idx": 34, + "mcc": "211", + "mnc": "111", + "sNSSAI": 102 + } + ], + "quotaType": "STRICT", + "rRMPolicyMaxRatio": 23, + "rRMPolicyMinRatio": 4, + "rRMPolicyDedicatedRatio": 5 + } + } + ], + "userLabel": "user", + "sAP": [ + { + "host": "localhost", + "port": 8080 + } + ] + }, + "NRCellDU": [ + { + "idNRCellDU": "12230", + "attributes": { + "nRCellDU-url": "10.165.160.15:8083", + "cellLocalId": 12230, + "operationalState": "ENABLED", + "administrativeState": "UNLOCKED", + "cellState": "ACTIVE", + "RRMPolicyRatio": [ + { + "id": "34", + "attributes": { + "resourceType": "sharing", + "rRMPolicyMemberList": [ + { + "idx": 34, + "mcc": "211", + "mnc": "111", + "sNSSAI": 102 + } + ], + "quotaType": "STRICT", + "rRMPolicyMaxRatio": 23, + "rRMPolicyMinRatio": 4, + "rRMPolicyDedicatedRatio": 5 + } + } + ], + "pLMNInfoList": [ + { + "mcc": "211", + "mnc": "211", + "sNSSAIList": [ + { + "sNssai": "111-1111", + "status": "active", + "configData": [ + { + "configParameter": "maxNumberOfConns", + "configValue": 21 + }, + { + "configParameter": "dLThptPerSlice", + "configValue": 21 + }, + { + "configParameter": "uLThptPerSlice", + "configValue": 21 + } + ] + } + ] + } + ], + "nRPCI": 11, + "nRTAC": 14777, + "arfcnDL": 1, + "arfcnUL": 2, + "arfcnSUL": 3, + "bSChannelBwDL": 4, + "bSChannelBwUL": 5, + "bSChannelBwSUL": 6, + "ssbFrequency": 7, + "ssbSubCarrierSpacing": 15, + "ssbOffset": 9, + "ssbDuration": 4, + "nRSectorCarrierRef": [ + "OU=Sales" + ], + "userLabel": "user", + "sAP": [ + { + "host": "localhost", + "port": 8080 + } + ] + } + }, + { + "idNRCellDU": "12231", + "attributes": { + "nRCellDU-url": "10.165.160.15:8083", + "cellLocalId": 12231, + "operationalState": "ENABLED", + "administrativeState": "UNLOCKED", + "cellState": "ACTIVE", + "RRMPolicyRatio": [ + { + "id": "34", + "attributes": { + "resourceType": "sharing", + "rRMPolicyMemberList": [ + { + "idx": 34, + "mcc": "211", + "mnc": "111", + "sNSSAI": 102 + } + ], + "quotaType": "STRICT", + "rRMPolicyMaxRatio": 23, + "rRMPolicyMinRatio": 4, + "rRMPolicyDedicatedRatio": 5 + } + } + ], + "pLMNInfoList": [ + { + "mcc": "211", + "mnc": "211", + "sNSSAIList": [ + { + "sNssai": "111-1111", + "status": "active", + "configData": [ + { + "configParameter": "maxNumberOfConns", + "configValue": 21 + }, + { + "configParameter": "dLThptPerSlice", + "configValue": 21 + }, + { + "configParameter": "uLThptPerSlice", + "configValue": 21 + } + ] + } + ] + } + ], + "nRPCI": 11, + "nRTAC": 14777, + "arfcnDL": 1, + "arfcnUL": 2, + "arfcnSUL": 3, + "bSChannelBwDL": 4, + "bSChannelBwUL": 5, + "bSChannelBwSUL": 6, + "ssbFrequency": 7, + "ssbSubCarrierSpacing": 15, + "ssbOffset": 9, + "ssbDuration": 4, + "nRSectorCarrierRef": [ + "OU=Sales" + ], + "userLabel": "user", + "sAP": [ + { + "host": "localhost", + "port": 8080 + } + ] + } + }, + { + "idNRCellDU": "12232", + "attributes": { + "nRCellDU-url": "10.165.160.15:8083", + "cellLocalId": 12232, + "operationalState": "ENABLED", + "administrativeState": "UNLOCKED", + "cellState": "ACTIVE", + "RRMPolicyRatio": [ + { + "id": "34", + "attributes": { + "resourceType": "sharing", + "rRMPolicyMemberList": [ + { + "idx": 34, + "mcc": "211", + "mnc": "111", + "sNSSAI": 102 + } + ], + "quotaType": "STRICT", + "rRMPolicyMaxRatio": 23, + "rRMPolicyMinRatio": 4, + "rRMPolicyDedicatedRatio": 5 + } + } + ], + "pLMNInfoList": [ + { + "mcc": "211", + "mnc": "211", + "sNSSAIList": [ + { + "sNssai": "111-1111", + "status": "active", + "configData": [ + { + "configParameter": "maxNumberOfConns", + "configValue": 21 + }, + { + "configParameter": "dLThptPerSlice", + "configValue": 21 + }, + { + "configParameter": "uLThptPerSlice", + "configValue": 21 + } + ] + } + ] + } + ], + "nRPCI": 11, + "nRTAC": 14777, + "arfcnDL": 1, + "arfcnUL": 2, + "arfcnSUL": 3, + "bSChannelBwDL": 4, + "bSChannelBwUL": 5, + "bSChannelBwSUL": 6, + "ssbFrequency": 7, + "ssbSubCarrierSpacing": 15, + "ssbOffset": 9, + "ssbDuration": 4, + "nRSectorCarrierRef": [ + "OU=Sales" + ], + "userLabel": "user", + "sAP": [ + { + "host": "localhost", + "port": 8080 + } + ] + } + } + ] + } + ] + } + ] + } +} diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/service_instances.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/service_instances.json new file mode 100644 index 00000000..161c61bb --- /dev/null +++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/service_instances.json @@ -0,0 +1,10 @@ +{ + "service-instance-id":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd84", + "service-instance-name":"an_sp_1", + "service-type":"00-000", + "service-role":"nssi", + "environment-context":"001-00110", + "workload-context":"AN-NF", + "service-instance-location-id":"[\"460-00\",\"460-01\"]", + "orchestration-status":"deactivated" +} diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/service_role.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/service_role.json new file mode 100644 index 00000000..a78b1028 --- /dev/null +++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/service_role.json @@ -0,0 +1,112 @@ +{ + "service-instance":[ + { + "service-instance-id":"4b889f2b-8ee4-4ec7-881f-5b1af8a74039", + "service-instance-name":"TEST_RAN_NF_NSST", + "service-type":"00-000", + "service-role":"nssi", + "environment-context":"001-00110", + "workload-context":"AN-NF", + "model-invariant-id":"cc2ffa2f-722b-4ab1-a6cb-45258ebf0c7f", + "model-version-id":"ca22957d-3aa1-4c6e-ab70-666e678b8e02", + "service-instance-location-id":"[\"460-00\",\"460-01\"]", + "resource-version":"1613630576677", + "orchestration-status":"deactivated", + "service-function":"non-shared", + "relationship-list":{ + "relationship":[ + { + "related-to":"network-route", + "relationship-label":"org.onap.relationships.inventory.ComposedOf", + "related-link":"/aai/v21/network/network-routes/network-route/835909aa-3163-41fe-b0aa-8964887132c9", + "relationship-data":[ + { + "relationship-key":"network-route.route-id", + "relationship-value":"835909aa-3163-41fe-b0aa-8964887132c9" + } + ] + }, + { + "related-to":"service-instance", + "relationship-label":"org.onap.relationships.inventory.ComposedOf", + "related-link":"/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/ee81b1a6-6562-40e2-8235-122a92d651a7", + "relationship-data":[ + { + "relationship-key":"customer.global-customer-id", + "relationship-value":"5GCustomer" + }, + { + "relationship-key":"service-subscription.service-type", + "relationship-value":"5G" + }, + { + "relationship-key":"service-instance.service-instance-id", + "relationship-value":"ee81b1a6-6562-40e2-8235-122a92d651a7" + } + ], + "related-to-property":[ + { + "property-key":"service-instance.service-instance-name", + "property-value":"sliceprofile_002fcda5-ebff-4efc-b385-58d0b3f25f6f" + } + ] + } + ] + } + }, + { + "service-instance-id":"4b889f2b-8ee4-4ec7-881f-5b1af8a74049", + "service-instance-name":"TEST_RAN_NF_NSST", + "service-type":"00-000", + "service-role":"nssi", + "environment-context":"001-010000", + "workload-context":"AN-NF", + "model-invariant-id":"cc2ffa2f-722b-4ab1-a6cb-45258ebf0c7f", + "model-version-id":"ca22957d-3aa1-4c6e-ab70-666e678b8e02", + "service-instance-location-id":"[\"460-00\",\"460-01\"]", + "resource-version":"1613630576677", + "orchestration-status":"deactivated", + "service-function":"non-shared", + "relationship-list":{ + "relationship":[ + { + "related-to":"network-route", + "relationship-label":"org.onap.relationships.inventory.ComposedOf", + "related-link":"/aai/v21/network/network-routes/network-route/835909aa-3163-41fe-b0aa-8964887132c9", + "relationship-data":[ + { + "relationship-key":"network-route.route-id", + "relationship-value":"835909aa-3163-41fe-b0aa-8964887132c9" + } + ] + }, + { + "related-to":"service-instance", + "relationship-label":"org.onap.relationships.inventory.ComposedOf", + "related-link":"/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/ee81b1a6-6562-40e2-8235-122a92d651a7", + "relationship-data":[ + { + "relationship-key":"customer.global-customer-id", + "relationship-value":"5GCustomer" + }, + { + "relationship-key":"service-subscription.service-type", + "relationship-value":"5G" + }, + { + "relationship-key":"service-instance.service-instance-id", + "relationship-value":"ee81b1a6-6562-40e2-8235-122a92d651a7" + } + ], + "related-to-property":[ + { + "property-key":"service-instance.service-instance-name", + "property-value":"sliceprofile_002fcda5-ebff-4efc-b385-58d0b3f25f6f" + } + ] + } + ] + } + } + ] +} diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/service_subscriptions.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/service_subscriptions.json new file mode 100644 index 00000000..b9563a49 --- /dev/null +++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/service_subscriptions.json @@ -0,0 +1 @@ +{"service-type":"5G"} diff --git a/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/slice_profile.json b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/slice_profile.json new file mode 100644 index 00000000..1dbbdbec --- /dev/null +++ b/scripts/dcaegen2-services-slice-analysis-ms/slice-analysis-ms/cps-aai/sim-data/slice_profile.json @@ -0,0 +1,9 @@ +{ + "profile-id":"684hf846f-863b-4901-b202-0ab86a638555", + "latency":30, + "max-number-of-UEs":200, + "coverage-area-TA-list":"[1, 2, 3, 4]", + "resource-sharing-level":"non-shared", + "exp-data-rate-UL":40, + "exp-data-rate-DL":50 +} diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_ml_payload0.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_ml_payload0.json new file mode 100644 index 00000000..81f4f309 --- /dev/null +++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_ml_payload0.json @@ -0,0 +1,38 @@ +{ + "name": "3f2f23fa-c567-4dd8-8f15-f95ae3e6fd84", + "serviceInstanceID": "3f2f23fa-c567-4dd8-8f15-f95ae3e6fd84", + "globalSubscriberId": "5GCustomer", + "subscriptionServiceType": "5G", + "networkType": "AN", + "additionalProperties": { + "modifyAction": "reconfigure", + "snssaiList": [ + "001-00110" + ], + "sliceProfileId": "3f2f23fa-c567-4dd8-8f15-f95ae3e6fd83", + "resourceConfig": { + "snssai": "001-00110", + "data": [ + { + "gNBCUName": "cucpserver1", + "nearRTRICId": "11", + "cellCUList": [ + { + "cellLocalId": 11220, + "configData": { + "maxNumberofConns": "20", + "predictedMaxNumberofConns": "25", + "lastUpdatedTS": "yyyy/MM/dd HH:mm:ss" + } + } + ] + } + ] + }, + "nsiInfo": { + "nsiName": "", + "nsiId": "36575a3f-c18c-4bf1-908e-e498ee481853" + }, + "scriptName": "AN" + } +} diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_payload_pm0.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_payload_pm0.json new file mode 100644 index 00000000..f730294d --- /dev/null +++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/expected_payload_pm0.json @@ -0,0 +1 @@ +{"name":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd84","serviceInstanceID":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd84","globalSubscriberId":"5GCustomer","subscriptionServiceType":"5G","networkType":"AN","additionalProperties":{"modifyAction":"reconfigure","snssaiList":["001-00110"],"sliceProfileId":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd84","resourceConfig":{"11":{"dLThptPerSlice":40,"uLThptPerSlice":50}},"nsiInfo":{"nsiName":"","nsiId":"7455d0de-fc43-4260-b8d4-5b57d357ea57"},"scriptName":"AN"}} diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/ml_response0.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/ml_response0.json new file mode 100644 index 00000000..476ba86c --- /dev/null +++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/ml_response0.json @@ -0,0 +1,18 @@ +{ + "snssai": "001-00110", + "data": [ + { + "gNBCUName": "cucpserver1", + "cellCUList": [ + { + "cellLocalId": 11220, + "configData": { + "maxNumberofConns": "20", + "predictedMaxNumberofConns": "25", + "lastUpdatedTS": "yyyy/MM/dd HH:mm:ss" + } + } + ] + } + ] +} diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification0.json b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification0.json new file mode 100644 index 00000000..f6c649c2 --- /dev/null +++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/data/performance_notification0.json @@ -0,0 +1,84 @@ +{ + "event": { + "commonEventHeader": { + "domain": "perf3gpp", + "eventId": "9e7c7db8-7a51-4bff-94f5-b530296edd7c", + "sequence": 0, + "eventName": "perf3gpp_AcmeNode-Acme_pmMeasResult", + "sourceName": "oteNB5309", + "reportingEntityName": "", + "priority": "Normal", + "startEpochMicrosec": 1538478000000, + "lastEpochMicrosec": 1538478900000, + "version": "4.0", + "vesEventListenerVersion": "7.1", + "timeZoneOffset": "UTC+05:00" + }, + "perf3gppFields": { + "perf3gppFieldsVersion": "1", + "measDataCollection": { + "granularityPeriod": 1538482500000, + "measuredEntityUserName": "", + "measuredEntityDn": "1", + "measuredEntitySoftwareVersion": "r0.1", + "measInfoList": [ + { + "measInfoId": { + "sMeasInfoId": "some measInfoId" + }, + "measTypes": { + "sMeasTypesList": [ + "SM.PrbUsedDl.001-00110", + "SM.PrbUsedUl.001-00110" + ] + }, + "measValuesList": [ + { + "measObjInstId": "11220", + "suspectFlag": "false", + "measResults": [ + { + "p": 1, + "sValue": "75" + }, + { + "p": 2, + "sValue": "84" + } + ] + }, + { + "measObjInstId": "11221", + "suspectFlag": "false", + "measResults": [ + { + "p": 1, + "sValue": "76" + }, + { + "p": 2, + "sValue": "85" + } + ] + }, + { + "measObjInstId": "11222", + "suspectFlag": "false", + "measResults": [ + { + "p": 1, + "sValue": "90" + }, + { + "p": 2, + "sValue": "95" + } + ] + } + ] + } + ] + } + } + } +} diff --git a/tests/dcaegen2-services-slice-analysis-ms/testcases/slice-analysis-ms-test-cps-aai.robot b/tests/dcaegen2-services-slice-analysis-ms/testcases/slice-analysis-ms-test-cps-aai.robot new file mode 100644 index 00000000..8c4d8e23 --- /dev/null +++ b/tests/dcaegen2-services-slice-analysis-ms/testcases/slice-analysis-ms-test-cps-aai.robot @@ -0,0 +1,78 @@ +*** Settings *** +Library Collections +Library Process +Library RequestsLibrary +Library String +Library OperatingSystem + +Suite Teardown Delete All Sessions + +*** Variables *** +${SLICE_ANALYSIS_MS_BASE_URL} http://${SLICE_ANALYSIS_MS_IP}:8080 +${HEALTHCHECK_ENDPOINT} /healthcheck +${DMAAP_URL} http://${DMAAP_IP}:3904/events +${unauthenticated.DCAE_CL_OUTPUT} /unauthenticated.DCAE_CL_OUTPUT/23/23 +${POST_DMAAP_EVENT_FOR_ML_NOTIF_URL} http://${DMAAP_IP}:3904/events/unauthenticated.ML_RESPONSE_TOPIC +${POST_DMAAP_EVENT_FOR_PM_NOTIF_URL} http://${DMAAP_IP}:3904/events/unauthenticated.PERFORMANCE_MEASUREMENTS + + +*** Test Cases *** + +HealthCheck + + Create Session sliceanalysisms ${SLICE_ANALYSIS_MS_BASE_URL} + ${resp}= Get Request sliceanalysisms ${HEALTHCHECK_ENDPOINT} + Should Be Equal As Strings ${resp.status_code} 200 + + +Post ml notification to dmaap + Create Session dmaap ${DMAAP_URL} + ${headers}= Create Dictionary Content-Type application/json + ${data}= Get File ${TEST_ROBOT_DIR}/data/ml_response0.json + ${response}= Evaluate requests.post('${POST_DMAAP_EVENT_FOR_ML_NOTIF_URL}', data=$data) + Should Be Equal As Strings ${response.status_code} 200 + + +Verify ml notification trigger + Create Session dmaap ${DMAAP_URL} + FOR ${i} IN RANGE 30 + ${result}= Get Request dmaap ${unauthenticated.DCAE_CL_OUTPUT} + Exit For Loop If ${result.json()} != @{EMPTY} + Log Waiting for slice-analysis-ms to handle trigger... console=${True} + Sleep 5s + END + + ${expected_string}= Get File ${TEST_ROBOT_DIR}/data/expected_ml_payload0.json + ${expected_payload}= Evaluate json.loads("""${expected_string}""") json + ${result}= Convert To String ${result.content} + ${result_string}= Get Substring ${result} 2 -2 + ${actual_data}= Evaluate json.loads("""${result_string}""") json + ${actual_payload_str}= Set Variable ${actual_data['payload']} + ${actual_payload}= Evaluate json.loads("""${actual_payload_str}""") json + +Post pm notification-1 to dmaap + ${data}= Get File ${TEST_ROBOT_DIR}/data/performance_notification0.json + FOR ${j} IN RANGE 6 + ${response}= Evaluate requests.post('${POST_DMAAP_EVENT_FOR_PM_NOTIF_URL}', data=$data) + Sleep 10s + END + Should Be Equal As Strings ${response.status_code} 200 + + +Verify pm notification-1 trigger + Create Session dmaap ${DMAAP_URL} + FOR ${i} IN RANGE 20 + ${result}= Get Request dmaap ${unauthenticated.DCAE_CL_OUTPUT} + Exit For Loop If ${result.json()} != @{EMPTY} + Log Waiting for sliceanalysisms to handle trigger... console=${True} + Sleep 30s + END + ${expected_string}= Get File ${TEST_ROBOT_DIR}/data/expected_payload_pm0.json + ${expected_payload}= Evaluate json.loads("""${expected_string}""") json + ${result}= Convert To String ${result.content} + ${result_string}= Get Substring ${result} 2 -2 + ${actual_data}= Evaluate json.loads("""${result_string}""") json + ${actual_payload_str}= Set Variable ${actual_data['payload']} + ${actual_payload}= Evaluate json.loads("""${actual_payload_str}""") json + set to dictionary ${expected_payload['additionalProperties']['nsiInfo']} nsiId=${actual_payload['additionalProperties']['nsiInfo']['nsiId']} + Should Be True """${actual_payload}""".strip() == """${expected_payload}""".strip() |