summaryrefslogtreecommitdiffstats
path: root/nokiav2/driver/src/test/resources
diff options
context:
space:
mode:
authorDenes Nemeth <denes.nemeth@nokia.com>2018-02-12 20:55:54 +0100
committerDenes Nemeth <denes.nemeth@nokia.com>2018-02-23 11:44:45 +0100
commitb17042b955489d8a023d09abad5436ff9b900dc3 (patch)
tree1e4392ac04a2fb1ed8d17075d504cf6594acaf16 /nokiav2/driver/src/test/resources
parentd4982f7b1777e9cdae9a4cc7d0d104263889ac69 (diff)
Updating Nokia driver
Change-Id: I950afe6acbdb359cd67a448024f006a45e8fc293 Signed-off-by: Denes Nemeth <denes.nemeth@nokia.com> Issue-ID: VFC-728
Diffstat (limited to 'nokiav2/driver/src/test/resources')
-rw-r--r--nokiav2/driver/src/test/resources/.gitignore1
-rw-r--r--nokiav2/driver/src/test/resources/application.properties66
-rw-r--r--nokiav2/driver/src/test/resources/test.jksbin0 -> 1949 bytes
-rw-r--r--nokiav2/driver/src/test/resources/unittests/TestCbamCatalogManager.sample.csarbin0 -> 1479 bytes
-rw-r--r--nokiav2/driver/src/test/resources/unittests/cbam.package.zipbin0 -> 759 bytes
-rw-r--r--nokiav2/driver/src/test/resources/unittests/empty.zipbin0 -> 22 bytes
-rw-r--r--nokiav2/driver/src/test/resources/unittests/lcn.json9
-rw-r--r--nokiav2/driver/src/test/resources/unittests/localhost.cert.pem73
-rw-r--r--nokiav2/driver/src/test/resources/unittests/localhost.jksbin0 -> 2254 bytes
-rw-r--r--nokiav2/driver/src/test/resources/unittests/maria.vnfd.scalable.tosca.nated.yaml593
-rw-r--r--nokiav2/driver/src/test/resources/unittests/missing.vnfd.zipbin0 -> 448 bytes
-rw-r--r--nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.full.modified.vnfd.yaml87
-rw-r--r--nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.full.original.vnfd.yaml33
-rw-r--r--nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.minimal.modified.vnfd.yaml46
-rw-r--r--nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.minimal.original.vnfd.yaml9
-rw-r--r--nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.package.zipbin0 -> 1288 bytes
-rw-r--r--nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.package.zip.vnfd17
-rw-r--r--nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.cbam.yaml11
-rw-r--r--nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.onap.yaml14
-rw-r--r--nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.cbam.yaml85
-rw-r--r--nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.inconsistent.cbam.yaml18
-rw-r--r--nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.onap.yaml80
-rw-r--r--nokiav2/driver/src/test/resources/unittests/sample.cert.pem14
-rw-r--r--nokiav2/driver/src/test/resources/unittests/vnfd.full.yaml24
-rw-r--r--nokiav2/driver/src/test/resources/unittests/vnfd.instantiation.yaml16
-rw-r--r--nokiav2/driver/src/test/resources/unittests/vnfd.scale.yaml12
26 files changed, 1208 insertions, 0 deletions
diff --git a/nokiav2/driver/src/test/resources/.gitignore b/nokiav2/driver/src/test/resources/.gitignore
new file mode 100644
index 00000000..03941911
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/.gitignore
@@ -0,0 +1 @@
+application-real.properties
diff --git a/nokiav2/driver/src/test/resources/application.properties b/nokiav2/driver/src/test/resources/application.properties
new file mode 100644
index 00000000..f5c42fc0
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/application.properties
@@ -0,0 +1,66 @@
+###############################################################################
+# Copyright 2016, Nokia Corporation
+#
+# 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.
+###############################################################################
+server.error.whitelabel.enabled=false
+###############################################################################
+# Beginning of mandatory properties #
+###############################################################################
+# The TCP port of the server
+server.port=8089
+# the base path of the server
+server.context-path=
+# the IP address to which the server binds to
+server.address=127.0.0.1
+# the IP address of the server reported to the micro service bus
+driverMsbExternalIp=127.0.0.1
+# the IP address of the server reported to VNFM
+driverVnfmExternalIp=127.0.0.1
+# the IP address of the message bus
+messageBusIp=127.0.0.1
+# the TCP port of the message bus
+messageBusPort=8089
+# the URL of the CBAM catalog service
+cbamCatalogUrl=https://127.0.0.1:443/api/catalog/adapter
+# the URL of the CBAM LCN service
+cbamLcnUrl=https://127.0.0.0.1:443/vnfm/lcn/v3
+# the URL of the CBAM authentication service
+cbamKeyCloakBaseUrl=https://127.0.0.0.1:443/auth
+# skip hostname verification during SSL on CBAM LCN, LCM and authorization interface
+skipHostnameVerification=true
+# skip certificate verification during SSL on CBAM LCN, LCM and authorization interface
+skipCertificateVerification=true
+# the collection of trusted certificates for SSL on CBAM LCN, LCM and authorization interface
+# in PEM format encoded in BASE64 to a single line
+trustedCertificates=
+# the username to be used for requesting a token on CBAM authorization interface
+cbamUsername=onap
+# the password to be used for requesting a token on CBAM authorization interface
+cbamPassword=myPassword
+# the identifier of the VNFM in A&AI core system registry
+vnfmId=53fbba58-464e-4cc4-8d33-aaaf072f0a27
+###############################################################################
+# End of mandatory properties for driver #
+###############################################################################
+
+
+spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.oauth2.OAuth2AutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
+vnfmInfoCacheEvictionInMs=600000
+
+## for logging begin ##
+com.fasterxml.jackson.core=jackson-databind
+#logging.file=${catalina.base}/logs/vfcadaptor.log
+logging.level.org.springframework.web=TRACE
+logging.level.org.hibernate=OFF
+## for logging end ##
diff --git a/nokiav2/driver/src/test/resources/test.jks b/nokiav2/driver/src/test/resources/test.jks
new file mode 100644
index 00000000..5506b9a8
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/test.jks
Binary files differ
diff --git a/nokiav2/driver/src/test/resources/unittests/TestCbamCatalogManager.sample.csar b/nokiav2/driver/src/test/resources/unittests/TestCbamCatalogManager.sample.csar
new file mode 100644
index 00000000..94f476f4
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/TestCbamCatalogManager.sample.csar
Binary files differ
diff --git a/nokiav2/driver/src/test/resources/unittests/cbam.package.zip b/nokiav2/driver/src/test/resources/unittests/cbam.package.zip
new file mode 100644
index 00000000..d7c6a673
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/cbam.package.zip
Binary files differ
diff --git a/nokiav2/driver/src/test/resources/unittests/empty.zip b/nokiav2/driver/src/test/resources/unittests/empty.zip
new file mode 100644
index 00000000..15cb0ecb
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/empty.zip
Binary files differ
diff --git a/nokiav2/driver/src/test/resources/unittests/lcn.json b/nokiav2/driver/src/test/resources/unittests/lcn.json
new file mode 100644
index 00000000..1ed3f5f4
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/lcn.json
@@ -0,0 +1,9 @@
+{
+ "status": "STARTED",
+ "vnfInstanceId": "CBAM-d59f413228af4a35b00eb168d636f567",
+ "timestamp": "2018-01-02T10:50:54.903260Z",
+ "notificationType": "VnfLifecycleChangeNotification",
+ "lifecycleOperationOccurrenceId": "CBAM-9b7dd0c2591d463b890021c38ead3f24",
+ "subscriptionId": "CBAM-1b89306bcd494879b7cb02369d2b2503",
+ "operation": "TERMINATE"
+} \ No newline at end of file
diff --git a/nokiav2/driver/src/test/resources/unittests/localhost.cert.pem b/nokiav2/driver/src/test/resources/unittests/localhost.cert.pem
new file mode 100644
index 00000000..879a6a5a
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/localhost.cert.pem
@@ -0,0 +1,73 @@
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number: 878178886 (0x3457f246)
+ Signature Algorithm: sha256WithRSAEncryption
+ Issuer: C=Unknown, ST=Unknown, L=Unknown, O=Unknown, OU=Unknown, CN=localhost
+ Validity
+ Not Before: Dec 16 01:51:53 2017 GMT
+ Not After : Mar 16 01:51:53 2018 GMT
+ Subject: C=Unknown, ST=Unknown, L=Unknown, O=Unknown, OU=Unknown, CN=localhost
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ Public-Key: (2048 bit)
+ Modulus:
+ 00:85:90:1e:2e:d5:b6:55:c4:56:ac:f7:3d:fb:12:
+ c3:a5:be:30:bb:56:03:e7:b2:cb:0e:e5:27:d2:82:
+ 41:11:09:ff:3b:1c:aa:bc:3d:97:0e:2f:c1:b5:bf:
+ de:ed:fe:36:e9:71:d6:3d:3d:ca:00:b0:3b:69:b0:
+ b8:0a:ef:e3:df:91:2e:8f:f7:92:9d:29:0c:5d:15:
+ ad:47:10:db:34:8c:10:01:ad:68:dc:df:80:d5:42:
+ 1f:55:be:06:7c:b0:c7:0a:04:87:9a:0a:57:ba:67:
+ 43:39:a4:91:09:91:bb:6f:00:dc:ff:ff:4c:53:e0:
+ 38:37:de:50:2f:a7:04:e7:c3:bc:a8:56:cd:d6:a7:
+ 99:51:43:14:00:32:85:46:3d:92:31:f6:5b:de:74:
+ de:11:4f:23:c2:0d:c6:65:0d:1d:d5:66:d8:bb:79:
+ 21:0e:b8:b9:0c:75:6e:7b:35:de:1e:a1:35:00:2e:
+ 74:84:7d:a9:b6:55:f8:58:c4:a9:8e:cf:ae:3e:17:
+ 12:71:05:b8:8a:50:05:7a:e9:55:db:68:26:e9:02:
+ 0c:1d:43:7f:bd:00:ab:4b:6e:cf:3f:1a:68:a8:52:
+ a2:b8:36:19:ca:fb:37:f8:79:54:6a:b4:7b:41:54:
+ af:bc:6a:49:2d:15:6d:14:95:18:b1:37:b2:9a:52:
+ 21:47
+ Exponent: 65537 (0x10001)
+ X509v3 extensions:
+ X509v3 Subject Key Identifier:
+ B4:A1:34:DA:34:7F:52:3E:76:AB:81:A4:5C:7E:10:3E:FD:84:9A:3E
+ Signature Algorithm: sha256WithRSAEncryption
+ 6b:9f:d7:de:1b:38:f0:46:7a:40:df:47:b1:1c:5c:05:2c:9a:
+ 4a:ad:5e:81:84:d1:ac:d4:8d:27:4b:8f:92:2e:02:18:7a:84:
+ 2f:bb:68:f5:ea:2b:ae:cc:3f:21:f7:d0:47:ea:6d:21:73:db:
+ 35:f0:e4:27:ba:95:db:2b:99:93:aa:a1:ab:23:bd:78:4f:7c:
+ e1:63:cb:2b:e8:2c:fb:e1:ad:af:2d:01:1d:67:d8:7c:bb:82:
+ 00:30:1a:de:b2:1c:d3:25:b0:de:b1:b5:3c:dc:42:4b:ae:b9:
+ 1c:e2:f4:dd:45:6c:87:75:d8:9e:bd:1d:27:05:e7:8c:63:ec:
+ de:87:aa:95:d7:65:64:80:42:95:88:14:16:6b:43:22:0f:e7:
+ c0:06:36:0d:93:14:be:d6:22:24:c0:43:c4:fa:83:bd:6c:5b:
+ 24:7f:ac:a5:f5:ea:a7:61:fd:5d:67:e3:9d:d1:59:b5:e6:d6:
+ 9b:20:ca:23:44:44:b7:65:a7:f9:74:34:de:68:87:fd:1c:2f:
+ 32:d7:48:c0:10:ba:7e:83:06:a4:21:05:d5:6b:b0:9e:9c:dc:
+ 12:5a:5a:45:b7:84:94:96:a4:29:e6:05:47:1f:f5:a5:93:db:
+ 21:fc:2e:2a:4d:55:09:54:38:0c:56:ba:59:5b:b2:36:85:c6:
+ 63:78:93:0c
+-----BEGIN CERTIFICATE-----
+MIIDezCCAmOgAwIBAgIENFfyRjANBgkqhkiG9w0BAQsFADBuMRAwDgYDVQQGEwdV
+bmtub3duMRAwDgYDVQQIEwdVbmtub3duMRAwDgYDVQQHEwdVbmtub3duMRAwDgYD
+VQQKEwdVbmtub3duMRAwDgYDVQQLEwdVbmtub3duMRIwEAYDVQQDEwlsb2NhbGhv
+c3QwHhcNMTcxMjE2MDE1MTUzWhcNMTgwMzE2MDE1MTUzWjBuMRAwDgYDVQQGEwdV
+bmtub3duMRAwDgYDVQQIEwdVbmtub3duMRAwDgYDVQQHEwdVbmtub3duMRAwDgYD
+VQQKEwdVbmtub3duMRAwDgYDVQQLEwdVbmtub3duMRIwEAYDVQQDEwlsb2NhbGhv
+c3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCFkB4u1bZVxFas9z37
+EsOlvjC7VgPnsssO5SfSgkERCf87HKq8PZcOL8G1v97t/jbpcdY9PcoAsDtpsLgK
+7+PfkS6P95KdKQxdFa1HENs0jBABrWjc34DVQh9VvgZ8sMcKBIeaCle6Z0M5pJEJ
+kbtvANz//0xT4Dg33lAvpwTnw7yoVs3Wp5lRQxQAMoVGPZIx9lvedN4RTyPCDcZl
+DR3VZti7eSEOuLkMdW57Nd4eoTUALnSEfam2VfhYxKmOz64+FxJxBbiKUAV66VXb
+aCbpAgwdQ3+9AKtLbs8/GmioUqK4NhnK+zf4eVRqtHtBVK+8akktFW0UlRixN7Ka
+UiFHAgMBAAGjITAfMB0GA1UdDgQWBBS0oTTaNH9SPnargaRcfhA+/YSaPjANBgkq
+hkiG9w0BAQsFAAOCAQEAa5/X3hs48EZ6QN9HsRxcBSyaSq1egYTRrNSNJ0uPki4C
+GHqEL7to9eorrsw/IffQR+ptIXPbNfDkJ7qV2yuZk6qhqyO9eE984WPLK+gs++Gt
+ry0BHWfYfLuCADAa3rIc0yWw3rG1PNxCS665HOL03UVsh3XYnr0dJwXnjGPs3oeq
+lddlZIBClYgUFmtDIg/nwAY2DZMUvtYiJMBDxPqDvWxbJH+spfXqp2H9XWfjndFZ
+tebWmyDKI0REt2Wn+XQ03miH/RwvMtdIwBC6foMGpCEF1WuwnpzcElpaRbeElJak
+KeYFRx/1pZPbIfwuKk1VCVQ4DFa6WVuyNoXGY3iTDA==
+-----END CERTIFICATE-----
diff --git a/nokiav2/driver/src/test/resources/unittests/localhost.jks b/nokiav2/driver/src/test/resources/unittests/localhost.jks
new file mode 100644
index 00000000..80b72992
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/localhost.jks
Binary files differ
diff --git a/nokiav2/driver/src/test/resources/unittests/maria.vnfd.scalable.tosca.nated.yaml b/nokiav2/driver/src/test/resources/unittests/maria.vnfd.scalable.tosca.nated.yaml
new file mode 100644
index 00000000..76ed67ce
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/maria.vnfd.scalable.tosca.nated.yaml
@@ -0,0 +1,593 @@
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0_nokia
+
+topology_template:
+ substitution_mappings:
+ node_type: tosca.nodes.nfv.VNF
+ properties:
+ descriptor_id: Nokia~Maria DB~1.0~1.0
+ descriptor_version: '1.0'
+ provider: Nokia
+ product_name: Maria DB
+ software_version: '1.0'
+ product_info_name: Maria DB
+ product_info_description: Relational database, non-scalable
+ vnfm_info:
+ - CBAM
+ requirements:
+ - virtual_link: [ dbBackendIpv4, external_virtual_link ] # IPv4 for SQL
+ - virtual_link: [ dbBackendIpv6, external_virtual_link ] # IPv6 for SQL
+ - virtual_link: [ serviceNodeIpv4, external_virtual_link ] # IPv4 for SSH
+ - virtual_link: [ loadBalancer, external_virtual_link ] # IPv4 for SQL (load balanced)
+ capabilities:
+ deployment_flavour:
+ properties:
+ flavour_id: scalable
+ description: ..
+ scaling_aspects:
+ dbBackendAspect:
+ name: ..
+ description: ..
+ associated_group: dbBackendScalingGroup
+ max_scale_level: 8
+ serviceNodeAspect:
+ name: ..
+ description: ..
+ associated_group: serviceNodeScalingGroup
+ max_scale_level: 3
+ instantiation_levels:
+ small:
+ description: ..
+ vdu_levels:
+ dbBackend:
+ number_of_instances: 3
+ serviceNode:
+ number_of_instances: 2
+ scale_info:
+ dbBackendAspect:
+ scale_level: 0
+ serviceNodeAspect:
+ scale_level: 1
+ medium:
+ description: ..
+ vdu_levels:
+ dbBackend:
+ number_of_instances: 4
+ serviceNode:
+ number_of_instances: 2
+ scale_info:
+ dbBackendAspect:
+ scale_level: 1
+ serviceNodeAspect:
+ scale_level: 1
+ large:
+ description: ..
+ vdu_levels:
+ dbBackend:
+ number_of_instances: 5
+ serviceNode:
+ number_of_instances: 4
+ scale_info:
+ dbBackendAspect:
+ scale_level: 2
+ serviceNodeAspect:
+ scale_level: 2
+ default_instantiation_level_id: small
+ vdu_profile:
+ dbBackend:
+ min_number_of_instances: 3
+ max_number_of_instances: 11
+ serviceNode:
+ min_number_of_instances: 0
+ max_number_of_instances: 6
+ vnf:
+ properties:
+ modifiable_attributes:
+ extensions:
+ http_proxy:
+ default: "http://87.254.212.120:8080"
+ https_proxy:
+ default: "https://87.254.212.120:8080"
+ no_proxy:
+ default: "10.41.49.231,10.41.49.5"
+ mysqlPassword:
+ default: "password"
+ mysqlUsername:
+ default: "mysql"
+ loginUsername:
+ default: "ubuntu"
+ rhel_yum_repository_host:
+ default: "http://10.41.49.231/mirror/rhel-7-server-rpms/"
+ ubuntu_repository_host:
+ default: "deb [arch=amd64] http://10.41.49.5/cobbler/repo_mirror/ubuntu-16.04-x86_64/ xenial main universe"
+ mariadb_rhel_repo_host:
+# default: "http://yum.mariadb.org/10.0/rhel7-amd64"
+ default: "http://10.41.49.5/cobbler/repo_mirror/mariadb-10.0-el7-x86_64/"
+ mariadb_ubuntu_repo_host:
+# default: "deb http://mirror.netinch.com/pub/mariadb/repo/10.0/ubuntu trusty main"
+ default: "deb [arch=amd64] http://10.41.49.5/cobbler/repo_mirror/ubuntu-mariadb-10.0-x86_64/ xenial main"
+ custom_backend_root_volume_size:
+ default: "10"
+ dry_run:
+ default: "false"
+ interfaces:
+ Basic:
+ instantiate:
+ inputs:
+ extensions:
+ pre_actions:
+ - javascript: javascript/scalable_instantiate_hot_params.js
+ include:
+ - javascript/scalable_prepare_cbam_include.js
+ output: stack_parameters
+ - javascript: javascript/cbam.pre.collectConnectionPoints.js
+ include:
+ - javascript/cbam.collectConnectionPoints.js
+ output: operation_result
+ post_actions:
+ - javascript: javascript/workaround_inventory_on_kilo.js
+ output: ansible_inventory
+ - ansible: ansible/playbook-scalable.yml
+ - javascript: javascript/cbam.post.collectConnectionPoints.js
+ include:
+ - javascript/cbam.collectConnectionPoints.js
+ output: operation_result
+ additional_parameters:
+ jobId: onapJobId
+ terminate:
+ inputs:
+ extensions:
+ pre_actions:
+ - javascript: javascript/cbam.pre.collectConnectionPoints.js
+ include:
+ - javascript/cbam.collectConnectionPoints.js
+ output: operation_result
+ post_actions:
+ - javascript: javascript/cbam.post.collectConnectionPoints.js
+ include:
+ - javascript/cbam.collectConnectionPoints.js
+ output: operation_result
+ additional_parameters:
+ jobId: onapJobId
+ Scalable:
+ scale:
+ inputs:
+ extensions:
+ pre_actions:
+ - javascript: javascript/scalable_instantiate_hot_params.js
+ include:
+ - javascript/scalable_prepare_cbam_include.js
+ output: stack_parameters
+ - ansible: ansible/playbook-scalable-scale-in.yml
+ - javascript: javascript/cbam.pre.collectConnectionPoints.js
+ include:
+ - javascript/cbam.collectConnectionPoints.js
+ output: operation_result
+ post_actions:
+ - javascript: javascript/workaround_inventory_on_kilo.js
+ output: ansible_inventory
+ - ansible: ansible/playbook-scalable.yml
+ - javascript: javascript/cbam.post.collectConnectionPoints.js
+ include:
+ - javascript/cbam.collectConnectionPoints.js
+ output: operation_result
+ additional_parameters:
+ jobId: onapJobId
+ Healable:
+ heal:
+ implementation: mistral-workbooks/heal_workbook.yaml
+ inputs:
+ extensions:
+ pre_actions:
+ - javascript: javascript/cbam.pre.collectConnectionPoints.js
+ include:
+ - javascript/cbam.collectConnectionPoints.js
+ output: operation_result
+ post_actions:
+ - javascript: javascript/cbam.post.collectConnectionPoints.js
+ include:
+ - javascript/cbam.collectConnectionPoints.js
+ output: operation_result
+ additional_parameters:
+ vmName: null
+ action: null
+ jobId: onapJobId
+ Custom:
+ upgrade:
+ implementation: mistral-workbooks/upgrade_workbook.yaml
+ inputs:
+ additional_parameters:
+ imageId: ubuntu.16.04
+ jobId: onapJobId
+ node_templates:
+ dbBackend:
+ type: tosca.nodes.nfv.VDU
+ properties:
+ description: ..
+ configurable_properties:
+ additional_vnfc_configurable_properties: {}
+ boot_order:
+ - rootVolume
+ requirements:
+ - virtual_compute: dbBackendCompute
+ - virtual_storage: rootVolume
+ - virtual_storage: dataVolume
+ - sw_image: mariaDbImage #FIXME
+
+ serviceNode:
+ type: tosca.nodes.nfv.VDU
+ properties:
+ description: ..
+ configurable_properties:
+ additional_vnfc_configurable_properties: {}
+ requirements:
+ - virtual_compute: serviceNodeCompute
+ - sw_image: mariaDbImage
+
+ dbBackendCompute:
+ type: tosca.nodes.nfv.VirtualCompute
+ properties:
+ virtual_memory:
+ virtual_mem_size: 8096 MB
+ virtual_cpu:
+ cpu_architecture: x86
+ num_virtual_cpu: 2
+ virtual_cpu_clock: 1800 MHz
+
+ serviceNodeCompute:
+ type: tosca.nodes.nfv.VirtualCompute
+ properties:
+ virtual_memory:
+ virtual_mem_size: 8096 MB
+ virtual_cpu:
+ cpu_architecture: x86
+ num_virtual_cpu: 2
+ virtual_cpu_clock: 1800 MHz
+
+ rootVolume:
+ type: tosca.nodes.nfv.VirtualStorage
+ properties:
+ type_of_storage: volume
+ size_of_storage: 10 GB
+ #rdma_enabled: false
+ requirements:
+ - sw_image: mariaDbImage
+
+ dataVolume:
+ type: tosca.nodes.nfv.VirtualStorage
+ properties:
+ type_of_storage: volume
+ size_of_storage: 1 GB
+ #rdma_enabled: false
+ requirements:
+ - sw_image: mariaDbImage
+
+ mariaDbImage:
+ type: tosca.nodes.nfv.SwImage
+ properties:
+ name: Software of Maria Db
+ version: 1.0
+ checksum: 9af30fce37a4c5c831e095745744d6d2
+ container_format: qcow2
+ disk_format: bare
+ # the ubuntu image is minimum 4GB the Centos is minimum 8 GB ?
+ min_disk: 10 GB
+ min_ram: 8096 MB
+ size: 10 GB
+ sw_image: maria.db.image.v1.0.qcow2
+ operating_system: Linux
+ supported_virtualisation_environments:
+ - KVM
+
+ dbBackendCpOnIpv4:
+ type: tosca.nodes.nfv.ICP
+ properties:
+ layer_protocol: ipv4
+ role: leaf
+ description: Connection point to access the DB on IPv4 externally
+ requirements:
+ - virtual_binding: dbBackend
+ - virtual_link: internalNetworkForFloatingIp
+
+ dbBackendCpOnIpv6:
+ type: tosca.nodes.nfv.ICP
+ properties:
+ layer_protocol: ipv6
+ role: leaf
+ description: Connection point to access the DB on IPv6 externally
+ requirements:
+ - virtual_binding: dbBackend
+ #- virtual_link: the CP is connected to the core network (IPv6)
+
+ dbBackendCpOnIpv4Redundancy1:
+ type: tosca.nodes.nfv.ICP
+ properties:
+ layer_protocol: ipv4
+ role: leaf
+ description: Connection point for DB replication
+ requirements:
+ - virtual_binding: dbBackend
+ - virtual_link: internalReplicationNetwork1
+
+ dbBackendCpOnIpv4Redundancy2:
+ type: tosca.nodes.nfv.ICP
+ properties:
+ layer_protocol: ipv4
+ role: leaf
+ description: Connection point for DB replication
+ requirements:
+ - virtual_binding: dbBackend
+ - virtual_link: internalReplicationNetwork2
+
+ dbBackendExternallyManagedCp:
+ type: tosca.nodes.nfv.ICP
+ properties:
+ layer_protocol: ipv6
+ role: leaf
+ description: Connection point to access the DB on IPv6 externally
+ requirements:
+ - virtual_binding: dbBackend
+ - virtual_link: extManagedVl
+
+ serviceNodeCp:
+ type: tosca.nodes.nfv.ICP
+ properties:
+ layer_protocol: ipv4
+ role: leaf
+ description: Connection point to access the DB on IPv4 externally
+ requirements:
+ - virtual_binding: serviceNode
+ - virtual_link: internalNetworkForFloatingIp
+
+ serviceNodeExternallyManagedCp:
+ type: tosca.nodes.nfv.ICP
+ properties:
+ layer_protocol: ipv4
+ role: leaf
+ description: External connection point to access the DB on IPv4
+ requirements:
+ - virtual_binding: dbBackend
+ - virtual_link: extManagedVl
+
+ movingIpCp:
+ type: tosca.nodes.nfv.ICP
+ properties:
+ layer_protocol: ipv4
+ role: leaf
+ description: Moving IP
+ requirements:
+ #- virtual_binding: # no corresponding VDU
+ - virtual_link: internalNetworkForFloatingIp
+ internalNetworkForFloatingIp:
+ type: tosca.nodes.nfv.VL
+ properties:
+ connectivity_type:
+ layer_protocol: ipv4
+ flow_pattern: mesh
+ vl_flavours: {}
+
+ internalReplicationNetwork1:
+ type: tosca.nodes.nfv.VL
+ properties:
+ connectivity_type:
+ layer_protocol: ipv4
+ flow_pattern: mesh
+ test_access: []
+ description: ..
+ vl_flavours: {}
+
+ internalReplicationNetwork2:
+ type: tosca.nodes.nfv.VL
+ properties:
+ connectivity_type:
+ layer_protocol: ipv4
+ flow_pattern: mesh
+ test_access: []
+ description: ..
+ vl_flavours: {}
+
+ extManagedVl:
+ type: tosca.nodes.nfv.VL
+ properties:
+ connectivity_type:
+ layer_protocol: ipv4
+ flow_pattern: mesh
+ test_access: []
+ description: ..
+ vl_flavours: {}
+
+ dbBackendIpv4:
+ type: tosca.nodes.nfv.ECP
+ properties:
+ layer_protocol: ipv4
+ requirements:
+ - internal_connection_point: dbBackendCpOnIpv4
+ #- external_virtual_link: # exposed on VNF boundary
+
+ dbBackendIpv6:
+ type: tosca.nodes.nfv.ECP
+ properties:
+ layer_protocol: ipv6
+ requirements:
+ - internal_connection_point: dbBackendCpOnIpv6
+ #- external_virtual_link: # exposed on VNF boundary
+
+ serviceNodeIpv4:
+ type: tosca.nodes.nfv.ECP
+ properties:
+ layer_protocol: ipv4
+ requirements:
+ - internal_connection_point: serviceNodeCp
+ #- external_virtual_link: # exposed on VNF boundary
+
+ loadBalancer:
+ type: tosca.nodes.nfv.ECP
+ properties:
+ layer_protocol: ipv4
+ requirements:
+ - internal_connection_point: movingIpCp
+ #- external_virtual_link: # exposed on VNF boundary
+
+ groups:
+ dbBackendScalingGroup:
+ type: tosca.groups.nfv.ElementGroup
+ description: ..
+ members: [ dbBackend ]
+
+ serviceNodeScalingGroup:
+ type: tosca.groups.nfv.ElementGroup
+ description: ..
+ members: [ serviceNode ]
+
+ policies:
+ - service_node_anti_affinity:
+ type: tosca.policies.nfv.ScalingStepLocalAntiAffinity
+ targets: [ serviceNode ]
+ properties:
+ scope: nfvi_node
+
+ - backend_node_anti_affinity:
+ type: tosca.policies.nfv.LocalAntiAffinity
+ targets: [ dbBackend ]
+ properties:
+ scope: nfvi_node
+
+ - nfvi_affinity:
+ type: tosca.policies.nfv.LocalAffinity
+ targets: [ dbBackend ]
+ properties:
+ scope: nfvi
+
+ - zone_affinity:
+ type: tosca.policies.nfv.LocalAffinity
+ targets: [ dbBackend ]
+ properties:
+ scope: resource_zone_group
+
+ - commissioning:
+ type: tosca.policies.nfv.Commissioning #FIXME
+ properties:
+ connection_points:
+ - dbBackendIpv6
+ - serviceNodeIpv4
+
+ - heat_mapping:
+ type: tosca.policies.nfv.HeatMapping
+ properties:
+ template:
+ hotPath: hot/
+ main: maria.hot.scalable.main.nated.yaml
+ nested:
+ - maria.hot.common.nated.yaml
+ - maria.hot.scalable.service.scaling.nated.yaml
+ - maria.hot.scalable.service.static.nated.yaml
+ - maria.hot.scalable.service.nated.yaml
+ - maria.hot.scalable.backend.static.nated.yaml
+ - maria.hot.scalable.backend.single.nated.yaml
+ - maria.hot.scalable.backend.nated.yaml
+ - maria.hot.scalable.backend.single.wrapper.nated.yaml
+ - maria.hot.scalable.backend.wrapper.nated.yaml
+# environment:
+ static:
+ virtualLinks:
+ internalReplicationNetwork1: db_backend_static.replication_network_1
+ internalReplicationNetwork2: db_backend_static.replication_network_2
+ internalNetworkForFloatingIp: common_resources.internal_network_for_floatingip
+ vdus:
+ dbBackend:
+ - heatResource: db_backend_static.static_node_0.wrapper_rg.0.server
+ connectionPoints:
+ dbBackendCpOnIpv4: db_backend_static.static_node_0.wrapper_rg.0.port_ipv4_nated
+ dbBackendCpOnIpv6: db_backend_static.static_node_0.wrapper_rg.0.port_ipv6
+ dbBackendCpOnIpv4Redundancy1: db_backend_static.static_node_0.wrapper_rg.0.port_replication_1
+ dbBackendCpOnIpv4Redundancy2: db_backend_static.static_node_0.wrapper_rg.0.port_replication_2
+ dbBackendExternallyManagedCp: db_backend_static.static_node_0.wrapper_rg.0.port_internal_ext_managed
+ virtualStorages:
+ rootVolume: db_backend_static.static_node_0.wrapper_rg.0.volume_root
+ dataVolume: db_backend_static.static_node_0.wrapper_rg.0.volume_data
+ externalConnectionPoints:
+ dbBackendIpv4:
+ - db_backend_static.static_node_0.wrapper_rg.0.floating_ip
+ dbBackendIpv6:
+ - db_backend_static.static_node_0.wrapper_rg.0.port_ipv6
+ - heatResource: db_backend_static.static_node_1.wrapper_rg.0.server
+ connectionPoints:
+ dbBackendCpOnIpv4: db_backend_static.static_node_1.wrapper_rg.0.port_ipv4_nated
+ dbBackendCpOnIpv6: db_backend_static.static_node_1.wrapper_rg.0.port_ipv6
+ dbBackendCpOnIpv4Redundancy1: db_backend_static.static_node_1.wrapper_rg.0.port_replication_1
+ dbBackendCpOnIpv4Redundancy2: db_backend_static.static_node_1.wrapper_rg.0.port_replication_2
+ dbBackendExternallyManagedCp: db_backend_static.static_node_1.wrapper_rg.0.port_internal_ext_managed
+ virtualStorages:
+ rootVolume: db_backend_static.static_node_1.wrapper_rg.0.volume_root
+ dataVolume: db_backend_static.static_node_1.wrapper_rg.0.volume_data
+ externalConnectionPoints:
+ dbBackendIpv4:
+ - db_backend_static.static_node_1.wrapper_rg.0.floating_ip
+ dbBackendIpv6:
+ - db_backend_static.static_node_1.wrapper_rg.0.port_ipv6
+ - heatResource: db_backend_static.static_node_2.wrapper_rg.0.server
+ connectionPoints:
+ dbBackendCpOnIpv4: db_backend_static.static_node_2.wrapper_rg.0.port_ipv4_nated
+ dbBackendCpOnIpv6: db_backend_static.static_node_2.wrapper_rg.0.port_ipv6
+ dbBackendCpOnIpv4Redundancy1: db_backend_static.static_node_2.wrapper_rg.0.port_replication_1
+ dbBackendCpOnIpv4Redundancy2: db_backend_static.static_node_2.wrapper_rg.0.port_replication_2
+ dbBackendExternallyManagedCp: db_backend_static.static_node_2.wrapper_rg.0.port_internal_ext_managed
+ virtualStorages:
+ rootVolume: db_backend_static.static_node_2.wrapper_rg.0.volume_root
+ dataVolume: db_backend_static.static_node_2.wrapper_rg.0.volume_data
+ externalConnectionPoints:
+ dbBackendIpv4:
+ - db_backend_static.static_node_2.wrapper_rg.0.floating_ip
+ dbBackendIpv6:
+ - db_backend_static.static_node_2.wrapper_rg.0.port_ipv6
+ externalConnectionPoints:
+ loadBalancer:
+ - service_node_static.moving_ip_floating_ip
+ aspects:
+ dbBackendAspect:
+ heatResource: db_backend_aspect_group
+ vdus:
+ dbBackend:
+ - heatResource: wrapper_rg.0.server
+ connectionPoints:
+ dbBackendCpOnIpv4: wrapper_rg.0.port_ipv4_nated
+ dbBackendCpOnIpv6: wrapper_rg.0.port_ipv6
+ dbBackendCpOnIpv4Redundancy1: wrapper_rg.0.port_replication_1
+ dbBackendCpOnIpv4Redundancy2: wrapper_rg.0.port_replication_2
+ dbBackendExternallyManagedCp: wrapper_rg.0.port_internal_ext_managed
+ virtualStorages:
+ rootVolume: wrapper_rg.0.volume_root
+ dataVolume: wrapper_rg.0.volume_data
+ externalConnectionPoints:
+ dbBackendIpv4:
+ - wrapper_rg.0.floating_ip
+ dbBackendIpv6:
+ - wrapper_rg.0.port_ipv6
+ serviceNodeAspect:
+ heatResource: service_node_aspect_group
+ affinity:
+ local:
+ - type: same
+ place: vim
+ resources: [node_a.server, node_b.server]
+ - type: same
+ place: zone
+ resources: [node_a.server, node_b.server]
+ - type: different
+ place: host
+ resources: [node_a.server, node_b.server]
+ vdus:
+ serviceNode:
+ - heatResource: node_a.server
+ connectionPoints:
+ serviceNodeCp: node_a.port_ipv4_nated
+ serviceNodeExternallyManagedCp: node_a.port_internal_ext_managed
+ externalConnectionPoints:
+ serviceNodeIpv4:
+ - node_a.floating_ip
+ - heatResource: node_b.server
+ connectionPoints:
+ serviceNodeCp: node_b.port_ipv4_nated
+ serviceNodeExternallyManagedCp: node_b.port_internal_ext_managed
+ externalConnectionPoints:
+ serviceNodeIpv4:
+ - node_b.floating_ip
diff --git a/nokiav2/driver/src/test/resources/unittests/missing.vnfd.zip b/nokiav2/driver/src/test/resources/unittests/missing.vnfd.zip
new file mode 100644
index 00000000..cfabc407
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/missing.vnfd.zip
Binary files differ
diff --git a/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.full.modified.vnfd.yaml b/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.full.modified.vnfd.yaml
new file mode 100644
index 00000000..83f1ea35
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.full.modified.vnfd.yaml
@@ -0,0 +1,87 @@
+---
+tosca_definitions_version: "tosca_simple_profile_for_nfv_1_0_0_nokia"
+topology_template:
+ substitution_mappings:
+ node_type: "tosca.nodes.nfv.VNF"
+ capabilities:
+ vnf:
+ properties:
+ modifiable_attributes:
+ extensions:
+ existingAttribute:
+ default: "value"
+ onapCsarId:
+ default: "kuku"
+ vimId:
+ default: "kuku"
+ interfaces:
+ Basic:
+ instantiate:
+ inputs:
+ extensions:
+ pre_actions:
+ - javascript: "pre"
+ include:
+ - "javascript/scalable_prepare_cbam_include.js"
+ output: "stack_parameters"
+ - javascript: "javascript/cbam.pre.collectConnectionPoints.js"
+ include:
+ - "javascript/cbam.collectConnectionPoints.js"
+ output: "operation_result"
+ post_actions:
+ - javascript: "post"
+ output: "ansible_inventory"
+ - javascript: "javascript/cbam.post.collectConnectionPoints.js"
+ include:
+ - "javascript/cbam.collectConnectionPoints.js"
+ output: "operation_result"
+ additional_parameters:
+ kuku: "muku"
+ jobId: "kuku"
+ terminate:
+ inputs:
+ extensions:
+ pre_actions:
+ - javascript: "javascript/cbam.pre.collectConnectionPoints.js"
+ include:
+ - "javascript/cbam.collectConnectionPoints.js"
+ output: "operation_result"
+ post_actions:
+ - javascript: "javascript/cbam.post.collectConnectionPoints.js"
+ include:
+ - "javascript/cbam.collectConnectionPoints.js"
+ output: "operation_result"
+ additional_parameters:
+ jobId: "kuku"
+ Scalable:
+ scale:
+ inputs:
+ extensions:
+ pre_actions:
+ - javascript: "javascript/cbam.pre.collectConnectionPoints.js"
+ include:
+ - "javascript/cbam.collectConnectionPoints.js"
+ output: "operation_result"
+ post_actions:
+ - javascript: "javascript/cbam.post.collectConnectionPoints.js"
+ include:
+ - "javascript/cbam.collectConnectionPoints.js"
+ output: "operation_result"
+ additional_parameters:
+ jobId: "kuku"
+ Healable:
+ heal:
+ inputs:
+ extensions:
+ pre_actions:
+ - javascript: "javascript/cbam.pre.collectConnectionPoints.js"
+ include:
+ - "javascript/cbam.collectConnectionPoints.js"
+ output: "operation_result"
+ post_actions:
+ - javascript: "javascript/cbam.post.collectConnectionPoints.js"
+ include:
+ - "javascript/cbam.collectConnectionPoints.js"
+ output: "operation_result"
+ additional_parameters:
+ jobId: "kuku"
diff --git a/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.full.original.vnfd.yaml b/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.full.original.vnfd.yaml
new file mode 100644
index 00000000..42569b04
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.full.original.vnfd.yaml
@@ -0,0 +1,33 @@
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0_nokia
+
+topology_template:
+ substitution_mappings:
+ node_type: tosca.nodes.nfv.VNF
+ capabilities:
+ vnf:
+ properties:
+ modifiable_attributes:
+ extensions:
+ existingAttribute:
+ default: "value"
+ interfaces:
+ Basic:
+ instantiate:
+ inputs:
+ extensions:
+ pre_actions:
+ - javascript: pre
+ include:
+ - javascript/scalable_prepare_cbam_include.js
+ output: stack_parameters
+ post_actions:
+ - javascript: post
+ output: ansible_inventory
+ additional_parameters:
+ kuku: muku
+ terminate:
+ Scalable:
+ scale:
+ Healable:
+ heal:
+
diff --git a/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.minimal.modified.vnfd.yaml b/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.minimal.modified.vnfd.yaml
new file mode 100644
index 00000000..2b05ecf1
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.minimal.modified.vnfd.yaml
@@ -0,0 +1,46 @@
+---
+tosca_definitions_version: "tosca_simple_profile_for_nfv_1_0_0_nokia"
+topology_template:
+ substitution_mappings:
+ node_type: "tosca.nodes.nfv.VNF"
+ interfaces:
+ Basic:
+ instantiate:
+ inputs:
+ extensions:
+ pre_actions:
+ - javascript: "javascript/cbam.pre.collectConnectionPoints.js"
+ include:
+ - "javascript/cbam.collectConnectionPoints.js"
+ output: "operation_result"
+ post_actions:
+ - javascript: "javascript/cbam.post.collectConnectionPoints.js"
+ include:
+ - "javascript/cbam.collectConnectionPoints.js"
+ output: "operation_result"
+ additional_parameters:
+ jobId: "kuku"
+ terminate:
+ inputs:
+ extensions:
+ pre_actions:
+ - javascript: "javascript/cbam.pre.collectConnectionPoints.js"
+ include:
+ - "javascript/cbam.collectConnectionPoints.js"
+ output: "operation_result"
+ post_actions:
+ - javascript: "javascript/cbam.post.collectConnectionPoints.js"
+ include:
+ - "javascript/cbam.collectConnectionPoints.js"
+ output: "operation_result"
+ additional_parameters:
+ jobId: "kuku"
+ capabilities:
+ vnf:
+ properties:
+ modifiable_attributes:
+ extensions:
+ onapCsarId:
+ default: "kuku"
+ vimId:
+ default: "kuku"
diff --git a/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.minimal.original.vnfd.yaml b/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.minimal.original.vnfd.yaml
new file mode 100644
index 00000000..7709793c
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.minimal.original.vnfd.yaml
@@ -0,0 +1,9 @@
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0_nokia
+
+topology_template:
+ substitution_mappings:
+ node_type: tosca.nodes.nfv.VNF
+ interfaces:
+ Basic:
+ instantiate:
+ terminate:
diff --git a/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.package.zip b/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.package.zip
new file mode 100644
index 00000000..ac555dff
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.package.zip
Binary files differ
diff --git a/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.package.zip.vnfd b/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.package.zip.vnfd
new file mode 100644
index 00000000..3c121386
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/packageconverter/cbam.package.zip.vnfd
@@ -0,0 +1,17 @@
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0_nokia
+
+topology_template:
+ substitution_mappings:
+ node_type: tosca.nodes.nfv.VNF
+ properties:
+ descriptor_id: Nokia~Maria DB~1.0~1.0
+ descriptor_version: '1.0'
+ provider: Nokia
+ product_name: Maria DB
+ software_version: '1.0'
+ product_info_name: Maria DB
+ product_info_description: Relational database, non-scalable
+ interfaces:
+ Basic:
+ instantiate:
+ terminate:
diff --git a/nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.cbam.yaml b/nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.cbam.yaml
new file mode 100644
index 00000000..45bfb73f
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.cbam.yaml
@@ -0,0 +1,11 @@
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0_nokia
+
+topology_template:
+ substitution_mappings:
+ node_type: tosca.nodes.nfv.VNF
+ properties:
+ descriptor_version: '1.0'
+ provider: myProvider
+ product_name: 'myName'
+ software_version: '2.0'
+ product_info_name: product_info_name \ No newline at end of file
diff --git a/nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.onap.yaml b/nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.onap.yaml
new file mode 100644
index 00000000..1cbc8ef7
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.onap.yaml
@@ -0,0 +1,14 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+metadata:
+ vendor: Nokia
+ csarVersion: 1.0
+ csarProvider: myProvider
+ id: Simple
+ version: 2.0
+ csarType: NFAR
+ name: myName
+ vnfdVersion: 1.0
+
+topology_template:
+ node_templates:
diff --git a/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.cbam.yaml b/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.cbam.yaml
new file mode 100644
index 00000000..a5e18eec
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.cbam.yaml
@@ -0,0 +1,85 @@
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0_nokia
+
+topology_template:
+ substitution_mappings:
+ node_type: tosca.nodes.nfv.VNF
+ properties:
+ descriptor_version: '1.0'
+ provider: myProvider
+ product_name: 'myName'
+ software_version: '2.0'
+ product_info_name: product_info_name
+ node_templates:
+ vduNode:
+ type: tosca.nodes.nfv.VDU
+ properties:
+ description: myVduDesc
+ requirements:
+ - virtual_compute: myCompute
+ - virtual_storage: myStorage1
+ - virtual_storage: myStorage2
+
+
+ myCompute:
+ type: tosca.nodes.nfv.VirtualCompute
+ properties:
+ virtual_memory:
+ virtual_mem_size: 8192 MB
+ virtual_cpu:
+ num_virtual_cpu: 4
+ virtual_cpu_clock: 1234 Mhz
+ myStorage1:
+ type: tosca.nodes.nfv.VirtualStorage
+ properties:
+ id: myStorage1
+ size_of_storage: 1G
+
+ myStorage2:
+ type: tosca.nodes.nfv.VirtualStorage
+ properties:
+ id: myStorage2
+ size_of_storage: 2G
+
+ myNetwork1:
+ type: tosca.nodes.nfv.VL
+
+ myNetwork2:
+ type: tosca.nodes.nfv.VL
+
+ icpWithOutEcp:
+ type: tosca.nodes.nfv.ICP
+ properties:
+ layer_protocol: ipv4
+ description: myDescription
+ requirements:
+ - virtual_binding: vduNode
+ - virtual_link: myNetwork1
+
+ icpWithEcp:
+ type: tosca.nodes.nfv.ICP
+ properties:
+ layer_protocol: ipv4
+ description: myDescription
+ requirements:
+ - virtual_binding: vduNode
+ - virtual_link: myNetwork1
+
+ myEcp:
+ type: tosca.nodes.nfv.ECP
+ properties:
+ layer_protocol: ipv4
+ requirements:
+ - internal_connection_point: icpWithEcp
+
+ icpWithOutVdu:
+ type: tosca.nodes.nfv.ICP
+ properties:
+ layer_protocol: ipv4
+ description: myDescription
+
+ ecpWithIcpWithOutVdu:
+ type: tosca.nodes.nfv.ECP
+ properties:
+ layer_protocol: ipv4
+ requirements:
+ - internal_connection_point: icpWithOutVdu \ No newline at end of file
diff --git a/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.inconsistent.cbam.yaml b/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.inconsistent.cbam.yaml
new file mode 100644
index 00000000..abb1243f
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.inconsistent.cbam.yaml
@@ -0,0 +1,18 @@
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0_nokia
+
+topology_template:
+ substitution_mappings:
+ node_type: tosca.nodes.nfv.VNF
+ properties:
+ descriptor_version: '1.0'
+ provider: myProvider
+ product_name: 'myName'
+ software_version: '2.0'
+ product_info_name: product_info_name
+ node_templates:
+ vduNode:
+ type: tosca.nodes.nfv.VDU
+ properties:
+ description: myVduDesc
+ requirements:
+ - virtual_compute: myComputeMissing
diff --git a/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.onap.yaml b/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.onap.yaml
new file mode 100644
index 00000000..ddb96bf0
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.onap.yaml
@@ -0,0 +1,80 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+metadata:
+ vendor: Nokia
+ csarVersion: 1.0
+ csarProvider: myProvider
+ id: Simple
+ version: 2.0
+ csarType: NFAR
+ name: myName
+ vnfdVersion: 1.0
+
+topology_template:
+ node_templates:
+ vduNode:
+ type: tosca.nodes.nfv.VDU.Compute
+ capabilities:
+ virtual_compute:
+ properties:
+ virtual_memory:
+ virtual_mem_size: 8192 MB
+ virtual_cpu:
+ num_virtual_cpu: 4
+ requirements:
+ - virtual_storage:
+ capability: tosca.capabilities.nfv.VirtualStorage
+ node: myStorage1
+ - virtual_storage:
+ capability: tosca.capabilities.nfv.VirtualStorage
+ node: myStorage2
+ myStorage1:
+ type: tosca.nodes.nfv.VDU.VirtualStorage
+ properties:
+ id: myStorage1
+ type_of_storage: volume
+ size_of_storage: 1G
+ myStorage2:
+ type: tosca.nodes.nfv.VDU.VirtualStorage
+ properties:
+ id: myStorage2
+ type_of_storage: volume
+ size_of_storage: 2G
+ myNetwork1:
+ type: tosca.nodes.nfv.VnfVirtualLinkDesc
+ properties:
+ vl_flavours:
+ flavours:
+ flavourId: notUsed
+ myNetwork2:
+ type: tosca.nodes.nfv.VnfVirtualLinkDesc
+ properties:
+ vl_flavours:
+ flavours:
+ flavourId: notUsed
+ icpWithOutEcp:
+ type: tosca.nodes.nfv.VduCpd
+ properties:
+ layer_protocol: ipv4
+ role: leaf
+ description: myDescription
+ requirements:
+ - virtual_binding: vduNode
+ - virtual_link: myNetwork1
+ icpWithEcp:
+ type: tosca.nodes.nfv.VduCpd
+ properties:
+ layer_protocol: ipv4
+ role: leaf
+ description: myDescription
+ requirements:
+ - virtual_binding: vduNode
+ - virtual_link: myNetwork1
+ myEcp:
+ type: tosca.nodes.nfv.VduCpd
+ properties:
+ layer_protocol: ipv4
+ role: leaf
+ description: myDescription
+ requirements:
+ - virtual_binding: vduNode
diff --git a/nokiav2/driver/src/test/resources/unittests/sample.cert.pem b/nokiav2/driver/src/test/resources/unittests/sample.cert.pem
new file mode 100644
index 00000000..0e41d269
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/sample.cert.pem
@@ -0,0 +1,14 @@
+-----BEGIN CERTIFICATE-----
+MIICEjCCAXsCAg36MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG
+A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE
+MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl
+YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw
+ODIyMDUyNjU0WhcNMTcwODIxMDUyNjU0WjBKMQswCQYDVQQGEwJKUDEOMAwGA1UE
+CAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBs
+ZS5jb20wXDANBgkqhkiG9w0BAQEFAANLADBIAkEAm/xmkHmEQrurE/0re/jeFRLl
+8ZPjBop7uLHhnia7lQG/5zDtZIUC3RVpqDSwBuw/NTweGyuP+o8AG98HxqxTBwID
+AQABMA0GCSqGSIb3DQEBBQUAA4GBABS2TLuBeTPmcaTaUW/LCB2NYOy8GMdzR1mx
+8iBIu2H6/E2tiY3RIevV2OW61qY2/XRQg7YPxx3ffeUugX9F4J/iPnnu1zAxxyBy
+2VguKv4SWjRFoRkIfIlHX0qVviMhSlNy2ioFLy7JcPZb+v3ftDGywUqcBiVDoea0
+Hn+GmxZA
+-----END CERTIFICATE----- \ No newline at end of file
diff --git a/nokiav2/driver/src/test/resources/unittests/vnfd.full.yaml b/nokiav2/driver/src/test/resources/unittests/vnfd.full.yaml
new file mode 100644
index 00000000..460f7f10
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/vnfd.full.yaml
@@ -0,0 +1,24 @@
+topology_template:
+ substitution_mappings:
+ capabilities:
+ deployment_flavour:
+ properties:
+ flavour_id: myFlavorId
+ instantiation_levels:
+ level1:
+ vdu_levels:
+ vdu1:
+ number_of_instances: 1
+ vdu2:
+ number_of_instances: 2
+ level2:
+ vdu_levels:
+ vdu1:
+ number_of_instances: 2
+ interfaces:
+ Basic:
+ scale:
+ inputs:
+ additional_parameters:
+ jobId: kuku
+ a: valueInVnfd \ No newline at end of file
diff --git a/nokiav2/driver/src/test/resources/unittests/vnfd.instantiation.yaml b/nokiav2/driver/src/test/resources/unittests/vnfd.instantiation.yaml
new file mode 100644
index 00000000..ef858dbc
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/vnfd.instantiation.yaml
@@ -0,0 +1,16 @@
+topology_template:
+ substitution_mappings:
+ capabilities:
+ deployment_flavour:
+ properties:
+ instantiation_levels:
+ level1:
+ vdu_levels:
+ vdu1:
+ number_of_instances: 1
+ vdu2:
+ number_of_instances: 2
+ level2:
+ vdu_levels:
+ vdu1:
+ number_of_instances: 2
diff --git a/nokiav2/driver/src/test/resources/unittests/vnfd.scale.yaml b/nokiav2/driver/src/test/resources/unittests/vnfd.scale.yaml
new file mode 100644
index 00000000..478fedaf
--- /dev/null
+++ b/nokiav2/driver/src/test/resources/unittests/vnfd.scale.yaml
@@ -0,0 +1,12 @@
+topology_template:
+ policies:
+ - heat_mapping:
+ properties:
+ aspects:
+ aspect1:
+ vdus:
+ vdu1:
+ - heatResource: wrapper_rg.0.server
+ - heatResource: wrapper_rg.1.server
+ vdu2:
+ - heatResource: wrapper_rg2.0.server \ No newline at end of file