summaryrefslogtreecommitdiffstats
path: root/robot/assets
diff options
context:
space:
mode:
authorKrzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>2020-10-07 09:23:18 +0200
committerMarcin Przybysz <marcin.przybysz@nokia.com>2020-10-12 12:27:03 +0000
commit590d66fda7ae1fb5d59555bd9af4cf212c2e7856 (patch)
treef5fab0b4f5b7df42b4c3af8755471bf07ec7cf50 /robot/assets
parent70902ea6a8086368524fef892ad52a951138e7c1 (diff)
Add CMPv2 E2E test case in robot test suite
Issue-ID: INT-1731 Signed-off-by: Krzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com> Change-Id: I79ac8cfc4755b134fa214d21cc71cc2b2067461b
Diffstat (limited to 'robot/assets')
-rw-r--r--robot/assets/cmpv2/blueprintTemplate.json12
-rw-r--r--robot/assets/cmpv2/k8s-mongo.yaml31
-rw-r--r--robot/assets/cmpv2/k8s-pnf-simulator.yaml65
-rw-r--r--robot/assets/templates/deployment/VesTlsCmpv2Inputs.jinja25
-rw-r--r--robot/assets/templates/ves/pnf_simulator_single_event.jinja4
5 files changed, 137 insertions, 0 deletions
diff --git a/robot/assets/cmpv2/blueprintTemplate.json b/robot/assets/cmpv2/blueprintTemplate.json
new file mode 100644
index 00000000..f3b87e7d
--- /dev/null
+++ b/robot/assets/cmpv2/blueprintTemplate.json
@@ -0,0 +1,12 @@
+{
+ "asdcResourceId": "",
+ "asdcServiceId": "",
+ "asdcServiceURL": "",
+ "blueprintTemplate": "",
+ "owner": "robot",
+ "serviceIds": [],
+ "serviceLocations": [],
+ "typeName": "",
+ "typeVersion": 100,
+ "vnfTypes": []
+}
diff --git a/robot/assets/cmpv2/k8s-mongo.yaml b/robot/assets/cmpv2/k8s-mongo.yaml
new file mode 100644
index 00000000..8e4b4634
--- /dev/null
+++ b/robot/assets/cmpv2/k8s-mongo.yaml
@@ -0,0 +1,31 @@
+tosca_definitions_version: cloudify_dsl_1_3
+imports:
+ - 'http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'
+ - 'plugin:k8splugin?version=3.4.2'
+inputs:
+ tag_version:
+ type: string
+ description: Docker image to be used
+ default: 'mongo'
+ replicas:
+ type: integer
+ description: Number of instances
+ default: 1
+node_templates:
+ mongo:
+ type: dcae.nodes.ContainerizedServiceComponent
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ MONGO_INITDB_ROOT_USERNAME: root
+ MONGO_INITDB_ROOT_PASSWORD: zXcVbN123!
+ MONGO_INITDB_DATABASE: pnf_simulator
+ ports:
+ - '27017:0'
+ properties:
+ service_component_type: mongo
+ service_component_name_override: mongo
+ image: { get_input: tag_version }
+ replicas: { get_input: replicas }
diff --git a/robot/assets/cmpv2/k8s-pnf-simulator.yaml b/robot/assets/cmpv2/k8s-pnf-simulator.yaml
new file mode 100644
index 00000000..24a1030f
--- /dev/null
+++ b/robot/assets/cmpv2/k8s-pnf-simulator.yaml
@@ -0,0 +1,65 @@
+tosca_definitions_version: cloudify_dsl_1_3
+imports:
+ - 'http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'
+ - 'plugin:k8splugin?version=3.4.2'
+inputs:
+ tag_version:
+ type: string
+ description: Docker image to be used
+ default: 'nexus3.onap.org:10001/onap/org.onap.integration.simulators.pnfsimulator:latest'
+ replicas:
+ type: integer
+ description: Number of instances
+ default: 1
+ external_cert_cert_type:
+ type: string
+ description: Output type
+ default: 'P12'
+ external_cert_ca_name:
+ type: string
+ description: Name of Certificate Authority configured on CertService side.
+ default: 'RA'
+ external_cert_common_name:
+ type: string
+ description: Common name which should be present in certificate.
+ default: 'pnf-simulator'
+ external_cert_sans:
+ type: string
+ description: 'List of Subject Alternative Names (SANs) which should be present
+ in certificate. Delimiter - : Should contain common_name value and other FQDNs
+ under which given component is accessible.'
+ default: 'pnf-simulator'
+ external_cert_use_external_tls:
+ type: boolean
+ description: Flag to indicate external tls enable/disable.
+ default: true
+node_templates:
+ pnf-simulator:
+ type: dcae.nodes.ContainerizedServiceComponent
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ ports:
+ - '5000:0'
+ properties:
+ service_component_type: pnf-simulator
+ service_component_name_override: pnf-simulator
+ image: { get_input: tag_version }
+ replicas: { get_input: replicas }
+ always_pull_image: true
+ tls_info:
+ cert_directory: '/app/store/'
+ external_cert:
+ external_cert_directory: '/app/store/'
+ use_external_tls:
+ get_input: external_cert_use_external_tls
+ cert_type:
+ get_input: external_cert_cert_type
+ ca_name:
+ get_input: external_cert_ca_name
+ external_certificate_parameters:
+ common_name:
+ get_input: external_cert_common_name
+ sans:
+ get_input: external_cert_sans
diff --git a/robot/assets/templates/deployment/VesTlsCmpv2Inputs.jinja b/robot/assets/templates/deployment/VesTlsCmpv2Inputs.jinja
new file mode 100644
index 00000000..6505552e
--- /dev/null
+++ b/robot/assets/templates/deployment/VesTlsCmpv2Inputs.jinja
@@ -0,0 +1,25 @@
+{
+ "serviceTypeId": "{{serviceTypeId}}",
+ "inputs": {
+ "external_port": 0,
+ "external_port_tls": {{external_port_tls}},
+ "auth_method": "certBasicAuth",
+ "service_component_name_override": "{{service_component_name_override}}",
+ "service_id": "{{service_component_name_override}}",
+ "service_component_type": "{{service_component_name_override}}",
+ "enable_tls": true,
+ "ves_other_publish_url": "http://message-router:3904/events/unauthenticated.SEC_OTHER_OUTPUT/",
+ "ves_heartbeat_publish_url": "http://message-router:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT/",
+ "ves_fault_publish_url": "http://message-router:3904/events/unauthenticated.SEC_FAULT_OUTPUT/",
+ "ves_measurement_publish_url": "http://message-router:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT/",
+ "ves_pnfRegistration_publish_url": "http://message-router:3904/events/unauthenticated.VES_PNFREG_OUTPUT/",
+ "ves_notification_publish_url": "http://message-router:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT/",
+ "user_list": "sample1,$2a$10$0buh.2WeYwN868YMwnNNEuNEAMNYVU9.FSMJGyIKV3dGET/7oGOi6|demouser,$2a$10$1cc.COcqV/d3iT2N7BjPG.S6ZKv2jpb9a5MV.o7lMih/GpjJRX.Ce",
+ "external_cert_ca_name": "RA",
+ "external_cert_common_name": "{{service_component_name_override}}",
+ "external_cert_sans": "{{external_cert_sans}}",
+ "external_cert_cert_type": "JKS",
+ "external_cert_use_external_tls": true,
+ "tag_version": "{{image}}"
+ }
+} \ No newline at end of file
diff --git a/robot/assets/templates/ves/pnf_simulator_single_event.jinja b/robot/assets/templates/ves/pnf_simulator_single_event.jinja
new file mode 100644
index 00000000..d800d992
--- /dev/null
+++ b/robot/assets/templates/ves/pnf_simulator_single_event.jinja
@@ -0,0 +1,4 @@
+{
+ "vesServerUrl": "{{ves_url}}",
+ "event": {{event}}
+} \ No newline at end of file