summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--robot/assets/usecases/5gbulkpm/Notification.json33
-rw-r--r--robot/assets/usecases/5gbulkpm/blueprintTemplate.json12
-rw-r--r--robot/assets/usecases/5gbulkpm/k8s-datafile.yaml136
-rw-r--r--robot/assets/usecases/5gbulkpm/k8s-pm-mapper.yaml200
-rw-r--r--robot/assets/usecases/5gbulkpm/k8s-sftp.yaml34
-rw-r--r--robot/assets/usecases/5gbulkpm/mr_clusters.json6
-rw-r--r--robot/assets/usecases/5gbulkpm/pmfiles/A20181002.0000-1000-0015-1000_5G.xml.gzbin0 -> 959 bytes
-rw-r--r--robot/assets/usecases/5gbulkpm/sub.json10
-rw-r--r--robot/resources/mr_interface.robot13
-rw-r--r--robot/resources/usecases/5gbulkpm_interface.robot40
-rw-r--r--robot/testsuites/usecases/5gbulkpm.robot145
-rwxr-xr-xsetup.sh7
12 files changed, 632 insertions, 4 deletions
diff --git a/robot/assets/usecases/5gbulkpm/Notification.json b/robot/assets/usecases/5gbulkpm/Notification.json
new file mode 100644
index 00000000..db77c10b
--- /dev/null
+++ b/robot/assets/usecases/5gbulkpm/Notification.json
@@ -0,0 +1,33 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.0.1",
+ "vesEventListenerVersion": "7.0.1",
+ "domain": "notification",
+ "eventName": "Noti_RnNode-Ericsson_FileReady",
+ "eventId": "FileReady_1797490e-10ae-4d48-9ea7-3d7d790b25e1",
+ "lastEpochMicrosec": 8745745764578,
+ "priority": "Normal",
+ "reportingEntityName": "otenb5309",
+ "sequence": 0,
+ "sourceName": "oteNB5309",
+ "startEpochMicrosec": 8745745764578,
+ "timeZoneOffset": "UTC+05.30"
+ },
+ "notificationFields": {
+ "changeIdentifier": "PM_MEAS_FILES",
+ "changeType": "FileReady",
+ "notificationFieldsVersion": "2.0",
+ "arrayOfNamedHashMap": [
+ { "name": "test.xml.gz",
+ "hashMap":{
+ "location": "sftp://sftp:22/test.xml.gz",
+ "compression": "gzip",
+ "fileFormatType": "org.3GPP.32.435#measCollec",
+ "fileFormatVersion": "V10"
+ }
+ }
+ ]
+ }
+}
+} \ No newline at end of file
diff --git a/robot/assets/usecases/5gbulkpm/blueprintTemplate.json b/robot/assets/usecases/5gbulkpm/blueprintTemplate.json
new file mode 100644
index 00000000..5615d2c3
--- /dev/null
+++ b/robot/assets/usecases/5gbulkpm/blueprintTemplate.json
@@ -0,0 +1,12 @@
+{
+ "asdcResourceId": "",
+ "asdcServiceId": "",
+ "asdcServiceURL": "",
+ "blueprintTemplate": "",
+ "owner": "robot",
+ "serviceIds": [],
+ "serviceLocations": [],
+ "typeName": "",
+ "typeVersion": 100,
+ "vnfTypes": []
+} \ No newline at end of file
diff --git a/robot/assets/usecases/5gbulkpm/k8s-datafile.yaml b/robot/assets/usecases/5gbulkpm/k8s-datafile.yaml
new file mode 100644
index 00000000..5a0b0bb6
--- /dev/null
+++ b/robot/assets/usecases/5gbulkpm/k8s-datafile.yaml
@@ -0,0 +1,136 @@
+
+#description: Docker application to collect log file from PNF
+#blueprint_version: 1.0.0
+---
+tosca_definitions_version: cloudify_dsl_1_3
+description: Docker application to collect log file from PNF
+imports:
+- http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
+- https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R5/k8splugin/1.6.0/k8splugin_types.yaml
+- https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/dmaap/dmaap.yaml
+inputs:
+ PM_MEAS_FILES_feed0_location:
+ type: string
+ default: "loc00"
+ cert_directory:
+ type: string
+ default: "/opt/app/datafile/etc/cert/"
+ datafile-collector_cpu_limit:
+ type: string
+ default: "250m"
+ datafile-collector_cpu_request:
+ type: string
+ default: "250m"
+ datafile-collector_memory_limit:
+ type: string
+ default: "256Mi"
+ datafile-collector_memory_request:
+ type: string
+ default: "256Mi"
+ envs:
+ default: {}
+ external_port:
+ type: string
+ default: ":0"
+ feed0_name:
+ type: string
+ default: "bulk_pm_feed"
+ topic_name:
+ type: string
+ default: "unauthenticated.VES_NOTIFICATION_OUTPUT"
+ consumer_group:
+ type: string
+ default: "OpenDcae-c12"
+ consumer_id:
+ type: string
+ default: "C12"
+ log_directory:
+ type: string
+ default: "/var/log/ONAP"
+ replicas:
+ type: integer
+ description: number of instances
+ default: 1
+ tag_version:
+ type: string
+ default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:latest"
+ use_tls:
+ type: boolean
+ default: false
+node_templates:
+ datafile-collector:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ get_input: envs
+ properties:
+ application_config:
+ service_calls: []
+ streams_publishes:
+ PM_MEAS_FILES:
+ dmaap_info: <<feed0>>
+ type: data_router
+ streams_subscribes: {}
+ dmaap.ftpesConfig.keyCert: /opt/app/datafile/config/cert.jks
+ dmaap.ftpesConfig.keyPasswordPath: /opt/app/datafile/config/jks.pass
+ dmaap.ftpesConfig.trustedCa: /opt/app/datafile/config/trust.jks
+ dmaap.ftpesConfig.trustedCaPasswordPath: /opt/app/datafile/etc/cert/trust.pass
+ dmaap.security.enableDmaapCertAuth: false
+ dmaap.security.keyStorePasswordPath: /opt/app/datafile/etc/cert/key.pass
+ dmaap.security.keyStorePath: /opt/app/datafile/etc/cert/key.p12
+ dmaap.security.trustStorePasswordPath: /opt/app/datafile/etc/cert/trust.pass
+ dmaap.security.trustStorePath: /opt/app/datafile/etc/cert/trust.jks
+ streams_subscribes:
+ dmaap_subscriber:
+ dmaap_info:
+ topic_url: { concat: ['https://message-router:3905/events/',{ get_input: topic_name }, '/', { get_input: consumer_group }, "/", { get_input: consumer_id }] }
+ docker_config:
+ healthcheck:
+ interval: 15s
+ timeout: 1s
+ type: http
+ endpoint: /heartbeat
+ ports:
+ - concat: ["8100", {get_input: external_port}]
+ - concat: ["8433", {get_input: external_port}]
+ image:
+ get_input: tag_version
+ service_component_type: datafile-collector
+ log_info:
+ log_directory:
+ get_input: log_directory
+ replicas:
+ get_input: replicas
+ streams_publishes:
+ - name: feed0
+ location:
+ get_input: PM_MEAS_FILES_feed0_location
+ type: data_router
+ tls_info:
+ cert_directory:
+ get_input: cert_directory
+ use_tls:
+ get_input: use_tls
+ resource_config:
+ limits:
+ cpu:
+ get_input: datafile-collector_cpu_limit
+ memory:
+ get_input: datafile-collector_memory_limit
+ requests:
+ cpu:
+ get_input: datafile-collector_cpu_request
+ memory:
+ get_input: datafile-collector_memory_request
+ relationships:
+ - type: ccsdk.relationships.publish_files
+ target: feed0
+ feed0:
+ type: ccsdk.nodes.Feed
+ properties:
+ feed_name:
+ get_input: feed0_name
+ useExisting: true
diff --git a/robot/assets/usecases/5gbulkpm/k8s-pm-mapper.yaml b/robot/assets/usecases/5gbulkpm/k8s-pm-mapper.yaml
new file mode 100644
index 00000000..c372618e
--- /dev/null
+++ b/robot/assets/usecases/5gbulkpm/k8s-pm-mapper.yaml
@@ -0,0 +1,200 @@
+#
+# ============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=========================================================
+#
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+ - 'http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'
+ - 'https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R5/k8splugin/1.6.0/k8splugin_types.yaml'
+ - 'https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/dmaap/dmaap.yaml'
+
+inputs:
+ filter:
+ type: string
+ description: PM Mapper filter on measInfo, measInfoId, measType, instanceId
+ default: "{ \"filters\":[] }"
+ enable_http:
+ type: boolean
+ description: Option to turn on HTTP connections
+ default: false
+ tag_version:
+ type: string
+ description: Docker image to be used
+ default: 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:latest'
+ replicas:
+ type: integer
+ description: Number of instances
+ default: 1
+ feed_name:
+ type: string
+ default: 'bulk_pm_feed'
+ topic_name:
+ type: string
+ default: 'PERFORMANCE_MEASUREMENTS'
+ client_role:
+ type: string
+ description: Client role to request secure access to topic
+ default: 'org.onap.dcae.pmPublisher'
+ client_id:
+ type: string
+ description: Client id for given AAF client
+ default: 'dcae@dcae.onap.org'
+ client_password:
+ type: string
+ description: Password for AAF client provided as client_id
+ dmaap_dr_username:
+ type: string
+ description: DMAAP Data Router user name
+ default: 'username'
+ dmaap_dr_password:
+ type: string
+ description: DMAAP Data Router password
+ default: 'password'
+ dcae_location:
+ type: string
+ description: DCAE location for the subscriber, used to set up routing
+ default: 'san-francisco'
+ pm_mapper_service_protocol:
+ type: string
+ description: PM Mapper protocol
+ default: 'https'
+ pm_mapper_service_port:
+ type: string
+ description: PM Mapper host port
+ default: '8443'
+ dmaap_dr_service_host:
+ type: string
+ description: DMAAP Data Router host address
+ default: 'dmaap-dr-node'
+ dmaap_dr_service_port:
+ type: string
+ description: DMAAP Data Router host port
+ default: '8443'
+ dmaap_mr_service_protocol:
+ type: string
+ description: DMAAP Message Router protocol
+ default: 'https'
+ dmaap_mr_service_host:
+ type: string
+ description: DMAAP Message Router host address
+ default: 'message-router'
+ dmaap_mr_service_port:
+ type: string
+ description: DMAAP Message Router host port
+ default: '3905'
+ cpu_limit:
+ type: string
+ default: '1000m'
+ cpu_request:
+ type: string
+ default: '1000m'
+ memory_limit:
+ type: string
+ default: '1024Mi'
+ memory_request:
+ type: string
+ default: '1024Mi'
+
+node_templates:
+ pm-feed:
+ type: ccsdk.nodes.Feed
+ properties:
+ feed_name: { get_input: feed_name }
+ useExisting: true
+
+ pm-topic:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic_name }
+
+ pm-mapper:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ ports:
+ - '8443:0'
+ - '8081:0'
+
+ relationships:
+ - type: ccsdk.relationships.subscribe_to_files
+ target: pm-feed
+ - type: ccsdk.relationships.publish_events
+ target: pm-topic
+
+ properties:
+ service_component_type: 'dcae-pm-mapper'
+ service_component_name_override: 'dcae-pm-mapper'
+ application_config:
+ trust_store_path: '/opt/app/pm-mapper/etc/cert/trust.jks.b64'
+ trust_store_pass_path: '/opt/app/pm-mapper/etc/cert/trust.pass'
+ key_store_path: '/opt/app/pm-mapper/etc/cert/cert.jks.b64'
+ key_store_pass_path: '/opt/app/pm-mapper/etc/cert/jks.pass'
+ pm-mapper-filter: { get_input: filter }
+ enable_http: { get_input: enable_http }
+ dmaap_dr_delete_endpoint: { concat: ['https://',{ get_input: dmaap_dr_service_host },':',{ get_input: dmaap_dr_service_port },'/delete'] }
+ aaf_identity: { get_input: client_id }
+ aaf_password: { get_input: client_password }
+ streams_subscribes:
+ dmaap_subscriber:
+ type: data_router
+ dmaap_info: <<pm-feed>>
+ streams_publishes:
+ dmaap_publisher:
+ type: message_router
+ dmaap_info: <<pm-topic>>
+ resource_config:
+ limits:
+ cpu: { get_input: cpu_limit }
+ memory: { get_input: memory_limit }
+ requests:
+ cpu: { get_input: cpu_request }
+ memory: { get_input: memory_request }
+ docker_config:
+ healthcheck:
+ endpoint: /healthcheck
+ interval: 15s
+ timeout: 1s
+ type: https
+ streams_publishes:
+ - name: pm-topic
+ location: { get_input: dcae_location }
+ client_role: { get_input: client_role }
+ type: message-router
+ streams_subscribes:
+ - name: pm-feed
+ location: { get_input: dcae_location }
+ client_role: { get_input: client_role }
+ username: { get_input: dmaap_dr_username }
+ password: { get_input: dmaap_dr_password }
+ scheme: { get_input: pm_mapper_service_protocol }
+ route: delivery
+ delivery_url: ''
+ privileged: true
+ decompress: true
+ type: data_router
+ image: { get_input: tag_version }
+ replicas: { get_input: replicas }
+ log_info:
+ log_directory: '/var/log/ONAP/dcaegen2/services/pm-mapper'
+ tls_info:
+ cert_directory: '/opt/app/pm-mapper/etc/cert/'
+ use_tls: true \ No newline at end of file
diff --git a/robot/assets/usecases/5gbulkpm/k8s-sftp.yaml b/robot/assets/usecases/5gbulkpm/k8s-sftp.yaml
new file mode 100644
index 00000000..a8fe1839
--- /dev/null
+++ b/robot/assets/usecases/5gbulkpm/k8s-sftp.yaml
@@ -0,0 +1,34 @@
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+ - 'http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'
+ - 'https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R5/k8splugin/1.6.0/k8splugin_types.yaml'
+
+inputs:
+ tag_version:
+ type: string
+ description: Docker image to be used
+ default: 'atmoz/sftp'
+ replicas:
+ type: integer
+ description: Number of instances
+ default: 1
+
+node_templates:
+ sftpserver:
+ type: dcae.nodes.ContainerizedPlatformComponent
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ SFTP_USERS: bulkpm:bulkpm:::upload
+ ports:
+ - '22:32222'
+
+ properties:
+ name: "sftpserver"
+ dns_name: "sftpserver"
+
+ image: { get_input: tag_version }
+ replicas: { get_input: replicas } \ No newline at end of file
diff --git a/robot/assets/usecases/5gbulkpm/mr_clusters.json b/robot/assets/usecases/5gbulkpm/mr_clusters.json
new file mode 100644
index 00000000..f3b3d51c
--- /dev/null
+++ b/robot/assets/usecases/5gbulkpm/mr_clusters.json
@@ -0,0 +1,6 @@
+{
+ "dcaeLocationName": "san-francisco",
+ "fqdn": "message-router",
+ "topicProtocol": "http",
+ "topicPort": "3904"
+} \ No newline at end of file
diff --git a/robot/assets/usecases/5gbulkpm/pmfiles/A20181002.0000-1000-0015-1000_5G.xml.gz b/robot/assets/usecases/5gbulkpm/pmfiles/A20181002.0000-1000-0015-1000_5G.xml.gz
new file mode 100644
index 00000000..32865fc1
--- /dev/null
+++ b/robot/assets/usecases/5gbulkpm/pmfiles/A20181002.0000-1000-0015-1000_5G.xml.gz
Binary files differ
diff --git a/robot/assets/usecases/5gbulkpm/sub.json b/robot/assets/usecases/5gbulkpm/sub.json
new file mode 100644
index 00000000..c889bb3d
--- /dev/null
+++ b/robot/assets/usecases/5gbulkpm/sub.json
@@ -0,0 +1,10 @@
+{
+ "dcaeLocationName": "san-francisco",
+ "fqtn": "org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS",
+ "clientIdentity": "dcae@dcae.onap.org",
+ "action": [
+ "view",
+ "pub",
+ "sub"
+ ]
+} \ No newline at end of file
diff --git a/robot/resources/mr_interface.robot b/robot/resources/mr_interface.robot
index 7a3c3d90..8204315a 100644
--- a/robot/resources/mr_interface.robot
+++ b/robot/resources/mr_interface.robot
@@ -5,7 +5,7 @@ Library DateTime
Library Process
Library ONAPLibrary.JSON
Library ONAPLibrary.Utilities
-Library ONAPLibrary.Templating WITH NAME Templating
+Library ONAPLibrary.Templating WITH NAME Templating
Resource global_properties.robot
@@ -95,6 +95,17 @@ Run MR Auth Put Request
Log Received response from message router ${resp.text}
[Return] ${resp}
+Run MR Auth Get Request
+ [Documentation] Runs MR Authenticated Put Request
+ [Arguments] ${data_path} ${username} ${password}
+ ${auth}= Create List ${username} ${password}
+ ${session}= Create Session mr ${MR_ENDPOINT} auth=${auth}
+ ${uuid}= Generate UUID4
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
+ ${resp}= Get Request mr ${data_path} headers=${headers}
+ Log Received response from message router ${resp.text}
+ [Return] ${resp}
+
Run MR Get Request
[Documentation] Runs MR Get request
[Arguments] ${data_path}
diff --git a/robot/resources/usecases/5gbulkpm_interface.robot b/robot/resources/usecases/5gbulkpm_interface.robot
new file mode 100644
index 00000000..b87f17f4
--- /dev/null
+++ b/robot/resources/usecases/5gbulkpm_interface.robot
@@ -0,0 +1,40 @@
+*** Settings ***
+Documentation The main interface for interacting with 5G Bulkpm.
+Library RequestsLibrary
+Library OperatingSystem
+Library String
+
+*** Variables ***
+${INVENTORY_SERVER} ${GLOBAL_INVENTORY_SERVER_PROTOCOL}://${GLOBAL_INVENTORY_SERVER_NAME}:${GLOBAL_INVENTORY_SERVER_PORT}
+${DEPLOYMENT_SERVER} ${GLOBAL_DEPLOYMENT_HANDLER_SERVER_PROTOCOL}://${GLOBAL_DEPLOYMENT_HANDLER_SERVER_NAME}:${GLOBAL_DEPLOYMENT_HANDLER_SERVER_PORT}
+${DR_ENDPOINT} ${GLOBAL_DMAAP_DR_PROV_SERVER_PROTOCOL}://${GLOBAL_INJECTED_DMAAP_DR_PROV_IP_ADDR}:${GLOBAL_DMAAP_DR_PROV_SERVER_PORT}
+${MR_ENDPOINT} ${GLOBAL_MR_SERVER_PROTOCOL}://${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_NAME}:${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_PORT}
+${DMAAP_BC_SERVER} ${GLOBAL_BC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_BC_IP_ADDR}:${GLOBAL_BC_HTTPS_SERVER_PORT}
+${VES_HEALTH_CHECK_PATH} ${GLOBAL_DCAE_VES_PROTOCOL}://${GLOBAL_INJECTED_DCAE_VES_HOST}:${GLOBAL_DCAE_VES_SERVER_PORT}
+
+*** Keywords ***
+Undeploy Service
+ [Arguments] ${server} ${endpoint}
+ ${session}= Create Session deployment ${server}
+ ${resp}= Delete Request deployment ${endpoint}
+ [Return] ${resp}
+
+Deployment Status
+ [Arguments] ${server} ${endpoint} ${deployment} ${operationId}
+ ${session}= Create Session deployment-status ${server}
+ ${resp}= Get Request deployment-status /${endpoint}/${deployment}/operation/${operationId}
+ ${status} Set Variable ${resp.json().get('status')}
+ Should Be Equal As Strings ${status} succeeded
+
+xNF PM File Validate
+ [Arguments] ${value}
+ ${resp}= Run MR Auth Get Request ${MR_TOPIC_URL_PATH} ${GLOBAL_DCAE_USERNAME} ${GLOBAL_DCAE_PASSWORD}
+ Should Contain ${resp.text} ${value}
+
+Usecase Teardown
+ Undeploy Service ${DEPLOYMENT_SERVER} /${DEPLOYMENT_ENDPOINT}/pmmapper
+ Undeploy Service ${INVENTORY_SERVER} ${INVENTORY_ENDPOINT}/${serviceTypeId-Pmmapper}
+ Undeploy Service ${DEPLOYMENT_SERVER} /${DEPLOYMENT_ENDPOINT}/sftpserver
+ Undeploy Service ${INVENTORY_SERVER} ${INVENTORY_ENDPOINT}/${serviceTypeId-Sftp}
+ Undeploy Service ${DEPLOYMENT_SERVER} /${DEPLOYMENT_ENDPOINT}/datafile
+ Undeploy Service ${INVENTORY_SERVER} ${INVENTORY_ENDPOINT}/${serviceTypeId-Dfc} \ No newline at end of file
diff --git a/robot/testsuites/usecases/5gbulkpm.robot b/robot/testsuites/usecases/5gbulkpm.robot
new file mode 100644
index 00000000..9b9c8c44
--- /dev/null
+++ b/robot/testsuites/usecases/5gbulkpm.robot
@@ -0,0 +1,145 @@
+*** Settings ***
+Documentation 5G Bulk PM Usecase functionality
+
+Library RequestsLibrary
+Library OperatingSystem
+Library Collections
+Library String
+Library DateTime
+Library SSHLibrary
+Library JSONLibrary
+Library Process
+Library ONAPLibrary.JSON
+Library ONAPLibrary.Utilities
+Resource ../resources/usecases/5gbulkpm_interface.robot
+Resource ../resources/mr_interface.robot
+Resource ../resources/dr_interface.robot
+Suite Teardown Usecase Teardown
+
+*** Variables ***
+${INVENTORY_ENDPOINT} /dcae-service-types
+${DFC_BLUEPRINT_PATH} ${EXECDIR}/robot/assets/usecases/5gbulkpm//k8s-datafile.yaml
+${PMMAPPER_BLUEPRINT_PATH} ${EXECDIR}/robot/assets/usecases/5gbulkpm//k8s-pm-mapper.yaml
+${XNF_SFTP_BLUEPRINT_PATH} ${EXECDIR}/robot/assets/usecases/5gbulkpm/k8s-sftp.yaml
+${BLUEPRINT_TEMPLATE_PATH} ${EXECDIR}/robot/assets/usecases/5gbulkpm/blueprintTemplate.json
+${FTP_FILE_PATH} ${EXECDIR}/robot/assets/usecases/5gbulkpm/pmfiles/A20181002.0000-1000-0015-1000_5G.xml.gz
+${DEPLOYMENT_ENDPOINT} dcae-deployments
+${MR_TOPIC_CHECK_PATH} /topics
+${DR_SUB_CHECK_PATH} /internal/prov
+${MR_TOPIC_URL_PATH} /events/org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS/CG1/C1
+${DMAAP_BC_MR_CLIENT_PATH} /webapi/mr_clients
+${DMAAP_BC_MR_CLUSTER_PATH} /webapi/mr_clusters
+${PMMAPPER_HEALTH_CHECK_PATH} /healthcheck
+${JSON_DATA_FILE} ${EXECDIR}/robot/assets/usecases/5gbulkpm/Notification.json
+${VES_LISTENER_PATH} /eventListener/v7
+${PMMAPPER_SUB_ROLE_DATA} ${EXECDIR}/robot/assets/usecases/5gbulkpm/sub.json
+${PMMAPPER_MR_CLUSTER_DATA} ${EXECDIR}/robot/assets/usecases/5gbulkpm/mr_clusters.json
+
+*** Test Cases ***
+
+Deploying Data File Collector
+ [Tags] 5gbulkpm
+ ${blueprint}= OperatingSystem.Get File ${DFC_BLUEPRINT_PATH}
+ ${templatejson}= Load JSON From File ${BLUEPRINT_TEMPLATE_PATH}
+ ${templatejson}= Update Value To Json ${templatejson} blueprintTemplate ${blueprint}
+ ${templatejson}= Update Value To Json ${templatejson} typeName datafile
+ ${json_data} Convert JSON To String ${templatejson}
+ ${headers}= Create Dictionary content-type=application/json
+ ${session}= Create Session dfc ${INVENTORY_SERVER}
+ ${resp}= Post Request dfc ${INVENTORY_ENDPOINT} data=${json_data} headers=${headers}
+ ${serviceTypeId-Dfc} Set Variable ${resp.json().get('typeId')}
+ Set Global Variable ${serviceTypeId-Dfc}
+ ${deployment_data}= Set Variable {"serviceTypeId": "${serviceTypeId-Dfc}"}
+ ${session}= Create Session deployment-dfc ${DEPLOYMENT_SERVER}
+ ${resp}= Put Request deployment-dfc /${DEPLOYMENT_ENDPOINT}/datafile data=${deployment_data} headers=${headers}
+ ${operationLink} Set Variable ${resp.json().get('links').get('status')}
+ ${operationId} Fetch From Right ${operationLink} /
+ Wait Until Keyword Succeeds 3 minute 20 sec Deployment Status ${DEPLOYMENT_SERVER} ${DEPLOYMENT_ENDPOINT} datafile ${operationId}
+
+Deploying 3GPP PM Mapper
+ [Tags] 5gbulkpm
+ ${clusterdata}= OperatingSystem.Get File ${PMMAPPER_MR_CLUSTER_DATA}
+ ${headers}= Create Dictionary content-type=application/json
+ ${session}= Create Session dmaapbc ${DMAAP_BC_SERVER}
+ ${resp}= Post Request dmaapbc ${DMAAP_BC_MR_CLUSTER_PATH} data=${clusterdata} headers=${headers}
+ ${blueprint}= OperatingSystem.Get File ${PMMAPPER_BLUEPRINT_PATH}
+ ${templatejson}= Load JSON From File ${BLUEPRINT_TEMPLATE_PATH}
+ ${templatejson}= Update Value To Json ${templatejson} blueprintTemplate ${blueprint}
+ ${templatejson}= Update Value To Json ${templatejson} typeName pmmapper
+ ${json_data} Convert JSON To String ${templatejson}
+ ${session}= Create Session pmmapper ${INVENTORY_SERVER}
+ ${resp}= Post Request pmmapper ${INVENTORY_ENDPOINT} data=${json_data} headers=${headers}
+ ${serviceTypeId-Pmmapper} Set Variable ${resp.json().get('typeId')}
+ Set Global Variable ${serviceTypeId-Pmmapper}
+ ${deployment_data}= Set Variable {"inputs":{"client_password": "${GLOBAL_DCAE_PASSWORD}"},"serviceTypeId": "${serviceTypeId-Pmmapper}"}
+ ${session}= Create Session deployment-pmmapper ${DEPLOYMENT_SERVER}
+ ${resp}= Put Request deployment-pmmapper /${DEPLOYMENT_ENDPOINT}/pmmapper data=${deployment_data} headers=${headers}
+ ${operationLink} Set Variable ${resp.json().get('links').get('status')}
+ ${operationId} Fetch From Right ${operationLink} /
+ Wait Until Keyword Succeeds 2 minute 10 sec Deployment Status ${DEPLOYMENT_SERVER} ${DEPLOYMENT_ENDPOINT} pmmapper ${operationId}
+
+Deploying SFTP Server As xNF
+ [Tags] 5gbulkpm
+ ${blueprint}= OperatingSystem.Get File ${XNF_SFTP_BLUEPRINT_PATH}
+ ${templatejson}= Load JSON From File ${BLUEPRINT_TEMPLATE_PATH}
+ ${templatejson}= Update Value To Json ${templatejson} blueprintTemplate ${blueprint}
+ ${templatejson}= Update Value To Json ${templatejson} typeName sftpserver
+ ${json_data} Convert JSON To String ${templatejson}
+ ${headers}= Create Dictionary content-type=application/json
+ ${session}= Create Session sftp ${INVENTORY_SERVER}
+ ${resp}= Post Request sftp ${INVENTORY_ENDPOINT} data=${json_data} headers=${headers}
+ ${serviceTypeId-Sftp}= Set Variable ${resp.json().get('typeId')}
+ Set Global Variable ${serviceTypeId-Sftp}
+ ${deployment_data}= Set Variable {"serviceTypeId": "${serviceTypeId-Sftp}"}
+ ${session}= Create Session deployment-sftpserver ${DEPLOYMENT_SERVER}
+ ${resp}= Put Request deployment-sftpserver /${DEPLOYMENT_ENDPOINT}/sftpserver data=${deployment_data} headers=${headers}
+ ${operationLink}= Set Variable ${resp.json().get('links').get('status')}
+ ${operationId} Fetch From Right ${operationLink} /
+ Wait Until Keyword Succeeds 1 minute 5 sec Deployment Status ${DEPLOYMENT_SERVER} ${DEPLOYMENT_ENDPOINT} sftpserver ${operationId}
+
+
+Checking PERFORMANCE_MEASUREMENTS Topic In Message Router
+ [Tags] 5gbulkpm
+ ${headers}= Create Dictionary content-type=application/json
+ ${subdata}= OperatingSystem.Get File ${PMMAPPER_SUB_ROLE_DATA}
+ ${session}= Create Session dmaapbc ${DMAAP_BC_SERVER}
+ ${resp}= Post Request dmaapbc ${DMAAP_BC_MR_CLIENT_PATH} data=${subdata} headers=${headers}
+ ${resp}= Run MR Get Request ${MR_TOPIC_CHECK_PATH}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${topics}= Set Variable ${resp.json().get('topics')}
+ List Should Contain Value ${topics} org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS
+ ${resp}= Run MR Auth Get Request ${MR_TOPIC_URL_PATH} ${GLOBAL_DCAE_USERNAME} ${GLOBAL_DCAE_PASSWORD}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Upload PM Files to xNF SFTP Server
+ [Tags] 5gbulkpm
+ Open Connection sftpserver
+ Login bulkpm bulkpm
+ ${epoch}= Get Current Date result_format=epoch
+ Set Global Variable ${epoch}
+ Put File ${FTP_FILE_PATH} upload/A${epoch}.xml.gz
+
+DR Bulk PM Feed Check
+ [Tags] 5gbulkpm
+ ${resp}= Run DR Get Request ${DR_SUB_CHECK_PATH}
+ Should Contain ${resp.text} bulk_pm_feed
+
+DR PM Mapper Subscriber Check
+ [Tags] 5gbulkpm
+ ${resp}= Run DR Get Request ${DR_SUB_CHECK_PATH}
+ Should Contain ${resp.text} https://dcae-pm-mapper:8443/delivery
+
+Sending File Ready Event to VES Collector
+ [Tags] 5gbulkpm
+ ${headers}= Create Dictionary content-type=application/json
+ ${fileready}= OperatingSystem.Get File ${JSON_DATA_FILE}
+ ${session}= Create Session ves ${VES_HEALTH_CHECK_PATH}
+ ${resp}= Post Request ves ${VES_LISTENER_PATH} data=${fileready} headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 202
+ ${VES_FILE_READY_NOTIFICATION} Set Variable {"event":{"commonEventHeader":{"version":"4.0.1","vesEventListenerVersion":"7.0.1","domain":"notification","eventName":"Noti_RnNode-Ericsson_FileReady","eventId":"FileReady_1797490e-10ae-4d48-9ea7-3d7d790b25e1","lastEpochMicrosec":8745745764578,"priority":"Normal","reportingEntityName":"otenb5309","sequence":0,"sourceName":"oteNB5309","startEpochMicrosec":8745745764578,"timeZoneOffset":"UTC+05.30"},"notificationFields":{"changeIdentifier":"PM_MEAS_FILES","changeType":"FileReady","notificationFieldsVersion":"2.0","arrayOfNamedHashMap":[{"name":"A${epoch}.xml.gz","hashMap":{"location":"sftp://bulkpm:bulkpm@sftpserver:22/upload/A${epoch}.xml.gz","compression":"gzip","fileFormatType":"org.3GPP.32.435#measCollec","fileFormatVersion":"V10"}}]}}}
+ ${resp}= Post Request ves ${VES_LISTENER_PATH} data=${VES_FILE_READY_NOTIFICATION} headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 202
+
+Verifying 3GPP Perf VES Content On PERFORMANCE_MEASUREMENTS Topic
+ [Tags] 5gbulkpm
+ Wait Until Keyword Succeeds 1 minute 5 sec xNF PM File Validate perf3gpp_RnNode-Ericsson_pmMeasResult
diff --git a/setup.sh b/setup.sh
index 392a84aa..88a06182 100755
--- a/setup.sh
+++ b/setup.sh
@@ -23,7 +23,8 @@ pip install \
'robotframework-requests==0.5.0' \
'robotframework-sshlibrary==3.3.0' \
'robotframework-ftplibrary==1.6' \
-'robotframework-archivelibrary==0.4.0'
+'robotframework-archivelibrary==0.4.0' \
+'robotframework-jsonlibrary==0.3.1'
pip install \
--pre \
@@ -72,9 +73,9 @@ then
# we need to update PATH with chromium-chromedriver
echo "Adding in-container chromedriver to PATH"
ln -s /usr/lib/chromium-browser/chromedriver /usr/local/bin/chromedriver
-
+
echo "Skipping desktop steps, building container image..."
-else
+else
#
# Get the appropriate chromedriver. Default to linux64
#