fix tosca template bugs 27/95027/1
authormaopengzhang <zhang.maopeng1@zte.com.cn>
Thu, 5 Sep 2019 12:23:36 +0000 (20:23 +0800)
committermaopengzhang <zhang.maopeng1@zte.com.cn>
Thu, 5 Sep 2019 12:23:36 +0000 (20:23 +0800)
unzip tosca package to files and fix some template bugs

Change-Id: If5b7f70844fb3218f37cb9b3e286cfea622ae9a7
Issue-ID: MODELING-219
Signed-off-by: maopengzhang <zhang.maopeng1@zte.com.cn>
140 files changed:
catalog/pub/msapi/extsys.py [deleted file]
catalog/pub/utils/toscaparser/testdata/ns/ran.csar [deleted file]
catalog/pub/utils/toscaparser/testdata/ns/ran/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/ran/ran-ns.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/ran/type_definition.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vIMS.csar [deleted file]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/artifacts.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/capabilities.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/data.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/groups.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/interfaces.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/nodes.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/policies.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/relationships.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-CscfNokia-template-interface.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-CscfNokia-template.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-ExtZteVl-template.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-SbcHuawei-template-interface.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-SbcHuawei-template.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-VduCompute-template.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-VduCpd-template.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-VduVirtualstorage-template.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-Vnfvirtuallinkdesc-template.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/service-VimsV2-template-interface.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/service-VimsV2-template.yml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/ns/service-vims/csar.meta [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/pnf/ran-du.csar [deleted file]
catalog/pub/utils/toscaparser/testdata/pnf/ran-du/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/pnf/ran-du/ran-du.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/pnf/ran-du/type_definition.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vSBC.csar [deleted file]
catalog/pub/utils/toscaparser/testdata/vnf/vSBC/Definitions/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vSBC/Definitions/onap_dm.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vSBC/MainServiceTemplate.mf [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vSBC/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vSBC/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vSBC/onap_dm.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra.csar [deleted file]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Artifacts/images/ubuntu_16.04 [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Artifacts/keys/authorized_keys [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Artifacts/keys/id_rsa [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Artifacts/keys/id_rsa.pub [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Definitions/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Definitions/onap_dm.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/MainServiceTemplate.mf [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng.csar [deleted file]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Artifacts/images/ubuntu_16.04 [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Artifacts/keys/authorized_keys [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Artifacts/keys/id_rsa [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Artifacts/keys/id_rsa.pub [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Definitions/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Definitions/onap_dm.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/MainServiceTemplate.mf [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu.csar [deleted file]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Artifacts/images/ubuntu_16.04 [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Artifacts/keys/authorized_keys [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Artifacts/keys/id_rsa [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Artifacts/keys/id_rsa.pub [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Definitions/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Definitions/onap_dm.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/MainServiceTemplate.mf [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux.csar [deleted file]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Artifacts/images/ubuntu_16.04 [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Artifacts/keys/authorized_keys [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Artifacts/keys/id_rsa [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Artifacts/keys/id_rsa.pub [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Definitions/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Definitions/onap_dm.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/MainServiceTemplate.mf [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw.csar [deleted file]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Artifacts/images/ubuntu_16.04 [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Artifacts/keys/authorized_keys [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Artifacts/keys/id_rsa [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Artifacts/keys/id_rsa.pub [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Definitions/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Definitions/onap_dm.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/MainServiceTemplate.mf [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra.csar [deleted file]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Artifacts/images/ubuntu_16.04 [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Artifacts/keys/authorized_keys [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Artifacts/keys/id_rsa [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Artifacts/keys/id_rsa.pub [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Definitions/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Definitions/onap_dm.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/MainServiceTemplate.mf [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng.csar [deleted file]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Artifacts/images/ubuntu_16.04 [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Artifacts/keys/authorized_keys [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Artifacts/keys/id_rsa [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Artifacts/keys/id_rsa.pub [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Definitions/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Definitions/onap_dm.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/MainServiceTemplate.mf [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu.csar [deleted file]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Artifacts/images/ubuntu_16.04 [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Artifacts/keys/authorized_keys [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Artifacts/keys/id_rsa [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Artifacts/keys/id_rsa.pub [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Definitions/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Definitions/onap_dm.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/MainServiceTemplate.mf [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux.csar [deleted file]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Artifacts/images/ubuntu_16.04 [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Artifacts/keys/authorized_keys [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Artifacts/keys/id_rsa [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Artifacts/keys/id_rsa.pub [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Definitions/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Definitions/onap_dm.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/MainServiceTemplate.mf [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw.csar [deleted file]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Artifacts/Deployment/OTHER/authorized_keys [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Artifacts/Deployment/OTHER/id_rsa [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Artifacts/Deployment/OTHER/id_rsa.pub [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Artifacts/Deployment/OTHER/image [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Definitions/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Definitions/onap_dm.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/MainServiceTemplate.mf [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/MainServiceTemplate.yaml [new file with mode: 0644]
catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
catalog/pub/utils/toscaparser/tests.py
catalog/settings.py

diff --git a/catalog/pub/msapi/extsys.py b/catalog/pub/msapi/extsys.py
deleted file mode 100644 (file)
index e038f26..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-# Copyright 2016 ZTE 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.
-
-import json
-import logging
-import uuid
-
-from catalog.pub.config.config import AAI_BASE_URL, AAI_USER, AAI_PASSWD
-from catalog.pub.exceptions import CatalogException
-from catalog.pub.utils import restcall
-from catalog.pub.utils.values import ignore_case_get
-
-logger = logging.getLogger(__name__)
-
-
-def call_aai(resource, method, content=''):
-    additional_headers = {
-        'X-FromAppId': 'VFC-CATALOG',
-        'X-TransactionId': str(uuid.uuid1())
-    }
-    return restcall.call_req(AAI_BASE_URL,
-                             AAI_USER,
-                             AAI_PASSWD,
-                             restcall.rest_no_auth,
-                             resource,
-                             method,
-                             content,
-                             additional_headers)
-
-
-def get_vims():
-    ret = call_aai("/cloud-infrastructure/cloud-regions?depth=all", "GET")
-    if ret[0] != 0:
-        logger.error("Status code is %s, detail is %s.", ret[2], ret[1])
-        raise CatalogException("Failed to query vims from extsys.")
-    # convert vim_info_aai to internal vim_info
-    vims_aai = json.JSONDecoder().decode(ret[1])
-    vims_aai = ignore_case_get(vims_aai, "cloud-region")
-    vims_info = []
-    for vim in vims_aai:
-        vim = convert_vim_info(vim)
-        vims_info.append(vim)
-    return vims_info
-
-
-def get_vim_by_id(vim_id):
-    cloud_owner, cloud_region = split_vim_to_owner_region(vim_id)
-    ret = call_aai("/cloud-infrastructure/cloud-regions/cloud-region/%s/%s?depth=all"
-                   % (cloud_owner, cloud_region), "GET")
-    if ret[0] != 0:
-        logger.error("Status code is %s, detail is %s.", ret[2], ret[1])
-        raise CatalogException("Failed to query vim(%s) from extsys." % vim_id)
-    # convert vim_info_aai to internal vim_info
-    vim_info_aai = json.JSONDecoder().decode(ret[1])
-    vim_info = convert_vim_info(vim_info_aai)
-    return vim_info
-
-
-def split_vim_to_owner_region(vim_id):
-    split_vim = vim_id.split('_')
-    cloud_owner = split_vim[0]
-    cloud_region = "".join(split_vim[1:])
-    return cloud_owner, cloud_region
-
-
-def convert_vim_info(vim_info_aai):
-    vim_id = vim_info_aai["cloud-owner"] + "_" + vim_info_aai["cloud-region-id"]
-    esr_system_info = ignore_case_get(ignore_case_get(vim_info_aai, "esr-system-info-list"), "esr-system-info")
-    vim_info = {
-        "vimId": vim_id,
-        "name": vim_id,
-        "url": ignore_case_get(esr_system_info[0], "service-url"),
-        "userName": ignore_case_get(esr_system_info[0], "user-name"),
-        "password": ignore_case_get(esr_system_info[0], "password"),
-        "tenant": ignore_case_get(esr_system_info[0], "default-tenant"),
-        "vendor": ignore_case_get(esr_system_info[0], "vendor"),
-        "version": ignore_case_get(esr_system_info[0], "version"),
-        "description": "vim",
-        "domain": "",
-        "type": ignore_case_get(esr_system_info[0], "type"),
-        "createTime": "2016-07-18 12:22:53"
-    }
-    return vim_info
-
-
-def get_sdn_controller_by_id(sdn_ontroller_id):
-    ret = call_aai("/external-system/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/%s?depth=all"
-                   % sdn_ontroller_id, "GET")
-    if ret[0] != 0:
-        logger.error("Failed to query sdn ontroller(%s) from extsys. detail is %s.", sdn_ontroller_id, ret[1])
-        raise CatalogException("Failed to query sdn ontroller(%s) from extsys." % sdn_ontroller_id)
-    # convert vim_info_aai to internal vim_info
-    sdnc_info_aai = json.JSONDecoder().decode(ret[1])
-    sdnc_info = convert_sdnc_info(sdnc_info_aai)
-    return sdnc_info
-
-
-def convert_sdnc_info(sdnc_info_aai):
-    esr_system_info = ignore_case_get(ignore_case_get(sdnc_info_aai, "esr-system-info-list"), "esr-system-info")
-    sdnc_info = {
-        "sdnControllerId": sdnc_info_aai["thirdparty-sdnc-id"],
-        "name": sdnc_info_aai["thirdparty-sdnc-id"],
-        "url": ignore_case_get(esr_system_info[0], "service-url"),
-        "userName": ignore_case_get(esr_system_info[0], "user-name"),
-        "password": ignore_case_get(esr_system_info[0], "password"),
-        "vendor": ignore_case_get(esr_system_info[0], "vendor"),
-        "version": ignore_case_get(esr_system_info[0], "version"),
-        "description": "",
-        "protocol": ignore_case_get(esr_system_info[0], "protocal"),
-        "productName": ignore_case_get(sdnc_info_aai, "product-name"),
-        "type": ignore_case_get(esr_system_info[0], "type"),
-        "createTime": "2016-07-18 12:22:53"
-    }
-    return sdnc_info
-
-
-def get_vnfm_by_id(vnfm_inst_id):
-    uri = "/external-system/esr-vnfm-list/esr-vnfm/%s?depth=all" % vnfm_inst_id
-    ret = call_aai(uri, "GET")
-    if ret[0] > 0:
-        logger.error('Send get VNFM information request to extsys failed.')
-        raise CatalogException('Send get VNFM information request to extsys failed.')
-    # convert vnfm_info_aai to internal vnfm_info
-    vnfm_info_aai = json.JSONDecoder().decode(ret[1])
-    vnfm_info = convert_vnfm_info(vnfm_info_aai)
-    return vnfm_info
-
-
-def convert_vnfm_info(vnfm_info_aai):
-    esr_system_info = ignore_case_get(ignore_case_get(vnfm_info_aai, "esr-system-info-list"), "esr-system-info")
-    vnfm_info = {
-        "vnfmId": vnfm_info_aai["vnfm-id"],
-        "name": vnfm_info_aai["vnfm-id"],
-        "type": ignore_case_get(esr_system_info[0], "type"),
-        "vimId": vnfm_info_aai["vim-id"],
-        "vendor": ignore_case_get(esr_system_info[0], "vendor"),
-        "version": ignore_case_get(esr_system_info[0], "version"),
-        "description": "vnfm",
-        "certificateUrl": vnfm_info_aai["certificate-url"],
-        "url": ignore_case_get(esr_system_info[0], "service-url"),
-        "userName": ignore_case_get(esr_system_info[0], "user-name"),
-        "password": ignore_case_get(esr_system_info[0], "password"),
-        "createTime": "2016-07-06 15:33:18"
-    }
-    return vnfm_info
-
-
-def select_vnfm(vnfm_type, vim_id):
-    uri = "/external-system/esr-vnfm-list?depth=all"
-    ret = call_aai(uri, "GET")
-    if ret[0] > 0:
-        logger.error("Failed to call %s: %s", uri, ret[1])
-        raise CatalogException('Failed to get vnfms from extsys.')
-    vnfms = json.JSONDecoder().decode(ret[1])
-    vnfms = ignore_case_get(vnfms, "esr-vnfm")
-    for vnfm in vnfms:
-        esr_system_info = ignore_case_get(vnfm, "esr-system-info")
-        type = ignore_case_get(esr_system_info, "type")
-        vimId = vnfm["vnfm-id"]
-        if type == vnfm_type and vimId == vim_id:
-            # convert vnfm_info_aai to internal vnfm_info
-            vnfm = convert_vnfm_info(vnfm)
-            return vnfm
-    raise CatalogException('No vnfm found with %s in vim(%s)' % (vnfm_type, vim_id))
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/ran.csar b/catalog/pub/utils/toscaparser/testdata/ns/ran.csar
deleted file mode 100644 (file)
index 9ea868c..0000000
Binary files a/catalog/pub/utils/toscaparser/testdata/ns/ran.csar and /dev/null differ
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/ran/TOSCA-Metadata/TOSCA.meta b/catalog/pub/utils/toscaparser/testdata/ns/ran/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..c391bf2
--- /dev/null
@@ -0,0 +1,4 @@
+TOSCA-Meta-File-Version: 1.0
+CSAR-Version: 1.1
+Created-By: ONAP
+Entry-Definitions: ran-ns.yaml
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/ran/ran-ns.yaml b/catalog/pub/utils/toscaparser/testdata/ns/ran/ran-ns.yaml
new file mode 100644 (file)
index 0000000..4f203ba
--- /dev/null
@@ -0,0 +1,124 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  nsd_invariant_id: 1zx2323523xc
+  nsd_name: RAN-NS
+  nsd_file_structure_version: "1.0"
+  nsd_designer: ZTE
+  nsd_release_date_time: "2018-11-05 12:00:00"
+  
+description: RAN Network Service
+
+imports:
+  - type_definition.yaml
+
+node_types:
+  onap.ran.ns:
+    derived_from: tosca.nodes.nfv.NS
+    properties:
+      descriptor_id:
+        type: string
+        required: true
+      designer:
+        type: string
+        required: true
+      version:
+        type: string
+        required: true
+      name:
+        type: string
+        required: true       
+      invariant_id:
+        type: string
+        required: true
+          
+  onap.ran.cucp:
+    derived_from: tosca.nodes.nfv.VNF
+    requirements:
+      - ran_ext_net:           
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo 
+      - ran_flat_net:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+
+  onap.ran.cuup:
+    derived_from: tosca.nodes.nfv.VNF
+    requirements:
+      - ran_ext_net:           
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo 
+      - ran_flat_net:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          
+topology_template:
+  substitution_mappings:
+    node_type: onap.ran.ns
+    properties:
+       descriptor_id: test_01
+       designer: ZTE
+       version: 1.0.1
+       name: ZTE RAN
+       invariant_id: 1zx2323523xc
+
+  node_templates:
+  
+    vl_ext_net:
+      type: tosca.nodes.nfv.NsVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        version: 1.0.1
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: ran_ext_net
+          cidr: 10.0.0.0/24
+          dhcpEnabled: false
+    vl_flat_net:
+      type: tosca.nodes.nfv.NsVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        version: 1.0.1
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: ran_flat_net
+          cidr: 10.1.0.0/24
+          dhcpEnabled: false
+    cu:
+      type: onap.ran.cucp
+      properties:
+        descriptor_id: zte_ran_cu_0001
+        descriptor_version: 1.0
+        provider: ZTE
+        product_name: ran
+        software_version: 1.0.1
+        vnfm_info: [ 'gvnfmdriver' ]
+        flavour_id: 1
+        flavour_description: default
+      requirements:
+        - ran_ext_net: vl_ext_net
+        - ran_flat_net: vl_flat_net
+        
+         
+    du:
+      type: tosca.nodes.nfv.PNF
+      properties:
+        descriptor_id: pnf_test_01
+        provider: ZTE
+        version: 1.0
+        descriptor_invariant_id: 1111
+        name: ZTE RAN DU
+        function_description: RAN DU Function
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/ran/type_definition.yaml b/catalog/pub/utils/toscaparser/testdata/ns/ran/type_definition.yaml
new file mode 100644 (file)
index 0000000..83fcb01
--- /dev/null
@@ -0,0 +1,260 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+capability_types: 
+  tosca.capabilities.nfv.VirtualLinkable:
+    derived_from: tosca.capabilities.Root
+
+data_types:
+  tosca.datatypes.nfv.LinkBitRateRequirements:
+    derived_from: tosca.datatypes.Root
+    properties:
+      root:
+         type: integer
+         required: true
+      leaf:
+         type: integer
+         required: true
+  tosca.datatypes.nfv.ConnectivityType:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      layer_protocol:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]  
+      flow_pattern:
+        type: string
+        required: false
+        constraints: # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          - valid_values: [Line, Tree, Mesh]
+  
+  tosca.datatypes.nfv.VlProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        max_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        min_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        qos:
+           type: tosca.datatypes.nfv.Qos
+           required: false
+        initiationParameters: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: map
+           entry_schema:
+             type: string
+           required: false
+        cidr: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkName:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        startIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        endIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        gatewayIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        segmentationId:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: integer
+           required: false
+        physicalNetwork:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkType:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+           constraints:
+             - valid_values: [VLAN, VXLAN]
+        dhcpEnabled:  # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+        vlanTransparent:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+  
+  tosca.datatypes.nfv.Qos:
+    derived_from: tosca.datatypes.Root
+    properties:
+      latency:
+         type: integer #Number [ms]
+         required: true
+      packet_delay_variation:
+         type: integer #Number [ms]
+         required: true
+      packet_loss_ratio:
+         type: float
+         constraints:
+           - in_range: [ 0.0, 1.0 ]
+         required: false
+  
+  tosca.datatypes.nfv.ServiceAvailability:
+   derived_from: tosca.datatypes.Root
+   description: service availability
+   properties:
+     Level:
+       type: string
+       description: service availability levels
+       required: true
+       constraints:
+          - valid_values: [ Level1, Level2,Level3 ]
+          
+node_types:  
+  tosca.nodes.nfv.VNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id: 
+        type: string # GUID
+        required: true
+      descriptor_version: 
+        type: string
+        required: true
+      provider: 
+        type: string
+        required: true
+      product_name: 
+        type: string
+        required: true
+      software_version: 
+        type: string
+        required: true
+      product_info_name: 
+        type: string
+        required: false
+      product_info_description: 
+        type: string
+        required: false
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        required: true
+      localization_languages:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      default_localization_language:
+        type: string
+        required: false
+      configurable_properties:
+        type: tosca.datatypes.nfv.VnfConfigurableProperties
+        required: false
+      modifiable_attributes:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributes
+        required: false  
+      flavour_id:
+        type: string
+        required: true
+      flavour_description:
+        type: string
+        required: true
+    #requirements:
+    #  - virtual_link:
+    #      capability: tosca.capabilities.nfv.VirtualLinkable
+    #      relationship: tosca.relationships.nfv.VirtualLinksTo
+    #      node: tosca.nodes.nfv.VnfVirtualLink
+    #      occurrences: [ 0, UNBOUNDED ]
+    #interfaces:
+    #  Nfv:
+    #    type: tosca.interfaces.nfv.vnf.lifecycle.Nfv  
+        
+  tosca.nodes.nfv.PNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id:
+        type: string
+        required: true
+      provider:
+        type: string
+        required: true
+      version:
+        type: string
+        required: true
+      descriptor_invariant_id:
+        type: string
+        required: true
+      name:
+        type: string
+        required: true
+      function_description:
+        type: string
+        required: true
+      #geographical_location_info:       
+      #  type: TBD
+      #  required: true
+    #requirements:
+    #   - virtual_link:
+    #       capability: tosca.capabilities.nfv.VirtualLinkable
+    #       relationship: tosca.relationships.nfv.VirtualLinksTo
+
+  tosca.nodes.nfv.PnfExtPort:           
+    derived_from: tosca.nodes.Root
+           
+  tosca.nodes.nfv.NsVirtualLink:
+    derived_from: tosca.nodes.Root
+    description: node definition of Virtual Links
+    properties:
+      provider:
+        type: string
+        required: false
+      version:
+        type: string
+        required: true
+      vl_profile:
+        type: tosca.datatypes.nfv.VlProfile
+        required: true
+      connectivity_type:
+        type: tosca.datatypes.nfv.ConnectivityType
+        required: true
+      qos:
+        type: tosca.datatypes.nfv.Qos
+        required: false
+      service_availability:
+        type: tosca.datatypes.nfv.ServiceAvailability
+        required: false
+    capabilities:
+      VirtualLinkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+  tosca.nodes.nfv.NS:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id:
+        type: string
+        required: true
+      designer:
+        type: string
+        required: true
+      version:
+        type: string
+        required: true
+      name:
+        type: string
+        required: true
+      invariant_id:
+        type: string
+        required: true
+    capabilities:
+      #monitoring_parameter:
+        # modelled as ad hoc capabilities in VNF node template
+    requirements:
+      - virtual_link:
+          capability:
+             tosca.capabilities.nfv.VirtualLinkable
+          relationship:
+             tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.NsVirtualLink
+          occurrences: [ 0, UNBOUNDED ]
+
+relationship_types:
+  
+  tosca.relationships.nfv.VirtualLinksTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable]
+
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vIMS.csar b/catalog/pub/utils/toscaparser/testdata/ns/service-vIMS.csar
deleted file mode 100644 (file)
index 0aeed58..0000000
Binary files a/catalog/pub/utils/toscaparser/testdata/ns/service-vIMS.csar and /dev/null differ
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/artifacts.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/artifacts.yml
new file mode 100644 (file)
index 0000000..fd13d85
--- /dev/null
@@ -0,0 +1,40 @@
+#
+# 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.
+#
+tosca_definitions_version: tosca_simple_yaml_1_1
+imports:
+- data.yml
+artifact_types:
+  tosca.artifacts.Root:
+    description: This is the default (root) TOSCA Artifact Type definition that all other TOSCA base Artifact Types derive from.
+  tosca.artifacts.Deployment.Image:
+    derived_from: tosca.artifacts.Deployment
+    description: This artifact type represents a parent type for any "image" which is an opaque packaging of a TOSCA Node's deployment (whether real or virtual) whose contents are typically already installed and pre-configured (i.e., "stateful") and prepared to be run on a known target container.
+  tosca.artifacts.Implementation.Bash:
+    derived_from: tosca.artifacts.Implementation
+    description: This artifact type represents a Bash script type that contains Bash commands that can be executed on the Unix Bash shell.
+  tosca.artifacts.Deployment.Image.VM:
+    derived_from: tosca.artifacts.Deployment
+    description: This artifact represents the parent type for all Virtual Machine (VM) image and container formatted deployment artifacts. These images contain a stateful capture of a machine (e.g., server) including operating system and installed software along with any configurations and can be run on another machine using a hypervisor which virtualizes typical server (i.e., hardware) resources.
+  tosca.artifacts.Implementation.Python:
+    derived_from: tosca.artifacts.Implementation
+    description: This artifact type represents a Python file that contains Python language constructs that can be executed within a Python interpreter.
+  tosca.artifacts.Deployment:
+    derived_from: tosca.artifacts.Root
+    description: This artifact type represents the parent type for all deployment artifacts in TOSCA. This class of artifacts typically represents a binary packaging of an application or service that is used to install/create or deploy it as part of a node's lifecycle.
+  tosca.artifacts.File:
+    derived_from: tosca.artifacts.Root
+    description: This artifact type is used when an artifact definition needs to have its associated file simply treated as a file and no special handling/handlers are invoked (i.e., it is not treated as either an implementation or deployment artifact type).
+  tosca.artifacts.Implementation:
+    derived_from: tosca.artifacts.Root
+    description: This artifact type represents the parent type for all implementation artifacts in TOSCA. These artifacts are used to implement operations of TOSCA interfaces either directly (e.g., scripts) or indirectly (e.g., config. files).
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/capabilities.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/capabilities.yml
new file mode 100644 (file)
index 0000000..c4193e9
--- /dev/null
@@ -0,0 +1,279 @@
+#
+# 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.
+#
+tosca_definitions_version: tosca_simple_yaml_1_1
+imports:
+- data.yml
+capability_types:
+  tosca.capabilities.Root:
+    description: The TOSCA root Capability Type all other TOSCA base Capability Types derive from
+  tosca.capabilities.Attachment:
+    derived_from: tosca.capabilities.Root
+  tosca.capabilities.Node:
+    derived_from: tosca.capabilities.Root
+  tosca.capabilities.Container:
+    derived_from: tosca.capabilities.Root
+    properties:
+      num_cpus:
+        type: integer
+        required: false
+        constraints:
+        - greater_or_equal: 1
+      cpu_frequency:
+        type: scalar-unit.frequency
+        required: false
+        constraints:
+        - greater_or_equal: 0.1 GHz
+      disk_size:
+        type: scalar-unit.size
+        required: false
+        constraints:
+        - greater_or_equal: 0 MB
+      mem_size:
+        type: scalar-unit.size
+        required: false
+        constraints:
+        - greater_or_equal: 0 MB
+  org.openecomp.capabilities.PortMirroring:
+    derived_from: tosca.capabilities.Root
+    properties:
+      connection_point:
+        type: org.openecomp.datatypes.PortMirroringConnectionPointDescription
+  tosca.capabilities.Endpoint:
+    derived_from: tosca.capabilities.Root
+    properties:
+      protocol:
+        type: string
+        default: tcp
+      port:
+        type: PortDef
+        required: false
+      secure:
+        type: boolean
+        default: false
+      url_path:
+        type: string
+        required: false
+      port_name:
+        type: string
+        required: false
+      network_name:
+        type: string
+        required: false
+        default: PRIVATE
+      initiator:
+        type: string
+        default: source
+        constraints:
+        - valid_values:
+          - source
+          - target
+          - peer
+      ports:
+        type: map
+        required: false
+        constraints:
+        - min_length: 1
+        entry_schema:
+          type: PortSpec
+    attributes:
+      ip_address:
+        type: string
+  tosca.capabilities.DatabaseEndpoint:
+    derived_from: tosca.capabilities.Endpoint
+  tosca.capabilities.Endpoint.Public:
+    derived_from: tosca.capabilities.Endpoint
+    properties:
+      network_name: PUBLIC
+      floating:
+        description: |
+          indicates that the public address should be allocated from a pool of floating IPs that are associated with the network.
+        type: boolean
+        default: false
+        status: experimental
+      dns_name:
+        description: The optional name to register with DNS
+        type: string
+        required: false
+        status: experimental
+  tosca.capabilities.Endpoint.Admin:
+    derived_from: tosca.capabilities.Endpoint
+    properties:
+      secure: true
+  tosca.capabilities.Endpoint.Database:
+    derived_from: tosca.capabilities.Endpoint
+  tosca.capabilities.OperatingSystem:
+    derived_from: tosca.capabilities.Root
+    properties:
+      architecture:
+        type: string
+        required: false
+      type:
+        type: string
+        required: false
+      distribution:
+        type: string
+        required: false
+      version:
+        type: version
+        required: false
+  tosca.capabilities.Scalable:
+    derived_from: tosca.capabilities.Root
+    properties:
+      min_instances:
+        type: integer
+        default: 1
+      max_instances:
+        type: integer
+        default: 1
+      default_instances:
+        type: integer
+  tosca.capabilities.network.Bindable:
+    derived_from: tosca.capabilities.Node
+  tosca.capabilities.Container.Docker:
+    derived_from: tosca.capabilities.Container
+    properties:
+      version:
+        type: list
+        required: false
+        entry_schema: version
+      publish_all:
+        type: boolean
+        default: false
+        required: false
+      publish_ports:
+        type: list
+        entry_schema: PortSpec
+        required: false
+      expose_ports:
+        type: list
+        entry_schema: PortSpec
+        required: false
+      volumes:
+        type: list
+        entry_schema: string
+        required: false
+  tosca.capabilities.network.Linkable:
+    derived_from: tosca.capabilities.Root
+  org.openecomp.capabilities.AllottedResource:
+    derived_from: tosca.capabilities.Root
+  tosca.capabilities.nfv.Metric:
+    derived_from: tosca.capabilities.Endpoint
+  org.openecomp.capabilities.Metric:
+    derived_from: tosca.capabilities.nfv.Metric
+    description: A node type that includes the Metric capability indicates that it can be monitored.
+    properties:
+      unit:
+        type: string
+        description: Unit of the metric value
+        required: true
+        status: SUPPORTED
+      description:
+        type: string
+        description: Description of the metric
+        required: false
+        status: SUPPORTED
+      type:
+        type: string
+        description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+        required: true
+        status: SUPPORTED
+      category:
+        type: string
+        description: Category of the metric, for an example, compute, disk, network, storage and etc.
+        required: false
+        status: SUPPORTED
+    attributes:
+      value:
+        type: string
+        description: Runtime monitored value
+        status: SUPPORTED
+  org.openecomp.capabilities.metric.Ceilometer:
+    derived_from: org.openecomp.capabilities.Metric
+    description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+    properties:
+      name:
+        type: string
+        description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+        required: true
+        status: SUPPORTED
+  org.openecomp.capabilities.metric.SnmpPolling:
+    derived_from: org.openecomp.capabilities.Metric
+    description: A node type that includes the Metric capability indicates that it can be monitored using snmp polling.
+    properties:
+      oid:
+        type: string
+        description: Object Id of the metric
+        required: true
+        status: SUPPORTED
+  org.openecomp.capabilities.metric.SnmpTrap:
+    derived_from: org.openecomp.capabilities.Metric
+    description: A node type that includes the Metric capability indicates that it can be monitored using snmp trap.
+    properties:
+      oid:
+        type: string
+        description: Object Id of the metric
+        required: true
+        status: SUPPORTED
+  org.openecomp.capabilities.Forwarder:
+    derived_from: tosca.capabilities.Root
+  org.openecomp.capabilities.VLANAssignment:
+    derived_from: tosca.capabilities.Root
+    description: ability to expose routing information of the internal network
+    properties:
+      vfc_instance_group_reference:
+        type: string
+        description: Ability to recognize capability per vfc instance group on vnf instance
+        required: true
+  tosca.capabilities.nfv.VirtualStorage:
+    derived_from: tosca.capabilities.Root
+  tosca.capabilities.nfv.VirtualCompute:
+    derived_from: tosca.capabilities.Root
+    properties:
+      requested_additional_capabilities:
+        type: map
+        entry_schema:
+          type: tosca.datatypes.nfv.RequestedAdditionalCapability
+        required: false
+      virtual_memory:
+        type: tosca.datatypes.nfv.VirtualMemory
+        required: true
+      virtual_cpu:
+        type: tosca.datatypes.nfv.VirtualCpu
+        required: true
+  tosca.capabilities.nfv.VirtualBindable:
+    derived_from: tosca.capabilities.Root
+  tosca.capabilities.nfv.VirtualLinkable:
+    derived_from: tosca.capabilities.Root
+  tosca.capabilities.nfv.Forwarder:
+    derived_from: tosca.capabilities.Root
+  tosca.capabilities.nfv.ext.GuestOs:
+    derived_from: tosca.capabilities.Root
+  tosca.capabilities.nfv.ext.ImageFile:
+    derived_from: tosca.capabilities.Root
+  tosca.capabilities.nfv.ext.LocalAttachment:
+    derived_from: tosca.capabilities.Root
+  tosca.capabilities.nfv.ext.Compute.Container.Architecture:
+    derived_from: tosca.capabilities.Root
+    properties:
+      num_cpus:
+        type: string
+        required: false
+      flavor_extra_specs:
+        type: map
+        required: false
+        entry_schema:
+          type: string
+      mem_size:
+        type: string
+        required: false
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/data.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/data.yml
new file mode 100644 (file)
index 0000000..9dbe4e6
--- /dev/null
@@ -0,0 +1,1432 @@
+#
+# 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.
+#
+tosca_definitions_version: tosca_simple_yaml_1_1
+data_types:
+  tosca.datatypes.Root:
+    description: The TOSCA root Data Type all other TOSCA base Data Types derive from
+  integer:
+    derived_from: tosca.datatypes.Root
+  string:
+    derived_from: tosca.datatypes.Root
+  boolean:
+    derived_from: tosca.datatypes.Root
+  float:
+    derived_from: tosca.datatypes.Root
+  list:
+    derived_from: tosca.datatypes.Root
+  map:
+    derived_from: tosca.datatypes.Root
+  json:
+    derived_from: tosca.datatypes.Root
+  scalar-unit:
+    derived_from: tosca.datatypes.Root
+  scalar-unit.size:
+    derived_from: scalar-unit
+  scalar-unit.time:
+    derived_from: scalar-unit
+  scalar-unit.frequency:
+    derived_from: scalar-unit
+  tosca.datatypes.Credential:
+    derived_from: tosca.datatypes.Root
+    properties:
+      protocol:
+        type: string
+        required: false
+      token_type:
+        type: string
+        default: password
+      token:
+        type: string
+      keys:
+        type: map
+        required: false
+        entry_schema:
+          type: string
+      user:
+        type: string
+        required: false
+  org.openecomp.datatypes.PortMirroringConnectionPointDescription:
+    derived_from: tosca.datatypes.Root
+    properties:
+      nf_type:
+        type: string
+      nfc_type:
+        type: string
+      network_role:
+        type: string
+      pps_capacity:
+        type: string
+  tosca.datatypes.TimeInterval:
+    derived_from: tosca.datatypes.Root
+    properties:
+      start_time:
+        type: timestamp
+        required: true
+      end_time:
+        type: timestamp
+        required: true
+  tosca.datatypes.network.NetworkInfo:
+    derived_from: tosca.datatypes.Root
+    properties:
+      network_name:
+        type: string
+      network_id:
+        type: string
+      addresses:
+        type: list
+        entry_schema:
+          type: string
+  tosca.datatypes.network.PortInfo:
+    derived_from: tosca.datatypes.Root
+    properties:
+      port_name:
+        type: string
+      port_id:
+        type: string
+      network_id:
+        type: string
+      mac_address:
+        type: string
+      addresses:
+        type: list
+        entry_schema:
+          type: string
+  tosca.datatypes.network.PortDef:
+    derived_from: integer
+    constraints:
+    - in_range:
+      - 1
+      - 65535
+  tosca.datatypes.network.PortSpec:
+    derived_from: tosca.datatypes.Root
+    properties:
+      protocol:
+        type: string
+        required: true
+        default: tcp
+        constraints:
+        - valid_values:
+          - udp
+          - tcp
+          - igmp
+      target:
+        type: tosca.datatypes.network.PortDef
+      target_range:
+        type: range
+        constraints:
+        - in_range:
+          - 1
+          - 65535
+      source:
+        type: tosca.datatypes.network.PortDef
+      source_range:
+        type: range
+        constraints:
+        - in_range:
+          - 1
+          - 65535
+  org.openecomp.datatypes.heat.network.AddressPair:
+    derived_from: tosca.datatypes.Root
+    description: MAC/IP address pairs
+    properties:
+      mac_address:
+        type: string
+        description: MAC address
+        required: false
+        status: SUPPORTED
+      ip_address:
+        type: string
+        description: IP address
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.network.subnet.HostRoute:
+    derived_from: tosca.datatypes.Root
+    description: Host route info for the subnet
+    properties:
+      destination:
+        type: string
+        description: The destination for static route
+        required: false
+        status: SUPPORTED
+      nexthop:
+        type: string
+        description: The next hop for the destination
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.network.AllocationPool:
+    derived_from: tosca.datatypes.Root
+    description: The start and end addresses for the allocation pool
+    properties:
+      start:
+        type: string
+        description: Start address for the allocation pool
+        required: false
+        status: SUPPORTED
+      end:
+        type: string
+        description: End address for the allocation pool
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.network.neutron.Subnet:
+    derived_from: tosca.datatypes.Root
+    description: A subnet represents an IP address block that can be used for assigning IP addresses to virtual instances
+    properties:
+      tenant_id:
+        type: string
+        description: The ID of the tenant who owns the network
+        required: false
+        status: SUPPORTED
+      enable_dhcp:
+        type: boolean
+        description: Set to true if DHCP is enabled and false if DHCP is disabled
+        required: false
+        default: true
+        status: SUPPORTED
+      ipv6_address_mode:
+        type: string
+        description: IPv6 address mode
+        required: false
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - dhcpv6-stateful
+          - dhcpv6-stateless
+          - slaac
+      ipv6_ra_mode:
+        type: string
+        description: IPv6 RA (Router Advertisement) mode
+        required: false
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - dhcpv6-stateful
+          - dhcpv6-stateless
+          - slaac
+      value_specs:
+        type: map
+        description: Extra parameters to include in the request
+        required: false
+        default: {}
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      allocation_pools:
+        type: list
+        description: The start and end addresses for the allocation pools
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.AllocationPool
+      subnetpool:
+        type: string
+        description: The name or ID of the subnet pool
+        required: false
+        status: SUPPORTED
+      dns_nameservers:
+        type: list
+        description: A specified set of DNS name servers to be used
+        required: false
+        default: []
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      host_routes:
+        type: list
+        description: The gateway IP address
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.subnet.HostRoute
+      ip_version:
+        type: integer
+        description: The gateway IP address
+        required: false
+        default: 4
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - '4'
+          - '6'
+      name:
+        type: string
+        description: The name of the subnet
+        required: false
+        status: SUPPORTED
+      prefixlen:
+        type: integer
+        description: Prefix length for subnet allocation from subnet pool
+        required: false
+        status: SUPPORTED
+        constraints:
+        - greater_or_equal: 0
+      cidr:
+        type: string
+        description: The CIDR
+        required: false
+        status: SUPPORTED
+      gateway_ip:
+        type: string
+        description: The gateway IP address
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.novaServer.network.PortExtraProperties:
+    derived_from: tosca.datatypes.Root
+    description: Nova server network expand properties for port
+    properties:
+      port_security_enabled:
+        type: boolean
+        description: Flag to enable/disable port security on the port
+        required: false
+        status: SUPPORTED
+      mac_address:
+        type: string
+        description: MAC address to give to this port
+        required: false
+        status: SUPPORTED
+      admin_state_up:
+        type: boolean
+        description: The administrative state of this port
+        required: false
+        default: true
+        status: SUPPORTED
+      qos_policy:
+        type: string
+        description: The name or ID of QoS policy to attach to this port
+        required: false
+        status: SUPPORTED
+      allowed_address_pairs:
+        type: list
+        description: Additional MAC/IP address pairs allowed to pass through the port
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.AddressPair
+      binding:vnic_type:
+        type: string
+        description: The vnic type to be bound on the neutron port
+        required: false
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - macvtap
+          - direct
+          - normal
+      value_specs:
+        type: map
+        description: Extra parameters to include in the request
+        required: false
+        default: {}
+        status: SUPPORTED
+        entry_schema:
+          type: string
+  org.openecomp.datatypes.heat.novaServer.network.AddressInfo:
+    derived_from: tosca.datatypes.network.NetworkInfo
+    description: Network addresses with corresponding port id
+    properties:
+      port_id:
+        type: string
+        description: Port id
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.neutron.port.FixedIps:
+    derived_from: tosca.datatypes.Root
+    description: subnet/ip_address
+    properties:
+      subnet:
+        type: string
+        description: Subnet in which to allocate the IP address for this port
+        required: false
+        status: SUPPORTED
+      ip_address:
+        type: string
+        description: IP address desired in the subnet for this port
+        required: false
+        status: SUPPORTED
+      subnet_id:
+        type: string
+        description: Subnet in which to allocate the IP address for this port
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.FileInfo:
+    derived_from: tosca.datatypes.Root
+    description: Heat File Info
+    properties:
+      file:
+        type: string
+        description: The required URI string (relative or absolute) which can be used to locate the file
+        required: true
+        status: SUPPORTED
+      file_type:
+        type: string
+        description: The type of the file
+        required: true
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - base
+          - env
+          - volume
+          - network
+  org.openecomp.datatypes.heat.contrail.network.rule.PortPairs:
+    derived_from: tosca.datatypes.Root
+    description: source and destination port pairs
+    properties:
+      start_port:
+        type: string
+        description: Start port
+        required: false
+        status: SUPPORTED
+      end_port:
+        type: string
+        description: End port
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrail.network.rule.Rule:
+    derived_from: tosca.datatypes.Root
+    description: policy rule
+    properties:
+      src_ports:
+        type: list
+        description: Source ports
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.contrail.network.rule.PortPairs
+      protocol:
+        type: string
+        description: Protocol
+        required: false
+        status: SUPPORTED
+      dst_addresses:
+        type: list
+        description: Destination addresses
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.contrail.network.rule.VirtualNetwork
+      apply_service:
+        type: string
+        description: Service to apply
+        required: false
+        status: SUPPORTED
+      dst_ports:
+        type: list
+        description: Destination ports
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.contrail.network.rule.PortPairs
+      src_addresses:
+        type: list
+        description: Source addresses
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.contrail.network.rule.VirtualNetwork
+      direction:
+        type: string
+        description: Direction
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrail.network.rule.RuleList:
+    derived_from: tosca.datatypes.Root
+    description: list of policy rules
+    properties:
+      policy_rule:
+        type: list
+        description: Contrail network rule
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.contrail.network.rule.Rule
+  org.openecomp.datatypes.heat.contrail.network.rule.VirtualNetwork:
+    derived_from: tosca.datatypes.Root
+    description: source and destination addresses
+    properties:
+      virtual_network:
+        type: string
+        description: Virtual network
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.network.neutron.SecurityRules.Rule:
+    derived_from: tosca.datatypes.Root
+    description: Rules Pairs
+    properties:
+      remote_group_id:
+        type: string
+        description: The remote group ID to be associated with this security group rule
+        required: false
+        status: SUPPORTED
+      protocol:
+        type: string
+        description: The protocol that is matched by the security group rule
+        required: false
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - tcp
+          - udp
+          - icmp
+      ethertype:
+        type: string
+        description: Ethertype of the traffic
+        required: false
+        default: IPv4
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - IPv4
+          - IPv6
+      port_range_max:
+        type: integer
+        description: 'The maximum port number in the range that is matched by the
+          security group rule. '
+        required: false
+        status: SUPPORTED
+        constraints:
+        - in_range:
+          - 0
+          - 65535
+      remote_ip_prefix:
+        type: string
+        description: The remote IP prefix (CIDR) to be associated with this security group rule
+        required: false
+        status: SUPPORTED
+      remote_mode:
+        type: string
+        description: Whether to specify a remote group or a remote IP prefix
+        required: false
+        default: remote_ip_prefix
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - remote_ip_prefix
+          - remote_group_id
+      direction:
+        type: string
+        description: The direction in which the security group rule is applied
+        required: false
+        default: ingress
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - egress
+          - ingress
+      port_range_min:
+        type: integer
+        description: The minimum port number in the range that is matched by the security group rule.
+        required: false
+        status: SUPPORTED
+        constraints:
+        - in_range:
+          - 0
+          - 65535
+  org.openecomp.datatypes.heat.substitution.SubstitutionFiltering:
+    derived_from: tosca.datatypes.Root
+    description: Substitution Filter
+    properties:
+      substitute_service_template:
+        type: string
+        description: Substitute Service Template
+        required: true
+        status: SUPPORTED
+      index_value:
+        type: integer
+        description: Index value of the substitution service template runtime instance
+        required: false
+        default: 0
+        status: SUPPORTED
+        constraints:
+        - greater_or_equal: 0
+      count:
+        type: string
+        description: Count
+        required: false
+        default: 1
+        status: SUPPORTED
+      scaling_enabled:
+        type: boolean
+        description: Indicates whether service scaling is enabled
+        required: false
+        default: true
+        status: SUPPORTED
+      mandatory:
+        type: boolean
+        description: Mandatory
+        required: false
+        default: true
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.RefDataSequence:
+    derived_from: tosca.datatypes.Root
+    description: network policy refs data sequence
+    properties:
+      network_policy_refs_data_sequence_major:
+        type: integer
+        description: Network Policy ref data sequence Major
+        required: false
+        status: SUPPORTED
+      network_policy_refs_data_sequence_minor:
+        type: integer
+        description: Network Policy ref data sequence Minor
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.RefData:
+    derived_from: tosca.datatypes.Root
+    description: network policy refs data
+    properties:
+      network_policy_refs_data_sequence:
+        type: org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.RefDataSequence
+        description: Network Policy ref data sequence
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.ref.data.IpamSubnet:
+    derived_from: tosca.datatypes.Root
+    description: Network Ipam Ref Data Subnet
+    properties:
+      network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
+        type: string
+        description: Network ipam refs data ipam subnets ip prefix len
+        required: false
+        status: SUPPORTED
+      network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
+        type: string
+        description: Network ipam refs data ipam subnets ip prefix
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.ref.data.IpamSubnetList:
+    derived_from: tosca.datatypes.Root
+    description: Network Ipam Ref Data Subnet List
+    properties:
+      network_ipam_refs_data_ipam_subnets_subnet:
+        type: org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.ref.data.IpamSubnet
+        description: Network ipam refs data ipam subnets
+        required: false
+        status: SUPPORTED
+      network_ipam_refs_data_ipam_subnets_addr_from_start:
+        type: string
+        description: Network ipam refs data ipam subnets addr from start
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.IpamRefData:
+    derived_from: tosca.datatypes.Root
+    description: Network Ipam Ref Data
+    properties:
+      network_ipam_refs_data_ipam_subnets:
+        type: list
+        description: Network ipam refs data ipam subnets
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.ref.data.IpamSubnetList
+  org.openecomp.datatypes.heat.contrailV2.network.rule.SrcVirtualNetwork:
+    derived_from: tosca.datatypes.Root
+    description: source addresses
+    properties:
+      network_policy_entries_policy_rule_src_addresses_virtual_network:
+        type: string
+        description: Source addresses Virtual network
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrailV2.network.rule.DstVirtualNetwork:
+    derived_from: tosca.datatypes.Root
+    description: destination addresses
+    properties:
+      network_policy_entries_policy_rule_dst_addresses_virtual_network:
+        type: string
+        description: Destination addresses Virtual network
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrailV2.network.rule.DstPortPairs:
+    derived_from: tosca.datatypes.Root
+    description: destination port pairs
+    properties:
+      network_policy_entries_policy_rule_dst_ports_start_port:
+        type: string
+        description: Start port
+        required: false
+        status: SUPPORTED
+      network_policy_entries_policy_rule_dst_ports_end_port:
+        type: string
+        description: End port
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrailV2.network.rule.SrcPortPairs:
+    derived_from: tosca.datatypes.Root
+    description: source port pairs
+    properties:
+      network_policy_entries_policy_rule_src_ports_start_port:
+        type: string
+        description: Start port
+        required: false
+        status: SUPPORTED
+      network_policy_entries_policy_rule_src_ports_end_port:
+        type: string
+        description: End port
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrailV2.network.rule.ActionList:
+    derived_from: tosca.datatypes.Root
+    description: Action List
+    properties:
+      network_policy_entries_policy_rule_action_list_simple_action:
+        type: string
+        description: Simple Action
+        required: false
+        status: SUPPORTED
+      network_policy_entries_policy_rule_action_list_apply_service:
+        type: list
+        description: Apply Service
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: string
+  org.openecomp.datatypes.heat.contrailV2.network.rule.Rule:
+    derived_from: tosca.datatypes.Root
+    description: policy rule
+    properties:
+      network_policy_entries_policy_rule_dst_addresses:
+        type: list
+        description: Destination addresses
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.contrailV2.network.rule.DstVirtualNetwork
+      network_policy_entries_policy_rule_dst_ports:
+        type: list
+        description: Destination ports
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.contrailV2.network.rule.DstPortPairs
+      network_policy_entries_policy_rule_protocol:
+        type: string
+        description: Protocol
+        required: false
+        status: SUPPORTED
+      network_policy_entries_policy_rule_src_addresses:
+        type: list
+        description: Source addresses
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.contrailV2.network.rule.SrcVirtualNetwork
+      network_policy_entries_policy_rule_direction:
+        type: string
+        description: Direction
+        required: false
+        status: SUPPORTED
+      network_policy_entries_policy_rule_src_ports:
+        type: list
+        description: Source ports
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.contrailV2.network.rule.SrcPortPairs
+      network_policy_entries_policy_rule_action_list:
+        type: org.openecomp.datatypes.heat.contrailV2.network.rule.ActionList
+        description: Action list
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrailV2.network.rule.RuleList:
+    derived_from: tosca.datatypes.Root
+    description: list of policy rules
+    properties:
+      network_policy_entries_policy_rule:
+        type: list
+        description: Contrail network rule
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.contrailV2.network.rule.Rule
+  org.openecomp.datatypes.heat.network.contrail.port.StaticRoute:
+    derived_from: tosca.datatypes.Root
+    description: static route
+    properties:
+      prefix:
+        type: string
+        description: Route prefix
+        required: false
+        status: SUPPORTED
+      next_hop:
+        type: string
+        description: Next hop
+        required: false
+        status: SUPPORTED
+      next_hop_type:
+        type: string
+        description: Next hop type
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.network.contrail.AddressPair:
+    derived_from: tosca.datatypes.Root
+    description: Address Pair
+    properties:
+      address_mode:
+        type: string
+        description: Address mode active-active or active-standy
+        required: false
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - active-active
+          - active-standby
+      prefix:
+        type: string
+        description: IP address prefix
+        required: false
+        status: SUPPORTED
+      mac_address:
+        type: string
+        description: Mac address
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.network.contrail.InterfaceData:
+    derived_from: tosca.datatypes.Root
+    description: Interface Data
+    properties:
+      static_routes:
+        type: list
+        description: An ordered list of static routes to be added to this interface
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.contrail.port.StaticRoute
+      virtual_network:
+        type: string
+        description: Virtual Network for this interface
+        required: true
+        status: SUPPORTED
+      allowed_address_pairs:
+        type: list
+        description: List of allowed address pair for this interface
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.contrail.AddressPair
+      ip_address:
+        type: string
+        description: IP for this interface
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrailV2.virtual.machine.interface.Properties:
+    derived_from: tosca.datatypes.Root
+    description: Virtual Machine Interface Properties.
+    properties:
+      virtual_machine_interface_properties_service_interface_type:
+        type: string
+        description: Service Interface Type.
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.Root:
+    derived_from: tosca.datatypes.Root
+    description: |
+      The ECOMP root Data Type all other Data Types derive from
+    properties:
+      supplemental_data:
+        type: map
+        entry_schema:
+          description: |
+            A placeholder for missing properties that would be included in future ecomp model versions. fromat <key>:<value>
+          type: string
+  org.openecomp.datatypes.AssignmentRequirements:
+    derived_from: org.openecomp.datatypes.Root
+    properties:
+      is_required:
+        description: |
+          "true" indicates that assignment is required
+        type: boolean
+        default: false
+        required: true
+      count:
+        description: number of assignments required
+        type: integer
+        required: false
+  org.openecomp.datatypes.network.SubnetAssignments:
+    derived_from: org.openecomp.datatypes.Root
+    properties:
+      ip_network_address_plan:
+        type: string
+        required: false
+        description: Reference to EIPAM, VLAN or other address plan ID used to assign subnets to this network
+      dhcp_enabled:
+        type: boolean
+        required: false
+        description: \"true\" indicates the network has 1 or more policies
+      ip_version:
+        type: integer
+        constraints:
+        - valid_values:
+          - 4
+          - 6
+        required: true
+        description: The IP version of the subnet
+      cidr_mask:
+        type: integer
+        required: true
+        description: The default subnet CIDR mask
+      min_subnets_count:
+        type: integer
+        default: 1
+        required: true
+        description: Quantity of subnets that must be initially assigned
+  org.openecomp.datatypes.network.IPv4SubnetAssignments:
+    derived_from: org.openecomp.datatypes.network.SubnetAssignments
+    properties:
+      use_ipv4:
+        type: boolean
+        required: true
+        description: Indicates IPv4 subnet assignments
+  org.openecomp.datatypes.network.IPv6SubnetAssignments:
+    derived_from: org.openecomp.datatypes.network.SubnetAssignments
+    properties:
+      use_ipv6:
+        type: boolean
+        required: true
+        description: Indicates IPv6 subnet assignments
+  org.openecomp.datatypes.network.NetworkAssignments:
+    derived_from: org.openecomp.datatypes.Root
+    properties:
+      ecomp_generated_network_assignment:
+        type: boolean
+        required: true
+        default: false
+        description: |
+          \"true\" indicates that the network assignments will be auto-generated by ECOMP \"false\" indicates operator-supplied Network assignments file upload is required (e.g. VID will present prompt to operator to upload operator-supplied Network assignments file).
+      is_shared_network:
+        type: boolean
+        required: true
+        description: \"true\" means this network is shared by multiple Openstack tenants
+      is_external_network:
+        type: boolean
+        required: true
+        default: false
+        description: |
+          \"true\" means this Contrail external network
+      ipv4_subnet_default_assignment:
+        type: org.openecomp.datatypes.network.IPv4SubnetAssignments
+        required: true
+        description: IPv4 defualt subnet assignments
+      ipv6_subnet_default_assignment:
+        type: org.openecomp.datatypes.network.IPv6SubnetAssignments
+        required: true
+        description: IPv6 defualt subnet assignments
+  org.openecomp.datatypes.network.ProviderNetwork:
+    derived_from: org.openecomp.datatypes.Root
+    properties:
+      is_provider_network:
+        type: boolean
+        required: true
+        description: \"true\" indicates that this a Neutron provider type of network
+      physical_network_name:
+        type: string
+        required: false
+        constraints:
+        - valid_values:
+          - Physnet41
+          - Physnet42
+          - Physnet43
+          - Physnet44
+          - Physnet21
+          - Physnet22
+        description: |
+          Identifies the NUMA processor cluster to which this physical network interface belongs. NUMA instance correlates to the first digit of the Physical Network Name suffix (e.g. \"01\" = NUMA 0, \"11\" = NUMA 1)
+      numa:
+        type: string
+        required: false
+        constraints:
+        - valid_values:
+          - NUMA 0
+          - NUMA 1
+        description: |
+          PNIC instance within the NUMA processor cluster PNIC Instance correlates to the second digit of the Physical Network Name suffix (e.g. "01" = PNIC 1, "02" = "PNIC 2)
+      pnic_instance:
+        type: integer
+        required: false
+        description: PNIC instance within the NUMA processor cluster
+  org.openecomp.datatypes.network.NetworkFlows:
+    derived_from: org.openecomp.datatypes.Root
+    properties:
+      is_network_policy:
+        type: boolean
+        required: false
+        default: false
+        description: \"true\" indicates the network has 1 or more policies
+      network_policy:
+        type: string
+        required: false
+        description: 'Identifies the specific Cloud network policy that must be applied
+          to this network (source: from Policy Manager).'
+      is_bound_to_vpn:
+        type: boolean
+        required: false
+        default: false
+        description: \"true\" indicates the network has 1 or more vpn bindings
+      vpn_binding:
+        type: string
+        required: false
+        description: 'Identifies the specific VPN Binding entry in A&AI that must
+          be applied when creating this network (source: A&AI)'
+  org.openecomp.datatypes.network.VlanRequirements:
+    derived_from: org.openecomp.datatypes.Root
+    properties:
+      vlan_range_plan:
+        type: string
+        required: true
+        description: reference to a vlan range plan
+      vlan_type:
+        type: string
+        required: true
+        constraints:
+        - valid_values:
+          - c-tag
+          - s-tag
+        description: identifies the vlan type (e.g., c-tag)
+      vlan_count:
+        type: integer
+        required: true
+        description: identifies the number of vlan tags to assign to the CP from the plan
+  org.openecomp.datatypes.network.IpRequirements:
+    derived_from: org.openecomp.datatypes.Root
+    properties:
+      ip_version:
+        type: integer
+        required: true
+        constraints:
+        - valid_values:
+          - 4
+          - 6
+      ip_count:
+        description: identifies the number of ip address to assign to the CP from the plan
+        type: integer
+        required: false
+      floating_ip_count:
+        type: integer
+        required: false
+      subnet_role:
+        type: string
+        required: false
+      assingment_method:
+        type: string
+        required: true
+        constraints:
+        - valid_values:
+          - fixed
+          - dhcp
+      dhcp_enabled:
+        type: boolean
+        required: false
+      ip_count_required:
+        description: identifies the number of ip address to assign to the CP from the plan
+        type: org.openecomp.datatypes.AssignmentRequirements
+        required: false
+      floating_ip_count_required:
+        type: org.openecomp.datatypes.AssignmentRequirements
+        required: false
+      ip_address_plan_name:
+        type: string
+        required: false
+      vrf_name:
+        type: string
+        required: false
+  org.openecomp.datatypes.network.MacAssignments:
+    derived_from: org.openecomp.datatypes.Root
+    properties:
+      mac_range_plan:
+        type: string
+        required: true
+        description: reference to a MAC address range plan
+      mac_count:
+        type: integer
+        required: true
+        description: identifies the number of MAC addresses to assign to the CP from the plan
+  org.openecomp.datatypes.EcompHoming:
+    derived_from: org.openecomp.datatypes.Root
+    properties:
+      ecomp_selected_instance_node_target:
+        type: boolean
+        required: true
+        default: false
+        description: |
+          \"true\" indicates that the target deployment node for this instance will be auto-selected by ECOMP \"false\" indicates operator-supplied instance target deployment node required (e.g. VID will present a prompt to operator and collect the operator-selected target node for the deployment of this Network instance).
+      homing_policy:
+        type: string
+        required: false
+        description: Referenc to a service level homing policy that ECOMP will use for instance deployment target node
+      instance_node_target:
+        type: string
+        required: false
+        description: Instance target deployment node
+  org.openecomp.datatypes.EcompNaming:
+    derived_from: org.openecomp.datatypes.Root
+    properties:
+      ecomp_generated_naming:
+        type: boolean
+        required: true
+        default: true
+        description: |
+          \"true\" indicates that the name for the instance will be auto-generated by ECOMP. \"false\" indicates operator-supplied name required (e.g. VID will present prompt to operator and collect the operator-supplied instance name).
+      naming_policy:
+        type: string
+        required: false
+        description: Referenc to naming policy that ECOMP will use when the name is auto-generated
+  org.openecomp.datatypes.network.MacRequirements:
+    derived_from: org.openecomp.datatypes.Root
+    properties:
+      mac_range_plan:
+        description: reference to a MAC address range plan
+        type: string
+        required: false
+      mac_count:
+        description: identifies the number of MAC addresses to assign to the CP from the plan
+        type: integer
+        required: false
+      mac_count_required:
+        description: identifies the number of MAC addresses to assign to the CP from the plan
+        type: org.openecomp.datatypes.AssignmentRequirements
+  org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.AddressPairIp:
+    derived_from: tosca.datatypes.Root
+    description: Virtual Machine Sub Interface Address Pair IP.
+    properties:
+      ip_prefix:
+        type: string
+        description: IP Prefix.
+        required: false
+        status: SUPPORTED
+      ip_prefix_len:
+        type: integer
+        description: IP Prefix Len.
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.MacAddress:
+    derived_from: tosca.datatypes.Root
+    description: Virtual Machine Sub Interface Mac Address.
+    properties:
+      mac_address:
+        type: list
+        description: Mac Addresses List.
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: string
+  org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.Properties:
+    derived_from: tosca.datatypes.Root
+    description: Virtual Machine Sub Interface VLAN Properties.
+    properties:
+      sub_interface_vlan_tag:
+        type: string
+        description: Sub Interface VLAN Tag.
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.AddressPair:
+    derived_from: tosca.datatypes.Root
+    description: Virtual Machine Sub Interface Address Pair.
+    properties:
+      address_mode:
+        type: string
+        description: Address Mode.
+        required: false
+        status: SUPPORTED
+      ip:
+        type: org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.AddressPairIp
+        description: IP.
+        required: false
+        status: SUPPORTED
+      mac:
+        type: string
+        description: Mac.
+        required: false
+        status: SUPPORTED
+  org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.AddressPairs:
+    derived_from: tosca.datatypes.Root
+    description: Virtual Machine Sub Interface Address Pairs.
+    properties:
+      allowed_address_pair:
+        type: list
+        description: Addresses pair List.
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.AddressPair
+  org.openecomp.datatypes.Naming:
+    derived_from: org.openecomp.datatypes.Root
+    properties:
+      ecomp_generated_naming:
+        description: |
+          "true" indicates that the name for the instance will be auto-generated by ECOMP. "false" indicates operator-supplied name required (e.g. VID will present prompt to operator and collect the operator-supplied instance name).
+        type: boolean
+        default: true
+        required: true
+      naming_policy:
+        description: Reference to naming policy that ECOMP will use when the name is auto-generated
+        type: string
+        required: false
+      instance_name:
+        description: indicates operator-supplied name required (e.g. VID will present prompt to operator and collect the operator-supplied instance name).
+        type: string
+        required: false
+  org.openecomp.datatypes.flavors.ComputeFlavor:
+    derived_from: tosca.datatypes.Root
+    properties:
+      num_cpus:
+        type: integer
+      disk_size:
+        type: scalar-unit.size
+      mem_size:
+        type: scalar-unit.size
+  org.openecomp.datatypes.flavors.LicenseFlavor:
+    derived_from: tosca.datatypes.Root
+    properties:
+      feature_group_uuid:
+        type: string
+  org.openecomp.datatypes.flavors.VendorInfo:
+    derived_from: tosca.datatypes.Root
+    properties:
+      manufacturer_reference_number:
+        type: string
+      vendor_model:
+        type: string
+  org.openecomp.datatypes.flavors.DeploymentFlavor:
+    derived_from: tosca.datatypes.Root
+    properties:
+      sp_part_number:
+        type: string
+      vendor_info:
+        type: org.openecomp.datatypes.flavors.VendorInfo
+      compute_flavor:
+        type: org.openecomp.datatypes.flavors.ComputeFlavor
+      license_flavor:
+        type: org.openecomp.datatypes.flavors.LicenseFlavor
+        required: false
+  org.openecomp.datatypes.ImageInfo:
+    derived_from: tosca.datatypes.Root
+    properties:
+      software_version:
+        type: string
+      file_name:
+        type: string
+      file_hash:
+        type: string
+        description: checksum/signature
+      file_hash_type:
+        type: string
+        required: false
+        default: md5
+  tosca.datatypes.nfv.VnfcConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      additional_vnfc_configurable_properties:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  tosca.datatypes.nfv.RequestedAdditionalCapability:
+    derived_from: tosca.datatypes.Root
+    properties:
+      support_mandatory:
+        type: boolean
+        required: true
+      min_requested_additional_capability_version:
+        type: string
+        required: false
+      preferred_requested_additional_capability_version:
+        type: string
+        required: false
+      requested_additional_capability_name:
+        type: string
+        required: true
+      target_performance_parameters:
+        type: map
+        entry_schema:
+          type: string
+        required: true
+  tosca.datatypes.nfv.VirtualMemory:
+    derived_from: tosca.datatypes.Root
+    properties:
+      virtual_mem_size:
+        type: scalar-unit.size
+        required: true
+      virtual_mem_oversubscription_policy:
+        type: string
+        required: false
+      numa_enabled:
+        type: boolean
+        required: false
+  tosca.datatypes.nfv.VirtualCpuPinning:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_pinning_policy:
+        type: string
+        constraints:
+        - valid_values:
+          - static
+          - dynamic
+        required: false
+      cpu_pinning_map:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  tosca.datatypes.nfv.VirtualCpu:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_architecture:
+        type: string
+        required: false
+      num_virtual_cpu:
+        type: integer
+        required: true
+      virtual_cpu_clock:
+        type: scalar-unit.frequency
+        required: false
+      virtual_cpu_oversubscription_policy:
+        type: string
+        required: false
+      virtual_cpu_pinning:
+        type: tosca.datatypes.nfv.VirtualCpuPinning
+        required: false
+  tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+        type: string
+        required: false
+      description:
+        type: string
+        required: false
+      support_mandatory:
+        type: boolean
+        required: true
+      requirement:
+        type: string
+        required: true
+  tosca.datatypes.nfv.L2AddressData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      address:
+        type: string
+        required: false
+  tosca.datatypes.nfv.L3AddressData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      ip_address_assignment:
+        type: boolean
+        required: true
+      floating_ip_activated:
+        type: boolean
+        required: true
+      ip_address_type:
+        type: string
+        required: false
+        constraints:
+        - valid_values:
+          - ipv4
+          - ipv6
+      number_of_ip_address:
+        type: integer
+        required: false
+  tosca.datatype.nfv.AddressData:
+    properties:
+      address_type:
+        constraints:
+        - valid_values:
+          - mac_address
+          - ip_address
+        type: string
+      l2_address_data:
+        required: false
+        type: tosca.datatypes.nfv.L2AddressData
+      l3_address_data:
+        required: false
+        type: tosca.datatypes.nfv.L3AddressData
+  tosca.datatypes.nfv.ConnectivityType:
+    derived_from: tosca.datatypes.Root
+    properties:
+      layer_protocol:
+        type: string
+        required: true
+        constraints:
+        - valid_values:
+          - ethernet
+          - mpls
+          - odu2
+          - ipv4
+          - ipv6
+          - pseudo_wire
+      flow_pattern:
+        type: string
+        required: false
+  tosca.datatypes.nfv.VlFlavour:
+    derived_from: tosca.datatypes.Root
+    properties:
+      flavourId:
+        type: string
+  tosca.datatypes.nfv.ext.AddressPairs:
+    properties:
+      ip:
+        type: string
+        required: false
+      mac:
+        type: string
+        required: false
+  tosca.datatypes.nfv.ext.FloatingIP:
+    properties:
+      external_network:
+        type: string
+        required: false
+      ip_address:
+        type: string
+        required: false
+  tosca.datatypes.nfv.ext.LocationInfo:
+    properties:
+      availability_zone:
+        type: string
+        required: false
+      vimid:
+        type: integer
+        required: false
+      tenant:
+        type: string
+        required: false
+  tosca.datatypes.nfv.ext.HostRouteInfo:
+    properties:
+      destination:
+        type: string
+        required: false
+      nexthop:
+        type: string
+        required: false
+  tosca.datatypes.nfv.ext.InjectData:
+    properties:
+      file_name:
+        type: string
+        required: false
+      file_data:
+        type: string
+        required: false
+  tosca.datatypes.nfv.ext.zte.WatchDog:
+    properties:
+      enable_delay:
+        type: integer
+        required: false
+      action:
+        type: string
+        required: false
+  tosca.datatypes.nfv.ext.LocalAffinityOrAntiAffinityRule:
+    properties:
+      scope:
+        type: string
+        required: false
+      affinity_antiaffinity:
+        type: string
+        required: false
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/groups.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/groups.yml
new file mode 100644 (file)
index 0000000..f8be60d
--- /dev/null
@@ -0,0 +1,133 @@
+#
+# 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.
+#
+tosca_definitions_version: tosca_simple_yaml_1_1
+imports:
+- data.yml
+group_types:
+  tosca.groups.Root:
+    description: The TOSCA Group Type all other TOSCA Group Types derive from
+    interfaces:
+      Standard:
+        type: tosca.interfaces.node.lifecycle.Standard
+  org.openecomp.groups.heat.HeatStack:
+    derived_from: tosca.groups.Root
+    description: Grouped all heat resources which are in the same heat stack
+    properties:
+      heat_file:
+        type: string
+        description: Heat file which associate to this group/heat stack
+        required: true
+        status: SUPPORTED
+      description:
+        type: string
+        description: group description
+        required: true
+        status: SUPPORTED
+  org.openecomp.groups.VfModule:
+    derived_from: tosca.groups.Root
+    description: Grouped all heat resources which are in the same VF Module
+    properties:
+      isBase:
+        type: boolean
+        description: Whether this module should be deployed before other modules
+        required: true
+        default: false
+        status: SUPPORTED
+      vf_module_label:
+        type: string
+        required: true
+        description: |
+          Alternate textual key used to reference this VF-Module model.  Must be unique within the VNF model
+      vf_module_description:
+        type: string
+        required: true
+        description: |
+          Description of the VF-modules contents and purpose   (e.g. "Front-End" or "Database Cluster")
+      min_vf_module_instances:
+        type: integer
+        required: true
+        description: The minimum instances of this VF-Module
+      max_vf_module_instances:
+        type: integer
+        required: false
+        description: The maximum instances of this VF-Module
+      initial_count:
+        type: integer
+        required: false
+        description: |
+          The initial count of instances of the VF-Module. The value must be in the  range between min_vfmodule_instances and max_vfmodule_instances. If no value provided the initial count is the min_vfmodule_instances.
+      vf_module_type:
+        type: string
+        required: true
+        constraint:
+        - valid_values:
+          - Base
+          - Expansion
+      volume_group:
+        type: boolean
+        required: true
+        default: false
+        description: |
+          "true" indicates that this VF Module model requires attachment to a Volume   Group.  VID operator must select the Volume Group instance to attach to a VF-Module  at deployment time.
+      availability_zone_count:
+        type: integer
+        required: false
+        description: |
+          Quantity of Availability Zones needed for this VF-Module     (source: Extracted from VF-Module HEAT template)
+      vfc_list:
+        type: map
+        entry_schema:
+          description: <vfc_id>:<count>
+          type: string
+        required: false
+        description: |
+          Identifies the set of VM types and their count included in the VF-Module
+  org.openecomp.groups.NetworkCollection:
+    derived_from: tosca.groups.Root
+    description: groups l3-networks in network collection
+    properties:
+      network_collection_function:
+        type: string
+        required: true
+        description: network collection function
+      network_collection_description:
+        type: string
+        required: true
+        description: network collection description, free format text
+  org.openecomp.groups.VfcInstanceGroup:
+    derived_from: tosca.groups.Root
+    description: groups VFCs with same parent port role
+    properties:
+      vfc_instance_group_function:
+        type: string
+        required: true
+        description: function of this VFC group
+      vfc_parent_port_role:
+        type: string
+        required: true
+        description: common role of parent ports of VFCs in this group
+      network_collection_function:
+        type: string
+        required: true
+        description: network collection function assigned to this group
+      subinterface_role:
+        type: string
+        required: true
+        description: common role of subinterfaces of VFCs in this group, criteria the group is created
+    capabilities:
+      vlan_assignment:
+        type: org.openecomp.capabilities.VLANAssignment
+        properties:
+          vfc_instance_group_reference:
+            type: string
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/interfaces.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/interfaces.yml
new file mode 100644 (file)
index 0000000..91c7c0a
--- /dev/null
@@ -0,0 +1,28 @@
+#
+# 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.
+#
+tosca_definitions_version: tosca_simple_yaml_1_1
+imports:
+- data.yml
+interface_types:
+  tosca.interfaces.node.lifecycle.Standard:
+    create:
+      description: Standard lifecycle create operation.
+    configure:
+      description: Standard lifecycle configure operation.
+    start:
+      description: Standard lifecycle start operation.
+    stop:
+      description: Standard lifecycle stop operation.
+    delete:
+      description: Standard lifecycle delete operation.
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/nodes.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/nodes.yml
new file mode 100644 (file)
index 0000000..91a3010
--- /dev/null
@@ -0,0 +1,3623 @@
+#
+# 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.
+#
+tosca_definitions_version: tosca_simple_yaml_1_1
+imports:
+- data.yml
+- artifacts.yml
+- capabilities.yml
+- interfaces.yml
+- relationships.yml
+node_types:
+  tosca.nodes.SoftwareComponent:
+    derived_from: tosca.nodes.Root
+    properties:
+      component_version:
+        type: version
+        required: false
+      admin_credential:
+        type: tosca.datatypes.Credential
+        required: false
+    requirements:
+    - host:
+        capability: tosca.capabilities.Container
+        node: tosca.nodes.Compute
+        relationship: tosca.relationships.HostedOn
+  tosca.nodes.Root:
+    description: The TOSCA Node Type all other TOSCA base Node Types derive from
+    attributes:
+      tosca_id:
+        type: string
+      tosca_name:
+        type: string
+      state:
+        type: string
+    capabilities:
+      feature:
+        type: tosca.capabilities.Node
+    requirements:
+    - dependency:
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+        occurrences:
+        - 0
+        - UNBOUNDED
+    interfaces:
+      Standard:
+        type: tosca.interfaces.node.lifecycle.Standard
+  tosca.nodes.Container.Runtime:
+    derived_from: tosca.nodes.SoftwareComponent
+    capabilities:
+      host:
+        type: tosca.capabilities.Container
+      scalable:
+        type: tosca.capabilities.Scalable
+  tosca.nodes.DBMS:
+    derived_from: tosca.nodes.SoftwareComponent
+    properties:
+      root_password:
+        type: string
+        required: false
+        description: the optional root password for the DBMS service
+      port:
+        type: integer
+        required: false
+        description: the port the DBMS service will listen to for data and requests
+    capabilities:
+      host:
+        type: tosca.capabilities.Container
+        valid_source_types:
+        - tosca.nodes.Database
+  tosca.nodes.WebApplication:
+    derived_from: tosca.nodes.Root
+    properties:
+      context_root:
+        type: string
+    capabilities:
+      app_endpoint:
+        type: tosca.capabilities.Endpoint
+    requirements:
+    - host:
+        capability: tosca.capabilities.Container
+        node: tosca.nodes.WebServer
+        relationship: tosca.relationships.HostedOn
+  tosca.nodes.network.Network:
+    derived_from: tosca.nodes.Root
+    properties:
+      ip_version:
+        type: integer
+        required: false
+        default: 4
+        constraints:
+        - valid_values:
+          - 4
+          - 6
+      cidr:
+        type: string
+        required: false
+      start_ip:
+        type: string
+        required: false
+      end_ip:
+        type: string
+        required: false
+      gateway_ip:
+        type: string
+        required: false
+      network_name:
+        type: string
+        required: false
+      network_id:
+        type: string
+        required: false
+      segmentation_id:
+        type: string
+        required: false
+      network_type:
+        type: string
+        required: false
+      physical_network:
+        type: string
+        required: false
+      dhcp_enabled:
+        type: boolean
+        required: false
+        default: true
+    capabilities:
+      link:
+        type: tosca.capabilities.network.Linkable
+  tosca.nodes.network.Port:
+    derived_from: tosca.nodes.Root
+    properties:
+      ip_address:
+        type: string
+        required: false
+      order:
+        type: integer
+        required: true
+        default: 0
+        constraints:
+        - greater_or_equal: 0
+      is_default:
+        type: boolean
+        required: false
+        default: false
+      ip_range_start:
+        type: string
+        required: false
+      ip_range_end:
+        type: string
+        required: false
+    requirements:
+    - link:
+        capability: tosca.capabilities.network.Linkable
+        relationship: tosca.relationships.network.LinksTo
+    - binding:
+        capability: tosca.capabilities.network.Bindable
+        relationship: tosca.relationships.network.BindsTo
+  tosca.nodes.Container.Application:
+    derived_from: tosca.nodes.Root
+    requirements:
+    - host:
+        capability: tosca.capabilities.Container
+        node: tosca.nodes.Container
+        relationship: tosca.relationships.HostedOn
+  tosca.nodes.LoadBalancer:
+    derived_from: tosca.nodes.Root
+    properties:
+      algorithm:
+        type: string
+        required: false
+        status: experimental
+    capabilities:
+      client:
+        type: tosca.capabilities.Endpoint.Public
+        occurrences:
+        - 0
+        - UNBOUNDED
+        description: the Floating (IP) client’s on the public network can connect to
+    requirements:
+    - application:
+        capability: tosca.capabilities.Endpoint
+        relationship: tosca.relationships.RoutesTo
+        occurrences:
+        - 0
+        - UNBOUNDED
+  tosca.nodes.BlockStorage:
+    derived_from: tosca.nodes.Root
+    properties:
+      size:
+        type: scalar-unit.size
+        constraints:
+        - greater_or_equal: 1 MB
+      volume_id:
+        type: string
+        required: false
+      snapshot_id:
+        type: string
+        required: false
+    capabilities:
+      attachment:
+        type: tosca.capabilities.Attachment
+  tosca.nodes.ObjectStorage:
+    derived_from: tosca.nodes.Root
+    properties:
+      name:
+        type: string
+      size:
+        type: scalar-unit.size
+        constraints:
+        - greater_or_equal: 0 GB
+      maxsize:
+        type: scalar-unit.size
+        constraints:
+        - greater_or_equal: 0 GB
+    capabilities:
+      storage_endpoint:
+        type: tosca.capabilities.Endpoint
+  tosca.nodes.Database:
+    derived_from: tosca.nodes.Root
+    properties:
+      name:
+        type: string
+        description: the logical name of the database
+      port:
+        type: integer
+        description: the port the underlying database service will listen to for data
+      user:
+        type: string
+        description: the optional user account name for DB administration
+        required: false
+      password:
+        type: string
+        description: the optional password for the DB user account
+        required: false
+    requirements:
+    - host:
+        capability: tosca.capabilities.Container
+        node: tosca.nodes.DBMS
+        relationship: tosca.relationships.HostedOn
+    capabilities:
+      database_endpoint:
+        type: tosca.capabilities.Endpoint.Database
+  tosca.nodes.Compute:
+    derived_from: tosca.nodes.Root
+    attributes:
+      private_address:
+        type: string
+      public_address:
+        type: string
+      networks:
+        type: map
+        entry_schema:
+          type: tosca.datatypes.network.NetworkInfo
+      ports:
+        type: map
+        entry_schema:
+          type: tosca.datatypes.network.PortInfo
+    requirements:
+    - local_storage:
+        capability: tosca.capabilities.Attachment
+        node: tosca.nodes.BlockStorage
+        relationship: tosca.relationships.AttachesTo
+        occurrences:
+        - 0
+        - UNBOUNDED
+    capabilities:
+      host:
+        type: tosca.capabilities.Container
+        valid_source_types:
+        - tosca.nodes.SoftwareComponent
+      endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+      os:
+        type: tosca.capabilities.OperatingSystem
+      scalable:
+        type: tosca.capabilities.Scalable
+      binding:
+        type: tosca.capabilities.network.Bindable
+  tosca.nodes.WebServer:
+    derived_from: tosca.nodes.SoftwareComponent
+    capabilities:
+      data_endpoint: tosca.capabilities.Endpoint
+      admin_endpoint: tosca.capabilities.Endpoint.Admin
+      host:
+        type: tosca.capabilities.Container
+        valid_source_types:
+        - tosca.nodes.WebApplication
+  org.openecomp.resource.cp.nodes.network.SubInterface:
+    derived_from: tosca.nodes.network.Port
+  org.openecomp.resource.cp.extCP:
+    derived_from: tosca.nodes.Root
+    description: The SDC Connection Point base type all other CP derive from
+    properties:
+      network_role:
+        type: string
+        required: true
+        description: identical to VL network_role
+      order:
+        type: integer
+        required: true
+        description: The order of the CP on the compute instance (e.g. eth2).
+      network_role_tag:
+        type: string
+        required: true
+        description: Must correlate to the set of defined “network-role” tag identifiers from the associated HEAT template
+      mac_requirements:
+        type: org.openecomp.datatypes.network.MacRequirements
+        required: false
+        description: identifies MAC address assignments to the CP
+      vlan_requirements:
+        type: list
+        entry_schema:
+          type: org.openecomp.datatypes.network.VlanRequirements
+        required: false
+        description: identifies vlan address assignments to the CP
+      ip_requirements:
+        type: list
+        entry_schema:
+          type: org.openecomp.datatypes.network.IpRequirements
+        required: true
+        description: identifies IP requirements to the CP
+      exCP_naming:
+        type: org.openecomp.datatypes.Naming
+      subnetpoolid:
+        type: string
+    requirements:
+    - virtualLink:
+        capability: tosca.capabilities.network.Linkable
+        relationship: tosca.relationships.network.LinksTo
+    - virtualBinding:
+        capability: tosca.capabilities.network.Bindable
+        relationship: tosca.relationships.network.BindsTo
+    - external_virtualLink:
+        capability: tosca.capabilities.network.Linkable
+        relationship: tosca.relationships.network.LinksTo
+        node: org.openecomp.resource.vl.VL
+    capabilities:
+      internal_connectionPoint:
+        type: tosca.capabilities.Node
+        valid_source_type:
+        - tosca.nodes.network.Port
+  org.openecomp.resource.abstract.nodes.service:
+    derived_from: tosca.nodes.Root
+  org.openecomp.resource.cp.nodes.heat.network.contrail.Port:
+    derived_from: org.openecomp.resource.cp.nodes.network.Port
+    properties:
+      static_routes:
+        type: list
+        description: An ordered list of static routes to be added to this interface
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.contrail.port.StaticRoute
+      virtual_network:
+        type: string
+        description: Virtual Network for this interface
+        required: true
+        status: SUPPORTED
+      static_route:
+        type: boolean
+        description: Static route enabled
+        required: false
+        default: false
+        status: SUPPORTED
+      allowed_address_pairs:
+        type: list
+        description: List of allowed address pair for this interface
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.contrail.AddressPair
+      shared_ip:
+        type: boolean
+        description: Shared ip enabled
+        required: false
+        default: false
+        status: SUPPORTED
+      ip_address:
+        type: string
+        description: IP for this interface
+        required: false
+        status: SUPPORTED
+      interface_type:
+        type: string
+        description: Interface type
+        required: true
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - management
+          - left
+          - right
+          - other
+    attributes:
+      fq_name:
+        type: string
+        description: fq_name
+        status: SUPPORTED
+  org.openecomp.resource.vfc.rules.nodes.heat.network.contrailV2.NetworkRules:
+    derived_from: tosca.nodes.Root
+    properties:
+      name:
+        type: string
+        description: A symbolic name for this contrail v2 network rule
+        required: false
+        status: SUPPORTED
+      network_policy_entries:
+        type: org.openecomp.datatypes.heat.contrailV2.network.rule.RuleList
+        description: A symbolic name for this contrail v2 network rule
+        required: false
+        status: SUPPORTED
+    attributes:
+      fq_name:
+        type: string
+        description: fq_name
+        status: SUPPORTED
+    requirements:
+    - network:
+        capability: tosca.capabilities.Attachment
+        node: tosca.nodes.network.Network
+        relationship: org.openecomp.relationships.AttachesTo
+        occurrences:
+        - 0
+        - UNBOUNDED
+  org.openecomp.nodes.PortMirroringConfigurationByPolicy:
+    derived_from: tosca.nodes.Root
+    properties:
+      collector_node:
+        type: string
+        description: The name of the Collector Proxy
+        required: true
+      policy_name:
+        type: string
+        description: The name of the policy for selection of the collector interfaces
+        required: true
+      equip_model:
+        type: string
+        description: The name of the equipment type of the collector, i.e. Cisco 4500x
+        required: true
+      equip_vendor:
+        type: string
+        description: The name of the equipment vendor of the collector, i.e. Cisco
+        required: true
+    requirements:
+    - source:
+        capability: org.openecomp.capabilities.PortMirroring
+        occurrences:
+        - 1
+        - UNBOUNDED
+  org.openecomp.nodes.ServiceProxy:
+    derived_from: tosca.nodes.Root
+  org.openecomp.resource.cp.nodes.heat.network.neutron.Port:
+    derived_from: org.openecomp.resource.cp.nodes.network.Port
+    properties:
+      port_security_enabled:
+        type: boolean
+        description: Flag to enable/disable port security on the network
+        required: false
+        status: SUPPORTED
+      device_id:
+        type: string
+        description: Device ID of this port
+        required: false
+        status: SUPPORTED
+      qos_policy:
+        type: string
+        description: The name or ID of QoS policy to attach to this network
+        required: false
+        status: SUPPORTED
+      allowed_address_pairs:
+        type: list
+        description: Additional MAC/IP address pairs allowed to pass through the port
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.AddressPair
+      binding:vnic_type:
+        type: string
+        description: The vnic type to be bound on the neutron port
+        required: false
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - macvtap
+          - direct
+          - normal
+      value_specs:
+        type: map
+        description: Extra parameters to include in the request
+        required: false
+        default: {}
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      device_owner:
+        type: string
+        description: Name of the network owning the port
+        required: false
+        status: SUPPORTED
+      network:
+        type: string
+        description: Network this port belongs to
+        required: false
+        status: SUPPORTED
+      replacement_policy:
+        type: string
+        description: Policy on how to respond to a stack-update for this resource
+        required: false
+        default: AUTO
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - REPLACE_ALWAYS
+          - AUTO
+      security_groups:
+        type: list
+        description: List of security group names or IDs
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      fixed_ips:
+        type: list
+        description: Desired IPs for this port
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.neutron.port.FixedIps
+      mac_address:
+        type: string
+        description: MAC address to give to this port
+        required: false
+        status: SUPPORTED
+      admin_state_up:
+        type: boolean
+        description: A boolean value specifying the administrative status of the network
+        required: false
+        default: true
+        status: SUPPORTED
+      name:
+        type: string
+        description: A symbolic name for this port
+        required: false
+        status: SUPPORTED
+    attributes:
+      tenant_id:
+        type: string
+        description: Tenant owning the port
+        status: SUPPORTED
+      network_id:
+        type: string
+        description: Unique identifier for the network owning the port
+        status: SUPPORTED
+      qos_policy_id:
+        type: string
+        description: The QoS policy ID attached to this network
+        status: SUPPORTED
+      show:
+        type: string
+        description: Detailed information about resource
+        status: SUPPORTED
+      subnets:
+        type: list
+        description: Subnets of this network
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      status:
+        type: string
+        description: The status of the network
+        status: SUPPORTED
+    capabilities:
+      attachment:
+        type: tosca.capabilities.Attachment
+        occurrences:
+        - 1
+        - UNBOUNDED
+      binding:
+        type: tosca.capabilities.network.Bindable
+        valid_source_types:
+        - org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface
+        occurrences:
+        - 0
+        - UNBOUNDED
+  org.openecomp.resource.vfc.nodes.heat.contrail.Compute:
+    derived_from: org.openecomp.resource.vfc.nodes.Compute
+    properties:
+      flavor:
+        type: string
+        description: flavor
+        required: false
+        status: SUPPORTED
+      image_name:
+        type: string
+        description: Image name
+        required: true
+        status: SUPPORTED
+      availability_zone:
+        type: string
+        description: Availability zone to create servers in
+        required: false
+        status: SUPPORTED
+      service_type:
+        type: string
+        description: Service type
+        required: true
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - firewall
+          - analyzer
+          - source-nat
+          - loadbalancer
+      availability_zone_enable:
+        type: boolean
+        description: Indicates availability zone is enabled
+        required: false
+        default: false
+        status: SUPPORTED
+      service_template_name:
+        type: string
+        description: Service template name
+        required: false
+        status: SUPPORTED
+      service_instance_name:
+        type: string
+        description: Service instance name
+        required: true
+        status: SUPPORTED
+      service_mode:
+        type: string
+        description: Service mode
+        required: true
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - transparent
+          - in-network
+          - in-network-nat
+    attributes:
+      tenant_id:
+        type: string
+        description: Tenant id of the VM
+        status: SUPPORTED
+      fq_name:
+        type: string
+        description: fq_name
+        status: SUPPORTED
+      show:
+        type: string
+        description: All attributes
+        status: SUPPORTED
+      active_vms:
+        type: string
+        description: Number of active VMs
+        status: SUPPORTED
+      virtual_machines:
+        type: string
+        description: VMs of this compute
+        status: SUPPORTED
+      status:
+        type: string
+        description: status of the compute
+        status: SUPPORTED
+  org.openecomp.resource.vfc.nodes.volume:
+    derived_from: tosca.nodes.BlockStorage
+  org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules:
+    derived_from: tosca.nodes.Root
+    properties:
+      entries:
+        type: org.openecomp.datatypes.heat.contrail.network.rule.RuleList
+        description: A symbolic name for this contrail network rule
+        required: false
+        status: SUPPORTED
+      name:
+        type: string
+        description: A symbolic name for this contrail network rule
+        required: false
+        status: SUPPORTED
+    attributes:
+      tenant_id:
+        type: string
+        description: tenant_id
+        status: SUPPORTED
+      fq_name:
+        type: string
+        description: fq_name
+        status: SUPPORTED
+      show:
+        type: string
+        description: All attributes.
+        status: SUPPORTED
+      rules:
+        type: list
+        description: List of rules
+        status: SUPPORTED
+        entry_schema:
+          type: string
+    requirements:
+    - network:
+        capability: tosca.capabilities.Attachment
+        node: tosca.nodes.network.Network
+        relationship: org.openecomp.relationships.AttachesTo
+        occurrences:
+        - 0
+        - UNBOUNDED
+  org.openecomp.resource.abstract.nodes.AbstractSubstitute:
+    derived_from: tosca.nodes.Root
+    properties:
+      service_template_filter:
+        type: org.openecomp.datatypes.heat.substitution.SubstitutionFiltering
+        description: Substitution Filter
+        required: true
+        status: SUPPORTED
+  org.openecomp.resource.vl.extVL:
+    derived_from: tosca.nodes.Root
+    description: VF Tenant oam protected network
+    properties:
+      network_type:
+        type: string
+        required: true
+        description: ECOMP supported network types.
+      network_role:
+        type: string
+        required: true
+        description: |
+          Unique label that defines the role that this network performs.   example: vce oam network, vnat sr-iov1 network
+      network_scope:
+        type: string
+        constraints:
+          valid_values:
+          - VF
+          - SERVICE
+          - GLOBAL
+        description: |
+          Uniquely identifies the network scope. Valid values for the network scope   includes: VF - VF-level network. Intra-VF network which connects the VFCs (VMs) inside the VF. SERVICE - Service-level network. Intra-Service network which connects  the VFs within the service GLOBAL - Global network which can be shared by multiple services
+      network_technology:
+        type: string
+        required: true
+        description: ECOMP supported network technology
+      exVL_naming:
+        type: org.openecomp.datatypes.Naming
+        required: true
+      network_homing:
+        type: org.openecomp.datatypes.EcompHoming
+        required: true
+      network_assignments:
+        type: org.openecomp.datatypes.network.NetworkAssignments
+        required: true
+      provider_network:
+        type: org.openecomp.datatypes.network.ProviderNetwork
+        required: true
+      network_flows:
+        type: org.openecomp.datatypes.network.NetworkFlows
+        required: false
+    capabilities:
+      virtual_linkable:
+        type: tosca.capabilities.network.Linkable
+  org.openecomp.resource.abstract.nodes.PNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      nf_function:
+        type: string
+      nf_role:
+        type: string
+      nf_type:
+        type: string
+  org.openecomp.resource.vl.internalVL:
+    derived_from: tosca.nodes.network.Network
+    description: The AT&T internal (VF-level) Virtual Link
+  org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface:
+    derived_from: org.openecomp.resource.cp.nodes.network.SubInterface
+    properties:
+      virtual_machine_interface_refs:
+        description: List of virtual machine interface.
+        type: list
+        status: SUPPORTED
+        entry_schema:
+          type: string
+        required: false
+      name:
+        description: Virtual Machine Sub Interface VLAN name
+        type: string
+        status: SUPPORTED
+        required: false
+      virtual_network_refs:
+        description: List of virtual networks.
+        type: list
+        status: SUPPORTED
+        entry_schema:
+          type: string
+        required: false
+      virtual_machine_interface_properties:
+        description: virtual machine interface properties.
+        type: org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.Properties
+        status: SUPPORTED
+        required: false
+      virtual_machine_interface_allowed_address_pairs:
+        description: Virtual Machine Sub Interface allowed address pairs.
+        type: org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.AddressPairs
+        status: SUPPORTED
+        required: false
+      virtual_machine_interface_mac_addresses:
+        description: List of mac addresses.
+        type: org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.MacAddress
+        status: SUPPORTED
+        required: false
+      security_group_refs:
+        description: List of security groups.
+        type: list
+        status: SUPPORTED
+        entry_schema:
+          type: string
+        required: false
+      port_tuple_refs:
+        description: List of port tuples.
+        type: list
+        status: SUPPORTED
+        entry_schema:
+          type: string
+        required: false
+    attributes:
+      fq_name:
+        description: The FQ name of the Virtual Network.
+        type: string
+        status: SUPPORTED
+      show:
+        description: All attributes.
+        type: string
+        status: SUPPORTED
+    requirements:
+    - binding:
+        capability: tosca.capabilities.network.Bindable
+        node: org.openecomp.resource.cp.nodes.network.Port
+        relationship: tosca.relationships.network.BindsTo
+        occurrences:
+        - 1
+        - 1
+  org.openecomp.resource.cp.v2.extCP:
+    derived_from: org.openecomp.resource.cp.nodes.network.Port
+    description: The SDC External Connection Point base type
+    capabilities:
+      port_mirroring:
+        type: org.openecomp.capabilities.PortMirroring
+  org.openecomp.resource.vl.VL:
+    derived_from: tosca.nodes.network.Network
+    properties:
+      vendor:
+        type: string
+        required: false
+      vl_name:
+        type: string
+        required: false
+    capabilities:
+      virtual_linkable:
+        type: tosca.capabilities.network.Linkable
+      end_point:
+        type: tosca.capabilities.Endpoint
+  org.openecomp.nodes.ForwardingPath:
+    derived_from: tosca.nodes.Root
+    properties:
+      target_range:
+        type: list
+        required: true
+        status: SUPPORTED
+        entry_schema:
+          description: Identifier of the reciever port of the VNF or the service
+          type: integer
+      protocol:
+        type: string
+        description: protocol type that runs on the link
+        required: true
+        status: SUPPORTED
+    requirements:
+    - forwarder:
+        capability: org.openecomp.capabilities.Forwarder
+        relationship: org.openecomp.relationships.ForwardsTo
+        occurrences:
+        - 0
+        - UNBOUNDED
+  org.openecomp.resource.vfc.nodes.heat.cinder.Volume:
+    derived_from: org.openecomp.resource.vfc.nodes.volume
+    properties:
+      availability_zone:
+        description: The availability zone in which the volume will be created
+        type: string
+        status: SUPPORTED
+        required: false
+      image:
+        description: If specified, the name or ID of the image to create the volume from
+        type: string
+        status: SUPPORTED
+        required: false
+      metadata:
+        description: Key/value pairs to associate with the volume
+        type: map
+        status: SUPPORTED
+        entry_schema:
+          type: string
+        required: false
+      volume_type:
+        description: If specified, the type of volume to use, mapping to a specific backend
+        type: string
+        status: SUPPORTED
+        required: false
+      description:
+        description: A description of the volume
+        type: string
+        status: SUPPORTED
+        required: false
+      device_type:
+        description: Device type
+        type: string
+        status: SUPPORTED
+        required: false
+        constraints:
+        - valid_values:
+          - cdrom
+          - disk
+      disk_bus:
+        description: 'Bus of the device: hypervisor driver chooses a suitable default
+          if omitted'
+        type: string
+        status: SUPPORTED
+        required: false
+        constraints:
+        - valid_values:
+          - ide
+          - lame_bus
+          - scsi
+          - usb
+          - virtio
+      backup_id:
+        description: If specified, the backup to create the volume from
+        type: string
+        status: SUPPORTED
+        required: false
+      source_volid:
+        description: If specified, the volume to use as source
+        type: string
+        status: SUPPORTED
+        required: false
+      boot_index:
+        description: Integer used for ordering the boot disks
+        type: integer
+        status: SUPPORTED
+        required: false
+      size:
+        description: The requested storage size (default unit is MB)
+        type: scalar-unit.size
+        status: SUPPORTED
+        required: false
+        constraints:
+        - greater_or_equal: 1 GB
+      read_only:
+        description: Enables or disables read-only access mode of volume
+        type: boolean
+        status: SUPPORTED
+        required: false
+      name:
+        description: A name used to distinguish the volume
+        type: string
+        status: SUPPORTED
+        required: false
+      scheduler_hints:
+        description: Arbitrary key-value pairs specified by the client to help the Cinder scheduler creating a volume
+        type: map
+        status: SUPPORTED
+        entry_schema:
+          type: string
+        required: false
+      swap_size:
+        description: The size of the swap, in MB
+        type: scalar-unit.size
+        status: SUPPORTED
+        required: false
+      delete_on_termination:
+        description: Indicate whether the volume should be deleted when the server is terminated
+        type: boolean
+        status: SUPPORTED
+        required: false
+      multiattach:
+        description: Whether allow the volume to be attached more than once
+        type: boolean
+        status: SUPPORTED
+        required: false
+    attributes:
+      display_description:
+        description: Description of the volume
+        type: string
+        status: SUPPORTED
+      attachments:
+        description: The list of attachments of the volume
+        type: string
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      encrypted:
+        description: Boolean indicating if the volume is encrypted or not
+        type: boolean
+        status: SUPPORTED
+      show:
+        description: Detailed information about resource
+        type: string
+        status: SUPPORTED
+      created_at:
+        description: The timestamp indicating volume creation
+        type: timestamp
+        status: SUPPORTED
+      display_name:
+        description: Name of the volume
+        type: string
+        status: SUPPORTED
+      metadata_values:
+        description: Key/value pairs associated with the volume in raw dict form
+        type: map
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      bootable:
+        description: Boolean indicating if the volume can be booted or not
+        type: boolean
+        status: SUPPORTED
+      status:
+        description: The current status of the volume
+        type: string
+        status: SUPPORTED
+  org.openecomp.resource.abstract.nodes.VFC:
+    derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+    properties:
+      nfc_function:
+        type: string
+      high_availablity:
+        type: string
+        description: high_availablity
+        required: false
+        status: SUPPORTED
+      vm_image_name:
+        type: string
+        description: Master image_name volume id
+        required: true
+        status: SUPPORTED
+      vm_flavor_name:
+        type: string
+        description: Master image_name volume id
+        required: true
+        status: SUPPORTED
+      nfc_naming_code:
+        type: string
+        description: nfc code for instance naming
+        required: false
+        status: SUPPORTED
+      vm_type_tag:
+        type: string
+        description: vm type based on naming Convention
+        required: false
+        status: SUPPORTED
+      nfc_naming:
+        type: org.openecomp.datatypes.Naming
+        description: vfc naming
+      min_instances:
+        type: integer
+        description: Minimum number of VFC Instances
+        required: false
+        default: 0
+        status: SUPPORTED
+        constraints:
+        - greater_or_equal: 0
+      max_instances:
+        type: integer
+        description: Maximum number of VFC Instances
+        required: false
+        status: SUPPORTED
+        constraints:
+        - greater_or_equal: 1
+  org.openecomp.resource.abstract.nodes.VF:
+    derived_from: tosca.nodes.Root
+    properties:
+      nf_function:
+        type: string
+      nf_role:
+        type: string
+      nf_naming_code:
+        type: string
+      nf_type:
+        type: string
+      nf_naming:
+        type: org.openecomp.datatypes.Naming
+        Default: true
+      availability_zone_max_count:
+        type: integer
+        default: 1
+        constraints:
+        - valid_values:
+          - 0
+          - 1
+          - 2
+      min_instances:
+        type: integer
+      max_instances:
+        type: integer
+      multi_stage_design:
+        type: boolean
+        default: false
+  org.openecomp.resource.vl.ELine:
+    derived_from: org.openecomp.resource.vl.VL
+    capabilities:
+      virtual_linkable:
+        type: tosca.capabilities.network.Linkable
+        occurrences:
+        - 0
+        - 2
+  org.openecomp.resource.cp.v2.extNeutronCP:
+    derived_from: org.openecomp.resource.cp.v2.extCP
+    properties:
+      port_security_enabled:
+        type: boolean
+        description: Flag to enable/disable port security on the network
+        required: false
+        status: SUPPORTED
+      device_id:
+        type: string
+        description: Device ID of this port
+        required: false
+        status: SUPPORTED
+      qos_policy:
+        type: string
+        description: The name or ID of QoS policy to attach to this network
+        required: false
+        status: SUPPORTED
+      allowed_address_pairs:
+        type: list
+        description: Additional MAC/IP address pairs allowed to pass through the port
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.AddressPair
+      binding:vnic_type:
+        type: string
+        description: The vnic type to be bound on the neutron port
+        required: false
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - macvtap
+          - direct
+          - normal
+      value_specs:
+        type: map
+        description: Extra parameters to include in the request
+        required: false
+        default: {}
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      device_owner:
+        type: string
+        description: Name of the network owning the port
+        required: false
+        status: SUPPORTED
+      network:
+        type: string
+        description: Network this port belongs to
+        required: false
+        status: SUPPORTED
+      replacement_policy:
+        type: string
+        description: Policy on how to respond to a stack-update for this resource
+        required: false
+        default: AUTO
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - REPLACE_ALWAYS
+          - AUTO
+      security_groups:
+        type: list
+        description: List of security group names or IDs
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      fixed_ips:
+        type: list
+        description: Desired IPs for this port
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.neutron.port.FixedIps
+      mac_address:
+        type: string
+        description: MAC address to give to this port
+        required: false
+        status: SUPPORTED
+      admin_state_up:
+        type: boolean
+        description: A boolean value specifying the administrative status of the network
+        required: false
+        default: true
+        status: SUPPORTED
+      name:
+        type: string
+        description: A symbolic name for this port
+        required: false
+        status: SUPPORTED
+    attributes:
+      tenant_id:
+        type: string
+        description: Tenant owning the port
+        status: SUPPORTED
+      network_id:
+        type: string
+        description: Unique identifier for the network owning the port
+        status: SUPPORTED
+      qos_policy_id:
+        type: string
+        description: The QoS policy ID attached to this network
+        status: SUPPORTED
+      show:
+        type: string
+        description: Detailed information about resource
+        status: SUPPORTED
+      subnets:
+        type: list
+        description: Subnets of this network
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      status:
+        type: string
+        description: The status of the network
+        status: SUPPORTED
+    capabilities:
+      attachment:
+        type: tosca.capabilities.Attachment
+        occurrences:
+        - 1
+        - UNBOUNDED
+      binding:
+        type: tosca.capabilities.network.Bindable
+        valid_source_types:
+        - org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface
+        occurrences:
+        - 0
+        - UNBOUNDED
+  org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork:
+    derived_from: org.openecomp.resource.vl.nodes.network.Network
+    properties:
+      shared:
+        type: string
+        description: Is virtual network shared
+        required: false
+        status: SUPPORTED
+      forwarding_mode:
+        type: string
+        description: forwarding mode of the virtual network
+        required: false
+        status: SUPPORTED
+      external:
+        type: string
+        description: Is virtual network external
+        required: false
+        status: SUPPORTED
+      allow_transit:
+        type: string
+        description: Whether this network should be transitive.
+        required: false
+        status: SUPPORTED
+      flood_unknown_unicast:
+        type: string
+        description: flood L2 packets on network
+        required: false
+        status: SUPPORTED
+      route_targets:
+        type: list
+        description: route targets associated with the virtual network
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      subnets:
+        type: map
+        description: Network related subnets
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.neutron.Subnet
+    attributes:
+      fq_name:
+        type: string
+        description: fq_name
+        status: SUPPORTED
+      show:
+        type: string
+        description: All attributes.
+        status: SUPPORTED
+      subnets_name:
+        type: list
+        description: Subnets name of this network
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      subnets_show:
+        type: map
+        description: Detailed information about each subnet
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      subnets:
+        type: map
+        description: Network related subnets
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.neutron.Subnet
+    capabilities:
+      attachment:
+        type: tosca.capabilities.Attachment
+        occurrences:
+        - 1
+        - UNBOUNDED
+  org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork:
+    derived_from: org.openecomp.resource.vl.nodes.network.Network
+    properties:
+      network_ipam_refs_data:
+        type: list
+        description: IPAM references Data
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.IpamRefData
+      network_policy_refs_data:
+        type: list
+        description: Policy references data
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.contrailV2.virtual.network.rule.RefData
+      network_ipam_refs:
+        type: list
+        description: IPAM references
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      network_policy_refs:
+        type: list
+        description: Policy references
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      subnets:
+        type: map
+        description: Network related subnets
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.neutron.Subnet
+    attributes:
+      fq_name:
+        type: string
+        description: fq_name
+        status: SUPPORTED
+      subnets_name:
+        type: list
+        description: Subnets name of this network
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      subnets_show:
+        type: map
+        description: Detailed information about each subnet
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      subnets:
+        type: map
+        description: Network related subnets
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.neutron.Subnet
+    capabilities:
+      attachment:
+        type: tosca.capabilities.Attachment
+        occurrences:
+        - 1
+        - UNBOUNDED
+  org.openecomp.nodes.PortMirroringConfiguration:
+    derived_from: tosca.nodes.Root
+    requirements:
+    - source:
+        capability: org.openecomp.capabilities.PortMirroring
+        occurrences:
+        - 1
+        - UNBOUNDED
+    - collector:
+        capability: org.openecomp.capabilities.PortMirroring
+        occurrences:
+        - 1
+        - 1
+  org.openecomp.resource.vfc.nodes.Compute:
+    derived_from: tosca.nodes.Compute
+    capabilities:
+      disk.ephemeral.size:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: GB
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.ephemeral.size
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Size of ephemeral disk
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      instance:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: instance
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: instance
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Existence of instance
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      memory:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: MB
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: memory
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Volume of RAM allocated to the instance
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.iops:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: count/s
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.iops
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average disk iops
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.device.read.requests:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: request
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.device.read.requests
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Number of read requests
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Cumulative
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      cpu.delta:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: ns
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: cpu.delta
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: CPU time used since previous datapoint
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Delta
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.capacity:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.capacity
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: The amount of disk that the instance can see
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.device.read.bytes:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.device.read.bytes
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Volume of reads
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Cumulative
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.write.bytes:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.write.bytes
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Volume of writes
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Cumulative
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.latency:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: ms
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.latency
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average disk latency
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.device.read.bytes.rate:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B/s
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.device.read.bytes.rate
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average rate of reads
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.usage:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.usage
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: The physical size in bytes of the image container on the host
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      cpu_util:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: '%'
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: cpu_util
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average CPU utilization
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.device.allocation:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.device.allocation
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: The amount of disk per device occupied by the instance on the host machine
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.write.requests.rate:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: request/s
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.write.requests.rate
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average rate of write requests
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.write.bytes.rate:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B/s
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.write.bytes.rate
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average rate of writes
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.device.latency:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: ms
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.device.latency
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average disk latency per device
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      cpu:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: ns
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: cpu
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: CPU time used
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Cumulative
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.device.write.requests:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: request
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.device.write.requests
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Number of write requests
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Cumulative
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.device.write.bytes:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.device.write.bytes
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Volume of writes
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Cumulative
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.read.requests:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: request
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.read.requests
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Number of read requests
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Cumulative
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.root.size:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: GB
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.root.size
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Size of root disk
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.device.write.bytes.rate:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B/s
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.device.write.bytes.rate
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average rate of writes
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      vcpus:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: vcpu
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: vcpus
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Number of virtual CPUs allocated to the instance
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.device.iops:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: count/s
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.device.iops
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average disk iops per device
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.device.usage:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.device.usage
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: The physical size in bytes of the image container on the host per device
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.device.read.requests.rate:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: request/s
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.device.read.requests.rate
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average rate of read requests
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.device.write.requests.rate:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: request/s
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.device.write.requests.rate
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average rate of write requests
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.allocation:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.allocation
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: The amount of disk occupied by the instance on the host machine
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.read.bytes.rate:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B/s
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.read.bytes.rate
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average rate of reads
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.read.bytes:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.read.bytes
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Volume of reads
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Cumulative
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      memory.usage:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: MB
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: memory.usage
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Volume of RAM used by the instance from the amount of its allocated memory
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.device.capacity:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.device.capacity
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: The amount of disk per device that the instance can see
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: disk
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      memory.resident:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: MB
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: memory.resident
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Volume of RAM used by the instance on the physical machine
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      disk.write.requests:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: request
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: disk.write.requests
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Number of write requests
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Cumulative
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: compute
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+  org.openecomp.resource.abstract.nodes.CR:
+    derived_from: tosca.nodes.Root
+    properties:
+      cr_function:
+        type: string
+      cr_role:
+        type: string
+      cr_type:
+        type: string
+  org.openecomp.resource.vfc.nodes.heat.nova.Server:
+    derived_from: org.openecomp.resource.vfc.nodes.Compute
+    properties:
+      admin_pass:
+        type: string
+        description: The administrator password for the server
+        required: false
+        status: SUPPORTED
+      availability_zone:
+        type: string
+        description: Availability zone to create servers in
+        required: false
+        status: SUPPORTED
+      image:
+        type: string
+        description: The ID or name of the image to boot with
+        required: false
+        status: SUPPORTED
+      image_update_policy:
+        type: string
+        description: Policy on how to apply an image-id update
+        required: false
+        default: REBUILD
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - REBUILD_PRESERVE_EPHEMERAL
+          - REPLACE
+          - REBUILD
+      metadata:
+        type: json
+        description: Arbitrary JSON metadata to store for this server
+        required: false
+        status: SUPPORTED
+      contrail_service_instance_ind:
+        type: boolean
+        description: Nova server related to service instance indicator
+        required: false
+        default: false
+        status: SUPPORTED
+      user_data_update_policy:
+        type: string
+        description: Policy on how to apply a user_data update
+        required: false
+        default: REPLACE
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - REPLACE
+          - IGNORE
+      flavor_update_policy:
+        type: string
+        description: Policy on how to apply a flavor update
+        required: false
+        default: RESIZE
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - RESIZE
+          - REPLACE
+      user_data:
+        type: string
+        description: User data script to be executed by cloud-init
+        required: false
+        default: ''
+        status: SUPPORTED
+      flavor:
+        type: string
+        description: The ID or name of the flavor to boot onto
+        required: true
+        status: SUPPORTED
+      key_name:
+        type: string
+        description: Name of keypair to inject into the server
+        required: false
+        status: SUPPORTED
+      reservation_id:
+        type: string
+        description: A UUID for the set of servers being requested
+        required: false
+        status: SUPPORTED
+      security_groups:
+        type: list
+        description: List of security group names or IDs
+        required: false
+        default: []
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      config_drive:
+        type: boolean
+        description: enable config drive on the server
+        required: false
+        status: SUPPORTED
+      personality:
+        type: map
+        description: A map of files to create/overwrite on the server upon boot
+        required: false
+        default: {}
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      software_config_transport:
+        type: string
+        description: How the server should receive the metadata required for software configuration
+        required: false
+        default: POLL_SERVER_CFN
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - POLL_SERVER_CFN
+          - POLL_SERVER_HEAT
+          - POLL_TEMP_URL
+          - ZAQAR_MESSAGE
+      user_data_format:
+        type: string
+        description: How the user_data should be formatted for the server
+        required: false
+        default: HEAT_CFNTOOLS
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - SOFTWARE_CONFIG
+          - RAW
+          - HEAT_CFNTOOLS
+      diskConfig:
+        type: string
+        description: Control how the disk is partitioned when the server is created
+        required: false
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - AUTO
+          - MANUAL
+      name:
+        type: string
+        description: Server name
+        required: false
+        status: SUPPORTED
+      scheduler_hints:
+        type: map
+        description: Arbitrary key-value pairs specified by the client to help boot a server
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: string
+    attributes:
+      accessIPv4:
+        type: string
+        description: The manually assigned alternative public IPv4 address of the server
+        status: SUPPORTED
+      addresses:
+        type: map
+        description: A dict of all network addresses with corresponding port_id
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.novaServer.network.AddressInfo
+      accessIPv6:
+        type: string
+        description: The manually assigned alternative public IPv6 address of the server
+        status: SUPPORTED
+      instance_name:
+        type: string
+        description: AWS compatible instance name
+        status: SUPPORTED
+      name:
+        type: string
+        description: Name of the server
+        status: SUPPORTED
+      show:
+        type: string
+        description: Detailed information about resource
+        status: SUPPORTED
+      console_urls:
+        type: string
+        description: URLs of servers consoles
+        status: SUPPORTED
+  org.openecomp.resource.abstract.nodes.VnfConfiguration:
+    derived_from: tosca.nodes.Root
+    properties:
+      allowed_flavors:
+        description: a collection of all flavor valuesets available for a given VFC
+        type: map
+        entry_schema:
+          type: org.openecomp.datatypes.flavors.DeploymentFlavor
+  org.openecomp.resource.abstract.nodes.MultiFlavorVFC:
+    derived_from: org.openecomp.resource.abstract.nodes.VFC
+    properties:
+      images:
+        type: map
+        entry_schema:
+          type: org.openecomp.datatypes.ImageInfo
+        required: false
+  org.openecomp.resource.cp.nodes.network.Port:
+    derived_from: tosca.nodes.network.Port
+    properties:
+      network_role:
+        type: string
+        required: true
+        description: identical to VL network_role
+      order:
+        type: integer
+        required: true
+        description: The order of the CP on the compute instance (e.g. eth2).
+      network_role_tag:
+        description: Must correlate to the set of defined “network-role�? tag identifiers from the associated HEAT template
+        type: string
+        required: true
+      mac_requirements:
+        description: identifies MAC address assignments to the CP
+        type: org.openecomp.datatypes.network.MacRequirements
+        required: false
+      vlan_requirements:
+        description: identifies vlan address assignments to the CP
+        type: list
+        entry_schema:
+          type: org.openecomp.datatypes.network.VlanRequirements
+        required: false
+      ip_requirements:
+        description: identifies IP requirements to the CP
+        type: list
+        entry_schema:
+          type: org.openecomp.datatypes.network.IpRequirements
+        required: true
+      exCP_naming:
+        type: org.openecomp.datatypes.Naming
+      subnetpoolid:
+        type: string
+    capabilities:
+      network.incoming.packets.rate:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: packet/s
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: network.incoming.packets.rate
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average rate of incoming packets
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: network
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      forwarder:
+        type: org.openecomp.capabilities.Forwarder
+      network.outgoing.bytes:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: network.outgoing.bytes
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Number of outgoing bytes
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Cumulative
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: network
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      network.outgoing.packets.rate:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: packet/s
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: network.outgoing.packets.rate
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average rate of outgoing packets
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: network
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      network.outpoing.packets:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: packet
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: network.outpoing.packets
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Number of outgoing packets
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Cumulative
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: network
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      network.incoming.bytes.rate:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B/s
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: network.incoming.bytes.rate
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average rate of incoming bytes
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: network
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      network.incoming.bytes:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: network.incoming.bytes
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Number of incoming bytes
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Cumulative
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: network
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      network.outgoing.bytes.rate:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: B/s
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: network.outgoing.bytes.rate
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Average rate of outgoing bytes
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Gauge
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: network
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+      network.incoming.packets:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        properties:
+          unit:
+            type: string
+            description: Unit of the metric value
+            required: true
+            default: packet
+            status: SUPPORTED
+          name:
+            type: string
+            description: Ceilometer metric type name to monitor. (The name ceilometer is using)
+            required: true
+            default: network.incoming.packets
+            status: SUPPORTED
+          description:
+            type: string
+            description: Description of the metric
+            required: false
+            default: Number of incoming packets
+            status: SUPPORTED
+          type:
+            type: string
+            description: Type of the metric value, for an example, Cumulative, Delta, Gauge and etc.
+            required: true
+            default: Cumulative
+            status: SUPPORTED
+          category:
+            type: string
+            description: Category of the metric, for an example, compute, disk, network, storage and etc.
+            required: false
+            default: network
+            status: SUPPORTED
+        occurrences:
+        - 1
+        - UNBOUNDED
+  org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules:
+    derived_from: tosca.nodes.Root
+    properties:
+      description:
+        type: string
+        description: Description of the security group
+        required: false
+        status: SUPPORTED
+      name:
+        type: string
+        description: A symbolic name for this security group, which is not required to be unique.
+        required: false
+        status: SUPPORTED
+      rules:
+        type: list
+        description: List of security group rules
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.neutron.SecurityRules.Rule
+    attributes:
+      show:
+        type: string
+        description: Detailed information about resource
+        status: SUPPORTED
+    requirements:
+    - port:
+        capability: tosca.capabilities.Attachment
+        node: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+        relationship: org.openecomp.relationships.AttachesTo
+        occurrences:
+        - 0
+        - UNBOUNDED
+  org.openecomp.resource.cp.v2.extContrailCP:
+    derived_from: org.openecomp.resource.cp.v2.extCP
+    properties:
+      static_routes:
+        type: list
+        description: An ordered list of static routes to be added to this interface
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.contrail.port.StaticRoute
+      virtual_network:
+        type: string
+        description: Virtual Network for this interface
+        required: true
+        status: SUPPORTED
+      static_route:
+        type: boolean
+        description: Static route enabled
+        required: false
+        default: false
+        status: SUPPORTED
+      allowed_address_pairs:
+        type: list
+        description: List of allowed address pair for this interface
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.contrail.AddressPair
+      shared_ip:
+        type: boolean
+        description: Shared ip enabled
+        required: false
+        default: false
+        status: SUPPORTED
+      ip_address:
+        type: string
+        description: IP for this interface
+        required: false
+        status: SUPPORTED
+      interface_type:
+        type: string
+        description: Interface type
+        required: true
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - management
+          - left
+          - right
+          - other
+    attributes:
+      fq_name:
+        type: string
+        description: fq_name
+        status: SUPPORTED
+  org.openecomp.resource.vl.nodes.heat.network.neutron.Net:
+    derived_from: org.openecomp.resource.vl.nodes.network.Network
+    properties:
+      dhcp_agent_ids:
+        type: list
+        description: The IDs of the DHCP agent to schedule the network
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      tenant_id:
+        type: string
+        description: The ID of the tenant which will own the network
+        required: false
+        status: SUPPORTED
+      port_security_enabled:
+        type: boolean
+        description: Flag to enable/disable port security on the network
+        required: false
+        status: SUPPORTED
+      shared:
+        type: boolean
+        description: Whether this network should be shared across all tenants
+        required: false
+        default: false
+        status: SUPPORTED
+      admin_state_up:
+        type: boolean
+        description: A boolean value specifying the administrative status of the network
+        required: false
+        default: true
+        status: SUPPORTED
+      qos_policy:
+        type: string
+        description: The name or ID of QoS policy to attach to this network
+        required: false
+        status: SUPPORTED
+      subnets:
+        type: map
+        description: Network related subnets
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.neutron.Subnet
+      value_specs:
+        type: map
+        description: Extra parameters to include in the request
+        required: false
+        default: {}
+        status: SUPPORTED
+        entry_schema:
+          type: string
+    attributes:
+      qos_policy_id:
+        type: string
+        description: The QoS policy ID attached to this network
+        status: SUPPORTED
+      show:
+        type: string
+        description: Detailed information about resource
+        status: SUPPORTED
+      subnets_name:
+        type: list
+        description: Subnets name of this network
+        status: SUPPORTED
+        entry_schema:
+          type: string
+      subnets:
+        type: map
+        description: Network related subnets
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.neutron.Subnet
+      mtu:
+        type: scalar-unit.size
+        description: The maximum transmission unit size(in bytes) for the network
+        status: SUPPORTED
+      status:
+        type: string
+        description: The status of the network
+        status: SUPPORTED
+    capabilities:
+      attachment:
+        type: tosca.capabilities.Attachment
+        occurrences:
+        - 1
+        - UNBOUNDED
+  org.openecomp.resource.abstract.nodes.contrail.AbstractSubstitute:
+    derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute
+    properties:
+      availability_zone:
+        type: string
+        description: Availability zone to create servers in
+        required: false
+        status: SUPPORTED
+      static_routes_list:
+        type: list
+        description: Static routes enabled
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: boolean
+      availability_zone_enable:
+        type: boolean
+        description: Indicates availability zone is enabled
+        required: false
+        default: false
+        status: SUPPORTED
+      service_template_name:
+        type: string
+        description: Service template name
+        required: false
+        status: SUPPORTED
+      ordered_interfaces:
+        type: boolean
+        description: Indicates if service interface are ordered
+        required: false
+        default: false
+        status: SUPPORTED
+      flavor:
+        type: string
+        description: flavor
+        required: false
+        status: SUPPORTED
+      image_name:
+        type: string
+        description: Image name
+        required: true
+        status: SUPPORTED
+      service_type:
+        type: string
+        description: Service type
+        required: true
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - firewall
+          - analyzer
+          - source-nat
+          - loadbalancer
+      service_interface_type_list:
+        type: list
+        description: List of interface types
+        required: true
+        status: SUPPORTED
+        entry_schema:
+          type: string
+          constraints:
+          - valid_values:
+            - management
+            - left
+            - right
+            - other
+      service_instance_name:
+        type: string
+        description: Service instance name
+        required: true
+        status: SUPPORTED
+      interface_list:
+        type: list
+        description: List of interfaces
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: org.openecomp.datatypes.heat.network.contrail.InterfaceData
+      service_mode:
+        type: string
+        description: Service mode
+        required: true
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - transparent
+          - in-network
+          - in-network-nat
+      shared_ip_list:
+        type: list
+        description: Shared ips enabled
+        required: false
+        status: SUPPORTED
+        entry_schema:
+          type: boolean
+    attributes:
+      tenant_id:
+        type: string
+        description: Tenant id of the Service Instance
+        status: SUPPORTED
+      fq_name:
+        type: string
+        description: The FQ name of the service instance
+        status: SUPPORTED
+      service_template_name:
+        type: string
+        description: Service Template of the Service Instance
+        status: SUPPORTED
+      show:
+        type: string
+        description: All attributes
+        status: SUPPORTED
+      active_vms:
+        type: string
+        description: Number of service VMs active for this Service Instance
+        status: SUPPORTED
+      service_instance_name:
+        type: string
+        description: The name of the service instance
+        status: SUPPORTED
+      virtual_machines:
+        type: string
+        description: Service VMs for the Service Instance
+        status: SUPPORTED
+      status:
+        type: string
+        description: Status of the service instance
+        status: SUPPORTED
+  org.openecomp.resource.vl.nodes.network.Network:
+    derived_from: tosca.nodes.network.Network
+    properties:
+      vendor:
+        type: string
+        required: false
+      vl_name:
+        type: string
+        required: false
+    capabilities:
+      end_point:
+        type: tosca.capabilities.Endpoint
+  org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface:
+    derived_from: org.openecomp.resource.cp.nodes.network.Port
+    properties:
+      name:
+        description: Virtual Machine Interface name
+        type: string
+        status: SUPPORTED
+        required: false
+      security_group_refs:
+        description: List of security groups.
+        type: list
+        status: SUPPORTED
+        entry_schema:
+          type: string
+        required: false
+      virtual_network_refs:
+        description: List of virtual networks.
+        type: list
+        status: SUPPORTED
+        entry_schema:
+          type: string
+        required: false
+      virtual_machine_interface_properties:
+        description: virtual machine interface properties.
+        type: org.openecomp.datatypes.heat.contrailV2.virtual.machine.interface.Properties
+        status: SUPPORTED
+        required: false
+      port_tuple_refs:
+        description: List of port tuples.
+        type: list
+        status: SUPPORTED
+        entry_schema:
+          type: string
+        required: false
+      virtual_machine_interface_mac_addresses:
+        description: List of mac addresses.
+        type: list
+        status: SUPPORTED
+        entry_schema:
+          type: string
+        required: false
+      virtual_machine_interface_allowed_address_pairs:
+        description: Virtual Machine Interface allowed address pairs.
+        type: org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.AddressPairs
+        status: SUPPORTED
+        required: false
+    attributes:
+      fq_name:
+        description: The FQ name of the Virtual Network.
+        type: string
+        status: SUPPORTED
+      show:
+        description: All attributes.
+        type: string
+        status: SUPPORTED
+    capabilities:
+      binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 0
+        - UNBOUNDED
+        valid_source_types:
+        - org.openecomp.resources.cp.nodes.heat.network.contrailV2.VLANSubInterface
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/policies.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/policies.yml
new file mode 100644 (file)
index 0000000..6063d08
--- /dev/null
@@ -0,0 +1,134 @@
+#
+# 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.
+#
+tosca_definitions_version: tosca_simple_yaml_1_1
+imports:
+- data.yml
+policy_types:
+  tosca.policies.Root:
+    description: The TOSCA Policy Type all other TOSCA Policy Types derive from
+  tosca.policies.Placement:
+    derived_from: tosca.policies.Root
+    description: The TOSCA Policy Type definition that is used to govern placement of TOSCA nodes or groups of nodes.
+  tosca.policies.Scaling:
+    derived_from: tosca.policies.Root
+    description: The TOSCA Policy Type definition that is used to govern scaling of TOSCA nodes or groups of nodes.
+  tosca.policies.Update:
+    derived_from: tosca.policies.Root
+    description: The TOSCA Policy Type definition that is used to govern update of TOSCA nodes or groups of nodes.
+  tosca.policies.Performance:
+    derived_from: tosca.policies.Root
+    description: The TOSCA Policy Type definition that is used to declare performance requirements for TOSCA nodes or groups of nodes.
+  org.openecomp.policies.placement.Antilocate:
+    derived_from: tosca.policies.Placement
+    description: My placement policy for separation based upon container type value
+    properties:
+      name:
+        type: string
+        description: The name of the policy
+        required: false
+        status: SUPPORTED
+      container_type:
+        type: string
+        description: container type
+        required: false
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - host
+          - region
+          - compute
+  org.openecomp.policies.placement.Colocate:
+    derived_from: tosca.policies.Placement
+    description: Keep associated nodes (groups of nodes) based upon affinity value
+    properties:
+      name:
+        type: string
+        description: The name of the policy
+        required: false
+        status: SUPPORTED
+      affinity:
+        type: string
+        description: affinity
+        required: true
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - host
+          - region
+          - compute
+  org.openecomp.policies.placement.valet.Diversity:
+    derived_from: tosca.policies.Placement
+    description: Valet Diversity
+    properties:
+      level:
+        type: string
+        description: diversity
+        required: false
+        default: host
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - host
+          - rack
+  org.openecomp.policies.placement.valet.Exclusivity:
+    derived_from: tosca.policies.Placement
+    description: Valet Exclusivity
+    properties:
+      level:
+        type: string
+        description: exclusivity
+        required: false
+        default: host
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - host
+          - rack
+  org.openecomp.policies.placement.valet.Affinity:
+    derived_from: tosca.policies.Placement
+    description: Valet Affinity
+    properties:
+      level:
+        type: string
+        description: affinity
+        required: false
+        default: host
+        status: SUPPORTED
+        constraints:
+        - valid_values:
+          - host
+          - rack
+  org.openecomp.policies.scaling.Fixed:
+    derived_from: tosca.policies.Scaling
+    properties:
+      quantity:
+        description: the exact number of instances to keep up
+        type: integer
+        required: true
+  org.openecomp.policies.External:
+    derived_from: tosca.policies.Root
+    description: externally managed policy (for example, type="network assignment", source="Policy Manager", name="route target")
+    properties:
+      source:
+        type: string
+        description: The name of the server that exposes the policy with predefined type and name.
+        required: false
+      type:
+        type: string
+        description: The type (category) of the policy same as it is defined in the source.
+        required: false
+      name:
+        type: string
+        description: The name of the policy, that related to specific type, same as it is defined in the source.
+        required: false
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/relationships.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/relationships.yml
new file mode 100644 (file)
index 0000000..f8b4335
--- /dev/null
@@ -0,0 +1,125 @@
+#
+# 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.
+#
+tosca_definitions_version: tosca_simple_yaml_1_1
+imports:
+- capabilities.yml
+- data.yml
+- interfaces.yml
+relationship_types:
+  tosca.relationships.Root:
+    description: This is the default (root) TOSCA Relationship Type definition that all other TOSCA Relationship Types derive from.
+    attributes:
+      tosca_id:
+        description: A unique identifier of the realized instance of a Relationship Template that derives from any TOSCA normative type.
+        type: string
+      tosca_name:
+        description: This attribute reflects the name of the Relationship Template as defined in the TOSCA service template. This name is not unique to the realized instance model of corresponding deployed application as each template in the model can result in one or more instances (e.g., scaled) when orchestrated to a provider environment.
+        type: string
+      state:
+        description: The state of the relationship instance.
+        type: string
+        default: initial
+    interfaces:
+      Configure:
+        type: tosca.interfaces.relationship.Configure
+  tosca.relationships.RoutesTo:
+    derived_from: tosca.relationships.ConnectsTo
+    description: This type represents an intentional network routing between two Endpoints in different networks.
+    valid_target_types:
+    - tosca.capabilities.Endpoint
+  tosca.relationships.network.LinksTo:
+    derived_from: tosca.relationships.DependsOn
+    description: This relationship type represents an association relationship between Port and Network node types.
+    valid_target_types:
+    - tosca.capabilities.network.Linkable
+  tosca.relationships.AttachesTo:
+    derived_from: tosca.relationships.Root
+    description: This type represents an attachment relationship between two nodes. For example, an AttachesTo relationship type would be used for attaching a storage node to a Compute node.
+    valid_target_types:
+    - tosca.capabilities.Attachment
+    properties:
+      location:
+        description: 'The relative location (e.g., path on the file system), which
+          provides the root location to address an attached node. e.g., a mount point
+          / path such as ''/usr/data''. Note: The user must provide it and it cannot
+          be "root".'
+        type: string
+        constraints:
+        - min_length: 1
+      device:
+        description: The logical device name which for the attached device (which is represented by the target node in the model). e.g., '/dev/hda1'.
+        type: string
+        required: false
+    attributes:
+      device:
+        description: 'The logical name of the device as exposed to the instance. Note:
+          A runtime property that gets set when the model gets instantiated by the
+          orchestrator.'
+        type: string
+  tosca.relationships.network.BindsTo:
+    derived_from: tosca.relationships.DependsOn
+    description: This type represents a network association relationship between Port and Compute node types.
+    valid_target_types:
+    - tosca.capabilities.network.Bindable
+  tosca.relationships.HostedOn:
+    derived_from: tosca.relationships.Root
+    description: This type represents a hosting relationship between two nodes.
+    valid_target_types:
+    - tosca.capabilities.Container
+  tosca.relationships.DependsOn:
+    derived_from: tosca.relationships.Root
+    description: This type represents a general dependency relationship between two nodes.
+    valid_target_types:
+    - tosca.capabilities.Node
+  tosca.relationships.ConnectsTo:
+    derived_from: tosca.relationships.Root
+    description: This type represents a network connection relationship between two nodes.
+    valid_target_types:
+    - tosca.capabilities.Endpoint
+    properties:
+      credential:
+        type: tosca.datatypes.Credential
+        required: false
+  org.openecomp.relationships.VolumeAttachesTo:
+    derived_from: org.openecomp.relationships.AttachesTo
+    description: This type represents an attachment relationship for associating volume
+    properties:
+      volume_id:
+        description: The ID of the volume to be attached
+        type: string
+        status: SUPPORTED
+        required: true
+      instance_uuid:
+        description: The ID of the server to which the volume attaches
+        type: string
+        status: SUPPORTED
+        required: true
+    attributes:
+      show:
+        description: Detailed information about resource
+        type: string
+        status: SUPPORTED
+  org.openecomp.relationships.AttachesTo:
+    derived_from: tosca.relationships.AttachesTo
+    description: This type represents an attachment relationship
+    properties:
+      location:
+        description: The relative location (e.g., path on the file system), which provides the root location to address an attached node.
+        type: string
+        status: SUPPORTED
+        required: false
+  org.openecomp.relationships.ForwardsTo:
+    derived_from: tosca.relationships.Root
+    valid_target_types:
+    - org.openecomp.capabilities.Forwarder
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-CscfNokia-template-interface.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-CscfNokia-template-interface.yml
new file mode 100644 (file)
index 0000000..5a20b62
--- /dev/null
@@ -0,0 +1,678 @@
+tosca_definitions_version: tosca_simple_yaml_1_1
+imports:
+- nodes:
+    file: nodes.yml
+- datatypes:
+    file: data.yml
+- capabilities:
+    file: capabilities.yml
+- relationships:
+    file: relationships.yml
+- groups:
+    file: groups.yml
+- policies:
+    file: policies.yml
+node_types:
+  org.openecomp.resource.vf.CscfNokia:
+    derived_from: org.openecomp.resource.abstract.nodes.VF
+    properties:
+      nf_naming:
+        type: org.openecomp.datatypes.Naming
+        default:
+          ecomp_generated_naming: true
+      multi_stage_design:
+        type: boolean
+        default: false
+      nf_function:
+        type: string
+      nf_naming_code:
+        type: string
+      availability_zone_max_count:
+        type: integer
+        default: 1
+      nf_role:
+        type: string
+      min_instances:
+        type: integer
+      max_instances:
+        type: integer
+      nf_type:
+        type: string
+    capabilities:
+      lb_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      oam.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      lb.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      cscf.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      oam.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscf.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      oam.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      internal.virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscf.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      oam.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lb_internal.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lb.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      oam.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lbcpd_diameter.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      oam.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      cscf.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      cscf.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lb_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lb.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      oam.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      oam.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      lbcpd_sip.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lb.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      cscf.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscf_internal.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      oamcpd_om.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      oam_internal.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lbcpd_om.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lb.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      cscf.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lb.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      cscf.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      lb.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscf.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      lb.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      oam_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      oam.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      internal.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lb.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      oam_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+    requirements:
+    - cscf.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - oam_internal.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cscf_internal.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - lb_internal.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - internal.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - lbcpd_om.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - lbcpd_diameter.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - oam.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - oamcpd_om.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - lb_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - lb.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - lbcpd_sip.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - oam_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cscf.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - oam.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - lb.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - oam_internal.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - cscf_internal.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - lb_internal.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - lbcpd_om.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - lbcpd_diameter.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - oamcpd_om.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - lbcpd_sip.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - cscf.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - oam.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - lb.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - oam_internal.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - cscf_internal.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - lb_internal.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - lbcpd_om.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - lbcpd_diameter.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - oamcpd_om.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - lbcpd_sip.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-CscfNokia-template.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-CscfNokia-template.yml
new file mode 100644 (file)
index 0000000..d6130dc
--- /dev/null
@@ -0,0 +1,600 @@
+tosca_definitions_version: tosca_simple_yaml_1_1
+metadata:
+  invariantUUID: 2ed01e73-2a23-4717-a7fe-8d067ff6bb87
+  UUID: 8612efa5-9df9-43ef-8e76-5a3cca97a15e
+  name: CSCF Nokia
+  description: CSCF Nokia
+  type: VF
+  category: Generic
+  subcategory: Network Elements
+  resourceVendor: onap
+  resourceVendorRelease: '1.0'
+  resourceVendorModelNumber: ''
+imports:
+- nodes:
+    file: nodes.yml
+- datatypes:
+    file: data.yml
+- capabilities:
+    file: capabilities.yml
+- relationships:
+    file: relationships.yml
+- groups:
+    file: groups.yml
+- policies:
+    file: policies.yml
+- resource-CSCF Nokia-interface:
+    file: resource-CscfNokia-template-interface.yml
+- resource-VDU Compute:
+    file: resource-VduCompute-template.yml
+- resource-VDU Cpd:
+    file: resource-VduCpd-template.yml
+- resource-VnfVirtualLinkDesc:
+    file: resource-Vnfvirtuallinkdesc-template.yml
+- resource-VDU VirtualStorage:
+    file: resource-VduVirtualstorage-template.yml
+topology_template:
+  inputs:
+    nf_naming:
+      type: org.openecomp.datatypes.Naming
+      default:
+        ecomp_generated_naming: true
+    multi_stage_design:
+      type: boolean
+      default: false
+    nf_function:
+      type: string
+    nf_naming_code:
+      type: string
+    availability_zone_max_count:
+      type: integer
+      default: 1
+    nf_role:
+      type: string
+    min_instances:
+      type: integer
+    max_instances:
+      type: integer
+    nf_type:
+      type: string
+  node_templates:
+    internal:
+      type: tosca.nodes.nfv.VnfVirtualLinkDesc
+      metadata:
+        invariantUUID: ffa0bcc5-7903-4332-adb9-3c44f577621e
+        UUID: ecb39b27-06c8-4337-9304-d6a88c8c0fae
+        customizationUUID: 582c18d7-d466-4b8c-9cab-536e45f3a14a
+        version: '2.0'
+        name: VnfVirtualLinkDesc
+        description: VnfVirtualLinkDesc
+        type: VL
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        vl_flavours:
+          flavours:
+            flavourId: test
+        connectivity_type:
+          layer_protocol: ipv4
+    lbCpd_SIP:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: 1ec6019b-ea02-4065-8db3-dc631e468f61
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: leaf
+        layer_protocol: ipv4
+      requirements:
+      - virtual_binding:
+          capability: virtual_binding
+          node: lb
+    lbCpd_Diameter:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: 1c9bfa55-d4fe-43ff-b8ad-984e26795fc9
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: leaf
+        layer_protocol: ipv4
+      requirements:
+      - virtual_binding:
+          capability: virtual_binding
+          node: lb
+    oam_Storage:
+      type: tosca.nodes.nfv.VDU.VirtualStorage
+      metadata:
+        invariantUUID: fabee67b-5538-453d-9dc0-41c5655c9105
+        UUID: e852ea2a-3a48-4521-8ef7-f12682c75e86
+        customizationUUID: 845ba157-b397-4ed1-8c1c-02bfa29b2515
+        version: '2.0'
+        name: VDU VirtualStorage
+        description: VDU VirtualStorage
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        size_of_storage: 300G
+        id: oam_Storage
+        type_of_storage: volume
+    oamCpd_OM:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: 2a71f014-924a-4966-8bba-db5d68f5088a
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: leaf
+        layer_protocol: ipv4
+      requirements:
+      - virtual_binding:
+          capability: virtual_binding
+          node: oam
+    lbCpd_OM:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: 9bf40aab-eff2-4c22-b516-b1f106b6a797
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: leaf
+        layer_protocol: ipv4
+      requirements:
+      - virtual_binding:
+          capability: virtual_binding
+          node: lb
+    lb_Storage:
+      type: tosca.nodes.nfv.VDU.VirtualStorage
+      metadata:
+        invariantUUID: fabee67b-5538-453d-9dc0-41c5655c9105
+        UUID: e852ea2a-3a48-4521-8ef7-f12682c75e86
+        customizationUUID: 3d22021f-f602-45f1-8bcd-d339ba5fd536
+        version: '2.0'
+        name: VDU VirtualStorage
+        description: VDU VirtualStorage
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        size_of_storage: 300G
+        id: lb_Storage
+        type_of_storage: volume
+    lb:
+      type: tosca.nodes.nfv.VDU.Compute
+      metadata:
+        invariantUUID: 63007034-0330-4132-b51e-87c6a64065f3
+        UUID: 9c6a1271-b443-48e3-8049-f5433db3d5f2
+        customizationUUID: d87fb984-012e-4789-8098-b20115fae393
+        version: '2.0'
+        name: VDU Compute
+        description: VDU Compute
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      requirements:
+      - virtual_storage:
+          capability: virtual_storage
+          node: lb_Storage
+      capabilities:
+        scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 32G
+            virtual_cpu:
+              num_virtual_cpu: 12
+        endpoint:
+          properties:
+            secure: true
+    cscf_internal:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: d9e1d2f1-4a0c-4a19-9472-1aa819acd79f
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: leaf
+        layer_protocol: ipv4
+      requirements:
+      - virtual_link:
+          capability: virtual_linkable
+          node: internal
+      - virtual_binding:
+          capability: virtual_binding
+          node: cscf
+    oam_internal:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: 7e9afa7a-ed8a-4445-9e01-c7eea12e761a
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: leaf
+        layer_protocol: ipv4
+      requirements:
+      - virtual_link:
+          capability: virtual_linkable
+          node: internal
+      - virtual_binding:
+          capability: virtual_binding
+          node: oam
+    oam:
+      type: tosca.nodes.nfv.VDU.Compute
+      metadata:
+        invariantUUID: 63007034-0330-4132-b51e-87c6a64065f3
+        UUID: 9c6a1271-b443-48e3-8049-f5433db3d5f2
+        customizationUUID: 77154a9e-8fc7-4158-b79e-eecb034384bd
+        version: '2.0'
+        name: VDU Compute
+        description: VDU Compute
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      requirements:
+      - virtual_storage:
+          capability: virtual_storage
+          node: oam_Storage
+      capabilities:
+        scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 32G
+            virtual_cpu:
+              num_virtual_cpu: 4
+        endpoint:
+          properties:
+            secure: true
+    lb_internal:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: b009969e-472e-4956-90e0-15237838baca
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: leaf
+        layer_protocol: ipv4
+      requirements:
+      - virtual_link:
+          capability: virtual_linkable
+          node: internal
+      - virtual_binding:
+          capability: virtual_binding
+          node: lb
+    cscf:
+      type: tosca.nodes.nfv.VDU.Compute
+      metadata:
+        invariantUUID: 63007034-0330-4132-b51e-87c6a64065f3
+        UUID: 9c6a1271-b443-48e3-8049-f5433db3d5f2
+        customizationUUID: 133b949c-b711-4c5f-a7ce-8ed33ff401ea
+        version: '2.0'
+        name: VDU Compute
+        description: VDU Compute
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      capabilities:
+        scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 24G
+            virtual_cpu:
+              num_virtual_cpu: 8
+        endpoint:
+          properties:
+            secure: true
+  substitution_mappings:
+    node_type: org.openecomp.resource.vf.CscfNokia
+    capabilities:
+      lb_storage.feature:
+      - lb_storage
+      - feature
+      oam.host:
+      - oam
+      - host
+      lb.os:
+      - lb
+      - os
+      cscf.virtual_binding:
+      - cscf
+      - virtual_binding
+      oam.virtual_binding:
+      - oam
+      - virtual_binding
+      cscf.host:
+      - cscf
+      - host
+      oam.endpoint:
+      - oam
+      - endpoint
+      internal.virtual_linkable:
+      - internal
+      - virtual_linkable
+      cscf.endpoint:
+      - cscf
+      - endpoint
+      oam.binding:
+      - oam
+      - binding
+      lb_internal.feature:
+      - lb_internal
+      - feature
+      lb.virtual_binding:
+      - lb
+      - virtual_binding
+      oam.feature:
+      - oam
+      - feature
+      lbcpd_diameter.feature:
+      - lbcpd_diameter
+      - feature
+      oam.scalable:
+      - oam
+      - scalable
+      cscf.scalable:
+      - cscf
+      - scalable
+      cscf.monitoring_parameter:
+      - cscf
+      - monitoring_parameter
+      lb_storage.virtual_storage:
+      - lb_storage
+      - virtual_storage
+      lb.virtual_compute:
+      - lb
+      - virtual_compute
+      oam.virtual_compute:
+      - oam
+      - virtual_compute
+      oam.os:
+      - oam
+      - os
+      lbcpd_sip.feature:
+      - lbcpd_sip
+      - feature
+      lb.endpoint:
+      - lb
+      - endpoint
+      cscf.feature:
+      - cscf
+      - feature
+      cscf_internal.feature:
+      - cscf_internal
+      - feature
+      oamcpd_om.feature:
+      - oamcpd_om
+      - feature
+      oam_internal.feature:
+      - oam_internal
+      - feature
+      lbcpd_om.feature:
+      - lbcpd_om
+      - feature
+      lb.host:
+      - lb
+      - host
+      cscf.binding:
+      - cscf
+      - binding
+      lb.scalable:
+      - lb
+      - scalable
+      cscf.os:
+      - cscf
+      - os
+      lb.feature:
+      - lb
+      - feature
+      cscf.virtual_compute:
+      - cscf
+      - virtual_compute
+      lb.monitoring_parameter:
+      - lb
+      - monitoring_parameter
+      oam_storage.feature:
+      - oam_storage
+      - feature
+      oam.monitoring_parameter:
+      - oam
+      - monitoring_parameter
+      internal.feature:
+      - internal
+      - feature
+      lb.binding:
+      - lb
+      - binding
+      oam_storage.virtual_storage:
+      - oam_storage
+      - virtual_storage
+    requirements:
+      lbcpd_diameter.virtual_link:
+      - lbcpd_diameter
+      - virtual_link
+      lbcpd_om.dependency:
+      - lbcpd_om
+      - dependency
+      oam.dependency:
+      - oam
+      - dependency
+      lbcpd_diameter.virtual_binding:
+      - lbcpd_diameter
+      - virtual_binding
+      cscf_internal.virtual_link:
+      - cscf_internal
+      - virtual_link
+      oamcpd_om.virtual_binding:
+      - oamcpd_om
+      - virtual_binding
+      lb.dependency:
+      - lb
+      - dependency
+      lb_storage.dependency:
+      - lb_storage
+      - dependency
+      cscf_internal.virtual_binding:
+      - cscf_internal
+      - virtual_binding
+      lb_internal.virtual_link:
+      - lb_internal
+      - virtual_link
+      lbcpd_om.virtual_binding:
+      - lbcpd_om
+      - virtual_binding
+      cscf.local_storage:
+      - cscf
+      - local_storage
+      lbcpd_diameter.dependency:
+      - lbcpd_diameter
+      - dependency
+      lbcpd_sip.virtual_link:
+      - lbcpd_sip
+      - virtual_link
+      cscf_internal.dependency:
+      - cscf_internal
+      - dependency
+      lb_internal.virtual_binding:
+      - lb_internal
+      - virtual_binding
+      oam_storage.dependency:
+      - oam_storage
+      - dependency
+      oam_internal.dependency:
+      - oam_internal
+      - dependency
+      internal.dependency:
+      - internal
+      - dependency
+      oam_internal.virtual_binding:
+      - oam_internal
+      - virtual_binding
+      lb_internal.dependency:
+      - lb_internal
+      - dependency
+      oamcpd_om.dependency:
+      - oamcpd_om
+      - dependency
+      oam.virtual_storage:
+      - oam
+      - virtual_storage
+      cscf.dependency:
+      - cscf
+      - dependency
+      lbcpd_om.virtual_link:
+      - lbcpd_om
+      - virtual_link
+      cscf.virtual_storage:
+      - cscf
+      - virtual_storage
+      oamcpd_om.virtual_link:
+      - oamcpd_om
+      - virtual_link
+      oam.local_storage:
+      - oam
+      - local_storage
+      lbcpd_sip.virtual_binding:
+      - lbcpd_sip
+      - virtual_binding
+      lbcpd_sip.dependency:
+      - lbcpd_sip
+      - dependency
+      lb.virtual_storage:
+      - lb
+      - virtual_storage
+      lb.local_storage:
+      - lb
+      - local_storage
+      oam_internal.virtual_link:
+      - oam_internal
+      - virtual_link
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-ExtZteVl-template.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-ExtZteVl-template.yml
new file mode 100644 (file)
index 0000000..b8d7488
--- /dev/null
@@ -0,0 +1,80 @@
+tosca_definitions_version: tosca_simple_yaml_1_1
+metadata:
+  invariantUUID: d0d43bd0-4088-4b1c-9ac1-c6303d9f923a
+  UUID: 0f93d9d8-a815-4da9-820f-6cc77f670623
+  name: ext ZTE VL
+  description: Ext ZTE VL
+  type: VL
+  category: Generic
+  subcategory: Network Elements
+  resourceVendor: ATT (Tosca)
+  resourceVendorRelease: 1.0.0.wd03
+  resourceVendorModelNumber: ''
+imports:
+- nodes:
+    file: nodes.yml
+- datatypes:
+    file: data.yml
+- capabilities:
+    file: capabilities.yml
+- relationships:
+    file: relationships.yml
+- groups:
+    file: groups.yml
+- policies:
+    file: policies.yml
+node_types:
+  tosca.nodes.nfv.ext.zte.VL:
+    derived_from: tosca.nodes.Root
+    description: Ext ZTE VL
+    properties:
+      segmentation_id:
+        type: string
+      network_name:
+        type: string
+      is_predefined:
+        type: boolean
+      mtu:
+        type: integer
+      dns_nameservers:
+        type: list
+        entry_schema:
+          type: string
+      physical_network:
+        type: string
+      dhcp_enabled:
+        type: boolean
+      network_id:
+        type: string
+      host_routes:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.ext.HostRouteInfo
+      ip_version:
+        type: integer
+      vendor:
+        type: string
+      name:
+        type: string
+      start_ip:
+        type: string
+      vlan_transparent:
+        type: boolean
+      cidr:
+        type: string
+      gateway_ip:
+        type: string
+      network_type:
+        type: string
+      end_ip:
+        type: string
+      location_info:
+        type: tosca.datatypes.nfv.ext.LocationInfo
+    capabilities:
+      virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-SbcHuawei-template-interface.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-SbcHuawei-template-interface.yml
new file mode 100644 (file)
index 0000000..615bdf6
--- /dev/null
@@ -0,0 +1,1716 @@
+tosca_definitions_version: tosca_simple_yaml_1_1
+imports:
+- nodes:
+    file: nodes.yml
+- datatypes:
+    file: data.yml
+- capabilities:
+    file: capabilities.yml
+- relationships:
+    file: relationships.yml
+- groups:
+    file: groups.yml
+- policies:
+    file: policies.yml
+node_types:
+  org.openecomp.resource.vf.SbcHuawei:
+    derived_from: org.openecomp.resource.abstract.nodes.VF
+    properties:
+      nf_naming:
+        type: org.openecomp.datatypes.Naming
+        default:
+          ecomp_generated_naming: true
+      multi_stage_design:
+        type: boolean
+        default: false
+      nf_function:
+        type: string
+      nf_naming_code:
+        type: string
+      availability_zone_max_count:
+        type: integer
+        default: 1
+      nf_role:
+        type: string
+      min_instances:
+        type: integer
+      max_instances:
+        type: integer
+      nf_type:
+        type: string
+    capabilities:
+      ccu_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      bsu.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      hru2medianet2.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      vpu.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      bsu.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      scu.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      cmu.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      scu.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      lbu_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      omu.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      ccu.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cmu.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lbu.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      vpu.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      ccu.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lbu.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      scu.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      cmu.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      hru.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      omu.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      bsu_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cmu.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      omu.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      bsu.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      vpu.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      vpu.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      hru_vducpd_intra2.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      hru.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cmu_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      omu.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      omu.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      vpu_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cmu.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      cmu.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      vpu.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      lbu_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      omu_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lbu_vducpd_intra2.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      scu_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      hru.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      omu_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      omu2managenet.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cmu.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      upiru_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lbu2signalnet2.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lbu.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cmu.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      vpu.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      hru_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cmu_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      scu_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      vpu.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      ccu.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      hru.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      ccu.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      ccu_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cmu.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      omu_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      omu.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lbu.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      lbu.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      bsu_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      hru.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      scu.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      ccu_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      ccu.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      bsu.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      ccu.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      bsu_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      hru.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      bsu.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      bsu.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      omu.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      hru.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      bsu.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      scu.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      intranet1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      scu.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      upiru_vducpd_intra2.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lbu.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      intranet1.virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      vpu.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      ccu.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      lbu.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      lbu_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      hru_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lbu2signalnet1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      bsu.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      scu.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      vpu_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      hru2medianet1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      hru_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      omu.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      ccu.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      scu.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      hru.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      intranet2.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      vpu.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cmu_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      bsu.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      scu.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      intranet2.virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      hru.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      omu.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lbu.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      ccu.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      lbu.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      scu_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+    requirements:
+    - scu_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - vpu.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cmu_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - omu_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - bsu.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - hru_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - intranet1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - hru_vducpd_intra2.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - vpu_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - lbu.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - hru_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - intranet2.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - scu_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - upiru_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cmu.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - upiru_vducpd_intra2.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - bsu_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - omu2managenet.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - ccu.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - omu_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - lbu_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - ccu_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cmu_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - omu.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - scu.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - bsu_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - lbu2signalnet1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - lbu_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - hru.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - ccu_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - lbu2signalnet2.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - lbu_vducpd_intra2.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - hru2medianet1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - hru2medianet2.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - vpu.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - bsu.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - lbu.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - cmu.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - ccu.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - omu.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - scu.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - hru.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - omu_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - hru_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - hru_vducpd_intra2.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - scu_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - upiru_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - upiru_vducpd_intra2.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - omu2managenet.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - ccu_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - cmu_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - bsu_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - lbu2signalnet1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - lbu_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - lbu2signalnet2.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - lbu_vducpd_intra2.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - hru2medianet1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - hru2medianet2.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - vpu.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - bsu.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - lbu.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - cmu.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - ccu.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - omu.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - scu.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - hru.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - omu_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - hru_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - hru_vducpd_intra2.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - scu_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - upiru_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - upiru_vducpd_intra2.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - omu2managenet.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - ccu_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - cmu_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - bsu_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - lbu2signalnet1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - lbu_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - lbu2signalnet2.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - lbu_vducpd_intra2.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - hru2medianet1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - hru2medianet2.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-SbcHuawei-template.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-SbcHuawei-template.yml
new file mode 100644 (file)
index 0000000..c7c51b5
--- /dev/null
@@ -0,0 +1,1546 @@
+tosca_definitions_version: tosca_simple_yaml_1_1
+metadata:
+  invariantUUID: 459372a6-51a2-4f35-8193-b11ca47c2a24
+  UUID: 4563686a-a63a-457d-8232-a3d07b314028
+  name: SBC Huawei
+  description: SBC Huawei
+  type: VF
+  category: Generic
+  subcategory: Network Elements
+  resourceVendor: onap
+  resourceVendorRelease: '1.0'
+  resourceVendorModelNumber: ''
+imports:
+- nodes:
+    file: nodes.yml
+- datatypes:
+    file: data.yml
+- capabilities:
+    file: capabilities.yml
+- relationships:
+    file: relationships.yml
+- groups:
+    file: groups.yml
+- policies:
+    file: policies.yml
+- resource-SBC Huawei-interface:
+    file: resource-SbcHuawei-template-interface.yml
+- resource-VDU VirtualStorage:
+    file: resource-VduVirtualstorage-template.yml
+- resource-VDU Compute:
+    file: resource-VduCompute-template.yml
+- resource-VDU Cpd:
+    file: resource-VduCpd-template.yml
+- resource-VnfVirtualLinkDesc:
+    file: resource-Vnfvirtuallinkdesc-template.yml
+topology_template:
+  inputs:
+    nf_naming:
+      type: org.openecomp.datatypes.Naming
+      default:
+        ecomp_generated_naming: true
+    multi_stage_design:
+      type: boolean
+      default: false
+    nf_function:
+      type: string
+    nf_naming_code:
+      type: string
+    availability_zone_max_count:
+      type: integer
+      default: 1
+    nf_role:
+      type: string
+    min_instances:
+      type: integer
+    max_instances:
+      type: integer
+    nf_type:
+      type: string
+  node_templates:
+    SCU:
+      type: tosca.nodes.nfv.VDU.Compute
+      metadata:
+        invariantUUID: 63007034-0330-4132-b51e-87c6a64065f3
+        UUID: 9c6a1271-b443-48e3-8049-f5433db3d5f2
+        customizationUUID: 592668f7-6eab-451a-bccb-018db1fd17d1
+        version: '2.0'
+        name: VDU Compute
+        description: VDU Compute
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        configurable_properties:
+          test:
+            additional_vnfc_configurable_properties:
+              aaa: '1'
+        name: SCU
+        descrption: the virtual machine of SCU
+      requirements:
+      - virtual_storage:
+          capability: virtual_storage
+          node: SCU_Storage
+      capabilities:
+        scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 24G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 2
+        endpoint:
+          properties:
+            secure: true
+    LBU2SignalNet1:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: 19e73b12-a0d0-49f0-8f9b-7fac22688c70
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ethernet
+      requirements:
+      - virtual_binding:
+          capability: virtual_binding
+          node: LBU
+    CCU_VduCpd_Intra1:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: 4daec8ff-8dc2-44c3-abac-4580c5d5c292
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ipv4
+      requirements:
+      - virtual_link:
+          capability: virtual_linkable
+          node: Intranet1
+      - virtual_binding:
+          capability: virtual_binding
+          node: CCU
+    LBU_VduCpd_Intra1:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: c6b492b3-2674-4d29-b190-04788e08ab39
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ipv4
+      requirements:
+      - virtual_binding:
+          capability: virtual_binding
+          node: LBU
+      - virtual_link:
+          capability: virtual_linkable
+          node: Intranet1
+    OMU2ManageNet:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: e2967dfa-15fb-4b71-b5aa-a4f0a95fff60
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ipv4
+    LBU_VduCpd_Intra2:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: 8a4b0534-8c48-4631-a1a4-7de4a090faf7
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ipv4
+      requirements:
+      - virtual_link:
+          capability: virtual_linkable
+          node: Intranet2
+      - virtual_binding:
+          capability: virtual_binding
+          node: LBU
+    OMU_Storage:
+      type: tosca.nodes.nfv.VDU.VirtualStorage
+      metadata:
+        invariantUUID: fabee67b-5538-453d-9dc0-41c5655c9105
+        UUID: e852ea2a-3a48-4521-8ef7-f12682c75e86
+        customizationUUID: 156e7686-96a2-4ade-8a52-1f2d2e291653
+        version: '2.0'
+        name: VDU VirtualStorage
+        description: VDU VirtualStorage
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        rdma_enabled: false
+        size_of_storage: 256G
+        id: OMU_Storage
+        type_of_storage: volume
+    HRU:
+      type: tosca.nodes.nfv.VDU.Compute
+      metadata:
+        invariantUUID: 63007034-0330-4132-b51e-87c6a64065f3
+        UUID: 9c6a1271-b443-48e3-8049-f5433db3d5f2
+        customizationUUID: 1ef6b212-4bd3-4e58-878d-29e18c2ce930
+        version: '2.0'
+        name: VDU Compute
+        description: VDU Compute
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        configurable_properties:
+          test:
+            additional_vnfc_configurable_properties:
+              aaa: '1'
+        name: HRU
+        descrption: the virtual machine of HRU
+      requirements:
+      - virtual_storage:
+          capability: virtual_storage
+          node: HRU_Storage
+      capabilities:
+        scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 12G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 3
+        endpoint:
+          properties:
+            secure: true
+    VPU_Storage:
+      type: tosca.nodes.nfv.VDU.VirtualStorage
+      metadata:
+        invariantUUID: fabee67b-5538-453d-9dc0-41c5655c9105
+        UUID: e852ea2a-3a48-4521-8ef7-f12682c75e86
+        customizationUUID: 69c6e716-f8c4-4ee7-b517-908dc23f0c74
+        version: '2.0'
+        name: VDU VirtualStorage
+        description: VDU VirtualStorage
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        size_of_storage: 4G
+        id: VPU_Storage
+        type_of_storage: volume
+    SCU_VduCpd_Intra1:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: 482a3f60-5c44-4587-840d-53df210df213
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ipv4
+      requirements:
+      - virtual_binding:
+          capability: virtual_binding
+          node: SCU
+      - virtual_link:
+          capability: virtual_linkable
+          node: Intranet1
+    HRU_VduCpd_Intra2:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: 69c33f3b-75ba-4766-865d-e751439ceb63
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ipv4
+      requirements:
+      - virtual_link:
+          capability: virtual_linkable
+          node: Intranet2
+      - virtual_binding:
+          capability: virtual_binding
+          node: HRU
+    HRU_VduCpd_Intra1:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: 9a844ac0-6676-42d1-b10e-b766eeb2582e
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ipv4
+      requirements:
+      - virtual_binding:
+          capability: virtual_binding
+          node: HRU
+      - virtual_link:
+          capability: virtual_linkable
+          node: Intranet1
+    CCU_Storage:
+      type: tosca.nodes.nfv.VDU.VirtualStorage
+      metadata:
+        invariantUUID: fabee67b-5538-453d-9dc0-41c5655c9105
+        UUID: e852ea2a-3a48-4521-8ef7-f12682c75e86
+        customizationUUID: 6d15fa4c-77d4-4f6e-9635-d8d95c5e0476
+        version: '2.0'
+        name: VDU VirtualStorage
+        description: VDU VirtualStorage
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        size_of_storage: 4G
+        id: CCU_Storage
+        type_of_storage: volume
+    BSU_VduCpd_Intra1:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: e95a5f3f-8037-48a6-80cd-a245b71429c8
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ipv4
+      requirements:
+      - virtual_link:
+          capability: virtual_linkable
+          node: Intranet1
+      - virtual_binding:
+          capability: virtual_binding
+          node: BSU
+    Intranet1:
+      type: tosca.nodes.nfv.VnfVirtualLinkDesc
+      metadata:
+        invariantUUID: ffa0bcc5-7903-4332-adb9-3c44f577621e
+        UUID: ecb39b27-06c8-4337-9304-d6a88c8c0fae
+        customizationUUID: 4635dd5e-a3f6-4fa2-9701-42b843de0da4
+        version: '2.0'
+        name: VnfVirtualLinkDesc
+        description: VnfVirtualLinkDesc
+        type: VL
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        vl_flavours:
+          flavours:
+            flavourId: test1
+        connectivity_type:
+          layer_protocol: ipv4
+    Intranet2:
+      type: tosca.nodes.nfv.VnfVirtualLinkDesc
+      metadata:
+        invariantUUID: ffa0bcc5-7903-4332-adb9-3c44f577621e
+        UUID: ecb39b27-06c8-4337-9304-d6a88c8c0fae
+        customizationUUID: bf49e290-c9da-446e-b32f-4ca63462f0be
+        version: '2.0'
+        name: VnfVirtualLinkDesc
+        description: VnfVirtualLinkDesc
+        type: VL
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        vl_flavours:
+          flavours:
+            flavourId: test2
+        connectivity_type:
+          layer_protocol: ipv4
+    VPU:
+      type: tosca.nodes.nfv.VDU.Compute
+      metadata:
+        invariantUUID: 63007034-0330-4132-b51e-87c6a64065f3
+        UUID: 9c6a1271-b443-48e3-8049-f5433db3d5f2
+        customizationUUID: 6ef26ba3-0abb-48b4-bfba-20a86b521f36
+        version: '2.0'
+        name: VDU Compute
+        description: VDU Compute
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        configurable_properties:
+          test:
+            additional_vnfc_configurable_properties:
+              aaa: '1'
+        name: VPU
+        descrption: the virtual machine of VPU
+      requirements:
+      - virtual_storage:
+          capability: virtual_storage
+          node: VPU_Storage
+      capabilities:
+        scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 8G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 5
+        endpoint:
+          properties:
+            secure: true
+    LBU2SignalNet2:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: 7df93c99-cdd6-49be-be6d-1769760442cf
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ipv4
+      requirements:
+      - virtual_binding:
+          capability: virtual_binding
+          node: LBU
+    OMU_VduCpd_Intra1:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: baf8ef19-47ea-406c-95ef-483690b32171
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ipv4
+      requirements:
+      - virtual_link:
+          capability: virtual_linkable
+          node: Intranet1
+      - virtual_binding:
+          capability: virtual_binding
+          node: OMU
+    LBU:
+      type: tosca.nodes.nfv.VDU.Compute
+      metadata:
+        invariantUUID: 63007034-0330-4132-b51e-87c6a64065f3
+        UUID: 9c6a1271-b443-48e3-8049-f5433db3d5f2
+        customizationUUID: 34020892-4b2b-412b-9acf-91cfb80f5d0f
+        version: '2.0'
+        name: VDU Compute
+        description: VDU Compute
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        configurable_properties:
+          test:
+            additional_vnfc_configurable_properties:
+              aaa: '1'
+        name: LBU
+        descrption: the virtual machine of LBU
+      requirements:
+      - virtual_storage:
+          capability: virtual_storage
+          node: LBU_Storage
+      capabilities:
+        scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 24G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 4
+        endpoint:
+          properties:
+            secure: true
+    CMU_VduCpd_Intra1:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: db655574-25ed-48d1-ae39-b6e041148064
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ipv4
+      requirements:
+      - virtual_link:
+          capability: virtual_linkable
+          node: Intranet1
+      - virtual_binding:
+          capability: virtual_binding
+          node: CMU
+    CMU_Storage:
+      type: tosca.nodes.nfv.VDU.VirtualStorage
+      metadata:
+        invariantUUID: fabee67b-5538-453d-9dc0-41c5655c9105
+        UUID: e852ea2a-3a48-4521-8ef7-f12682c75e86
+        customizationUUID: 269f5f42-ef96-465f-892e-361d6dcb12ee
+        version: '2.0'
+        name: VDU VirtualStorage
+        description: VDU VirtualStorage
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        size_of_storage: 4G
+        id: CMU_Storage
+        type_of_storage: volume
+    BSU:
+      type: tosca.nodes.nfv.VDU.Compute
+      metadata:
+        invariantUUID: 63007034-0330-4132-b51e-87c6a64065f3
+        UUID: 9c6a1271-b443-48e3-8049-f5433db3d5f2
+        customizationUUID: 66e9d293-68b6-4086-a700-df7b4ffc6689
+        version: '2.0'
+        name: VDU Compute
+        description: VDU Compute
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        configurable_properties:
+          test:
+            additional_vnfc_configurable_properties:
+              aaa: '1'
+        name: BSU
+        descrption: the virtual machine of BSU
+      requirements:
+      - virtual_storage:
+          capability: virtual_storage
+          node: BSU_Storage
+      capabilities:
+        scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 8G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 1
+        endpoint:
+          properties:
+            secure: true
+    CMU:
+      type: tosca.nodes.nfv.VDU.Compute
+      metadata:
+        invariantUUID: 63007034-0330-4132-b51e-87c6a64065f3
+        UUID: 9c6a1271-b443-48e3-8049-f5433db3d5f2
+        customizationUUID: 0ba6264c-1b85-4c7b-89f1-7533ce9b08e0
+        version: '2.0'
+        name: VDU Compute
+        description: VDU Compute
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        configurable_properties:
+          test:
+            additional_vnfc_configurable_properties:
+              aaa: '1'
+        name: CMU
+        descrption: the virtual machine of CMU
+      requirements:
+      - virtual_storage:
+          capability: virtual_storage
+          node: CMU_Storage
+      capabilities:
+        scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 8G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 1
+        endpoint:
+          properties:
+            secure: true
+    SCU_Storage:
+      type: tosca.nodes.nfv.VDU.VirtualStorage
+      metadata:
+        invariantUUID: fabee67b-5538-453d-9dc0-41c5655c9105
+        UUID: e852ea2a-3a48-4521-8ef7-f12682c75e86
+        customizationUUID: b5df1233-babf-44f1-b565-fa41a30c9f7b
+        version: '2.0'
+        name: VDU VirtualStorage
+        description: VDU VirtualStorage
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        size_of_storage: 4G
+        id: SCU_Storage
+        type_of_storage: volume
+    HRU_Storage:
+      type: tosca.nodes.nfv.VDU.VirtualStorage
+      metadata:
+        invariantUUID: fabee67b-5538-453d-9dc0-41c5655c9105
+        UUID: e852ea2a-3a48-4521-8ef7-f12682c75e86
+        customizationUUID: c24eae39-81a5-4ca2-af7d-3cdb81a46b40
+        version: '2.0'
+        name: VDU VirtualStorage
+        description: VDU VirtualStorage
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        size_of_storage: 4G
+        id: HRU_Storage
+        type_of_storage: volume
+    CCU:
+      type: tosca.nodes.nfv.VDU.Compute
+      metadata:
+        invariantUUID: 63007034-0330-4132-b51e-87c6a64065f3
+        UUID: 9c6a1271-b443-48e3-8049-f5433db3d5f2
+        customizationUUID: 51f263d2-9d80-4c93-afbd-442cd7276477
+        version: '2.0'
+        name: VDU Compute
+        description: VDU Compute
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        configurable_properties:
+          test:
+            additional_vnfc_configurable_properties:
+              aaa: '1'
+        name: CCU
+        descrption: the virtual machine of CCU
+      requirements:
+      - virtual_storage:
+          capability: virtual_storage
+          node: CCU_Storage
+      capabilities:
+        scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 16G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 2
+        endpoint:
+          properties:
+            secure: true
+    OMU:
+      type: tosca.nodes.nfv.VDU.Compute
+      metadata:
+        invariantUUID: 63007034-0330-4132-b51e-87c6a64065f3
+        UUID: 9c6a1271-b443-48e3-8049-f5433db3d5f2
+        customizationUUID: 4ad39620-ccff-4067-aa1f-12216c0c8ebf
+        version: '2.0'
+        name: VDU Compute
+        description: VDU Compute
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        configurable_properties:
+          test:
+            additional_vnfc_configurable_properties:
+              aaa: '1'
+        name: OMU
+        descrption: the virtual machine of OMU
+      requirements:
+      - virtual_storage:
+          capability: virtual_storage
+          node: OMU_Storage
+      capabilities:
+        scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 16G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 4
+        endpoint:
+          properties:
+            secure: true
+    BSU_Storage:
+      type: tosca.nodes.nfv.VDU.VirtualStorage
+      metadata:
+        invariantUUID: fabee67b-5538-453d-9dc0-41c5655c9105
+        UUID: e852ea2a-3a48-4521-8ef7-f12682c75e86
+        customizationUUID: e483151b-38fd-4ea3-b13f-11d6f085e276
+        version: '2.0'
+        name: VDU VirtualStorage
+        description: VDU VirtualStorage
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        size_of_storage: 4G
+        id: BSU_Storage
+        type_of_storage: volume
+    UPIRU_VduCpd_Intra1:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: 940826f5-4339-4370-8d93-f82cc5821c89
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ipv4
+      requirements:
+      - virtual_binding:
+          capability: virtual_binding
+          node: VPU
+      - virtual_link:
+          capability: virtual_linkable
+          node: Intranet1
+    UPIRU_VduCpd_Intra2:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: cc7fd241-a3a3-4ad9-a173-6834b2363ae6
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ipv4
+      requirements:
+      - virtual_binding:
+          capability: virtual_binding
+          node: VPU
+      - virtual_link:
+          capability: virtual_linkable
+          node: Intranet2
+    HRU2MediaNet1:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: b8f4d611-3e0e-495f-a6b5-612f6b9acc99
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ethernet
+      requirements:
+      - virtual_binding:
+          capability: virtual_binding
+          node: HRU
+    LBU_Storage:
+      type: tosca.nodes.nfv.VDU.VirtualStorage
+      metadata:
+        invariantUUID: fabee67b-5538-453d-9dc0-41c5655c9105
+        UUID: e852ea2a-3a48-4521-8ef7-f12682c75e86
+        customizationUUID: bae734f4-21b8-44e3-bd54-8561c4de821f
+        version: '2.0'
+        name: VDU VirtualStorage
+        description: VDU VirtualStorage
+        type: VFC
+        category: Generic
+        subcategory: Infrastructure
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        size_of_storage: 4G
+        id: LBU_Storage
+        type_of_storage: volume
+    HRU2MediaNet2:
+      type: tosca.nodes.nfv.VduCpd
+      metadata:
+        invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+        UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+        customizationUUID: 05ee15f6-ce45-4278-9567-9a2978b881d2
+        version: '2.0'
+        name: VDU Cpd
+        description: VDU Cpd
+        type: CP
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+      properties:
+        role: root
+        layer_protocol: ipv4
+      requirements:
+      - virtual_binding:
+          capability: virtual_binding
+          node: HRU
+  substitution_mappings:
+    node_type: org.openecomp.resource.vf.SbcHuawei
+    capabilities:
+      ccu_storage.feature:
+      - ccu_storage
+      - feature
+      bsu.binding:
+      - bsu
+      - binding
+      hru2medianet2.feature:
+      - hru2medianet2
+      - feature
+      vpu.os:
+      - vpu
+      - os
+      bsu.os:
+      - bsu
+      - os
+      scu.scalable:
+      - scu
+      - scalable
+      cmu.host:
+      - cmu
+      - host
+      scu.virtual_compute:
+      - scu
+      - virtual_compute
+      lbu_vducpd_intra1.feature:
+      - lbu_vducpd_intra1
+      - feature
+      omu.scalable:
+      - omu
+      - scalable
+      ccu.virtual_binding:
+      - ccu
+      - virtual_binding
+      cmu.binding:
+      - cmu
+      - binding
+      lbu.virtual_compute:
+      - lbu
+      - virtual_compute
+      vpu.virtual_binding:
+      - vpu
+      - virtual_binding
+      ccu.feature:
+      - ccu
+      - feature
+      lbu.feature:
+      - lbu
+      - feature
+      scu.host:
+      - scu
+      - host
+      cmu.os:
+      - cmu
+      - os
+      hru.virtual_binding:
+      - hru
+      - virtual_binding
+      omu.os:
+      - omu
+      - os
+      bsu_storage.feature:
+      - bsu_storage
+      - feature
+      cmu.feature:
+      - cmu
+      - feature
+      omu.endpoint:
+      - omu
+      - endpoint
+      bsu.virtual_binding:
+      - bsu
+      - virtual_binding
+      vpu.binding:
+      - vpu
+      - binding
+      vpu.scalable:
+      - vpu
+      - scalable
+      hru_vducpd_intra2.feature:
+      - hru_vducpd_intra2
+      - feature
+      hru.feature:
+      - hru
+      - feature
+      cmu_storage.virtual_storage:
+      - cmu_storage
+      - virtual_storage
+      omu.virtual_compute:
+      - omu
+      - virtual_compute
+      omu.binding:
+      - omu
+      - binding
+      vpu_storage.feature:
+      - vpu_storage
+      - feature
+      cmu.virtual_compute:
+      - cmu
+      - virtual_compute
+      cmu.scalable:
+      - cmu
+      - scalable
+      vpu.host:
+      - vpu
+      - host
+      lbu_storage.virtual_storage:
+      - lbu_storage
+      - virtual_storage
+      omu_vducpd_intra1.feature:
+      - omu_vducpd_intra1
+      - feature
+      lbu_vducpd_intra2.feature:
+      - lbu_vducpd_intra2
+      - feature
+      scu_storage.feature:
+      - scu_storage
+      - feature
+      hru.host:
+      - hru
+      - host
+      omu_storage.virtual_storage:
+      - omu_storage
+      - virtual_storage
+      omu2managenet.feature:
+      - omu2managenet
+      - feature
+      cmu.endpoint:
+      - cmu
+      - endpoint
+      upiru_vducpd_intra1.feature:
+      - upiru_vducpd_intra1
+      - feature
+      lbu2signalnet2.feature:
+      - lbu2signalnet2
+      - feature
+      lbu.monitoring_parameter:
+      - lbu
+      - monitoring_parameter
+      cmu.monitoring_parameter:
+      - cmu
+      - monitoring_parameter
+      vpu.monitoring_parameter:
+      - vpu
+      - monitoring_parameter
+      hru_vducpd_intra1.feature:
+      - hru_vducpd_intra1
+      - feature
+      cmu_storage.feature:
+      - cmu_storage
+      - feature
+      scu_vducpd_intra1.feature:
+      - scu_vducpd_intra1
+      - feature
+      vpu.virtual_compute:
+      - vpu
+      - virtual_compute
+      ccu.endpoint:
+      - ccu
+      - endpoint
+      hru.scalable:
+      - hru
+      - scalable
+      ccu.binding:
+      - ccu
+      - binding
+      ccu_vducpd_intra1.feature:
+      - ccu_vducpd_intra1
+      - feature
+      cmu.virtual_binding:
+      - cmu
+      - virtual_binding
+      omu_storage.feature:
+      - omu_storage
+      - feature
+      omu.feature:
+      - omu
+      - feature
+      lbu.scalable:
+      - lbu
+      - scalable
+      lbu.os:
+      - lbu
+      - os
+      bsu_vducpd_intra1.feature:
+      - bsu_vducpd_intra1
+      - feature
+      hru.monitoring_parameter:
+      - hru
+      - monitoring_parameter
+      scu.virtual_binding:
+      - scu
+      - virtual_binding
+      ccu_storage.virtual_storage:
+      - ccu_storage
+      - virtual_storage
+      ccu.host:
+      - ccu
+      - host
+      bsu.endpoint:
+      - bsu
+      - endpoint
+      ccu.virtual_compute:
+      - ccu
+      - virtual_compute
+      bsu_storage.virtual_storage:
+      - bsu_storage
+      - virtual_storage
+      hru.binding:
+      - hru
+      - binding
+      bsu.feature:
+      - bsu
+      - feature
+      bsu.virtual_compute:
+      - bsu
+      - virtual_compute
+      omu.virtual_binding:
+      - omu
+      - virtual_binding
+      hru.virtual_compute:
+      - hru
+      - virtual_compute
+      bsu.monitoring_parameter:
+      - bsu
+      - monitoring_parameter
+      scu.os:
+      - scu
+      - os
+      intranet1.feature:
+      - intranet1
+      - feature
+      scu.feature:
+      - scu
+      - feature
+      upiru_vducpd_intra2.feature:
+      - upiru_vducpd_intra2
+      - feature
+      lbu.binding:
+      - lbu
+      - binding
+      intranet1.virtual_linkable:
+      - intranet1
+      - virtual_linkable
+      vpu.endpoint:
+      - vpu
+      - endpoint
+      ccu.os:
+      - ccu
+      - os
+      lbu.endpoint:
+      - lbu
+      - endpoint
+      lbu_storage.feature:
+      - lbu_storage
+      - feature
+      hru_storage.virtual_storage:
+      - hru_storage
+      - virtual_storage
+      lbu2signalnet1.feature:
+      - lbu2signalnet1
+      - feature
+      bsu.scalable:
+      - bsu
+      - scalable
+      scu.binding:
+      - scu
+      - binding
+      vpu_storage.virtual_storage:
+      - vpu_storage
+      - virtual_storage
+      hru2medianet1.feature:
+      - hru2medianet1
+      - feature
+      hru_storage.feature:
+      - hru_storage
+      - feature
+      omu.host:
+      - omu
+      - host
+      ccu.scalable:
+      - ccu
+      - scalable
+      scu.endpoint:
+      - scu
+      - endpoint
+      hru.endpoint:
+      - hru
+      - endpoint
+      intranet2.feature:
+      - intranet2
+      - feature
+      vpu.feature:
+      - vpu
+      - feature
+      cmu_vducpd_intra1.feature:
+      - cmu_vducpd_intra1
+      - feature
+      bsu.host:
+      - bsu
+      - host
+      scu.monitoring_parameter:
+      - scu
+      - monitoring_parameter
+      intranet2.virtual_linkable:
+      - intranet2
+      - virtual_linkable
+      hru.os:
+      - hru
+      - os
+      omu.monitoring_parameter:
+      - omu
+      - monitoring_parameter
+      lbu.host:
+      - lbu
+      - host
+      ccu.monitoring_parameter:
+      - ccu
+      - monitoring_parameter
+      lbu.virtual_binding:
+      - lbu
+      - virtual_binding
+      scu_storage.virtual_storage:
+      - scu_storage
+      - virtual_storage
+    requirements:
+      scu_vducpd_intra1.dependency:
+      - scu_vducpd_intra1
+      - dependency
+      cmu_vducpd_intra1.dependency:
+      - cmu_vducpd_intra1
+      - dependency
+      lbu2signalnet1.dependency:
+      - lbu2signalnet1
+      - dependency
+      hru2medianet2.dependency:
+      - hru2medianet2
+      - dependency
+      cmu_vducpd_intra1.virtual_link:
+      - cmu_vducpd_intra1
+      - virtual_link
+      vpu.local_storage:
+      - vpu
+      - local_storage
+      scu_vducpd_intra1.virtual_binding:
+      - scu_vducpd_intra1
+      - virtual_binding
+      lbu_vducpd_intra2.virtual_binding:
+      - lbu_vducpd_intra2
+      - virtual_binding
+      cmu.dependency:
+      - cmu
+      - dependency
+      omu2managenet.dependency:
+      - omu2managenet
+      - dependency
+      hru_vducpd_intra1.virtual_binding:
+      - hru_vducpd_intra1
+      - virtual_binding
+      upiru_vducpd_intra2.dependency:
+      - upiru_vducpd_intra2
+      - dependency
+      bsu_vducpd_intra1.dependency:
+      - bsu_vducpd_intra1
+      - dependency
+      hru_vducpd_intra2.virtual_link:
+      - hru_vducpd_intra2
+      - virtual_link
+      scu.local_storage:
+      - scu
+      - local_storage
+      bsu_storage.dependency:
+      - bsu_storage
+      - dependency
+      bsu.virtual_storage:
+      - bsu
+      - virtual_storage
+      hru2medianet2.virtual_binding:
+      - hru2medianet2
+      - virtual_binding
+      hru_vducpd_intra1.dependency:
+      - hru_vducpd_intra1
+      - dependency
+      lbu2signalnet1.virtual_link:
+      - lbu2signalnet1
+      - virtual_link
+      bsu.local_storage:
+      - bsu
+      - local_storage
+      ccu_vducpd_intra1.dependency:
+      - ccu_vducpd_intra1
+      - dependency
+      upiru_vducpd_intra1.virtual_link:
+      - upiru_vducpd_intra1
+      - virtual_link
+      omu_vducpd_intra1.virtual_link:
+      - omu_vducpd_intra1
+      - virtual_link
+      omu_storage.dependency:
+      - omu_storage
+      - dependency
+      lbu_vducpd_intra1.virtual_link:
+      - lbu_vducpd_intra1
+      - virtual_link
+      bsu_vducpd_intra1.virtual_binding:
+      - bsu_vducpd_intra1
+      - virtual_binding
+      lbu.dependency:
+      - lbu
+      - dependency
+      lbu_vducpd_intra2.dependency:
+      - lbu_vducpd_intra2
+      - dependency
+      upiru_vducpd_intra2.virtual_link:
+      - upiru_vducpd_intra2
+      - virtual_link
+      hru_vducpd_intra2.dependency:
+      - hru_vducpd_intra2
+      - dependency
+      omu_vducpd_intra1.virtual_binding:
+      - omu_vducpd_intra1
+      - virtual_binding
+      scu.dependency:
+      - scu
+      - dependency
+      lbu_vducpd_intra2.virtual_link:
+      - lbu_vducpd_intra2
+      - virtual_link
+      lbu2signalnet2.virtual_binding:
+      - lbu2signalnet2
+      - virtual_binding
+      hru2medianet1.virtual_binding:
+      - hru2medianet1
+      - virtual_binding
+      hru2medianet1.dependency:
+      - hru2medianet1
+      - dependency
+      upiru_vducpd_intra1.virtual_binding:
+      - upiru_vducpd_intra1
+      - virtual_binding
+      lbu_vducpd_intra1.dependency:
+      - lbu_vducpd_intra1
+      - dependency
+      upiru_vducpd_intra1.dependency:
+      - upiru_vducpd_intra1
+      - dependency
+      lbu2signalnet2.virtual_link:
+      - lbu2signalnet2
+      - virtual_link
+      hru_storage.dependency:
+      - hru_storage
+      - dependency
+      hru.dependency:
+      - hru
+      - dependency
+      omu2managenet.virtual_binding:
+      - omu2managenet
+      - virtual_binding
+      omu.local_storage:
+      - omu
+      - local_storage
+      scu_storage.dependency:
+      - scu_storage
+      - dependency
+      cmu_vducpd_intra1.virtual_binding:
+      - cmu_vducpd_intra1
+      - virtual_binding
+      scu.virtual_storage:
+      - scu
+      - virtual_storage
+      omu2managenet.virtual_link:
+      - omu2managenet
+      - virtual_link
+      bsu_vducpd_intra1.virtual_link:
+      - bsu_vducpd_intra1
+      - virtual_link
+      vpu.virtual_storage:
+      - vpu
+      - virtual_storage
+      scu_vducpd_intra1.virtual_link:
+      - scu_vducpd_intra1
+      - virtual_link
+      upiru_vducpd_intra2.virtual_binding:
+      - upiru_vducpd_intra2
+      - virtual_binding
+      cmu_storage.dependency:
+      - cmu_storage
+      - dependency
+      bsu.dependency:
+      - bsu
+      - dependency
+      lbu2signalnet2.dependency:
+      - lbu2signalnet2
+      - dependency
+      hru_vducpd_intra1.virtual_link:
+      - hru_vducpd_intra1
+      - virtual_link
+      hru_vducpd_intra2.virtual_binding:
+      - hru_vducpd_intra2
+      - virtual_binding
+      vpu.dependency:
+      - vpu
+      - dependency
+      cmu.local_storage:
+      - cmu
+      - local_storage
+      lbu_vducpd_intra1.virtual_binding:
+      - lbu_vducpd_intra1
+      - virtual_binding
+      cmu.virtual_storage:
+      - cmu
+      - virtual_storage
+      ccu.local_storage:
+      - ccu
+      - local_storage
+      lbu_storage.dependency:
+      - lbu_storage
+      - dependency
+      lbu.virtual_storage:
+      - lbu
+      - virtual_storage
+      omu_vducpd_intra1.dependency:
+      - omu_vducpd_intra1
+      - dependency
+      ccu_vducpd_intra1.virtual_binding:
+      - ccu_vducpd_intra1
+      - virtual_binding
+      omu.dependency:
+      - omu
+      - dependency
+      ccu_vducpd_intra1.virtual_link:
+      - ccu_vducpd_intra1
+      - virtual_link
+      ccu_storage.dependency:
+      - ccu_storage
+      - dependency
+      lbu.local_storage:
+      - lbu
+      - local_storage
+      ccu.dependency:
+      - ccu
+      - dependency
+      intranet1.dependency:
+      - intranet1
+      - dependency
+      hru.local_storage:
+      - hru
+      - local_storage
+      lbu2signalnet1.virtual_binding:
+      - lbu2signalnet1
+      - virtual_binding
+      omu.virtual_storage:
+      - omu
+      - virtual_storage
+      hru.virtual_storage:
+      - hru
+      - virtual_storage
+      vpu_storage.dependency:
+      - vpu_storage
+      - dependency
+      hru2medianet2.virtual_link:
+      - hru2medianet2
+      - virtual_link
+      intranet2.dependency:
+      - intranet2
+      - dependency
+      hru2medianet1.virtual_link:
+      - hru2medianet1
+      - virtual_link
+      ccu.virtual_storage:
+      - ccu
+      - virtual_storage
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-VduCompute-template.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-VduCompute-template.yml
new file mode 100644 (file)
index 0000000..cf6ced5
--- /dev/null
@@ -0,0 +1,169 @@
+tosca_definitions_version: tosca_simple_yaml_1_1
+metadata:
+  invariantUUID: 63007034-0330-4132-b51e-87c6a64065f3
+  UUID: 9c6a1271-b443-48e3-8049-f5433db3d5f2
+  name: VDU Compute
+  description: VDU Compute
+  type: VFC
+  category: Generic
+  subcategory: Infrastructure
+  resourceVendor: ATT (Tosca)
+  resourceVendorRelease: 1.0.0.wd03
+  resourceVendorModelNumber: ''
+imports:
+- nodes:
+    file: nodes.yml
+- datatypes:
+    file: data.yml
+- capabilities:
+    file: capabilities.yml
+- relationships:
+    file: relationships.yml
+- groups:
+    file: groups.yml
+- policies:
+    file: policies.yml
+node_types:
+  tosca.nodes.nfv.VDU.Compute:
+    derived_from: tosca.nodes.Root
+    description: VDU Compute
+    properties:
+      configurable_properties:
+        type: map
+        entry_schema:
+          type: tosca.datatypes.nfv.VnfcConfigurableProperties
+      name:
+        type: string
+      nfvi_constraints:
+        type: list
+        entry_schema:
+          type: string
+      descrption:
+        type: string
+      boot_order:
+        type: list
+        entry_schema:
+          type: string
+    capabilities:
+      scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+    requirements:
+    - virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-VduCpd-template.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-VduCpd-template.yml
new file mode 100644 (file)
index 0000000..d432f98
--- /dev/null
@@ -0,0 +1,57 @@
+tosca_definitions_version: tosca_simple_yaml_1_1
+metadata:
+  invariantUUID: a79633fa-0a7f-4858-9064-93d7f1bb8f88
+  UUID: 04dcc383-181f-41c3-9ca0-49fa56278d2a
+  name: VDU Cpd
+  description: VDU Cpd
+  type: CP
+  category: Generic
+  subcategory: Network Elements
+  resourceVendor: ATT (Tosca)
+  resourceVendorRelease: 1.0.0.wd03
+  resourceVendorModelNumber: ''
+imports:
+- nodes:
+    file: nodes.yml
+- datatypes:
+    file: data.yml
+- capabilities:
+    file: capabilities.yml
+- relationships:
+    file: relationships.yml
+- groups:
+    file: groups.yml
+- policies:
+    file: policies.yml
+node_types:
+  tosca.nodes.nfv.VduCpd:
+    derived_from: tosca.nodes.Root
+    description: VDU Cpd
+    properties:
+      virtual_network_interface_requirements:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+      role:
+        type: string
+      bitrate_requirement:
+        type: integer
+      description:
+        type: string
+      layer_protocol:
+        type: string
+      address_data:
+        type: list
+        entry_schema:
+          type: tosca.datatype.nfv.AddressData
+    requirements:
+    - virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-VduVirtualstorage-template.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-VduVirtualstorage-template.yml
new file mode 100644 (file)
index 0000000..f7415c7
--- /dev/null
@@ -0,0 +1,46 @@
+tosca_definitions_version: tosca_simple_yaml_1_1
+metadata:
+  invariantUUID: fabee67b-5538-453d-9dc0-41c5655c9105
+  UUID: e852ea2a-3a48-4521-8ef7-f12682c75e86
+  name: VDU VirtualStorage
+  description: VDU VirtualStorage
+  type: VFC
+  category: Generic
+  subcategory: Infrastructure
+  resourceVendor: ATT (Tosca)
+  resourceVendorRelease: 1.0.0.wd03
+  resourceVendorModelNumber: ''
+imports:
+- nodes:
+    file: nodes.yml
+- datatypes:
+    file: data.yml
+- capabilities:
+    file: capabilities.yml
+- relationships:
+    file: relationships.yml
+- groups:
+    file: groups.yml
+- policies:
+    file: policies.yml
+node_types:
+  tosca.nodes.nfv.VDU.VirtualStorage:
+    derived_from: tosca.nodes.Root
+    description: VDU VirtualStorage
+    properties:
+      id:
+        type: string
+      size_of_storage:
+        type: string
+      rdma_enabled:
+        type: boolean
+      type_of_storage:
+        type: string
+    capabilities:
+      virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-Vnfvirtuallinkdesc-template.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/resource-Vnfvirtuallinkdesc-template.yml
new file mode 100644 (file)
index 0000000..31cc3bf
--- /dev/null
@@ -0,0 +1,50 @@
+tosca_definitions_version: tosca_simple_yaml_1_1
+metadata:
+  invariantUUID: ffa0bcc5-7903-4332-adb9-3c44f577621e
+  UUID: ecb39b27-06c8-4337-9304-d6a88c8c0fae
+  name: VnfVirtualLinkDesc
+  description: VnfVirtualLinkDesc
+  type: VL
+  category: Generic
+  subcategory: Infrastructure
+  resourceVendor: ATT (Tosca)
+  resourceVendorRelease: 1.0.0.wd03
+  resourceVendorModelNumber: ''
+imports:
+- nodes:
+    file: nodes.yml
+- datatypes:
+    file: data.yml
+- capabilities:
+    file: capabilities.yml
+- relationships:
+    file: relationships.yml
+- groups:
+    file: groups.yml
+- policies:
+    file: policies.yml
+node_types:
+  tosca.nodes.nfv.VnfVirtualLinkDesc:
+    derived_from: tosca.nodes.Root
+    description: VnfVirtualLinkDesc
+    properties:
+      vl_flavours:
+        type: map
+        entry_schema:
+          type: tosca.datatypes.nfv.VlFlavour
+      description:
+        type: string
+      test_access:
+        type: list
+        entry_schema:
+          type: string
+      connectivity_type:
+        type: tosca.datatypes.nfv.ConnectivityType
+    capabilities:
+      virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/service-VimsV2-template-interface.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/service-VimsV2-template-interface.yml
new file mode 100644 (file)
index 0000000..80fb616
--- /dev/null
@@ -0,0 +1,2371 @@
+tosca_definitions_version: tosca_simple_yaml_1_1
+imports:
+- nodes:
+    file: nodes.yml
+- datatypes:
+    file: data.yml
+- capabilities:
+    file: capabilities.yml
+- relationships:
+    file: relationships.yml
+- groups:
+    file: groups.yml
+- policies:
+    file: policies.yml
+node_types:
+  org.openecomp.service.VimsV2:
+    derived_from: org.openecomp.resource.abstract.nodes.service
+    capabilities:
+      sbchuawei0.intranet2.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.scu_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.ccu_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.ccu.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      sbchuawei0.cmu.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      cscfnokia0.oam.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      sbchuawei0.hru.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      cscfnokia0.lb_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.bsu.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      cscfnokia0.oam.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      cscfnokia0.cscf.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.omu.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      sbchuawei0.bsu_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.hru.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.scu.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      cscfnokia0.oam_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.lbu.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.intranet2.virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.bsu.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      cscfnokia0.lb.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      sbchuawei0.ccu_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      oamnet.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.lb.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      cscfnokia0.cscf.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      sbchuawei0.scu_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.oam.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      sbchuawei0.lbu.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      sbchuawei0.omu.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.hru_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.lbcpd_diameter.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.vpu.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.bsu.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.lb.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      sbchuawei0.vpu.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      sbchuawei0.vpu.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.scu.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.lbu.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.cmu_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.hru.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      sbchuawei0.cmu_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.ccu.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      sbchuawei0.vpu_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.vpu.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      sbchuawei0.ccu.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.cmu.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.lbu_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.oam_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.ccu.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      sbchuawei0.lbu2signalnet2.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.lb_internal.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      servicenet.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.cmu.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.lbu.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      sbchuawei0.ccu_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.lbu_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.lbu_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.lb.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      sbchuawei0.omu_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.omu.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      cscfnokia0.lbcpd_om.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.oam.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.cmu.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      sbchuawei0.vpu.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      sbchuawei0.vpu.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.lbu.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      sbchuawei0.bsu_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.lb.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.scu.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      cscfnokia0.lb_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.scu.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      cscfnokia0.oamcpd_om.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.oam_internal.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.ccu.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      sbchuawei0.upiru_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.omu.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.bsu_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.oam.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.lbu.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      sbchuawei0.hru.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.omu_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      servicenet.virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.hru_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.cscf_internal.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.cscf.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      sbchuawei0.ccu.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.lb.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      sbchuawei0.lbu2signalnet1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.cmu.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      sbchuawei0.lbu_vducpd_intra2.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.bsu.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.bsu.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      sbchuawei0.cmu_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.scu.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.cmu.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      cscfnokia0.cscf.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.cscf.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      sbchuawei0.lbu.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.oam.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      sbchuawei0.vpu.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      sbchuawei0.omu2managenet.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.scu.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.lbu.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.cmu.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.internal.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.scu.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.hru.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.oam.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      sbchuawei0.omu_vducpd_intra1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.hru.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.hru2medianet1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.bsu.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.omu.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.hru2medianet2.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.hru_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.ccu.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.lbcpd_sip.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.scu_storage.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.omu.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.cscf.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      sbchuawei0.hru.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      sbchuawei0.upiru_vducpd_intra2.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.cscf.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.lb.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.bsu.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      sbchuawei0.bsu.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      sbchuawei0.intranet1.virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.vpu_storage.virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.omu.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      cscfnokia0.cscf.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.hru.virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          virtual_memory:
+            type: tosca.datatypes.nfv.VirtualMemory
+            required: true
+          requested_additional_capabilities:
+            type: map
+            required: false
+            entry_schema:
+              type: tosca.datatypes.nfv.RequestedAdditionalCapability
+          virtual_cpu:
+            type: tosca.datatypes.nfv.VirtualCpu
+            required: true
+      sbchuawei0.hru.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      sbchuawei0.cmu.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      cscfnokia0.cscf.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      sbchuawei0.scu.endpoint:
+        type: tosca.capabilities.Endpoint.Admin
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          secure:
+            type: boolean
+            default: true
+            required: false
+      cscfnokia0.oam.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.omu.scalable:
+        type: tosca.capabilities.Scalable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          max_instances:
+            type: integer
+            default: 1
+            required: false
+          min_instances:
+            type: integer
+            default: 1
+            required: false
+          default_instances:
+            type: integer
+            required: false
+      sbchuawei0.ccu.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.vpu.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      sbchuawei0.omu.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      sbchuawei0.bsu.monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.internal.virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.lbu.os:
+        type: tosca.capabilities.OperatingSystem
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          distribution:
+            type: string
+            required: false
+          type:
+            type: string
+            required: false
+          version:
+            type: version
+            required: false
+          architecture:
+            type: string
+            required: false
+      oamnet.virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.hru_vducpd_intra2.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.lb.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.oam.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.vpu.binding:
+        type: tosca.capabilities.network.Bindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.scu.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      sbchuawei0.ccu.host:
+        type: tosca.capabilities.Container
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+        properties:
+          num_cpus:
+            type: integer
+            required: false
+          disk_size:
+            type: scalar-unit.size
+            required: false
+          cpu_frequency:
+            type: scalar-unit.frequency
+            required: false
+          mem_size:
+            type: scalar-unit.size
+            required: false
+      sbchuawei0.cmu.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      sbchuawei0.intranet1.feature:
+        type: tosca.capabilities.Node
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+      cscfnokia0.lb.virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences:
+        - 1
+        - UNBOUNDED
+        valid_source_types: [
+          ]
+    requirements:
+    - sbchuawei0.scu_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.vpu.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.cmu_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.hru_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.omu_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.bsu.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.intranet1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.hru_vducpd_intra2.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.vpu_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.lbu.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.hru_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.intranet2.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.scu_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.upiru_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.upiru_vducpd_intra2.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.cmu.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.bsu_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.omu2managenet.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.ccu.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.omu_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.lbu_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.ccu_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.cmu_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.omu.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.scu.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.bsu_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.lbu2signalnet1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.hru.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.lbu_vducpd_intra1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.lbu2signalnet2.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.ccu_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.lbu_vducpd_intra2.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.hru2medianet1.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.hru2medianet2.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cscfnokia0.cscf.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cscfnokia0.oam_internal.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cscfnokia0.cscf_internal.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cscfnokia0.internal.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cscfnokia0.lb_internal.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cscfnokia0.lbcpd_om.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cscfnokia0.lbcpd_diameter.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cscfnokia0.oam.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cscfnokia0.oamcpd_om.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cscfnokia0.lb_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cscfnokia0.lb.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cscfnokia0.lbcpd_sip.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - cscfnokia0.oam_storage.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - servicenet.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - oamnet.dependency:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Node
+        node: tosca.nodes.Root
+        relationship: tosca.relationships.DependsOn
+    - sbchuawei0.vpu.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - sbchuawei0.bsu.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - sbchuawei0.lbu.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - sbchuawei0.cmu.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - sbchuawei0.ccu.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - sbchuawei0.omu.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - sbchuawei0.scu.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - sbchuawei0.hru.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - cscfnokia0.cscf.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - cscfnokia0.oam.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - cscfnokia0.lb.virtual_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualStorage
+    - sbchuawei0.hru_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.omu_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.hru_vducpd_intra2.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.scu_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.upiru_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.upiru_vducpd_intra2.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.omu2managenet.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.ccu_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.cmu_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.bsu_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.lbu2signalnet1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.lbu_vducpd_intra1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.lbu2signalnet2.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.lbu_vducpd_intra2.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.hru2medianet1.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.hru2medianet2.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - cscfnokia0.oam_internal.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - cscfnokia0.cscf_internal.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - cscfnokia0.lb_internal.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - cscfnokia0.lbcpd_om.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - cscfnokia0.lbcpd_diameter.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - cscfnokia0.oamcpd_om.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - cscfnokia0.lbcpd_sip.virtual_link:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualLinkable
+    - sbchuawei0.vpu.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - sbchuawei0.bsu.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - sbchuawei0.lbu.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - sbchuawei0.cmu.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - sbchuawei0.ccu.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - sbchuawei0.omu.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - sbchuawei0.scu.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - sbchuawei0.hru.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - cscfnokia0.cscf.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - cscfnokia0.oam.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - cscfnokia0.lb.local_storage:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.Attachment
+    - sbchuawei0.hru_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - sbchuawei0.omu_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - sbchuawei0.hru_vducpd_intra2.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - sbchuawei0.scu_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - sbchuawei0.upiru_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - sbchuawei0.upiru_vducpd_intra2.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - sbchuawei0.omu2managenet.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - sbchuawei0.ccu_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - sbchuawei0.cmu_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - sbchuawei0.bsu_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - sbchuawei0.lbu2signalnet1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - sbchuawei0.lbu_vducpd_intra1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - sbchuawei0.lbu2signalnet2.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - sbchuawei0.lbu_vducpd_intra2.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - sbchuawei0.hru2medianet1.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - sbchuawei0.hru2medianet2.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - cscfnokia0.oam_internal.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - cscfnokia0.cscf_internal.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - cscfnokia0.lb_internal.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - cscfnokia0.lbcpd_om.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - cscfnokia0.lbcpd_diameter.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - cscfnokia0.oamcpd_om.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
+    - cscfnokia0.lbcpd_sip.virtual_binding:
+        occurrences:
+        - 0
+        - UNBOUNDED
+        capability: tosca.capabilities.nfv.VirtualBindable
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/service-VimsV2-template.yml b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/Definitions/service-VimsV2-template.yml
new file mode 100644 (file)
index 0000000..e9ad518
--- /dev/null
@@ -0,0 +1,1099 @@
+tosca_definitions_version: tosca_simple_yaml_1_1
+metadata:
+  invariantUUID: 19943f91-1dc1-4a8b-85bf-40a762f4803a
+  UUID: 3933006e-e87b-4a64-aedb-6358fcd67f0d
+  name: vIMS_v2
+  description: vIMS v2
+  type: Service
+  category: Network Service
+  serviceType: ''
+  serviceRole: ''
+  serviceEcompNaming: true
+  ecompGeneratedNaming: true
+  namingPolicy: ''
+  environmentContext: General_Revenue-Bearing
+imports:
+- nodes:
+    file: nodes.yml
+- datatypes:
+    file: data.yml
+- capabilities:
+    file: capabilities.yml
+- relationships:
+    file: relationships.yml
+- groups:
+    file: groups.yml
+- policies:
+    file: policies.yml
+- service-vIMS_v2-interface:
+    file: service-VimsV2-template-interface.yml
+- resource-ext ZTE VL:
+    file: resource-ExtZteVl-template.yml
+- resource-SBC Huawei:
+    file: resource-SbcHuawei-template.yml
+- resource-SBC Huawei-interface:
+    file: resource-SbcHuawei-template-interface.yml
+- resource-CSCF Nokia:
+    file: resource-CscfNokia-template.yml
+- resource-CSCF Nokia-interface:
+    file: resource-CscfNokia-template-interface.yml
+topology_template:
+  node_templates:
+    SBC Huawei 0:
+      type: org.openecomp.resource.vf.SbcHuawei
+      metadata:
+        invariantUUID: 459372a6-51a2-4f35-8193-b11ca47c2a24
+        UUID: 4563686a-a63a-457d-8232-a3d07b314028
+        customizationUUID: d0f6a032-c865-4c5f-957c-db72c5957b37
+        version: '1.0'
+        name: SBC Huawei
+        description: SBC Huawei
+        type: VF
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: onap
+        resourceVendorRelease: '1.0'
+        resourceVendorModelNumber: ''
+      properties:
+        nf_naming:
+          ecomp_generated_naming: true
+        multi_stage_design: false
+        availability_zone_max_count: 1
+        nf_type: huaweivnfmdriver
+      requirements:
+      - hru2medianet1.virtual_link:
+          capability: virtual_linkable
+          node: ServiceNet
+      - omu2managenet.virtual_link:
+          capability: virtual_linkable
+          node: OamNet
+      capabilities:
+        lbu.virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 24G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 4
+        ccu.virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 16G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 2
+        lbu.endpoint:
+          properties:
+            secure: true
+        bsu.virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 8G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 1
+        omu.endpoint:
+          properties:
+            secure: true
+        vpu.virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 8G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 5
+        hru.virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 12G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 3
+        ccu.endpoint:
+          properties:
+            secure: true
+        vpu.scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        hru.scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        cmu.endpoint:
+          properties:
+            secure: true
+        scu.scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        bsu.scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        lbu.scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        scu.virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 24G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 2
+        omu.virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 16G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 4
+        omu.scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        ccu.scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        cmu.virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 8G
+            requested_additional_capabilities: {
+              }
+            virtual_cpu:
+              num_virtual_cpu: 1
+        scu.endpoint:
+          properties:
+            secure: true
+        vpu.endpoint:
+          properties:
+            secure: true
+        cmu.scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        hru.endpoint:
+          properties:
+            secure: true
+        bsu.endpoint:
+          properties:
+            secure: true
+    CSCF Nokia 0:
+      type: org.openecomp.resource.vf.CscfNokia
+      metadata:
+        invariantUUID: 2ed01e73-2a23-4717-a7fe-8d067ff6bb87
+        UUID: 8612efa5-9df9-43ef-8e76-5a3cca97a15e
+        customizationUUID: b3cf8a5a-7fe9-435a-ab8e-d413f88a2f32
+        version: '1.0'
+        name: CSCF Nokia
+        description: CSCF Nokia
+        type: VF
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: onap
+        resourceVendorRelease: '1.0'
+        resourceVendorModelNumber: ''
+      properties:
+        nf_naming:
+          ecomp_generated_naming: true
+        multi_stage_design: false
+        availability_zone_max_count: 1
+        nf_type: NokiaSVNFM
+      requirements:
+      - lbcpd_om.virtual_link:
+          capability: virtual_linkable
+          node: OamNet
+      - lbcpd_sip.virtual_link:
+          capability: virtual_linkable
+          node: ServiceNet
+      capabilities:
+        cscf.endpoint:
+          properties:
+            secure: true
+        lb.virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 32G
+            virtual_cpu:
+              num_virtual_cpu: 12
+        oam.virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 32G
+            virtual_cpu:
+              num_virtual_cpu: 4
+        lb.endpoint:
+          properties:
+            secure: true
+        lb.scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        cscf.virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 24G
+            virtual_cpu:
+              num_virtual_cpu: 8
+        oam.scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+        oam.endpoint:
+          properties:
+            secure: true
+        cscf.scalable:
+          properties:
+            max_instances: 1
+            min_instances: 1
+    OamNet:
+      type: tosca.nodes.nfv.ext.zte.VL
+      metadata:
+        invariantUUID: d0d43bd0-4088-4b1c-9ac1-c6303d9f923a
+        UUID: 0f93d9d8-a815-4da9-820f-6cc77f670623
+        customizationUUID: 4de4666a-a6bc-4a80-b1b9-f80014b4a847
+        version: '2.0'
+        name: ext ZTE VL
+        description: Ext ZTE VL
+        type: VL
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+    ServiceNet:
+      type: tosca.nodes.nfv.ext.zte.VL
+      metadata:
+        invariantUUID: d0d43bd0-4088-4b1c-9ac1-c6303d9f923a
+        UUID: 0f93d9d8-a815-4da9-820f-6cc77f670623
+        customizationUUID: 0705b47f-ad55-4a25-be6d-d90748acb4dd
+        version: '2.0'
+        name: ext ZTE VL
+        description: Ext ZTE VL
+        type: VL
+        category: Generic
+        subcategory: Network Elements
+        resourceVendor: ATT (Tosca)
+        resourceVendorRelease: 1.0.0.wd03
+        resourceVendorModelNumber: ''
+  substitution_mappings:
+    node_type: org.openecomp.service.VimsV2
+    capabilities:
+      sbchuawei0.intranet2.feature:
+      - sbchuawei0
+      - intranet2.feature
+      sbchuawei0.scu_storage.virtual_storage:
+      - sbchuawei0
+      - scu_storage.virtual_storage
+      sbchuawei0.ccu_storage.virtual_storage:
+      - sbchuawei0
+      - ccu_storage.virtual_storage
+      sbchuawei0.ccu.endpoint:
+      - sbchuawei0
+      - ccu.endpoint
+      sbchuawei0.cmu.virtual_compute:
+      - sbchuawei0
+      - cmu.virtual_compute
+      cscfnokia0.oam.endpoint:
+      - cscfnokia0
+      - oam.endpoint
+      sbchuawei0.hru.scalable:
+      - sbchuawei0
+      - hru.scalable
+      cscfnokia0.lb_storage.virtual_storage:
+      - cscfnokia0
+      - lb_storage.virtual_storage
+      sbchuawei0.bsu.endpoint:
+      - sbchuawei0
+      - bsu.endpoint
+      cscfnokia0.oam.host:
+      - cscfnokia0
+      - oam.host
+      cscfnokia0.cscf.binding:
+      - cscfnokia0
+      - cscf.binding
+      sbchuawei0.omu.virtual_compute:
+      - sbchuawei0
+      - omu.virtual_compute
+      sbchuawei0.bsu_storage.virtual_storage:
+      - sbchuawei0
+      - bsu_storage.virtual_storage
+      sbchuawei0.hru.monitoring_parameter:
+      - sbchuawei0
+      - hru.monitoring_parameter
+      sbchuawei0.scu.virtual_compute:
+      - sbchuawei0
+      - scu.virtual_compute
+      cscfnokia0.oam_storage.feature:
+      - cscfnokia0
+      - oam_storage.feature
+      sbchuawei0.lbu.virtual_binding:
+      - sbchuawei0
+      - lbu.virtual_binding
+      sbchuawei0.intranet2.virtual_linkable:
+      - sbchuawei0
+      - intranet2.virtual_linkable
+      sbchuawei0.bsu.os:
+      - sbchuawei0
+      - bsu.os
+      cscfnokia0.lb.endpoint:
+      - cscfnokia0
+      - lb.endpoint
+      sbchuawei0.ccu_vducpd_intra1.feature:
+      - sbchuawei0
+      - ccu_vducpd_intra1.feature
+      oamnet.feature:
+      - oamnet
+      - feature
+      cscfnokia0.lb.virtual_compute:
+      - cscfnokia0
+      - lb.virtual_compute
+      cscfnokia0.cscf.os:
+      - cscfnokia0
+      - cscf.os
+      sbchuawei0.scu_vducpd_intra1.feature:
+      - sbchuawei0
+      - scu_vducpd_intra1.feature
+      cscfnokia0.oam.os:
+      - cscfnokia0
+      - oam.os
+      sbchuawei0.lbu.endpoint:
+      - sbchuawei0
+      - lbu.endpoint
+      sbchuawei0.omu.binding:
+      - sbchuawei0
+      - omu.binding
+      sbchuawei0.hru_vducpd_intra1.feature:
+      - sbchuawei0
+      - hru_vducpd_intra1.feature
+      cscfnokia0.lbcpd_diameter.feature:
+      - cscfnokia0
+      - lbcpd_diameter.feature
+      sbchuawei0.vpu.monitoring_parameter:
+      - sbchuawei0
+      - vpu.monitoring_parameter
+      sbchuawei0.bsu.binding:
+      - sbchuawei0
+      - bsu.binding
+      cscfnokia0.lb.host:
+      - cscfnokia0
+      - lb.host
+      sbchuawei0.vpu.scalable:
+      - sbchuawei0
+      - vpu.scalable
+      sbchuawei0.vpu.virtual_binding:
+      - sbchuawei0
+      - vpu.virtual_binding
+      sbchuawei0.scu.virtual_binding:
+      - sbchuawei0
+      - scu.virtual_binding
+      sbchuawei0.lbu.feature:
+      - sbchuawei0
+      - lbu.feature
+      sbchuawei0.cmu_vducpd_intra1.feature:
+      - sbchuawei0
+      - cmu_vducpd_intra1.feature
+      sbchuawei0.hru.os:
+      - sbchuawei0
+      - hru.os
+      sbchuawei0.cmu_storage.virtual_storage:
+      - sbchuawei0
+      - cmu_storage.virtual_storage
+      sbchuawei0.ccu.scalable:
+      - sbchuawei0
+      - ccu.scalable
+      sbchuawei0.vpu_storage.feature:
+      - sbchuawei0
+      - vpu_storage.feature
+      sbchuawei0.vpu.virtual_compute:
+      - sbchuawei0
+      - vpu.virtual_compute
+      sbchuawei0.ccu.virtual_binding:
+      - sbchuawei0
+      - ccu.virtual_binding
+      sbchuawei0.cmu.binding:
+      - sbchuawei0
+      - cmu.binding
+      sbchuawei0.lbu_vducpd_intra1.feature:
+      - sbchuawei0
+      - lbu_vducpd_intra1.feature
+      cscfnokia0.oam_storage.virtual_storage:
+      - cscfnokia0
+      - oam_storage.virtual_storage
+      sbchuawei0.ccu.os:
+      - sbchuawei0
+      - ccu.os
+      sbchuawei0.lbu2signalnet2.feature:
+      - sbchuawei0
+      - lbu2signalnet2.feature
+      cscfnokia0.lb_internal.feature:
+      - cscfnokia0
+      - lb_internal.feature
+      servicenet.feature:
+      - servicenet
+      - feature
+      sbchuawei0.cmu.virtual_binding:
+      - sbchuawei0
+      - cmu.virtual_binding
+      sbchuawei0.lbu.scalable:
+      - sbchuawei0
+      - lbu.scalable
+      sbchuawei0.ccu_storage.feature:
+      - sbchuawei0
+      - ccu_storage.feature
+      sbchuawei0.lbu_storage.virtual_storage:
+      - sbchuawei0
+      - lbu_storage.virtual_storage
+      sbchuawei0.lbu_storage.feature:
+      - sbchuawei0
+      - lbu_storage.feature
+      cscfnokia0.lb.scalable:
+      - cscfnokia0
+      - lb.scalable
+      sbchuawei0.omu_storage.virtual_storage:
+      - sbchuawei0
+      - omu_storage.virtual_storage
+      sbchuawei0.omu.host:
+      - sbchuawei0
+      - omu.host
+      cscfnokia0.lbcpd_om.feature:
+      - cscfnokia0
+      - lbcpd_om.feature
+      cscfnokia0.oam.binding:
+      - cscfnokia0
+      - oam.binding
+      sbchuawei0.cmu.host:
+      - sbchuawei0
+      - cmu.host
+      sbchuawei0.vpu.endpoint:
+      - sbchuawei0
+      - vpu.endpoint
+      sbchuawei0.vpu.feature:
+      - sbchuawei0
+      - vpu.feature
+      sbchuawei0.lbu.virtual_compute:
+      - sbchuawei0
+      - lbu.virtual_compute
+      sbchuawei0.bsu_vducpd_intra1.feature:
+      - sbchuawei0
+      - bsu_vducpd_intra1.feature
+      cscfnokia0.lb.binding:
+      - cscfnokia0
+      - lb.binding
+      sbchuawei0.scu.scalable:
+      - sbchuawei0
+      - scu.scalable
+      cscfnokia0.lb_storage.feature:
+      - cscfnokia0
+      - lb_storage.feature
+      sbchuawei0.scu.os:
+      - sbchuawei0
+      - scu.os
+      cscfnokia0.oamcpd_om.feature:
+      - cscfnokia0
+      - oamcpd_om.feature
+      cscfnokia0.oam_internal.feature:
+      - cscfnokia0
+      - oam_internal.feature
+      sbchuawei0.ccu.virtual_compute:
+      - sbchuawei0
+      - ccu.virtual_compute
+      sbchuawei0.upiru_vducpd_intra1.feature:
+      - sbchuawei0
+      - upiru_vducpd_intra1.feature
+      sbchuawei0.omu.virtual_binding:
+      - sbchuawei0
+      - omu.virtual_binding
+      sbchuawei0.bsu_storage.feature:
+      - sbchuawei0
+      - bsu_storage.feature
+      cscfnokia0.oam.monitoring_parameter:
+      - cscfnokia0
+      - oam.monitoring_parameter
+      sbchuawei0.lbu.host:
+      - sbchuawei0
+      - lbu.host
+      sbchuawei0.hru.virtual_binding:
+      - sbchuawei0
+      - hru.virtual_binding
+      sbchuawei0.omu_storage.feature:
+      - sbchuawei0
+      - omu_storage.feature
+      servicenet.virtual_linkable:
+      - servicenet
+      - virtual_linkable
+      sbchuawei0.hru_storage.feature:
+      - sbchuawei0
+      - hru_storage.feature
+      cscfnokia0.cscf_internal.feature:
+      - cscfnokia0
+      - cscf_internal.feature
+      cscfnokia0.cscf.host:
+      - cscfnokia0
+      - cscf.host
+      sbchuawei0.ccu.binding:
+      - sbchuawei0
+      - ccu.binding
+      cscfnokia0.lb.os:
+      - cscfnokia0
+      - lb.os
+      sbchuawei0.lbu2signalnet1.feature:
+      - sbchuawei0
+      - lbu2signalnet1.feature
+      sbchuawei0.cmu.os:
+      - sbchuawei0
+      - cmu.os
+      sbchuawei0.lbu_vducpd_intra2.feature:
+      - sbchuawei0
+      - lbu_vducpd_intra2.feature
+      sbchuawei0.bsu.feature:
+      - sbchuawei0
+      - bsu.feature
+      sbchuawei0.bsu.host:
+      - sbchuawei0
+      - bsu.host
+      sbchuawei0.cmu_storage.feature:
+      - sbchuawei0
+      - cmu_storage.feature
+      sbchuawei0.scu.monitoring_parameter:
+      - sbchuawei0
+      - scu.monitoring_parameter
+      sbchuawei0.cmu.endpoint:
+      - sbchuawei0
+      - cmu.endpoint
+      cscfnokia0.cscf.feature:
+      - cscfnokia0
+      - cscf.feature
+      cscfnokia0.cscf.scalable:
+      - cscfnokia0
+      - cscf.scalable
+      sbchuawei0.lbu.binding:
+      - sbchuawei0
+      - lbu.binding
+      cscfnokia0.oam.scalable:
+      - cscfnokia0
+      - oam.scalable
+      sbchuawei0.vpu.host:
+      - sbchuawei0
+      - vpu.host
+      sbchuawei0.omu2managenet.feature:
+      - sbchuawei0
+      - omu2managenet.feature
+      sbchuawei0.scu.feature:
+      - sbchuawei0
+      - scu.feature
+      sbchuawei0.lbu.monitoring_parameter:
+      - sbchuawei0
+      - lbu.monitoring_parameter
+      sbchuawei0.cmu.monitoring_parameter:
+      - sbchuawei0
+      - cmu.monitoring_parameter
+      cscfnokia0.internal.feature:
+      - cscfnokia0
+      - internal.feature
+      sbchuawei0.scu.binding:
+      - sbchuawei0
+      - scu.binding
+      sbchuawei0.hru.binding:
+      - sbchuawei0
+      - hru.binding
+      cscfnokia0.oam.virtual_compute:
+      - cscfnokia0
+      - oam.virtual_compute
+      sbchuawei0.omu_vducpd_intra1.feature:
+      - sbchuawei0
+      - omu_vducpd_intra1.feature
+      sbchuawei0.hru.feature:
+      - sbchuawei0
+      - hru.feature
+      sbchuawei0.hru2medianet1.feature:
+      - sbchuawei0
+      - hru2medianet1.feature
+      sbchuawei0.bsu.virtual_binding:
+      - sbchuawei0
+      - bsu.virtual_binding
+      sbchuawei0.omu.feature:
+      - sbchuawei0
+      - omu.feature
+      sbchuawei0.hru2medianet2.feature:
+      - sbchuawei0
+      - hru2medianet2.feature
+      sbchuawei0.hru_storage.virtual_storage:
+      - sbchuawei0
+      - hru_storage.virtual_storage
+      sbchuawei0.ccu.monitoring_parameter:
+      - sbchuawei0
+      - ccu.monitoring_parameter
+      cscfnokia0.lbcpd_sip.feature:
+      - cscfnokia0
+      - lbcpd_sip.feature
+      sbchuawei0.scu_storage.feature:
+      - sbchuawei0
+      - scu_storage.feature
+      sbchuawei0.omu.monitoring_parameter:
+      - sbchuawei0
+      - omu.monitoring_parameter
+      cscfnokia0.cscf.virtual_compute:
+      - cscfnokia0
+      - cscf.virtual_compute
+      sbchuawei0.hru.host:
+      - sbchuawei0
+      - hru.host
+      sbchuawei0.upiru_vducpd_intra2.feature:
+      - sbchuawei0
+      - upiru_vducpd_intra2.feature
+      cscfnokia0.cscf.monitoring_parameter:
+      - cscfnokia0
+      - cscf.monitoring_parameter
+      cscfnokia0.lb.monitoring_parameter:
+      - cscfnokia0
+      - lb.monitoring_parameter
+      sbchuawei0.bsu.virtual_compute:
+      - sbchuawei0
+      - bsu.virtual_compute
+      sbchuawei0.bsu.scalable:
+      - sbchuawei0
+      - bsu.scalable
+      sbchuawei0.intranet1.virtual_linkable:
+      - sbchuawei0
+      - intranet1.virtual_linkable
+      sbchuawei0.vpu_storage.virtual_storage:
+      - sbchuawei0
+      - vpu_storage.virtual_storage
+      sbchuawei0.omu.endpoint:
+      - sbchuawei0
+      - omu.endpoint
+      cscfnokia0.cscf.virtual_binding:
+      - cscfnokia0
+      - cscf.virtual_binding
+      sbchuawei0.hru.virtual_compute:
+      - sbchuawei0
+      - hru.virtual_compute
+      sbchuawei0.hru.endpoint:
+      - sbchuawei0
+      - hru.endpoint
+      sbchuawei0.cmu.scalable:
+      - sbchuawei0
+      - cmu.scalable
+      cscfnokia0.cscf.endpoint:
+      - cscfnokia0
+      - cscf.endpoint
+      sbchuawei0.scu.endpoint:
+      - sbchuawei0
+      - scu.endpoint
+      cscfnokia0.oam.feature:
+      - cscfnokia0
+      - oam.feature
+      sbchuawei0.omu.scalable:
+      - sbchuawei0
+      - omu.scalable
+      sbchuawei0.ccu.feature:
+      - sbchuawei0
+      - ccu.feature
+      sbchuawei0.vpu.os:
+      - sbchuawei0
+      - vpu.os
+      sbchuawei0.omu.os:
+      - sbchuawei0
+      - omu.os
+      sbchuawei0.bsu.monitoring_parameter:
+      - sbchuawei0
+      - bsu.monitoring_parameter
+      cscfnokia0.internal.virtual_linkable:
+      - cscfnokia0
+      - internal.virtual_linkable
+      sbchuawei0.lbu.os:
+      - sbchuawei0
+      - lbu.os
+      oamnet.virtual_linkable:
+      - oamnet
+      - virtual_linkable
+      sbchuawei0.hru_vducpd_intra2.feature:
+      - sbchuawei0
+      - hru_vducpd_intra2.feature
+      cscfnokia0.lb.feature:
+      - cscfnokia0
+      - lb.feature
+      cscfnokia0.oam.virtual_binding:
+      - cscfnokia0
+      - oam.virtual_binding
+      sbchuawei0.vpu.binding:
+      - sbchuawei0
+      - vpu.binding
+      sbchuawei0.scu.host:
+      - sbchuawei0
+      - scu.host
+      sbchuawei0.ccu.host:
+      - sbchuawei0
+      - ccu.host
+      sbchuawei0.cmu.feature:
+      - sbchuawei0
+      - cmu.feature
+      sbchuawei0.intranet1.feature:
+      - sbchuawei0
+      - intranet1.feature
+      cscfnokia0.lb.virtual_binding:
+      - cscfnokia0
+      - lb.virtual_binding
+    requirements:
+      sbchuawei0.bsu.local_storage:
+      - sbchuawei0
+      - bsu.local_storage
+      sbchuawei0.omu_vducpd_intra1.dependency:
+      - sbchuawei0
+      - omu_vducpd_intra1.dependency
+      sbchuawei0.lbu2signalnet1.virtual_link:
+      - sbchuawei0
+      - lbu2signalnet1.virtual_link
+      sbchuawei0.omu_storage.dependency:
+      - sbchuawei0
+      - omu_storage.dependency
+      sbchuawei0.hru2medianet2.dependency:
+      - sbchuawei0
+      - hru2medianet2.dependency
+      sbchuawei0.hru_vducpd_intra2.dependency:
+      - sbchuawei0
+      - hru_vducpd_intra2.dependency
+      sbchuawei0.omu2managenet.dependency:
+      - sbchuawei0
+      - omu2managenet.dependency
+      sbchuawei0.omu_vducpd_intra1.virtual_link:
+      - sbchuawei0
+      - omu_vducpd_intra1.virtual_link
+      sbchuawei0.scu_vducpd_intra1.virtual_link:
+      - sbchuawei0
+      - scu_vducpd_intra1.virtual_link
+      sbchuawei0.scu.local_storage:
+      - sbchuawei0
+      - scu.local_storage
+      sbchuawei0.hru_vducpd_intra1.virtual_binding:
+      - sbchuawei0
+      - hru_vducpd_intra1.virtual_binding
+      sbchuawei0.hru_storage.dependency:
+      - sbchuawei0
+      - hru_storage.dependency
+      sbchuawei0.upiru_vducpd_intra2.dependency:
+      - sbchuawei0
+      - upiru_vducpd_intra2.dependency
+      sbchuawei0.lbu2signalnet2.dependency:
+      - sbchuawei0
+      - lbu2signalnet2.dependency
+      cscfnokia0.lb_internal.virtual_binding:
+      - cscfnokia0
+      - lb_internal.virtual_binding
+      cscfnokia0.oam_internal.dependency:
+      - cscfnokia0
+      - oam_internal.dependency
+      sbchuawei0.lbu_vducpd_intra2.virtual_binding:
+      - sbchuawei0
+      - lbu_vducpd_intra2.virtual_binding
+      sbchuawei0.lbu_vducpd_intra1.virtual_link:
+      - sbchuawei0
+      - lbu_vducpd_intra1.virtual_link
+      sbchuawei0.lbu_vducpd_intra2.virtual_link:
+      - sbchuawei0
+      - lbu_vducpd_intra2.virtual_link
+      sbchuawei0.bsu_vducpd_intra1.virtual_link:
+      - sbchuawei0
+      - bsu_vducpd_intra1.virtual_link
+      sbchuawei0.lbu.virtual_storage:
+      - sbchuawei0
+      - lbu.virtual_storage
+      sbchuawei0.bsu.dependency:
+      - sbchuawei0
+      - bsu.dependency
+      cscfnokia0.lbcpd_om.virtual_link:
+      - cscfnokia0
+      - lbcpd_om.virtual_link
+      sbchuawei0.omu_vducpd_intra1.virtual_binding:
+      - sbchuawei0
+      - omu_vducpd_intra1.virtual_binding
+      cscfnokia0.oamcpd_om.dependency:
+      - cscfnokia0
+      - oamcpd_om.dependency
+      cscfnokia0.oam_storage.dependency:
+      - cscfnokia0
+      - oam_storage.dependency
+      cscfnokia0.lbcpd_om.virtual_binding:
+      - cscfnokia0
+      - lbcpd_om.virtual_binding
+      sbchuawei0.omu.virtual_storage:
+      - sbchuawei0
+      - omu.virtual_storage
+      sbchuawei0.scu.dependency:
+      - sbchuawei0
+      - scu.dependency
+      sbchuawei0.bsu_vducpd_intra1.virtual_binding:
+      - sbchuawei0
+      - bsu_vducpd_intra1.virtual_binding
+      sbchuawei0.hru.local_storage:
+      - sbchuawei0
+      - hru.local_storage
+      sbchuawei0.cmu.virtual_storage:
+      - sbchuawei0
+      - cmu.virtual_storage
+      sbchuawei0.lbu2signalnet2.virtual_link:
+      - sbchuawei0
+      - lbu2signalnet2.virtual_link
+      sbchuawei0.hru2medianet1.virtual_link:
+      - sbchuawei0
+      - hru2medianet1.virtual_link
+      cscfnokia0.lb_internal.dependency:
+      - cscfnokia0
+      - lb_internal.dependency
+      servicenet.dependency:
+      - servicenet
+      - dependency
+      cscfnokia0.cscf_internal.virtual_link:
+      - cscfnokia0
+      - cscf_internal.virtual_link
+      sbchuawei0.hru2medianet1.virtual_binding:
+      - sbchuawei0
+      - hru2medianet1.virtual_binding
+      sbchuawei0.scu.virtual_storage:
+      - sbchuawei0
+      - scu.virtual_storage
+      sbchuawei0.bsu_vducpd_intra1.dependency:
+      - sbchuawei0
+      - bsu_vducpd_intra1.dependency
+      cscfnokia0.oam.local_storage:
+      - cscfnokia0
+      - oam.local_storage
+      sbchuawei0.bsu_storage.dependency:
+      - sbchuawei0
+      - bsu_storage.dependency
+      sbchuawei0.ccu_vducpd_intra1.virtual_binding:
+      - sbchuawei0
+      - ccu_vducpd_intra1.virtual_binding
+      sbchuawei0.ccu.dependency:
+      - sbchuawei0
+      - ccu.dependency
+      sbchuawei0.hru2medianet1.dependency:
+      - sbchuawei0
+      - hru2medianet1.dependency
+      sbchuawei0.scu_vducpd_intra1.dependency:
+      - sbchuawei0
+      - scu_vducpd_intra1.dependency
+      sbchuawei0.omu.dependency:
+      - sbchuawei0
+      - omu.dependency
+      sbchuawei0.hru_vducpd_intra1.dependency:
+      - sbchuawei0
+      - hru_vducpd_intra1.dependency
+      sbchuawei0.ccu_vducpd_intra1.dependency:
+      - sbchuawei0
+      - ccu_vducpd_intra1.dependency
+      cscfnokia0.cscf.virtual_storage:
+      - cscfnokia0
+      - cscf.virtual_storage
+      sbchuawei0.ccu.local_storage:
+      - sbchuawei0
+      - ccu.local_storage
+      cscfnokia0.lbcpd_diameter.virtual_link:
+      - cscfnokia0
+      - lbcpd_diameter.virtual_link
+      cscfnokia0.lbcpd_diameter.virtual_binding:
+      - cscfnokia0
+      - lbcpd_diameter.virtual_binding
+      sbchuawei0.vpu.virtual_storage:
+      - sbchuawei0
+      - vpu.virtual_storage
+      cscfnokia0.oam_internal.virtual_link:
+      - cscfnokia0
+      - oam_internal.virtual_link
+      oamnet.dependency:
+      - oamnet
+      - dependency
+      cscfnokia0.cscf_internal.virtual_binding:
+      - cscfnokia0
+      - cscf_internal.virtual_binding
+      cscfnokia0.internal.dependency:
+      - cscfnokia0
+      - internal.dependency
+      sbchuawei0.cmu.local_storage:
+      - sbchuawei0
+      - cmu.local_storage
+      cscfnokia0.lbcpd_sip.virtual_binding:
+      - cscfnokia0
+      - lbcpd_sip.virtual_binding
+      cscfnokia0.lb_storage.dependency:
+      - cscfnokia0
+      - lb_storage.dependency
+      sbchuawei0.bsu.virtual_storage:
+      - sbchuawei0
+      - bsu.virtual_storage
+      sbchuawei0.omu2managenet.virtual_binding:
+      - sbchuawei0
+      - omu2managenet.virtual_binding
+      sbchuawei0.upiru_vducpd_intra2.virtual_link:
+      - sbchuawei0
+      - upiru_vducpd_intra2.virtual_link
+      cscfnokia0.lb.dependency:
+      - cscfnokia0
+      - lb.dependency
+      sbchuawei0.omu2managenet.virtual_link:
+      - sbchuawei0
+      - omu2managenet.virtual_link
+      sbchuawei0.lbu_vducpd_intra1.dependency:
+      - sbchuawei0
+      - lbu_vducpd_intra1.dependency
+      cscfnokia0.oamcpd_om.virtual_binding:
+      - cscfnokia0
+      - oamcpd_om.virtual_binding
+      sbchuawei0.lbu.dependency:
+      - sbchuawei0
+      - lbu.dependency
+      cscfnokia0.oamcpd_om.virtual_link:
+      - cscfnokia0
+      - oamcpd_om.virtual_link
+      sbchuawei0.hru.dependency:
+      - sbchuawei0
+      - hru.dependency
+      sbchuawei0.lbu2signalnet2.virtual_binding:
+      - sbchuawei0
+      - lbu2signalnet2.virtual_binding
+      sbchuawei0.scu_storage.dependency:
+      - sbchuawei0
+      - scu_storage.dependency
+      sbchuawei0.cmu.dependency:
+      - sbchuawei0
+      - cmu.dependency
+      sbchuawei0.hru_vducpd_intra1.virtual_link:
+      - sbchuawei0
+      - hru_vducpd_intra1.virtual_link
+      sbchuawei0.hru.virtual_storage:
+      - sbchuawei0
+      - hru.virtual_storage
+      cscfnokia0.lbcpd_sip.virtual_link:
+      - cscfnokia0
+      - lbcpd_sip.virtual_link
+      sbchuawei0.upiru_vducpd_intra1.dependency:
+      - sbchuawei0
+      - upiru_vducpd_intra1.dependency
+      sbchuawei0.cmu_vducpd_intra1.dependency:
+      - sbchuawei0
+      - cmu_vducpd_intra1.dependency
+      cscfnokia0.lbcpd_diameter.dependency:
+      - cscfnokia0
+      - lbcpd_diameter.dependency
+      sbchuawei0.ccu.virtual_storage:
+      - sbchuawei0
+      - ccu.virtual_storage
+      sbchuawei0.hru_vducpd_intra2.virtual_binding:
+      - sbchuawei0
+      - hru_vducpd_intra2.virtual_binding
+      cscfnokia0.lb.local_storage:
+      - cscfnokia0
+      - lb.local_storage
+      sbchuawei0.upiru_vducpd_intra1.virtual_binding:
+      - sbchuawei0
+      - upiru_vducpd_intra1.virtual_binding
+      cscfnokia0.oam.virtual_storage:
+      - cscfnokia0
+      - oam.virtual_storage
+      sbchuawei0.hru2medianet2.virtual_binding:
+      - sbchuawei0
+      - hru2medianet2.virtual_binding
+      sbchuawei0.lbu_storage.dependency:
+      - sbchuawei0
+      - lbu_storage.dependency
+      sbchuawei0.lbu.local_storage:
+      - sbchuawei0
+      - lbu.local_storage
+      sbchuawei0.lbu2signalnet1.virtual_binding:
+      - sbchuawei0
+      - lbu2signalnet1.virtual_binding
+      sbchuawei0.ccu_vducpd_intra1.virtual_link:
+      - sbchuawei0
+      - ccu_vducpd_intra1.virtual_link
+      sbchuawei0.intranet2.dependency:
+      - sbchuawei0
+      - intranet2.dependency
+      cscfnokia0.oam.dependency:
+      - cscfnokia0
+      - oam.dependency
+      sbchuawei0.lbu2signalnet1.dependency:
+      - sbchuawei0
+      - lbu2signalnet1.dependency
+      cscfnokia0.cscf.dependency:
+      - cscfnokia0
+      - cscf.dependency
+      sbchuawei0.lbu_vducpd_intra2.dependency:
+      - sbchuawei0
+      - lbu_vducpd_intra2.dependency
+      sbchuawei0.cmu_vducpd_intra1.virtual_link:
+      - sbchuawei0
+      - cmu_vducpd_intra1.virtual_link
+      sbchuawei0.upiru_vducpd_intra2.virtual_binding:
+      - sbchuawei0
+      - upiru_vducpd_intra2.virtual_binding
+      sbchuawei0.hru_vducpd_intra2.virtual_link:
+      - sbchuawei0
+      - hru_vducpd_intra2.virtual_link
+      sbchuawei0.upiru_vducpd_intra1.virtual_link:
+      - sbchuawei0
+      - upiru_vducpd_intra1.virtual_link
+      cscfnokia0.lb.virtual_storage:
+      - cscfnokia0
+      - lb.virtual_storage
+      sbchuawei0.hru2medianet2.virtual_link:
+      - sbchuawei0
+      - hru2medianet2.virtual_link
+      sbchuawei0.intranet1.dependency:
+      - sbchuawei0
+      - intranet1.dependency
+      sbchuawei0.cmu_vducpd_intra1.virtual_binding:
+      - sbchuawei0
+      - cmu_vducpd_intra1.virtual_binding
+      cscfnokia0.cscf_internal.dependency:
+      - cscfnokia0
+      - cscf_internal.dependency
+      sbchuawei0.scu_vducpd_intra1.virtual_binding:
+      - sbchuawei0
+      - scu_vducpd_intra1.virtual_binding
+      sbchuawei0.omu.local_storage:
+      - sbchuawei0
+      - omu.local_storage
+      sbchuawei0.vpu.local_storage:
+      - sbchuawei0
+      - vpu.local_storage
+      cscfnokia0.lbcpd_sip.dependency:
+      - cscfnokia0
+      - lbcpd_sip.dependency
+      cscfnokia0.lb_internal.virtual_link:
+      - cscfnokia0
+      - lb_internal.virtual_link
+      sbchuawei0.vpu_storage.dependency:
+      - sbchuawei0
+      - vpu_storage.dependency
+      sbchuawei0.lbu_vducpd_intra1.virtual_binding:
+      - sbchuawei0
+      - lbu_vducpd_intra1.virtual_binding
+      cscfnokia0.lbcpd_om.dependency:
+      - cscfnokia0
+      - lbcpd_om.dependency
+      sbchuawei0.vpu.dependency:
+      - sbchuawei0
+      - vpu.dependency
+      sbchuawei0.ccu_storage.dependency:
+      - sbchuawei0
+      - ccu_storage.dependency
+      cscfnokia0.oam_internal.virtual_binding:
+      - cscfnokia0
+      - oam_internal.virtual_binding
+      sbchuawei0.cmu_storage.dependency:
+      - sbchuawei0
+      - cmu_storage.dependency
+      cscfnokia0.cscf.local_storage:
+      - cscfnokia0
+      - cscf.local_storage
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/TOSCA-Metadata/TOSCA.meta b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..71ba636
--- /dev/null
@@ -0,0 +1,7 @@
+TOSCA-Meta-File-Version: 1.0
+CSAR-Version: 1.1
+Created-By: Carlos Santana
+Entry-Definitions: Definitions/service-VimsV2-template.yml
+
+Name: csar.meta
+Content-Type: text/plain
diff --git a/catalog/pub/utils/toscaparser/testdata/ns/service-vims/csar.meta b/catalog/pub/utils/toscaparser/testdata/ns/service-vims/csar.meta
new file mode 100644 (file)
index 0000000..9858cb6
--- /dev/null
@@ -0,0 +1,2 @@
+SDC-TOSCA-Meta-File-Version: 1.0
+SDC-TOSCA-Definitions-Version: 5.0
diff --git a/catalog/pub/utils/toscaparser/testdata/pnf/ran-du.csar b/catalog/pub/utils/toscaparser/testdata/pnf/ran-du.csar
deleted file mode 100644 (file)
index 45168a9..0000000
Binary files a/catalog/pub/utils/toscaparser/testdata/pnf/ran-du.csar and /dev/null differ
diff --git a/catalog/pub/utils/toscaparser/testdata/pnf/ran-du/TOSCA-Metadata/TOSCA.meta b/catalog/pub/utils/toscaparser/testdata/pnf/ran-du/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..24cb268
--- /dev/null
@@ -0,0 +1,4 @@
+TOSCA-Meta-File-Version: 1.0
+CSAR-Version: 1.1
+Created-By: ZTE
+Entry-Definitions: ran-du.yaml
diff --git a/catalog/pub/utils/toscaparser/testdata/pnf/ran-du/ran-du.yaml b/catalog/pub/utils/toscaparser/testdata/pnf/ran-du/ran-du.yaml
new file mode 100644 (file)
index 0000000..858602a
--- /dev/null
@@ -0,0 +1,65 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: RAN_DU
+  template_version: "1.0"
+  template_author: ZTE-0
+  descriptor_id: pnf_test_01
+description: RAN_DU
+
+imports:
+  - type_definition.yaml
+
+node_types:
+  onap.ran.du:
+    derived_from: tosca.nodes.nfv.PNF
+    properties:
+      descriptor_id:
+        type: string
+        required: true
+        default: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        required: true
+        default: ZTE
+      version:
+        type: string
+        required: true
+        default: v1.1.0
+      descriptor_invariant_id:
+        type: string
+        required: true
+        default: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
+      name:
+        type: string
+        required: true
+        default: ZTE-RAN-DU
+      function_description:
+        type: string
+        required: true
+        default: RAN DU
+      config_script:
+         type: string
+         required: false          
+
+topology_template:
+  substitution_mappings:
+    node_type: onap.ran.du
+    properties:
+      descriptor_id: 1
+      provider: ZTE
+      version: 1.1.0
+      descriptor_invariant_id: 1
+      name: 1
+      function_description: 1
+      config_data: "/artifacts/config_data.conf"
+      
+    requirements:
+      - virtual_link: [ extCp2Du, virtual_link ]
+      - virtual_link: [ extCp2Ru, virtual_link ]
+      
+  node_templates:
+    extCp2Ru:
+      type: tosca.nodes.nfv.PnfExtPort
+    extCp2CU:
+      type: tosca.nodes.nfv.PnfExtPort
+                 
diff --git a/catalog/pub/utils/toscaparser/testdata/pnf/ran-du/type_definition.yaml b/catalog/pub/utils/toscaparser/testdata/pnf/ran-du/type_definition.yaml
new file mode 100644 (file)
index 0000000..e3ade54
--- /dev/null
@@ -0,0 +1,251 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+capability_types: 
+  tosca.capabilities.nfv.VirtualLinkable:
+    derived_from: tosca.capabilities.Root
+
+data_types:
+  tosca.datatypes.nfv.ConnectivityType:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      layer_protocol:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]  
+      flow_pattern:
+        type: string
+        required: false
+        constraints: # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          - valid_values: [Line, Tree, Mesh]
+  
+  tosca.datatypes.nfv.VlProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        max_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        min_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        qos:
+           type: tosca.datatypes.nfv.Qos
+           required: false
+        initiationParameters: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: map
+           entry_schema:
+             type: string
+           required: false
+        cidr: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkName:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        startIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        endIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        gatewayIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        segmentationId:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: integer
+           required: false
+        physicalNetwork:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkType:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+           constraints:
+             - valid_values: [VLAN, VXLAN]
+        dhcpEnabled:  # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+        vlanTransparent:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+  
+  tosca.datatypes.nfv.Qos:
+    derived_from: tosca.datatypes.Root
+    properties:
+      latency:
+         type: integer #Number [ms]
+         required: true
+      packet_delay_variation:
+         type: integer #Number [ms]
+         required: true
+      packet_loss_ratio:
+         type: float
+         constraints:
+           - in_range: [ 0.0, 1.0 ]
+         required: false
+  
+  tosca.datatypes.nfv.ServiceAvailability:
+   derived_from: tosca.datatypes.Root
+   description: service availability
+   properties:
+     Level:
+       type: string
+       description: service availability levels
+       required: true
+       constraints:
+          - valid_values: [ Level1, Level2,Level3 ]
+          
+node_types:  
+  tosca.nodes.nfv.VNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id: 
+        type: string # GUID
+        required: true
+      descriptor_version: 
+        type: string
+        required: true
+      provider: 
+        type: string
+        required: true
+      product_name: 
+        type: string
+        required: true
+      software_version: 
+        type: string
+        required: true
+      product_info_name: 
+        type: string
+        required: false
+      product_info_description: 
+        type: string
+        required: false
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        required: true
+      localization_languages:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      default_localization_language:
+        type: string
+        required: false
+      configurable_properties:
+        type: tosca.datatypes.nfv.VnfConfigurableProperties
+        required: false
+      modifiable_attributes:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributes
+        required: false  
+      flavour_id:
+        type: string
+        required: true
+      flavour_description:
+        type: string
+        required: true
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink
+          occurrences: [ 0, UNBOUNDED ]
+    interfaces:
+      Nfv:
+        type: tosca.interfaces.nfv.vnf.lifecycle.Nfv  
+  tosca.nodes.nfv.PNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id:
+        type: string
+        required: true
+      provider:
+        type: string
+        required: true
+      version:
+        type: string
+        required: true
+      descriptor_invariant_id:
+        type: string
+        required: true
+      name:
+        type: string
+        required: true
+      function_description:
+        type: string
+        required: true
+      #geographical_location_info:       
+      #  type: TBD
+      #  required: true
+    requirements:
+       - virtual_link:
+           capability: tosca.capabilities.nfv.VirtualLinkable
+           relationship: tosca.relationships.nfv.VirtualLinksTo
+
+  tosca.nodes.nfv.PnfExtPort:           
+    derived_from: tosca.nodes.Root
+           
+  tosca.nodes.nfv.NsVirtualLink:
+    derived_from: tosca.nodes.Root
+    description: node definition of Virtual Links
+    properties:
+      provider:
+        type: string
+        required: false
+      version:
+        type: string
+        required: true
+      vl_profile:
+        type: tosca.datatypes.nfv.VlProfile
+        required: true
+      connectivity_type:
+        type: tosca.datatypes.nfv.ConnectivityType
+        required: true
+      qos:
+        type: tosca.datatypes.nfv.Qos
+        required: false
+      service_availability:
+        type: tosca.datatypes.nfv.ServiceAvailability
+        required: false
+    capabilities:
+      VirtualLinkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+  tosca.nodes.nfv.NS:
+    derived_from: tosca.nodes.Root
+    properties:
+      ns_id:
+        type: string
+        required: true
+      designer:
+        type: string
+        required: true
+      version:
+        type: string
+        required: true
+      name:
+        type: string
+        required: true
+      invariant_id:
+        type: string
+        required: true
+    capabilities:
+      #monitoring_parameter:
+        # modelled as ad hoc capabilities in VNF node template
+    requirements:
+      - virtual_link:
+          capability:
+             tosca.capabilities.nfv.VirtualLinkable
+          relationship:
+             tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.NsVirtualLink
+          occurrences: [ 0, UNBOUNDED ]
+
+relationship_types:
+  
+  tosca.relationships.nfv.VirtualLinksTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable]
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vSBC.csar b/catalog/pub/utils/toscaparser/testdata/vnf/vSBC.csar
deleted file mode 100644 (file)
index 921eafd..0000000
Binary files a/catalog/pub/utils/toscaparser/testdata/vnf/vSBC.csar and /dev/null differ
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vSBC/Definitions/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vSBC/Definitions/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..1f3426f
--- /dev/null
@@ -0,0 +1,192 @@
+tosca_definitions_version: tosca_simple_profile_yaml_1_1
+description: the VNFD of Huawei SBC
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  org.openecomp.resource.vfc.Huawei.SBC.18.1:  
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: 
+        - valid_values: 
+          - b1bb0ce7-ebca-4fa7-95ed-4840d70a1177
+        default: b1bb0ce7-ebca-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints:
+        - valid_values:
+          - Huawei
+        default: Huawei
+      product_name:
+        type: string
+        constraints:
+        - valid_values:
+          - SBC
+        default: SBC
+      software_version:
+        type: string
+        constraints:
+        - valid_values:
+          - 18
+        default: 18
+      descriptor_version:
+        type: string
+        constraints:
+        - valid_values:
+          - 1.0
+        default: 1.0
+      flavour_id:
+        type: string
+        constraints:
+        - valid_values:
+          - simple
+        default: simple   
+topology_template: 
+  node_templates:
+    SBC_VNF:
+      type: org.openecomp.resource.vfc.Huawei.SBC.18.1
+      properties:
+          descriptor_id: b1bb0ce7-ebca-4fa7-95ed-4840d70a1177
+          provider: Huawei
+          product_name: SBC
+          software_version: '1.0'
+          descriptor_version: '1.0'
+          flavour_id: simple 
+      requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          node: LBU_ACCESS
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          node: HRU_ACCESS
+      
+    LBU:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: LBU
+        description: LBU
+        configurable_properties: 
+          test: {"additional_vnfc_configurable_properties":{"aaa":"1"}}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 4
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 8096 MB
+            virtual_cpu:
+              cpu_architecture: x86
+              num_virtual_cpu: 2
+              virtual_cpu_clock: 1800 MHz
+      requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          node: LBU_Storage        
+  
+    LBU_Storage:
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: LBU_Storage
+        size_of_storage: 4 GB
+        rdma_enabled:  true     
+
+    LBU_ACCESS_CP:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ ipv4 ]
+        role: leaf
+        description: External connection point to access LBU_access
+      requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          node: LBU_ACCESS
+      - virtual_binding: 
+          capability: tosca.capabilities.nfv.VirtualBindable
+          node: LBU   
+    
+    LBU_ACCESS:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: [ ipv4 ]
+          flow_pattern: mesh
+        description: access network for LBU
+        vl_profile:
+          cidr: 192.168.1.24/24
+          networkName: LBU_ACCESS
+          startIp: 192.168.1.1
+          endIp: 192.168.1.10
+          gatewayIp: 192.168.1.0
+          segmentationId: 4000
+          physicalNetwork: physicalNetwork
+          networkType: VLAN
+          dhcpEnabled: true
+          vlanTransparent: false
+
+    HRU:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: HRU
+        description: HRU
+        configurable_properties: 
+          test: {"additional_vnfc_configurable_properties":{"bbb":"1"}}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 4
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 8096 MB
+            virtual_cpu:
+              cpu_architecture: x86
+              num_virtual_cpu: 3
+              virtual_cpu_clock: 1800 MHz
+      requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          node: HRU_Storage  
+  
+    HRU_Storage:
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: HRU_Storage
+        size_of_storage: 12 GB
+        rdma_enabled:  true     
+
+    HRU_ACCESS_CP:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ ipv4 ]
+        role: leaf
+        description: External connection point to access HRU_access
+      requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          node: HRU_ACCESS
+      - virtual_binding: 
+          capability: tosca.capabilities.nfv.VirtualBindable
+          node: HRU   
+    
+    HRU_ACCESS:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: [ ipv4 ]
+          flow_pattern: mesh
+        description: access network for HRU
+        vl_profile:
+          cidr: 192.168.1.24/24
+          networkName: HRU_ACCESS
+          startIp: 192.168.2.1
+          endIp: 192.168.2.10
+          gatewayIp: 192.168.2.0
+          segmentationId: 3000
+          physicalNetwork: physicalNetwork
+          networkType: VLAN
+          dhcpEnabled: true
+          vlanTransparent: false
\ No newline at end of file
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vSBC/Definitions/onap_dm.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vSBC/Definitions/onap_dm.yaml
new file mode 100644 (file)
index 0000000..716c5cb
--- /dev/null
@@ -0,0 +1,826 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+#Artifact Types
+#Based on R2 Design-time Resource DM clean version v8
+artifact_types:
+  tosca.artifacts.nfv.SwImage:
+    derived_from: tosca.artifacts.Deployment.Image
+
+#Capabilities Type
+#Based on R2 Design-time Resource DM clean version v21
+capability_types:
+  tosca.capabilities.nfv.VirtualBindable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.Metric:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.VirtualCompute:
+    derived_from: tosca.capabilities.Root
+    properties:
+      logical_node:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+      compute_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      requested_additional_capabilities:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.RequestedAdditionalCapability
+        required: false
+      virtual_memory:
+        type: tosca.datatypes.nfv.VirtualMemory
+        required: true
+      virtual_cpu:
+        type: tosca.datatypes.nfv.VirtualCpu
+        required: true
+
+  tosca.capabilities.nfv.VirtualStorage:
+    derived_from: tosca.capabilities.Root
+
+  tosca.capabilities.nfv.VirtualLinkable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.ExtVirtualLinkable:
+    derived_from: tosca.capabilities.Root
+
+#Data Types
+#Based on R2 Design-time Resource DM clean version v45
+data_types:
+  tosca.datatypes.nfv.L2AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      mac_address_assignment:
+        type: boolean
+        required: true
+
+  tosca.datatypes.nfv.injectFile:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      source_path:
+        type: string
+        required: true
+      dest_path:
+        type: string
+        required: true
+
+  tosca.datatypes.nfv.L3AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      ip_address_assignment:
+        type: boolean
+        required: true   
+      floating_ip_activated:
+        type: boolean
+        required: true
+      ip_address_type:
+        type: string
+        required: false
+        constraints:
+          - valid_values: [ipv4, ipv6]
+      number_of_ip_address:
+        type: integer
+        required: false
+      fixed_ip_address:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+
+  tosca.datatypes.nfv.AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      address_type:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [mac_address, ip_address]    
+      l2_address_data:
+        type: tosca.datatypes.nfv.L2AddressData # empty in "GS NFV IFA011 V0.7.3"
+        required: false
+      l3_address_data:
+        type: tosca.datatypes.nfv.L3AddressData
+        required: false 
+  
+  tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      name:
+        type: string
+        required: false   
+      description:
+        type: string
+        required: false
+      support_mandatory:
+        type: boolean
+        required: true
+      #TODO HPA
+      network_interface_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: true
+      nic_io_requirements:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+  
+  tosca.datatypes.nfv.ConnectivityType:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      layer_protocol:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]  
+      flow_pattern:
+        type: string
+        required: false
+        constraints: # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          - valid_values: [Line, Tree, Mesh]
+  
+  tosca.datatypes.nfv.RequestedAdditionalCapability:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #name:
+        # key of containing map
+      support_mandatory:
+        type: boolean
+        required: true
+      min_requested_additional_capability_version:
+        type: string
+        required: false
+      preferred_requested_additional_capability_version:
+        type: string
+        required: false
+      requested_additional_capability_name:
+        type: string
+        required: true
+      target_performance_parameters:
+        type: map
+        entry_schema:
+          type: string
+        required: true     
+  
+  tosca.datatypes.nfv.VirtualMemory:
+      derived_from: tosca.datatypes.Root
+      properties:
+        virtual_mem_size:
+          type: scalar-unit.size # Number
+          required: true
+        virtual_mem_oversubscription_policy:
+          type: string
+          required: false
+        #TODO HPA
+        vdu_memory_requirements:
+          type: map
+          entry_schema:
+           type: string
+          required: false
+        numa_enabled:
+          type: boolean
+          required: false
+  
+  tosca.datatypes.nfv.VirtualCpu:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_architecture:
+        type: string
+        required: false
+      num_virtual_cpu:
+        type: integer
+        required: true
+      virtual_cpu_clock:
+        type: scalar-unit.frequency
+        required: false
+      virtual_cpu_oversubscription_policy:
+        type: string
+        required: false
+      #TODO HPA
+      vdu_cpu_requirements:
+        type: map
+        entry_schema:
+           type: string
+        required: false
+      virtual_cpu_pinning:
+        type: tosca.datatypes.nfv.VirtualCpuPinning
+        required: false
+  
+  tosca.datatypes.nfv.VirtualCpuPinning:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_pinning_policy:
+        type: string # CpuPinningPolicy
+        constraints:
+          - valid_values: [ static, dynamic ]
+        required: false
+      cpu_pinning_map:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VnfcConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      additional_vnfc_configurable_properties:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VduProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_number_of_instances:
+          type: integer
+          required: true
+        max_number_of_instances:
+          type: integer
+          required: true
+        #localAffinityOrAntiAffinityRule:  # not defined in SOL001 v.6.0
+        #  type: tosca.datatype.nfv.LocalAffinityOrAntiAffinityRule
+        #  required: true
+        #affinityOrAntiAffinityGroupId: # not defined in SOL001 v.6.0
+        #  type: string
+        #  required: true
+        watchdog: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: string
+          required: true
+        vmBootUpTimeOut: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: integer
+          required: false
+  
+   
+  tosca.datatypes.nfv.VlProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        max_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        min_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        qos:
+           type: tosca.datatypes.nfv.Qos
+           required: false
+        initiationParameters: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: map
+           entry_schema:
+             type: string
+           required: false
+        cidr: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkName:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        startIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        endIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        gatewayIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        segmentationId:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: integer
+           required: false
+        physicalNetwork:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkType:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+           constraints:
+             - valid_values: [VLAN, VXLAN]
+        dhcpEnabled:  # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+        vlanTransparent:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+  
+  tosca.datatypes.nfv.InstantiationLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        description:
+          type: string
+          required: true
+        vdu_levels:
+          type: map # key: vduId
+          required: true
+          entry_schema:
+            type: tosca.datatypes.nfv.VduLevel
+        scale_info:
+          type: map # key: aspectId
+          required: false
+          entry_schema:
+            type: tosca.datatypes.nfv.ScaleInfo
+  
+  tosca.datatypes.nfv.VduLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        number_of_instances:
+          type: integer
+          required: true
+  
+  tosca.datatypes.nfv.VnfLcmOperationsConfiguration: 
+    derived_from: tosca.datatypes.Root 
+    properties: 
+      instantiate: 
+        type: tosca.datatypes.nfv.VnfInstantiateOperationConfiguration 
+      scale:
+        type: tosca.datatypes.nfv.VnfScaleOperationConfiguration 
+      scale_to_level: 
+        type: tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration 
+      heal: 
+        type: tosca.datatypes.nfv.VnfHealOperationConfiguration
+      terminate:
+        type: tosca.datatypes.nfv.VnfTerminateOperationConfiguration
+      operate: 
+        type: tosca.datatypes.nfv.VnfOperateOperationConfiguration
+  
+  tosca.datatypes.nfv.VnfInstantiateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      #properties:
+        #parameters:
+            #modeled as part of operation parameter list
+  
+  tosca.datatypes.nfv.VnfScaleOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        scaling_by_more_than_one_step_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        arbitrary_target_levels_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfHealOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        causes:
+           type: list
+           entry_schema:
+             type: string
+  
+  tosca.datatypes.nfv.VnfTerminateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_graceful_termination_timeout:
+           type: integer
+        max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.VnfOperateOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    properties:
+      min_graceful_termination_timeout:
+           type: integer
+      max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.ScaleInfo:
+    derived_from: tosca.datatypes.Root
+    properties:
+      scaleLevel:
+           type: integer
+           required: true
+  
+  tosca.datatypes.nfv.ScaleAspect:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+         type: string
+         required: true
+      description:
+         type: string
+         required: true
+      associated_group:
+         type: string #Identifier
+         required: false
+      max_scale_level:
+         type: integer #PositiveInteger
+         required: true
+  
+  tosca.datatypes.nfv.LinkBitRateRequirements:
+    derived_from: tosca.datatypes.Root
+    properties:
+      root:
+         type: integer
+         required: true
+      leaf:
+         type: integer
+         required: true
+  
+  tosca.datatypes.nfv.Qos:
+    derived_from: tosca.datatypes.Root
+    properties:
+      latency:
+         type: integer #Number [ms]
+         required: true
+      packet_delay_variation:
+         type: integer #Number [ms]
+         required: true
+      packet_loss_ratio:
+         type: float
+         constraints:
+           - in_range: [ 0.0, 1.0 ]
+         required: false
+  
+  tosca.datatypes.nfv.CpProtocolData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      asscociated_layer_protocol:
+        type: string
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
+        required: true
+      address_data:
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.datatypes.nfv.VnfConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      is_autoscale_enabled:
+        type: boolean
+        required: false
+      is_autoheal_enabled:
+        type: boolean
+        required: false
+      additional_configurable_properties:
+        type: tosca.datatypes.nfv.VnfAdditionalConfigurableProperties
+        required: false
+  
+  tosca.datatypes.nfv.VnfAdditionalConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributes:
+    derived_from: tosca.datatypes.Root
+    properties:
+      extensions:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions
+        required: false
+      metadata:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata
+        required: false
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.LogicalNodeData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #TODO HPA
+      logical_node_requirements:
+        type: map # not defined in SOL001 v.6.0
+        entry_schema:
+          type: string
+        required: false
+
+#Interface Types
+#Based on R2 Design-time Resource DM clean version v10
+interface_types:
+  tosca.interfaces.nfv.vnf.lifecycle.Nfv:
+    derived_from: tosca.interfaces.Root
+    instantiate:
+      description: Invoked upon receipt of an Instantiate VNF request
+    instantiate_start:
+      description: Invoked before instantiate
+    instantiate_end:
+      description: Invoked after instantiate
+    terminate:
+      description: Invoked upon receipt Terminate VNF request
+    terminate_start:
+      description: Invoked before terminate
+    terminate_end:
+      description: Invoked after terminate
+    modify_information:
+      description: Invoked upon receipt of a Modify VNF Information request
+    modify_information_start:
+      description: Invoked before modify_information
+    modify_information_end:
+      description: Invoked after modify_information
+    change_flavour:
+      description: Invoked upon receipt of a Change VNF Flavour request
+    change_flavour_start:
+      description: Invoked before change_flavour
+    change_flavour_end:
+      description: Invoked after change_flavour
+    change_external_connectivity:
+      description: Invoked upon receipt of a Change External VNF Connectivity request
+    change_external_connectivity_start:
+      description: Invoked before change_external_connectivity
+    change_external_connectivity_end:
+      description: Invoked after change_external_connectivity
+    operate:
+      description: Invoked upon receipt of an Operate VNF request
+    operate_start:
+      description: Invoked before operate
+    operate_end:
+      description: Invoked after operate
+    heal:
+      description: Invoked upon receipt of a Heal VNF request
+    heal_start:
+      description: Invoked before heal
+    heal_end:
+    description: Invoked after heal
+    scale:
+      description: Invoked upon receipt of a Scale VNF request
+    scale_start:
+      description: Invoked before scale
+    scale_end:
+      description: Invoked after scale 
+    scale_to_level:
+      description: Invoked upon receipt of a Scale VNF to Level request
+    scale_to_level_start:
+      description: Invoked before scale_to_level
+    scale_to_level_end:
+      description: Invoked after scale_to_level
+  #  indicator_changed:
+  #    description: On receiving a VNF indicator value change notification
+
+#Node Types
+#Based on R2 Design-time Resource DM clean version v36
+node_types:
+  tosca.nodes.nfv.Vdu.Compute:
+    derived_from: tosca.nodes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      description:
+        type: string
+        required: true
+      boot_order:
+        type: list # explicit index (boot index) not necessary, contrary to IFA011
+        entry_schema:
+          type: string
+        required: false
+      nfvi_constraints:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      configurable_properties:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.VnfcConfigurableProperties
+        required: true 
+      vdu_profile:
+        type: tosca.datatypes.nfv.VduProfile
+        required: true
+      inject_files: #Aligned with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.injectFile
+        required: false
+      meta_data: #metadata attached to the VM or container
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      user_data: #cloudinit userdata script support
+        type: string
+        required: false
+    #attributes: NOT DEFINED IN ONAP IM and SOL001
+      #private_address:
+      #  status: deprecated
+      #public_address:
+      #  status: deprecated
+      #networks:
+      #  status: deprecated
+      #ports:
+      #  status: deprecated
+    capabilities:
+      virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+      virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences: [1, UNBOUNDED]
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+    requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          relationship: tosca.relationships.nfv.Vdu.AttachedTo
+          node: tosca.nodes.nfv.Vdu.VirtualStorage
+          occurrences: [ 0, UNBOUNDED ]
+    #artifacts:
+    #  - sw_image:
+    #      file:
+    #      type: tosca.artifacts.nfv.SwImage
+  
+  tosca.nodes.nfv.Vdu.VirtualStorage:
+    derived_from: tosca.nodes.Root
+    properties:
+      #id:
+        # node name
+      type_of_storage:
+        type: string
+        constraints:
+          - valid_values: [volume, object, root, block]
+        required: true
+      size_of_storage:
+        type: scalar-unit.size
+        required: true
+      #TODO HPA
+      vdu_storage_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      rdma_enabled:
+        type: boolean
+        required: false
+    capabilities:
+      virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+    #artifacts:
+    #  - sw_image:
+    #     file:
+    #     type: tosca.artifacts.Deployment.Image
+  
+  tosca.nodes.nfv.Cp:
+    derived_from: tosca.nodes.Root
+    properties:
+      layer_protocol:
+        type: list
+        entry_schema:
+          constraints:
+            - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]
+          type: string
+        required: true
+      role: #Name in ETSI NFV IFA011 v0.7.3 cpRole
+        type: string
+        constraints:
+          - valid_values: [ root, leaf ]
+        required: false
+      description:
+        type: string
+        required: false
+      protocol_data:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.CpProtocolData
+        required: true
+      trunk_mode:
+        type: boolean
+        required: true
+      allowedAddressData: # Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.nodes.nfv.VduCp:
+    derived_from: tosca.nodes.nfv.Cp
+    properties:
+      bitrate_requirement:
+        type: integer
+        required: false
+      vnic_name: #  Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        required: false
+      vnic_order: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: integer
+        required: false
+      vnic_type: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        constraints:
+            - valid_values: [normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder]
+        required: false
+      virtual_network_interface_requirements:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+        required: false
+      #order:
+      #  type: integer
+      #  required: false
+      #  constraints:
+      #    - greater_or_equal: 0
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink   
+      - virtual_binding:
+          capability: tosca.capabilities.nfv.VirtualBindable
+          relationship: tosca.relationships.nfv.VirtualBindsTo
+          node: tosca.nodes.nfv.Vdu.Compute
+  
+  tosca.nodes.nfv.VnfVirtualLink:
+    derived_from: tosca.nodes.Root
+    properties:
+      connectivity_type:
+        type: tosca.datatypes.nfv.ConnectivityType
+        required: true
+      description:
+        type: string
+        required: false
+      test_access:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      vl_profile:
+        type: tosca.datatypes.nfv.VlProfile
+        required: true
+    capabilities:
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+      virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+  
+  tosca.nodes.nfv.VNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id: # instead of vnfd_id
+        type: string # GUID
+        required: true
+      descriptor_version: # instead of vnfd_version
+        type: string
+        required: true
+      provider: # instead of vnf_provider
+        type: string
+        required: true
+      product_name: # instead of vnf_product_name
+        type: string
+        required: true
+      software_version: # instead of vnf_software_version
+        type: string
+        required: true
+      product_info_name: # instead of vnf_product_info_name
+        type: string
+        required: false
+      product_info_description: # instead of vnf_product_info_description
+        type: string
+        required: false
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        required: true
+      localization_languages:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      default_localization_language:
+        type: string
+        required: false
+      configurable_properties:
+        type: tosca.datatypes.nfv.VnfConfigurableProperties
+        required: false
+      modifiable_attributes:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributes
+        required: false  # true in IFA011, but all of members are false
+      flavour_id:
+        type: string
+        required: true
+      flavour_description:
+        type: string
+        required: true
+    #capabilities:
+      # monitoring_parameter:
+        # modelled as ad hoc capabilities in the VNF node template
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink
+          occurrences: [ 0, UNBOUNDED ]
+    interfaces:
+      Nfv:
+        type: tosca.interfaces.nfv.vnf.lifecycle.Nfv
+
+#Relationship Types
+#Based on R2 Design-time Resource DM clean version v4
+relationship_types:
+  tosca.relationships.nfv.VirtualBindsTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualBindable]
+  
+  tosca.relationships.nfv.VirtualLinksTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable]
+
+  tosca.relationships.nfv.Vdu.AttachedTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualStorage]
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vSBC/MainServiceTemplate.mf b/catalog/pub/utils/toscaparser/testdata/vnf/vSBC/MainServiceTemplate.mf
new file mode 100644 (file)
index 0000000..92bb5a7
--- /dev/null
@@ -0,0 +1,8 @@
+metadata:
+    vnf_product_name: vSBC
+    vnf_provider_id: Huawei
+    vnf_package_version: 1.0
+    vnf_release_data_time: 2018.05.16T10:00+03:00
+
+source: MainServiceTemplate.yaml
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vSBC/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vSBC/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..8f699ac
--- /dev/null
@@ -0,0 +1,189 @@
+tosca_definitions_version: tosca_simple_profile_yaml_1_1
+description: the VNFD of Huawei SBC
+
+node_types:
+  org.openecomp.resource.vfc.Huawei.SBC.18.1:  
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: 
+        - valid_values: 
+          - b1bb0ce7-ebca-4fa7-95ed-4840d70a1177
+        default: b1bb0ce7-ebca-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints:
+        - valid_values:
+          - Huawei
+        default: Huawei
+      product_name:
+        type: string
+        constraints:
+        - valid_values:
+          - SBC
+        default: SBC
+      software_version:
+        type: string
+        constraints:
+        - valid_values:
+          - 18
+        default: 18
+      descriptor_version:
+        type: string
+        constraints:
+        - valid_values:
+          - 1.0
+        default: 1.0
+      flavour_id:
+        type: string
+        constraints:
+        - valid_values:
+          - simple
+        default: simple   
+topology_template: 
+  node_templates:
+    SBC_VNF:
+      type: org.openecomp.resource.vfc.Huawei.SBC.18.1
+      properties:
+      descriptor_id: b1bb0ce7-ebca-4fa7-95ed-4840d70a1177
+      provider: Huawei
+      product_name: SBC
+      software_version: '1.0'
+      descriptor_version: '1.0'
+      flavour_id: simple 
+      requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          node: LBU_ACCESS
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          node: HRU_ACCESS
+      
+    LBU:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: LBU
+        description: LBU
+        configurable_properties: 
+          test: {"additional_vnfc_configurable_properties":{"aaa":"1"}}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 4
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 8096 MB
+            virtual_cpu:
+              cpu_architecture: x86
+              num_virtual_cpu: 2
+              virtual_cpu_clock: 1800 MHz
+      requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          node: LBU_Storage        
+  
+    LBU_Storage:
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: LBU_Storage
+        size_of_storage: 4 GB
+        rdma_enabled:  true     
+
+    LBU_ACCESS_CP:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ ipv4 ]
+        role: leaf
+        description: External connection point to access LBU_access
+      requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          node: LBU_ACCESS
+      - virtual_binding: 
+          capability: tosca.capabilities.nfv.VirtualBindable
+          node: LBU   
+    
+    LBU_ACCESS:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: [ ipv4 ]
+          flow_pattern: mesh
+        description: access network for LBU
+        vl_profile:
+          cidr: 192.168.1.24/24
+          networkName: LBU_ACCESS
+          startIp: 192.168.1.1
+          endIp: 192.168.1.10
+          gatewayIp: 192.168.1.0
+          segmentationId: 4000
+          physicalNetwork: physicalNetwork
+          networkType: VLAN
+          dhcpEnabled: true
+          vlanTransparent: false
+
+    HRU:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: HRU
+        description: HRU
+        configurable_properties: 
+          test: {"additional_vnfc_configurable_properties":{"bbb":"1"}}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 4
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 8096 MB
+            virtual_cpu:
+              cpu_architecture: x86
+              num_virtual_cpu: 3
+              virtual_cpu_clock: 1800 MHz
+      requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          node: HRU_Storage  
+  
+    HRU_Storage:
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: HRU_Storage
+        size_of_storage: 12 GB
+        rdma_enabled:  true     
+
+    HRU_ACCESS_CP:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ ipv4 ]
+        role: leaf
+        description: External connection point to access HRU_access
+      requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          node: HRU_ACCESS
+      - virtual_binding: 
+          capability: tosca.capabilities.nfv.VirtualBindable
+          node: HRU   
+    
+    HRU_ACCESS:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: [ ipv4 ]
+          flow_pattern: mesh
+        description: access network for HRU
+        vl_profile:
+          cidr: 192.168.1.24/24
+          networkName: HRU_ACCESS
+          startIp: 192.168.2.1
+          endIp: 192.168.2.10
+          gatewayIp: 192.168.2.0
+          segmentationId: 3000
+          physicalNetwork: physicalNetwork
+          networkType: VLAN
+          dhcpEnabled: true
+          vlanTransparent: false
\ No newline at end of file
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vSBC/TOSCA-Metadata/TOSCA.meta b/catalog/pub/utils/toscaparser/testdata/vnf/vSBC/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..1111aa4
--- /dev/null
@@ -0,0 +1,4 @@
+TOSCA-Meta-Version: 1.0
+CSAR-Version: 1.0
+Created-By: Test
+Entry-Definitions: Definitions/MainServiceTemplate.yaml
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vSBC/onap_dm.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vSBC/onap_dm.yaml
new file mode 100644 (file)
index 0000000..716c5cb
--- /dev/null
@@ -0,0 +1,826 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+#Artifact Types
+#Based on R2 Design-time Resource DM clean version v8
+artifact_types:
+  tosca.artifacts.nfv.SwImage:
+    derived_from: tosca.artifacts.Deployment.Image
+
+#Capabilities Type
+#Based on R2 Design-time Resource DM clean version v21
+capability_types:
+  tosca.capabilities.nfv.VirtualBindable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.Metric:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.VirtualCompute:
+    derived_from: tosca.capabilities.Root
+    properties:
+      logical_node:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+      compute_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      requested_additional_capabilities:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.RequestedAdditionalCapability
+        required: false
+      virtual_memory:
+        type: tosca.datatypes.nfv.VirtualMemory
+        required: true
+      virtual_cpu:
+        type: tosca.datatypes.nfv.VirtualCpu
+        required: true
+
+  tosca.capabilities.nfv.VirtualStorage:
+    derived_from: tosca.capabilities.Root
+
+  tosca.capabilities.nfv.VirtualLinkable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.ExtVirtualLinkable:
+    derived_from: tosca.capabilities.Root
+
+#Data Types
+#Based on R2 Design-time Resource DM clean version v45
+data_types:
+  tosca.datatypes.nfv.L2AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      mac_address_assignment:
+        type: boolean
+        required: true
+
+  tosca.datatypes.nfv.injectFile:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      source_path:
+        type: string
+        required: true
+      dest_path:
+        type: string
+        required: true
+
+  tosca.datatypes.nfv.L3AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      ip_address_assignment:
+        type: boolean
+        required: true   
+      floating_ip_activated:
+        type: boolean
+        required: true
+      ip_address_type:
+        type: string
+        required: false
+        constraints:
+          - valid_values: [ipv4, ipv6]
+      number_of_ip_address:
+        type: integer
+        required: false
+      fixed_ip_address:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+
+  tosca.datatypes.nfv.AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      address_type:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [mac_address, ip_address]    
+      l2_address_data:
+        type: tosca.datatypes.nfv.L2AddressData # empty in "GS NFV IFA011 V0.7.3"
+        required: false
+      l3_address_data:
+        type: tosca.datatypes.nfv.L3AddressData
+        required: false 
+  
+  tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      name:
+        type: string
+        required: false   
+      description:
+        type: string
+        required: false
+      support_mandatory:
+        type: boolean
+        required: true
+      #TODO HPA
+      network_interface_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: true
+      nic_io_requirements:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+  
+  tosca.datatypes.nfv.ConnectivityType:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      layer_protocol:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]  
+      flow_pattern:
+        type: string
+        required: false
+        constraints: # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          - valid_values: [Line, Tree, Mesh]
+  
+  tosca.datatypes.nfv.RequestedAdditionalCapability:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #name:
+        # key of containing map
+      support_mandatory:
+        type: boolean
+        required: true
+      min_requested_additional_capability_version:
+        type: string
+        required: false
+      preferred_requested_additional_capability_version:
+        type: string
+        required: false
+      requested_additional_capability_name:
+        type: string
+        required: true
+      target_performance_parameters:
+        type: map
+        entry_schema:
+          type: string
+        required: true     
+  
+  tosca.datatypes.nfv.VirtualMemory:
+      derived_from: tosca.datatypes.Root
+      properties:
+        virtual_mem_size:
+          type: scalar-unit.size # Number
+          required: true
+        virtual_mem_oversubscription_policy:
+          type: string
+          required: false
+        #TODO HPA
+        vdu_memory_requirements:
+          type: map
+          entry_schema:
+           type: string
+          required: false
+        numa_enabled:
+          type: boolean
+          required: false
+  
+  tosca.datatypes.nfv.VirtualCpu:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_architecture:
+        type: string
+        required: false
+      num_virtual_cpu:
+        type: integer
+        required: true
+      virtual_cpu_clock:
+        type: scalar-unit.frequency
+        required: false
+      virtual_cpu_oversubscription_policy:
+        type: string
+        required: false
+      #TODO HPA
+      vdu_cpu_requirements:
+        type: map
+        entry_schema:
+           type: string
+        required: false
+      virtual_cpu_pinning:
+        type: tosca.datatypes.nfv.VirtualCpuPinning
+        required: false
+  
+  tosca.datatypes.nfv.VirtualCpuPinning:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_pinning_policy:
+        type: string # CpuPinningPolicy
+        constraints:
+          - valid_values: [ static, dynamic ]
+        required: false
+      cpu_pinning_map:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VnfcConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      additional_vnfc_configurable_properties:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VduProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_number_of_instances:
+          type: integer
+          required: true
+        max_number_of_instances:
+          type: integer
+          required: true
+        #localAffinityOrAntiAffinityRule:  # not defined in SOL001 v.6.0
+        #  type: tosca.datatype.nfv.LocalAffinityOrAntiAffinityRule
+        #  required: true
+        #affinityOrAntiAffinityGroupId: # not defined in SOL001 v.6.0
+        #  type: string
+        #  required: true
+        watchdog: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: string
+          required: true
+        vmBootUpTimeOut: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: integer
+          required: false
+  
+   
+  tosca.datatypes.nfv.VlProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        max_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        min_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        qos:
+           type: tosca.datatypes.nfv.Qos
+           required: false
+        initiationParameters: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: map
+           entry_schema:
+             type: string
+           required: false
+        cidr: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkName:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        startIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        endIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        gatewayIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        segmentationId:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: integer
+           required: false
+        physicalNetwork:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkType:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+           constraints:
+             - valid_values: [VLAN, VXLAN]
+        dhcpEnabled:  # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+        vlanTransparent:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+  
+  tosca.datatypes.nfv.InstantiationLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        description:
+          type: string
+          required: true
+        vdu_levels:
+          type: map # key: vduId
+          required: true
+          entry_schema:
+            type: tosca.datatypes.nfv.VduLevel
+        scale_info:
+          type: map # key: aspectId
+          required: false
+          entry_schema:
+            type: tosca.datatypes.nfv.ScaleInfo
+  
+  tosca.datatypes.nfv.VduLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        number_of_instances:
+          type: integer
+          required: true
+  
+  tosca.datatypes.nfv.VnfLcmOperationsConfiguration: 
+    derived_from: tosca.datatypes.Root 
+    properties: 
+      instantiate: 
+        type: tosca.datatypes.nfv.VnfInstantiateOperationConfiguration 
+      scale:
+        type: tosca.datatypes.nfv.VnfScaleOperationConfiguration 
+      scale_to_level: 
+        type: tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration 
+      heal: 
+        type: tosca.datatypes.nfv.VnfHealOperationConfiguration
+      terminate:
+        type: tosca.datatypes.nfv.VnfTerminateOperationConfiguration
+      operate: 
+        type: tosca.datatypes.nfv.VnfOperateOperationConfiguration
+  
+  tosca.datatypes.nfv.VnfInstantiateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      #properties:
+        #parameters:
+            #modeled as part of operation parameter list
+  
+  tosca.datatypes.nfv.VnfScaleOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        scaling_by_more_than_one_step_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        arbitrary_target_levels_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfHealOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        causes:
+           type: list
+           entry_schema:
+             type: string
+  
+  tosca.datatypes.nfv.VnfTerminateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_graceful_termination_timeout:
+           type: integer
+        max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.VnfOperateOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    properties:
+      min_graceful_termination_timeout:
+           type: integer
+      max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.ScaleInfo:
+    derived_from: tosca.datatypes.Root
+    properties:
+      scaleLevel:
+           type: integer
+           required: true
+  
+  tosca.datatypes.nfv.ScaleAspect:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+         type: string
+         required: true
+      description:
+         type: string
+         required: true
+      associated_group:
+         type: string #Identifier
+         required: false
+      max_scale_level:
+         type: integer #PositiveInteger
+         required: true
+  
+  tosca.datatypes.nfv.LinkBitRateRequirements:
+    derived_from: tosca.datatypes.Root
+    properties:
+      root:
+         type: integer
+         required: true
+      leaf:
+         type: integer
+         required: true
+  
+  tosca.datatypes.nfv.Qos:
+    derived_from: tosca.datatypes.Root
+    properties:
+      latency:
+         type: integer #Number [ms]
+         required: true
+      packet_delay_variation:
+         type: integer #Number [ms]
+         required: true
+      packet_loss_ratio:
+         type: float
+         constraints:
+           - in_range: [ 0.0, 1.0 ]
+         required: false
+  
+  tosca.datatypes.nfv.CpProtocolData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      asscociated_layer_protocol:
+        type: string
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
+        required: true
+      address_data:
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.datatypes.nfv.VnfConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      is_autoscale_enabled:
+        type: boolean
+        required: false
+      is_autoheal_enabled:
+        type: boolean
+        required: false
+      additional_configurable_properties:
+        type: tosca.datatypes.nfv.VnfAdditionalConfigurableProperties
+        required: false
+  
+  tosca.datatypes.nfv.VnfAdditionalConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributes:
+    derived_from: tosca.datatypes.Root
+    properties:
+      extensions:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions
+        required: false
+      metadata:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata
+        required: false
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.LogicalNodeData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #TODO HPA
+      logical_node_requirements:
+        type: map # not defined in SOL001 v.6.0
+        entry_schema:
+          type: string
+        required: false
+
+#Interface Types
+#Based on R2 Design-time Resource DM clean version v10
+interface_types:
+  tosca.interfaces.nfv.vnf.lifecycle.Nfv:
+    derived_from: tosca.interfaces.Root
+    instantiate:
+      description: Invoked upon receipt of an Instantiate VNF request
+    instantiate_start:
+      description: Invoked before instantiate
+    instantiate_end:
+      description: Invoked after instantiate
+    terminate:
+      description: Invoked upon receipt Terminate VNF request
+    terminate_start:
+      description: Invoked before terminate
+    terminate_end:
+      description: Invoked after terminate
+    modify_information:
+      description: Invoked upon receipt of a Modify VNF Information request
+    modify_information_start:
+      description: Invoked before modify_information
+    modify_information_end:
+      description: Invoked after modify_information
+    change_flavour:
+      description: Invoked upon receipt of a Change VNF Flavour request
+    change_flavour_start:
+      description: Invoked before change_flavour
+    change_flavour_end:
+      description: Invoked after change_flavour
+    change_external_connectivity:
+      description: Invoked upon receipt of a Change External VNF Connectivity request
+    change_external_connectivity_start:
+      description: Invoked before change_external_connectivity
+    change_external_connectivity_end:
+      description: Invoked after change_external_connectivity
+    operate:
+      description: Invoked upon receipt of an Operate VNF request
+    operate_start:
+      description: Invoked before operate
+    operate_end:
+      description: Invoked after operate
+    heal:
+      description: Invoked upon receipt of a Heal VNF request
+    heal_start:
+      description: Invoked before heal
+    heal_end:
+    description: Invoked after heal
+    scale:
+      description: Invoked upon receipt of a Scale VNF request
+    scale_start:
+      description: Invoked before scale
+    scale_end:
+      description: Invoked after scale 
+    scale_to_level:
+      description: Invoked upon receipt of a Scale VNF to Level request
+    scale_to_level_start:
+      description: Invoked before scale_to_level
+    scale_to_level_end:
+      description: Invoked after scale_to_level
+  #  indicator_changed:
+  #    description: On receiving a VNF indicator value change notification
+
+#Node Types
+#Based on R2 Design-time Resource DM clean version v36
+node_types:
+  tosca.nodes.nfv.Vdu.Compute:
+    derived_from: tosca.nodes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      description:
+        type: string
+        required: true
+      boot_order:
+        type: list # explicit index (boot index) not necessary, contrary to IFA011
+        entry_schema:
+          type: string
+        required: false
+      nfvi_constraints:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      configurable_properties:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.VnfcConfigurableProperties
+        required: true 
+      vdu_profile:
+        type: tosca.datatypes.nfv.VduProfile
+        required: true
+      inject_files: #Aligned with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.injectFile
+        required: false
+      meta_data: #metadata attached to the VM or container
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      user_data: #cloudinit userdata script support
+        type: string
+        required: false
+    #attributes: NOT DEFINED IN ONAP IM and SOL001
+      #private_address:
+      #  status: deprecated
+      #public_address:
+      #  status: deprecated
+      #networks:
+      #  status: deprecated
+      #ports:
+      #  status: deprecated
+    capabilities:
+      virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+      virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences: [1, UNBOUNDED]
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+    requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          relationship: tosca.relationships.nfv.Vdu.AttachedTo
+          node: tosca.nodes.nfv.Vdu.VirtualStorage
+          occurrences: [ 0, UNBOUNDED ]
+    #artifacts:
+    #  - sw_image:
+    #      file:
+    #      type: tosca.artifacts.nfv.SwImage
+  
+  tosca.nodes.nfv.Vdu.VirtualStorage:
+    derived_from: tosca.nodes.Root
+    properties:
+      #id:
+        # node name
+      type_of_storage:
+        type: string
+        constraints:
+          - valid_values: [volume, object, root, block]
+        required: true
+      size_of_storage:
+        type: scalar-unit.size
+        required: true
+      #TODO HPA
+      vdu_storage_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      rdma_enabled:
+        type: boolean
+        required: false
+    capabilities:
+      virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+    #artifacts:
+    #  - sw_image:
+    #     file:
+    #     type: tosca.artifacts.Deployment.Image
+  
+  tosca.nodes.nfv.Cp:
+    derived_from: tosca.nodes.Root
+    properties:
+      layer_protocol:
+        type: list
+        entry_schema:
+          constraints:
+            - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]
+          type: string
+        required: true
+      role: #Name in ETSI NFV IFA011 v0.7.3 cpRole
+        type: string
+        constraints:
+          - valid_values: [ root, leaf ]
+        required: false
+      description:
+        type: string
+        required: false
+      protocol_data:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.CpProtocolData
+        required: true
+      trunk_mode:
+        type: boolean
+        required: true
+      allowedAddressData: # Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.nodes.nfv.VduCp:
+    derived_from: tosca.nodes.nfv.Cp
+    properties:
+      bitrate_requirement:
+        type: integer
+        required: false
+      vnic_name: #  Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        required: false
+      vnic_order: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: integer
+        required: false
+      vnic_type: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        constraints:
+            - valid_values: [normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder]
+        required: false
+      virtual_network_interface_requirements:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+        required: false
+      #order:
+      #  type: integer
+      #  required: false
+      #  constraints:
+      #    - greater_or_equal: 0
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink   
+      - virtual_binding:
+          capability: tosca.capabilities.nfv.VirtualBindable
+          relationship: tosca.relationships.nfv.VirtualBindsTo
+          node: tosca.nodes.nfv.Vdu.Compute
+  
+  tosca.nodes.nfv.VnfVirtualLink:
+    derived_from: tosca.nodes.Root
+    properties:
+      connectivity_type:
+        type: tosca.datatypes.nfv.ConnectivityType
+        required: true
+      description:
+        type: string
+        required: false
+      test_access:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      vl_profile:
+        type: tosca.datatypes.nfv.VlProfile
+        required: true
+    capabilities:
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+      virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+  
+  tosca.nodes.nfv.VNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id: # instead of vnfd_id
+        type: string # GUID
+        required: true
+      descriptor_version: # instead of vnfd_version
+        type: string
+        required: true
+      provider: # instead of vnf_provider
+        type: string
+        required: true
+      product_name: # instead of vnf_product_name
+        type: string
+        required: true
+      software_version: # instead of vnf_software_version
+        type: string
+        required: true
+      product_info_name: # instead of vnf_product_info_name
+        type: string
+        required: false
+      product_info_description: # instead of vnf_product_info_description
+        type: string
+        required: false
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        required: true
+      localization_languages:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      default_localization_language:
+        type: string
+        required: false
+      configurable_properties:
+        type: tosca.datatypes.nfv.VnfConfigurableProperties
+        required: false
+      modifiable_attributes:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributes
+        required: false  # true in IFA011, but all of members are false
+      flavour_id:
+        type: string
+        required: true
+      flavour_description:
+        type: string
+        required: true
+    #capabilities:
+      # monitoring_parameter:
+        # modelled as ad hoc capabilities in the VNF node template
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink
+          occurrences: [ 0, UNBOUNDED ]
+    interfaces:
+      Nfv:
+        type: tosca.interfaces.nfv.vnf.lifecycle.Nfv
+
+#Relationship Types
+#Based on R2 Design-time Resource DM clean version v4
+relationship_types:
+  tosca.relationships.nfv.VirtualBindsTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualBindable]
+  
+  tosca.relationships.nfv.VirtualLinksTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable]
+
+  tosca.relationships.nfv.Vdu.AttachedTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualStorage]
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra.csar b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra.csar
deleted file mode 100644 (file)
index 5c9fbcf..0000000
Binary files a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra.csar and /dev/null differ
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Artifacts/images/ubuntu_16.04 b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Artifacts/images/ubuntu_16.04
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Artifacts/keys/authorized_keys b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Artifacts/keys/authorized_keys
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Artifacts/keys/id_rsa b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Artifacts/keys/id_rsa
new file mode 100644 (file)
index 0000000..6059757
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAxsekiqwLgs9VfChnr2bnpLC3VqD1iT+s969vWe05j1RDozPu
+zyD3krNgVUcd65x2QQJWrDK2fnyQUtubbPb3wviLXs0Gof4a/b65JsMQkeeC2/OK
+aFvrE6D3heouXmWO1vo1iXy2hUhcfXdr6eM3rP3zpU9zb2Al25/90Ha8kKBpe1RS
+PKHpmcqVXIpGVxJSXnioAFXUsJ687qrTv7Zm13AHkm2L1Y5IvMsGHLFjFTGFlFoY
+ftQQAepF507CFqs66tD378vvNVg8LYqrKpnfdx2PIRNLHAa1xQWc0EvwGHyBQZRL
+hTXS3M3IZ7Y22dJ+3Zg15PMx7QmWDZO5MG/JPwIDAQABAoIBAE5KS1AiutXmezDP
+aSb4TLvcrhj8hDhuT92txxmQCV+ePJWG2sPRpDCvXX246NvnX9vy49gmkSH4RY+c
+1vZvvt2XrqzD65zZzB+sgpf1tA0DNdMTdKvtqASvHU4tEd4z+bJKEdP4vpp4CZWQ
+93vC9ia4TsIJLNns8Hwz42+7lEEResKYZA2djGnzHl+83vR1dm0GGBD6BKR1C3Cx
+HbEhqx42EV61+8nAweQNjWKxeAc2hg+H8o8qWJM1aKy0TnqW6kudOYRyYIpX0rJA
+siE2HwvDA1mDd5M8ntZ/Cx0pnTc/cuZB8BQJ0jN1JXbrJGbWspBNXformw7isbyO
+WIOjvEECgYEA84XKV3aPrTE2JBs5vzzs59NMPV+5frw+xzDyPxqK5Q7+jjVKDwxh
+/WRatCaTdRxhOI905HfVsDYjrsPOpmF9MHsLxmBhwk8zBFOu/xtYr7zBNkJhmCsq
+kZMdxf8bpu08E7kMQJ2MvT7OhM5HRlWIUR0jdja8Hz51Ro4oOb/po7kCgYEA0Pb5
+v12ZsaSHMF0r4l983PifNwYmI22iQIEtRT2DxgTkDKgBTjbRzqZmEhaADMAO48o9
+sIZy+KJ/a8G9fPQVwMgBID8zOHnWsrFmM3qkj5hhrAQdtq7OE71zgaP0tyE1TG4u
+Zs3a7eSyuoildHHFqX88oXSYsTlfV8vn23UpwLcCgYEAwXiCuBger8dQL0FeEJwz
+zz5k7MG3WoPuEEzHuPC6dp8CCDM4IlqBI1JuaX/YWQtyBgCbKsQ2BigNE1THQhJj
+5ndrdHCwWjKX4pElj9HHFN+OVTBJ3x40VLGfzuUNsAH8X+L9Y/yHivZyFrrXj352
+rZLL0KhNrzjs7WAVf0QEOCkCgYBe2s1xnZZnueyX+qMyBfBTChST0Jm9WUXejAS1
+un+3gn7Wc+jrzRyd9pC8wzPrFb9sjWBFYjKMRI8cpfxS3SWGtgM01Rt2FnBr+vUO
+hyxt9ljX0aJ/S4hGE6h7/6XU/yEHibhMeENZ24d5/w9D9WUpVJV8IMYzJHzwCKI9
+z0hdrwKBgQDMKvY3DBpZjhZe9YnOgdj4SRpNwaasUSf3a3SZYY1JyOZVUzeSSzoX
+rYLfxBRDjkJ8Nnod+nR/JSRqYa/SJYEMZEZFsC+k/pvBiaP6tk694IlpLD/2MXN6
+14FUV5LH/rGSbZJMSfZ9yNX1XZDowH8nOu+qlmlU4lmgiOuityTmtw==
+-----END RSA PRIVATE KEY-----
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Artifacts/keys/id_rsa.pub b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Artifacts/keys/id_rsa.pub
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Definitions/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Definitions/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..0d24d8c
--- /dev/null
@@ -0,0 +1,764 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_infra
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_infra
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_infra:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-1111-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-1111-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_infra ] ]
+        default: vcpe_infra
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+#  substitution_mappings:
+#    node_type: onap.vcpe_infra
+#    requirements:
+#      virtual_link: [ Cp_vaaa_public, virtual_link ] # expose as external CP
+#      virtual_link: [ Cp_vaaa_onap_private, virtual_link ] # expose as external CP
+#      virtual_link: [ Cp_vdns_public, virtual_link ]
+#      virtual_link: [ Cp_vdns_onap_private, virtual_link ]
+#      virtual_link: [ Cp_vdhcp_public, virtual_link ]
+#      virtual_link: [ Cp_vdhcp_onap_private, virtual_link ]
+#      virtual_link: [ Cp_vweb_public, virtual_link ]
+#      virtual_link: [ Cp_vweb_onap_private, virtual_link ]
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    mr_ip_addr:
+      type: string
+      description: message router ip that for vDHCP configuration 
+      default: 10.0.11.1
+    mr_ip_port:
+      type: integer
+      # label: Message Router Port
+      description: IP port of the Message Router that for vDHCP configuration
+      default: 80
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: integer
+      description: dcae collector port
+      default: 8080
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    cpe_signal_net_id:
+      type: string
+      description: cpe signal net name
+      default: zdfw1cpe01_private
+    cpe_signal_net_cidr:
+      type: string
+      description: cpe signal net cidr
+      default: 10.4.0.0/24
+    cpe_public_net_id:
+      type: string
+      description: cpe public net name
+      default: zdfw1cpe01_public
+    cpe_public_net_cidr:
+      type: string
+      description: cpe public net cidr
+      default: 10.2.0.0/24
+    vdhcp_name_0:
+      type: string
+      description: vdu vdhcp_0 name
+      default: zdcpe1cpe01dhcp01
+    vdhcp_private_ip_0:
+      type: string
+      description: ip of vdhcp port to cpe signal net
+      default: 10.4.0.1
+    vdhcp_private_ip_1:
+      type: string
+      description: ip of vdhcp port to onap oam net
+      default: 10.0.101.1
+    vaaa_name_0:
+      type: string
+      description: vdu vaaa_0 name
+      default: zdcpe1cpe01aaa01
+    vaaa_private_ip_0:
+      type: string
+      description: ip of vaaa port to cpe signal net
+      default: 10.4.0.4
+    vaaa_private_ip_1:
+      type: string
+      description: ip of vaaa port to onap oam net
+      default: 10.0.101.2
+    vdns_name_0:
+      type: string
+      description: vdu vdns_0 name
+      default: zdcpe1cpe01dns01
+    vdns_private_ip_0:
+      type: string
+      description: ip of vdns port to cpe public net
+      default: 10.2.0.1
+    vdns_private_ip_1:
+      type: string
+      description: ip of vdns port to onap oam net
+      default: 10.0.101.3
+    vweb_name_0:
+      type: string
+      description: vdu vweb_0 name
+      default: zdcpe1cpe01web01
+    vweb_private_ip_0:
+      type: string
+      description: ip of vweb port to cpe public net
+      default: 10.2.0.10
+    vweb_private_ip_1:
+      type: string
+      description: ip of vweb port to onap oam net
+      default: 10.0.101.40
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Intrastructure
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #cpe signal network
+    VL_cpe_signal:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: cpe_signal_net_id}
+          cidr: { get_input: cpe_signal_net_cidr }
+          dhcpEnabled: false
+
+    #cpe public network
+    VL_cpe_public:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: cpe_public_net_id}
+          cidr: { get_input: cpe_public_net_cidr }
+          dhcpEnabled: false
+
+    # vaaa related
+    Cp_vaaa_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vaaa_0
+#        - virtual_link: VL_public
+
+    Cp_vaaa_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vaaa_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vaaa_0
+#        - virtual_link: VL_onap_private
+
+    Cp_vaaa_cpe_signal:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vaaa_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vaaa_0
+        - virtual_link: VL_cpe_signal
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vaaa_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vaaa_name_0 }
+        description: vaaa
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC Bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          dcae_collector_ip: { get_input: dcae_collector_ip }
+          dcae_collector_port: { get_input: dcae_collector_port }
+          cpe_signal_net_ipaddr: { get_input: vaaa_private_ip_0 }
+          oam_ipaddr: { get_input: vaaa_private_ip_1 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
+          echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
+          echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_aaa_install.sh
+          cd /opt
+          chmod +x v_aaa_install.sh
+          ./v_aaa_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
+    # vdns related
+    Cp_vdns_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vdns_0
+#        - virtual_link: VL_public
+
+    Cp_vdns_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdns_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vdns_0
+        #- virtual_link: VL_onap_private
+
+    Cp_vdns_cpe_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdns_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vdns_0
+        - virtual_link: VL_cpe_public
+
+    VDU_vdns_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vdns_name_0 }
+        description: vdns
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: # TODO SDC Bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          oam_ipaddr: { get_input: vdns_private_ip_1 }
+          cpe_public_net_ipaddr: { get_input: vdns_private_ip_0 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata cpe_public_net_ipaddr)" > /opt/config/cpe_public_net_ipaddr.txt
+          echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dns_install.sh
+          cd /opt
+          chmod +x v_dns_install.sh
+          ./v_dns_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
+    # vdhcp related
+    Cp_vdhcp_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vdhcp_0
+#        - virtual_link: VL_public
+
+    Cp_vdhcp_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdhcp_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vdhcp_0
+#        - virtual_link: VL_onap_private
+
+    Cp_vdhcp_cpe_signal:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdhcp_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vdhcp_0
+        - virtual_link: VL_cpe_signal
+
+    VDU_vdhcp_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vdhcp_name_0 }
+        description: vdhcp
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #SDC Bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          oam_ipaddr: { get_input: vdhcp_private_ip_1 }
+          cpe_signal_ipaddr: { get_input: vdhcp_private_ip_0 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
+          mr_ip_addr: { get_input: mr_ip_addr }
+          mr_ip_port: { get_input: mr_ip_port }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata cpe_signal_ipaddr)" > /opt/config/cpe_signal_ipaddr.txt
+          echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
+          echo "$(get_metadata mr_ip_addr)" > /opt/config/mr_ip_addr.txt
+          echo "$(get_metadata mr_ip_port)" > /opt/config/mr_ip_port.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dhcp_install.sh
+          cd /opt
+          chmod +x v_dhcp_install.sh
+          ./v_dhcp_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
+    # vweb related
+    Cp_vweb_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vweb_0
+#        - virtual_link: VL_public
+
+    Cp_vweb_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vweb_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vweb_0
+#        - virtual_link: VL_onap_private
+
+    Cp_vweb_cpe_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vweb_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vweb_0
+        - virtual_link: VL_cpe_public
+
+    VDU_vweb_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vweb_name_0 }
+        description: vweb
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: # TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          oam_ipaddr: { get_input: vweb_private_ip_1 }
+          cpe_public_ipaddr: { get_input: vweb_private_ip_0 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata cpe_public_ipaddr)" > /opt/config/cpe_public_ipaddr.txt
+          echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_web_install.sh
+          cd /opt
+          chmod +x v_web_install.sh
+          ./v_web_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Definitions/onap_dm.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/Definitions/onap_dm.yaml
new file mode 100644 (file)
index 0000000..0a3faba
--- /dev/null
@@ -0,0 +1,827 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+#Artifact Types
+#Based on R2 Design-time Resource DM clean version v8
+artifact_types:
+  tosca.artifacts.nfv.SwImage:
+    derived_from: tosca.artifacts.Deployment.Image
+
+#Capabilities Type
+#Based on R2 Design-time Resource DM clean version v21
+capability_types:
+  tosca.capabilities.nfv.VirtualBindable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.Metric:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.VirtualCompute:
+    derived_from: tosca.capabilities.Root
+    properties:
+      logical_node:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+      compute_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      requested_additional_capabilities:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.RequestedAdditionalCapability
+        required: false
+      virtual_memory:
+        type: tosca.datatypes.nfv.VirtualMemory
+        required: true
+      virtual_cpu:
+        type: tosca.datatypes.nfv.VirtualCpu
+        required: true
+
+  tosca.capabilities.nfv.VirtualStorage:
+    derived_from: tosca.capabilities.Root
+
+  tosca.capabilities.nfv.VirtualLinkable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.ExtVirtualLinkable:
+    derived_from: tosca.capabilities.Root
+
+#Data Types
+#Based on R2 Design-time Resource DM clean version v45
+data_types:
+  tosca.datatypes.nfv.L2AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      mac_address_assignment:
+        type: boolean
+        required: true
+
+  tosca.datatypes.nfv.injectFile:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      source_path:
+        type: string
+        required: true
+      dest_path:
+        type: string
+        required: true
+
+  tosca.datatypes.nfv.L3AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      ip_address_assignment:
+        type: boolean
+        required: true   
+      floating_ip_activated:
+        type: boolean
+        required: true
+      ip_address_type:
+        type: string
+        required: false
+        constraints:
+          - valid_values: [ipv4, ipv6]
+      number_of_ip_address:
+        type: integer
+        required: false
+      fixed_ip_address:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+
+  tosca.datatypes.nfv.AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      address_type:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [mac_address, ip_address]    
+      l2_address_data:
+        type: tosca.datatypes.nfv.L2AddressData # empty in "GS NFV IFA011 V0.7.3"
+        required: false
+      l3_address_data:
+        type: tosca.datatypes.nfv.L3AddressData
+        required: false 
+  
+  tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      name:
+        type: string
+        required: false   
+      description:
+        type: string
+        required: false
+      support_mandatory:
+        type: boolean
+        required: true
+      #TODO HPA
+      network_interface_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: true
+      nic_io_requirements:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+  
+  tosca.datatypes.nfv.ConnectivityType:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      layer_protocol:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]  
+      flow_pattern:
+        type: string
+        required: false
+        constraints: # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          - valid_values: [Line, Tree, Mesh]
+  
+  tosca.datatypes.nfv.RequestedAdditionalCapability:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #name:
+        # key of containing map
+      support_mandatory:
+        type: boolean
+        required: true
+      min_requested_additional_capability_version:
+        type: string
+        required: false
+      preferred_requested_additional_capability_version:
+        type: string
+        required: false
+      requested_additional_capability_name:
+        type: string
+        required: true
+      target_performance_parameters:
+        type: map
+        entry_schema:
+          type: string
+        required: true     
+  
+  tosca.datatypes.nfv.VirtualMemory:
+      derived_from: tosca.datatypes.Root
+      properties:
+        virtual_mem_size:
+          type: scalar-unit.size # Number
+          required: true
+        virtual_mem_oversubscription_policy:
+          type: string
+          required: false
+        #TODO HPA
+        vdu_memory_requirements:
+          type: map
+          entry_schema:
+           type: string
+          required: false
+        numa_enabled:
+          type: boolean
+          required: false
+  
+  tosca.datatypes.nfv.VirtualCpu:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_architecture:
+        type: string
+        required: false
+      num_virtual_cpu:
+        type: integer
+        required: true
+      virtual_cpu_clock:
+        type: scalar-unit.frequency
+        required: false
+      virtual_cpu_oversubscription_policy:
+        type: string
+        required: false
+      #TODO HPA
+      vdu_cpu_requirements:
+        type: map
+        entry_schema:
+           type: string
+        required: false
+      virtual_cpu_pinning:
+        type: tosca.datatypes.nfv.VirtualCpuPinning
+        required: false
+  
+  tosca.datatypes.nfv.VirtualCpuPinning:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_pinning_policy:
+        type: string # CpuPinningPolicy
+        constraints:
+          - valid_values: [ static, dynamic ]
+        required: false
+      cpu_pinning_map:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VnfcConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      additional_vnfc_configurable_properties:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VduProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_number_of_instances:
+          type: integer
+          required: true
+        max_number_of_instances:
+          type: integer
+          required: true
+        #localAffinityOrAntiAffinityRule:  # not defined in SOL001 v.6.0
+        #  type: tosca.datatype.nfv.LocalAffinityOrAntiAffinityRule
+        #  required: true
+        #affinityOrAntiAffinityGroupId: # not defined in SOL001 v.6.0
+        #  type: string
+        #  required: true
+        watchdog: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: string
+          required: true
+        vmBootUpTimeOut: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: integer
+          required: false
+  
+   
+  tosca.datatypes.nfv.VlProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        max_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        min_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        qos:
+           type: tosca.datatypes.nfv.Qos
+           required: false
+        initiationParameters: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: map
+           entry_schema:
+             type: string
+           required: false
+        cidr: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkName:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        startIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        endIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        gatewayIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        segmentationId:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: integer
+           required: false
+        physicalNetwork:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkType:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+           constraints:
+             - valid_values: [VLAN, VXLAN]
+        dhcpEnabled:  # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+        vlanTransparent:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+  
+  tosca.datatypes.nfv.InstantiationLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        description:
+          type: string
+          required: true
+        vdu_levels:
+          type: map # key: vduId
+          required: true
+          entry_schema:
+            type: tosca.datatypes.nfv.VduLevel
+        scale_info:
+          type: map # key: aspectId
+          required: false
+          entry_schema:
+            type: tosca.datatypes.nfv.ScaleInfo
+  
+  tosca.datatypes.nfv.VduLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        number_of_instances:
+          type: integer
+          required: true
+  
+  tosca.datatypes.nfv.VnfLcmOperationsConfiguration: 
+    derived_from: tosca.datatypes.Root 
+    properties: 
+      instantiate: 
+        type: tosca.datatypes.nfv.VnfInstantiateOperationConfiguration 
+      scale:
+        type: tosca.datatypes.nfv.VnfScaleOperationConfiguration 
+      scale_to_level: 
+        type: tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration 
+      heal: 
+        type: tosca.datatypes.nfv.VnfHealOperationConfiguration
+      terminate:
+        type: tosca.datatypes.nfv.VnfTerminateOperationConfiguration
+      operate: 
+        type: tosca.datatypes.nfv.VnfOperateOperationConfiguration
+  
+  tosca.datatypes.nfv.VnfInstantiateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      #properties:
+        #parameters:
+            #modeled as part of operation parameter list
+  
+  tosca.datatypes.nfv.VnfScaleOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        scaling_by_more_than_one_step_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        arbitrary_target_levels_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfHealOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        causes:
+           type: list
+           entry_schema:
+             type: string
+  
+  tosca.datatypes.nfv.VnfTerminateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_graceful_termination_timeout:
+           type: integer
+        max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.VnfOperateOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    properties:
+      min_graceful_termination_timeout:
+           type: integer
+      max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.ScaleInfo:
+    derived_from: tosca.datatypes.Root
+    properties:
+      scaleLevel:
+           type: integer
+           required: true
+  
+  tosca.datatypes.nfv.ScaleAspect:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+         type: string
+         required: true
+      description:
+         type: string
+         required: true
+      associated_group:
+         type: string #Identifier
+         required: false
+      max_scale_level:
+         type: integer #PositiveInteger
+         required: true
+  
+  tosca.datatypes.nfv.LinkBitRateRequirements:
+    derived_from: tosca.datatypes.Root
+    properties:
+      root:
+         type: integer
+         required: true
+      leaf:
+         type: integer
+         required: true
+  
+  tosca.datatypes.nfv.Qos:
+    derived_from: tosca.datatypes.Root
+    properties:
+      latency:
+         type: integer #Number [ms]
+         required: true
+      packet_delay_variation:
+         type: integer #Number [ms]
+         required: true
+      packet_loss_ratio:
+         type: float
+         constraints:
+           - in_range: [ 0.0, 1.0 ]
+         required: false
+  
+  tosca.datatypes.nfv.CpProtocolData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      asscociated_layer_protocol:
+        type: string
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
+        required: true
+      address_data:
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.datatypes.nfv.VnfConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      is_autoscale_enabled:
+        type: boolean
+        required: false
+      is_autoheal_enabled:
+        type: boolean
+        required: false
+      additional_configurable_properties:
+        type: tosca.datatypes.nfv.VnfAdditionalConfigurableProperties
+        required: false
+  
+  tosca.datatypes.nfv.VnfAdditionalConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributes:
+    derived_from: tosca.datatypes.Root
+    properties:
+      extensions:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions
+        required: false
+      metadata:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata
+        required: false
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.LogicalNodeData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #TODO HPA
+      logical_node_requirements:
+        type: map # not defined in SOL001 v.6.0
+        entry_schema:
+          type: string
+        required: false
+
+#Interface Types
+#Based on R2 Design-time Resource DM clean version v10
+interface_types:
+  tosca.interfaces.nfv.vnf.lifecycle.Nfv:
+    derived_from: tosca.interfaces.Root
+    instantiate:
+      description: Invoked upon receipt of an Instantiate VNF request
+    instantiate_start:
+      description: Invoked before instantiate
+    instantiate_end:
+      description: Invoked after instantiate
+    terminate:
+      description: Invoked upon receipt Terminate VNF request
+    terminate_start:
+      description: Invoked before terminate
+    terminate_end:
+      description: Invoked after terminate
+    modify_information:
+      description: Invoked upon receipt of a Modify VNF Information request
+    modify_information_start:
+      description: Invoked before modify_information
+    modify_information_end:
+      description: Invoked after modify_information
+    change_flavour:
+      description: Invoked upon receipt of a Change VNF Flavour request
+    change_flavour_start:
+      description: Invoked before change_flavour
+    change_flavour_end:
+      description: Invoked after change_flavour
+    change_external_connectivity:
+      description: Invoked upon receipt of a Change External VNF Connectivity request
+    change_external_connectivity_start:
+      description: Invoked before change_external_connectivity
+    change_external_connectivity_end:
+      description: Invoked after change_external_connectivity
+    operate:
+      description: Invoked upon receipt of an Operate VNF request
+    operate_start:
+      description: Invoked before operate
+    operate_end:
+      description: Invoked after operate
+    heal:
+      description: Invoked upon receipt of a Heal VNF request
+    heal_start:
+      description: Invoked before heal
+    heal_end:
+      description: Invoked after heal
+    scale:
+      description: Invoked upon receipt of a Scale VNF request
+    scale_start:
+      description: Invoked before scale
+    scale_end:
+      description: Invoked after scale 
+    scale_to_level:
+      description: Invoked upon receipt of a Scale VNF to Level request
+    scale_to_level_start:
+      description: Invoked before scale_to_level
+    scale_to_level_end:
+      description: Invoked after scale_to_level
+  #  indicator_changed:
+  #    description: On receiving a VNF indicator value change notification
+
+#Node Types
+#Based on R2 Design-time Resource DM clean version v36
+node_types:
+  tosca.nodes.nfv.Vdu.Compute:
+    derived_from: tosca.nodes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      description:
+        type: string
+        required: true
+      boot_order:
+        type: list # explicit index (boot index) not necessary, contrary to IFA011
+        entry_schema:
+          type: string
+        required: false
+      nfvi_constraints:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      configurable_properties:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.VnfcConfigurableProperties
+        required: true 
+      vdu_profile:
+        type: tosca.datatypes.nfv.VduProfile
+        required: true
+      inject_files: #Aligned with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        #type: list
+        #entry_schema:
+        #TODO workaround of SDC bug
+        type: tosca.datatypes.nfv.injectFile
+        required: false
+      meta_data: #metadata attached to the VM or container
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      user_data: #cloudinit userdata script support
+        type: string
+        required: false
+    #attributes: NOT DEFINED IN ONAP IM and SOL001
+      #private_address:
+      #  status: deprecated
+      #public_address:
+      #  status: deprecated
+      #networks:
+      #  status: deprecated
+      #ports:
+      #  status: deprecated
+    capabilities:
+      virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+      virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences: [1, UNBOUNDED]
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+    requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          relationship: tosca.relationships.nfv.Vdu.AttachedTo
+          node: tosca.nodes.nfv.Vdu.VirtualStorage
+          occurrences: [ 0, UNBOUNDED ]
+    #artifacts:
+    #  - sw_image:
+    #      file:
+    #      type: tosca.artifacts.nfv.SwImage
+  
+  tosca.nodes.nfv.Vdu.VirtualStorage:
+    derived_from: tosca.nodes.Root
+    properties:
+      #id:
+        # node name
+      type_of_storage:
+        type: string
+        constraints:
+          - valid_values: [volume, object, root, block]
+        required: true
+      size_of_storage:
+        type: scalar-unit.size
+        required: true
+      #TODO HPA
+      vdu_storage_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      rdma_enabled:
+        type: boolean
+        required: false
+    capabilities:
+      virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+    #artifacts:
+    #  - sw_image:
+    #     file:
+    #     type: tosca.artifacts.Deployment.Image
+  
+  tosca.nodes.nfv.Cp:
+    derived_from: tosca.nodes.Root
+    properties:
+      layer_protocol:
+        type: list
+        entry_schema:
+          constraints:
+            - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]
+          type: string
+        required: true
+      role: #Name in ETSI NFV IFA011 v0.7.3 cpRole
+        type: string
+        constraints:
+          - valid_values: [ root, leaf ]
+        required: false
+      description:
+        type: string
+        required: false
+      protocol_data:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.CpProtocolData
+        required: true
+      trunk_mode:
+        type: boolean
+        required: true
+      allowedAddressData: # Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.nodes.nfv.VduCp:
+    derived_from: tosca.nodes.nfv.Cp
+    properties:
+      bitrate_requirement:
+        type: integer
+        required: false
+      vnic_name: #  Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        required: false
+      vnic_order: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: integer
+        required: false
+      vnic_type: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        constraints:
+            - valid_values: [normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder]
+        required: false
+      virtual_network_interface_requirements:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+        required: false
+      #order:
+      #  type: integer
+      #  required: false
+      #  constraints:
+      #    - greater_or_equal: 0
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink   
+      - virtual_binding:
+          capability: tosca.capabilities.nfv.VirtualBindable
+          relationship: tosca.relationships.nfv.VirtualBindsTo
+          node: tosca.nodes.nfv.Vdu.Compute
+  
+  tosca.nodes.nfv.VnfVirtualLink:
+    derived_from: tosca.nodes.Root
+    properties:
+      connectivity_type:
+        type: tosca.datatypes.nfv.ConnectivityType
+        required: true
+      description:
+        type: string
+        required: false
+      test_access:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      vl_profile:
+        type: tosca.datatypes.nfv.VlProfile
+        required: true
+    capabilities:
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+      virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+  
+  tosca.nodes.nfv.VNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id: # instead of vnfd_id
+        type: string # GUID
+        required: true
+      descriptor_version: # instead of vnfd_version
+        type: string
+        required: true
+      provider: # instead of vnf_provider
+        type: string
+        required: true
+      product_name: # instead of vnf_product_name
+        type: string
+        required: true
+      software_version: # instead of vnf_software_version
+        type: string
+        required: true
+      product_info_name: # instead of vnf_product_info_name
+        type: string
+        required: false
+      product_info_description: # instead of vnf_product_info_description
+        type: string
+        required: false
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        required: true
+      localization_languages:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      default_localization_language:
+        type: string
+        required: false
+      configurable_properties:
+        type: tosca.datatypes.nfv.VnfConfigurableProperties
+        required: false
+      modifiable_attributes:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributes
+        required: false  # true in IFA011, but all of members are false
+      flavour_id:
+        type: string
+        required: true
+      flavour_description:
+        type: string
+        required: true
+    #capabilities:
+      # monitoring_parameter:
+        # modelled as ad hoc capabilities in the VNF node template
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink
+          occurrences: [ 0, UNBOUNDED ]
+    interfaces:
+      Nfv:
+        type: tosca.interfaces.nfv.vnf.lifecycle.Nfv
+
+#Relationship Types
+#Based on R2 Design-time Resource DM clean version v4
+relationship_types:
+  tosca.relationships.nfv.VirtualBindsTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualBindable]
+  
+  tosca.relationships.nfv.VirtualLinksTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable]
+
+  tosca.relationships.nfv.Vdu.AttachedTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualStorage]
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/MainServiceTemplate.mf b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/MainServiceTemplate.mf
new file mode 100644 (file)
index 0000000..67f80e5
--- /dev/null
@@ -0,0 +1,8 @@
+metadata:
+    vnf_product_name: vcpe_infra
+    vnf_provider_id: ONAP
+    vnf_package_version: 1.0
+    vnf_release_data_time: 2018.05.06T13:00+08:00
+
+Source: MainServiceTemplate.yaml
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..537efde
--- /dev/null
@@ -0,0 +1,763 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_infra
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_infra
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_infra:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-1111-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-1111-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_infra ] ]
+        default: vcpe_infra
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+#  substitution_mappings:
+#    node_type: onap.vcpe_infra
+#    requirements:
+#      virtual_link: [ Cp_vaaa_public, virtual_link ] # expose as external CP
+#      virtual_link: [ Cp_vaaa_onap_private, virtual_link ] # expose as external CP
+#      virtual_link: [ Cp_vdns_public, virtual_link ]
+#      virtual_link: [ Cp_vdns_onap_private, virtual_link ]
+#      virtual_link: [ Cp_vdhcp_public, virtual_link ]
+#      virtual_link: [ Cp_vdhcp_onap_private, virtual_link ]
+#      virtual_link: [ Cp_vweb_public, virtual_link ]
+#      virtual_link: [ Cp_vweb_onap_private, virtual_link ]
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    mr_ip_addr:
+      type: string
+      description: message router ip that for vDHCP configuration 
+      default: 10.0.11.1
+    mr_ip_port:
+      type: string
+      label: Message Router Port 
+      description: IP port of the Message Router that for vDHCP configuration 
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: integer
+      description: dcae collector port
+      default: 8080
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    cpe_signal_net_id:
+      type: string
+      description: cpe signal net name
+      default: zdfw1cpe01_private
+    cpe_signal_net_cidr:
+      type: string
+      description: cpe signal net cidr
+      default: 10.4.0.0/24
+    cpe_public_net_id:
+      type: string
+      description: cpe public net name
+      default: zdfw1cpe01_public
+    cpe_public_net_cidr:
+      type: string
+      description: cpe public net cidr
+      default: 10.2.0.0/24
+    vdhcp_name_0:
+      type: string
+      description: vdu vdhcp_0 name
+      default: zdcpe1cpe01dhcp01
+    vdhcp_private_ip_0:
+      type: string
+      description: ip of vdhcp port to cpe signal net
+      default: 10.4.0.1
+    vdhcp_private_ip_1:
+      type: string
+      description: ip of vdhcp port to onap oam net
+      default: 10.0.101.1
+    vaaa_name_0:
+      type: string
+      description: vdu vaaa_0 name
+      default: zdcpe1cpe01aaa01
+    vaaa_private_ip_0:
+      type: string
+      description: ip of vaaa port to cpe signal net
+      default: 10.4.0.4
+    vaaa_private_ip_1:
+      type: string
+      description: ip of vaaa port to onap oam net
+      default: 10.0.101.2
+    vdns_name_0:
+      type: string
+      description: vdu vdns_0 name
+      default: zdcpe1cpe01dns01
+    vdns_private_ip_0:
+      type: string
+      description: ip of vdns port to cpe public net
+      default: 10.2.0.1
+    vdns_private_ip_1:
+      type: string
+      description: ip of vdns port to onap oam net
+      default: 10.0.101.3
+    vweb_name_0:
+      type: string
+      description: vdu vweb_0 name
+      default: zdcpe1cpe01web01
+    vweb_private_ip_0:
+      type: string
+      description: ip of vweb port to cpe public net
+      default: 10.2.0.10
+    vweb_private_ip_1:
+      type: string
+      description: ip of vweb port to onap oam net
+      default: 10.0.101.40
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Intrastructure
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #cpe signal network
+    VL_cpe_signal:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: cpe_signal_net_id}
+          cidr: { get_input: cpe_signal_net_cidr }
+          dhcpEnabled: false
+
+    #cpe public network
+    VL_cpe_public:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: cpe_public_net_id}
+          cidr: { get_input: cpe_public_net_cidr }
+          dhcpEnabled: false
+
+    # vaaa related
+    Cp_vaaa_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vaaa_0
+#        - virtual_link: VL_public
+
+    Cp_vaaa_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vaaa_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vaaa_0
+#        - virtual_link: VL_onap_private
+
+    Cp_vaaa_cpe_signal:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vaaa_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vaaa_0
+        - virtual_link: VL_cpe_signal
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vaaa_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vaaa_name_0 }
+        description: vaaa
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC Bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          dcae_collector_ip: { get_input: dcae_collector_ip }
+          dcae_collector_port: { get_input: dcae_collector_port }
+          cpe_signal_net_ipaddr: { get_input: vaaa_private_ip_0 }
+          oam_ipaddr: { get_input: vaaa_private_ip_1 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
+          echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
+          echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_aaa_install.sh
+          cd /opt
+          chmod +x v_aaa_install.sh
+          ./v_aaa_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
+    # vdns related
+    Cp_vdns_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vdns_0
+#        - virtual_link: VL_public
+
+    Cp_vdns_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdns_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vdns_0
+        #- virtual_link: VL_onap_private
+
+    Cp_vdns_cpe_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdns_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vdns_0
+        - virtual_link: VL_cpe_public
+
+    VDU_vdns_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vdns_name_0 }
+        description: vdns
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: # TODO SDC Bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          oam_ipaddr: { get_input: vdns_private_ip_1 }
+          cpe_public_net_ipaddr: { get_input: vdns_private_ip_0 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata cpe_public_net_ipaddr)" > /opt/config/cpe_public_net_ipaddr.txt
+          echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dns_install.sh
+          cd /opt
+          chmod +x v_dns_install.sh
+          ./v_dns_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
+    # vdhcp related
+    Cp_vdhcp_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vdhcp_0
+#        - virtual_link: VL_public
+
+    Cp_vdhcp_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdhcp_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vdhcp_0
+#        - virtual_link: VL_onap_private
+
+    Cp_vdhcp_cpe_signal:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdhcp_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vdhcp_0
+        - virtual_link: VL_cpe_signal
+
+    VDU_vdhcp_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vdhcp_name_0 }
+        description: vdhcp
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #SDC Bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          oam_ipaddr: { get_input: vdhcp_private_ip_1 }
+          cpe_signal_ipaddr: { get_input: vdhcp_private_ip_0 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
+          mr_ip_addr: { get_input: mr_ip_addr }
+          mr_ip_port: { get_input: mr_ip_port }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata cpe_signal_ipaddr)" > /opt/config/cpe_signal_ipaddr.txt
+          echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
+          echo "$(get_metadata mr_ip_addr)" > /opt/config/mr_ip_addr.txt
+          echo "$(get_metadata mr_ip_port)" > /opt/config/mr_ip_port.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dhcp_install.sh
+          cd /opt
+          chmod +x v_dhcp_install.sh
+          ./v_dhcp_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
+    # vweb related
+    Cp_vweb_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vweb_0
+#        - virtual_link: VL_public
+
+    Cp_vweb_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vweb_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vweb_0
+#        - virtual_link: VL_onap_private
+
+    Cp_vweb_cpe_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vweb_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vweb_0
+        - virtual_link: VL_cpe_public
+
+    VDU_vweb_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vweb_name_0 }
+        description: vweb
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: # TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          oam_ipaddr: { get_input: vweb_private_ip_1 }
+          cpe_public_ipaddr: { get_input: vweb_private_ip_0 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata cpe_public_ipaddr)" > /opt/config/cpe_public_ipaddr.txt
+          echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_web_install.sh
+          cd /opt
+          chmod +x v_web_install.sh
+          ./v_web_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/TOSCA-Metadata/TOSCA.meta b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/infra/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..4eaf193
--- /dev/null
@@ -0,0 +1,4 @@
+TOSCA-Meta-File-Version: 1.0
+CSAR-Version: 1.1
+Created-By: ONAP
+Entry-Definitions: Definitions/MainServiceTemplate.yaml
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng.csar b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng.csar
deleted file mode 100644 (file)
index b11a6ef..0000000
Binary files a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng.csar and /dev/null differ
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Artifacts/images/ubuntu_16.04 b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Artifacts/images/ubuntu_16.04
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Artifacts/keys/authorized_keys b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Artifacts/keys/authorized_keys
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Artifacts/keys/id_rsa b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Artifacts/keys/id_rsa
new file mode 100644 (file)
index 0000000..6059757
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAxsekiqwLgs9VfChnr2bnpLC3VqD1iT+s969vWe05j1RDozPu
+zyD3krNgVUcd65x2QQJWrDK2fnyQUtubbPb3wviLXs0Gof4a/b65JsMQkeeC2/OK
+aFvrE6D3heouXmWO1vo1iXy2hUhcfXdr6eM3rP3zpU9zb2Al25/90Ha8kKBpe1RS
+PKHpmcqVXIpGVxJSXnioAFXUsJ687qrTv7Zm13AHkm2L1Y5IvMsGHLFjFTGFlFoY
+ftQQAepF507CFqs66tD378vvNVg8LYqrKpnfdx2PIRNLHAa1xQWc0EvwGHyBQZRL
+hTXS3M3IZ7Y22dJ+3Zg15PMx7QmWDZO5MG/JPwIDAQABAoIBAE5KS1AiutXmezDP
+aSb4TLvcrhj8hDhuT92txxmQCV+ePJWG2sPRpDCvXX246NvnX9vy49gmkSH4RY+c
+1vZvvt2XrqzD65zZzB+sgpf1tA0DNdMTdKvtqASvHU4tEd4z+bJKEdP4vpp4CZWQ
+93vC9ia4TsIJLNns8Hwz42+7lEEResKYZA2djGnzHl+83vR1dm0GGBD6BKR1C3Cx
+HbEhqx42EV61+8nAweQNjWKxeAc2hg+H8o8qWJM1aKy0TnqW6kudOYRyYIpX0rJA
+siE2HwvDA1mDd5M8ntZ/Cx0pnTc/cuZB8BQJ0jN1JXbrJGbWspBNXformw7isbyO
+WIOjvEECgYEA84XKV3aPrTE2JBs5vzzs59NMPV+5frw+xzDyPxqK5Q7+jjVKDwxh
+/WRatCaTdRxhOI905HfVsDYjrsPOpmF9MHsLxmBhwk8zBFOu/xtYr7zBNkJhmCsq
+kZMdxf8bpu08E7kMQJ2MvT7OhM5HRlWIUR0jdja8Hz51Ro4oOb/po7kCgYEA0Pb5
+v12ZsaSHMF0r4l983PifNwYmI22iQIEtRT2DxgTkDKgBTjbRzqZmEhaADMAO48o9
+sIZy+KJ/a8G9fPQVwMgBID8zOHnWsrFmM3qkj5hhrAQdtq7OE71zgaP0tyE1TG4u
+Zs3a7eSyuoildHHFqX88oXSYsTlfV8vn23UpwLcCgYEAwXiCuBger8dQL0FeEJwz
+zz5k7MG3WoPuEEzHuPC6dp8CCDM4IlqBI1JuaX/YWQtyBgCbKsQ2BigNE1THQhJj
+5ndrdHCwWjKX4pElj9HHFN+OVTBJ3x40VLGfzuUNsAH8X+L9Y/yHivZyFrrXj352
+rZLL0KhNrzjs7WAVf0QEOCkCgYBe2s1xnZZnueyX+qMyBfBTChST0Jm9WUXejAS1
+un+3gn7Wc+jrzRyd9pC8wzPrFb9sjWBFYjKMRI8cpfxS3SWGtgM01Rt2FnBr+vUO
+hyxt9ljX0aJ/S4hGE6h7/6XU/yEHibhMeENZ24d5/w9D9WUpVJV8IMYzJHzwCKI9
+z0hdrwKBgQDMKvY3DBpZjhZe9YnOgdj4SRpNwaasUSf3a3SZYY1JyOZVUzeSSzoX
+rYLfxBRDjkJ8Nnod+nR/JSRqYa/SJYEMZEZFsC+k/pvBiaP6tk694IlpLD/2MXN6
+14FUV5LH/rGSbZJMSfZ9yNX1XZDowH8nOu+qlmlU4lmgiOuityTmtw==
+-----END RSA PRIVATE KEY-----
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Artifacts/keys/id_rsa.pub b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Artifacts/keys/id_rsa.pub
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Definitions/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Definitions/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..a4e54bd
--- /dev/null
@@ -0,0 +1,436 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vbng
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_vbng
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vbng:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-5555-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-5555-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vbng ] ]
+        default: vcpe_vbng
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+#  substitution_mappings:
+#    node_type: onap.vcpe_vbng
+#    requirements:
+#      virtual_link: [ Cp_vbng_public, virtual_link ] # expose as external CP
+#      virtual_link: [ Cp_vbng_onap_private, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    brgemu_bng_private_net_id:
+      type: string
+      description: Private network that connects vBRG to vBNG
+      default: zdfw1bngin01_private
+    brgemu_bng_private_net_cidr:
+      type: string
+      description: The CIDR of the input side of vBNG private network
+      default: 10.3.0.0/24
+    bng_gmux_private_net_id:
+      type: string
+      description: Private network that connects vBNG to vGMUX
+      default: zdfw1bngmux01_private
+    bng_gmux_private_net_cidr:
+      type: string
+      description: The CIDR of the input side of vGMUX private network
+      default: 10.1.0.0/24
+    cpe_signal_net_id:
+      type: string
+      description: Private network that connects vCPE elements with vCPE infrastructure elements
+      default: zdfw1cpe01_private
+    cpe_signal_private_net_cidr:
+      type: string
+      description: The CIDR of the vAAA private network
+      default: 10.4.0.0/24
+    vbng_private_ip_0:
+      type: string
+      description: Private IP address that is assigned to the vBNG IN
+      default: 10.3.0.1
+    vbng_private_ip_1:
+      type: string
+      description: Private IP address that is assigned to the vBNG to communicate with ONAP components
+      default: 10.0.101.10
+    vbng_private_ip_2:
+      type: string
+      description: Private IP address that is assigned to the vBNG in the CPE_SIGNAL network
+      default: 10.4.0.3
+    vbng_private_ip_3:
+      type: string
+      description: Private IP address that is assigned to the vBNG to vGMUX port
+      default: 10.1.0.10
+    vbng_name_0:
+      type: string
+      description: Name of the vBNG
+      default: zdcpe1cpe01bng01
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_Metro_vBNG_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Intrastructure_Metro_vBNG
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: integer
+      description: dcae collector port
+      default: 8080
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    sdnc_ip_addr:
+      type: string
+      description: IP address of the SDNC
+      default: 10.0.7.1
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #Private network that connects vBRG to vBNG
+    VL_brgemu_bng_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: brgemu_bng_private_net_id}
+          cidr: { get_input: brgemu_bng_private_net_cidr }
+          dhcpEnabled: false
+
+    #cpe signal network
+    VL_cpe_signal:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: cpe_signal_net_id}
+          cidr: { get_input: cpe_signal_private_net_cidr }
+          dhcpEnabled: false
+
+    #Private network that connects vBNG to vGMUX
+    VL_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: bng_gmux_private_net_id}
+          cidr: { get_input: bng_gmux_private_net_cidr }
+          dhcpEnabled: false
+
+    # vbng related
+    Cp_vbng_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        #- virtual_link: VL_public
+
+    Cp_vbng_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        #- virtual_link: VL_onap_private
+
+    Cp_vbng_brgemu_bng_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_0 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            # TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        - virtual_link: VL_brgemu_bng_private_net
+
+    Cp_vbng_cpe_signal:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_2 }
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        - virtual_link: VL_cpe_signal
+
+    Cp_vbng_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_3 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            # TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        - virtual_link: VL_bng_gmux_private_net
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vbng_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vbng_name_0 }
+        description: vbng
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+
+          brgemu_bng_net_ipaddr: { get_input: vbng_private_ip_0 }
+          cpe_signal_net_ipaddr: { get_input: vbng_private_ip_2 }
+          bng_gmux_net_ipaddr: { get_input: vbng_private_ip_3 }
+          oam_ipaddr: { get_input: vbng_private_ip_1 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          bng_gmux_cidr: { get_input: bng_gmux_private_net_cidr }
+          cpe_signal_cidr: { get_input: cpe_signal_private_net_cidr }
+          brgemu_bng_cidr: { get_input: brgemu_bng_private_net_cidr }
+          dcae_collector_ip: { get_input: dcae_collector_ip }
+          dcae_collector_port: { get_input: dcae_collector_port }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          sdnc_ip: { get_input: sdnc_ip_addr }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata brgemu_bng_net_ipaddr)" > /opt/config/brgemu_bng_net_ipaddr.txt
+          echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
+          echo "$(get_metadata bng_gmux_net_ipaddr)" > /opt/config/bng_gmux_net_ipaddr.txt
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata bng_gmux_cidr)" > /opt/config/bng_gmux_net_cidr.txt
+          echo "$(get_metadata cpe_signal_cidr)" > /opt/config/cpe_signal_net_cidr.txt
+          echo "$(get_metadata brgemu_bng_cidr)" > /opt/config/brgemu_bng_net_cidr.txt
+          echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
+          echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_bng_install.sh
+          cd /opt
+          chmod +x v_bng_install.sh
+          ./v_bng_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              # HPA requirements
+              vdu_memory_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Definitions/onap_dm.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/Definitions/onap_dm.yaml
new file mode 100644 (file)
index 0000000..0a3faba
--- /dev/null
@@ -0,0 +1,827 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+#Artifact Types
+#Based on R2 Design-time Resource DM clean version v8
+artifact_types:
+  tosca.artifacts.nfv.SwImage:
+    derived_from: tosca.artifacts.Deployment.Image
+
+#Capabilities Type
+#Based on R2 Design-time Resource DM clean version v21
+capability_types:
+  tosca.capabilities.nfv.VirtualBindable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.Metric:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.VirtualCompute:
+    derived_from: tosca.capabilities.Root
+    properties:
+      logical_node:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+      compute_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      requested_additional_capabilities:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.RequestedAdditionalCapability
+        required: false
+      virtual_memory:
+        type: tosca.datatypes.nfv.VirtualMemory
+        required: true
+      virtual_cpu:
+        type: tosca.datatypes.nfv.VirtualCpu
+        required: true
+
+  tosca.capabilities.nfv.VirtualStorage:
+    derived_from: tosca.capabilities.Root
+
+  tosca.capabilities.nfv.VirtualLinkable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.ExtVirtualLinkable:
+    derived_from: tosca.capabilities.Root
+
+#Data Types
+#Based on R2 Design-time Resource DM clean version v45
+data_types:
+  tosca.datatypes.nfv.L2AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      mac_address_assignment:
+        type: boolean
+        required: true
+
+  tosca.datatypes.nfv.injectFile:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      source_path:
+        type: string
+        required: true
+      dest_path:
+        type: string
+        required: true
+
+  tosca.datatypes.nfv.L3AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      ip_address_assignment:
+        type: boolean
+        required: true   
+      floating_ip_activated:
+        type: boolean
+        required: true
+      ip_address_type:
+        type: string
+        required: false
+        constraints:
+          - valid_values: [ipv4, ipv6]
+      number_of_ip_address:
+        type: integer
+        required: false
+      fixed_ip_address:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+
+  tosca.datatypes.nfv.AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      address_type:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [mac_address, ip_address]    
+      l2_address_data:
+        type: tosca.datatypes.nfv.L2AddressData # empty in "GS NFV IFA011 V0.7.3"
+        required: false
+      l3_address_data:
+        type: tosca.datatypes.nfv.L3AddressData
+        required: false 
+  
+  tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      name:
+        type: string
+        required: false   
+      description:
+        type: string
+        required: false
+      support_mandatory:
+        type: boolean
+        required: true
+      #TODO HPA
+      network_interface_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: true
+      nic_io_requirements:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+  
+  tosca.datatypes.nfv.ConnectivityType:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      layer_protocol:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]  
+      flow_pattern:
+        type: string
+        required: false
+        constraints: # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          - valid_values: [Line, Tree, Mesh]
+  
+  tosca.datatypes.nfv.RequestedAdditionalCapability:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #name:
+        # key of containing map
+      support_mandatory:
+        type: boolean
+        required: true
+      min_requested_additional_capability_version:
+        type: string
+        required: false
+      preferred_requested_additional_capability_version:
+        type: string
+        required: false
+      requested_additional_capability_name:
+        type: string
+        required: true
+      target_performance_parameters:
+        type: map
+        entry_schema:
+          type: string
+        required: true     
+  
+  tosca.datatypes.nfv.VirtualMemory:
+      derived_from: tosca.datatypes.Root
+      properties:
+        virtual_mem_size:
+          type: scalar-unit.size # Number
+          required: true
+        virtual_mem_oversubscription_policy:
+          type: string
+          required: false
+        #TODO HPA
+        vdu_memory_requirements:
+          type: map
+          entry_schema:
+           type: string
+          required: false
+        numa_enabled:
+          type: boolean
+          required: false
+  
+  tosca.datatypes.nfv.VirtualCpu:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_architecture:
+        type: string
+        required: false
+      num_virtual_cpu:
+        type: integer
+        required: true
+      virtual_cpu_clock:
+        type: scalar-unit.frequency
+        required: false
+      virtual_cpu_oversubscription_policy:
+        type: string
+        required: false
+      #TODO HPA
+      vdu_cpu_requirements:
+        type: map
+        entry_schema:
+           type: string
+        required: false
+      virtual_cpu_pinning:
+        type: tosca.datatypes.nfv.VirtualCpuPinning
+        required: false
+  
+  tosca.datatypes.nfv.VirtualCpuPinning:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_pinning_policy:
+        type: string # CpuPinningPolicy
+        constraints:
+          - valid_values: [ static, dynamic ]
+        required: false
+      cpu_pinning_map:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VnfcConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      additional_vnfc_configurable_properties:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VduProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_number_of_instances:
+          type: integer
+          required: true
+        max_number_of_instances:
+          type: integer
+          required: true
+        #localAffinityOrAntiAffinityRule:  # not defined in SOL001 v.6.0
+        #  type: tosca.datatype.nfv.LocalAffinityOrAntiAffinityRule
+        #  required: true
+        #affinityOrAntiAffinityGroupId: # not defined in SOL001 v.6.0
+        #  type: string
+        #  required: true
+        watchdog: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: string
+          required: true
+        vmBootUpTimeOut: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: integer
+          required: false
+  
+   
+  tosca.datatypes.nfv.VlProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        max_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        min_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        qos:
+           type: tosca.datatypes.nfv.Qos
+           required: false
+        initiationParameters: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: map
+           entry_schema:
+             type: string
+           required: false
+        cidr: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkName:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        startIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        endIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        gatewayIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        segmentationId:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: integer
+           required: false
+        physicalNetwork:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkType:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+           constraints:
+             - valid_values: [VLAN, VXLAN]
+        dhcpEnabled:  # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+        vlanTransparent:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+  
+  tosca.datatypes.nfv.InstantiationLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        description:
+          type: string
+          required: true
+        vdu_levels:
+          type: map # key: vduId
+          required: true
+          entry_schema:
+            type: tosca.datatypes.nfv.VduLevel
+        scale_info:
+          type: map # key: aspectId
+          required: false
+          entry_schema:
+            type: tosca.datatypes.nfv.ScaleInfo
+  
+  tosca.datatypes.nfv.VduLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        number_of_instances:
+          type: integer
+          required: true
+  
+  tosca.datatypes.nfv.VnfLcmOperationsConfiguration: 
+    derived_from: tosca.datatypes.Root 
+    properties: 
+      instantiate: 
+        type: tosca.datatypes.nfv.VnfInstantiateOperationConfiguration 
+      scale:
+        type: tosca.datatypes.nfv.VnfScaleOperationConfiguration 
+      scale_to_level: 
+        type: tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration 
+      heal: 
+        type: tosca.datatypes.nfv.VnfHealOperationConfiguration
+      terminate:
+        type: tosca.datatypes.nfv.VnfTerminateOperationConfiguration
+      operate: 
+        type: tosca.datatypes.nfv.VnfOperateOperationConfiguration
+  
+  tosca.datatypes.nfv.VnfInstantiateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      #properties:
+        #parameters:
+            #modeled as part of operation parameter list
+  
+  tosca.datatypes.nfv.VnfScaleOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        scaling_by_more_than_one_step_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        arbitrary_target_levels_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfHealOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        causes:
+           type: list
+           entry_schema:
+             type: string
+  
+  tosca.datatypes.nfv.VnfTerminateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_graceful_termination_timeout:
+           type: integer
+        max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.VnfOperateOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    properties:
+      min_graceful_termination_timeout:
+           type: integer
+      max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.ScaleInfo:
+    derived_from: tosca.datatypes.Root
+    properties:
+      scaleLevel:
+           type: integer
+           required: true
+  
+  tosca.datatypes.nfv.ScaleAspect:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+         type: string
+         required: true
+      description:
+         type: string
+         required: true
+      associated_group:
+         type: string #Identifier
+         required: false
+      max_scale_level:
+         type: integer #PositiveInteger
+         required: true
+  
+  tosca.datatypes.nfv.LinkBitRateRequirements:
+    derived_from: tosca.datatypes.Root
+    properties:
+      root:
+         type: integer
+         required: true
+      leaf:
+         type: integer
+         required: true
+  
+  tosca.datatypes.nfv.Qos:
+    derived_from: tosca.datatypes.Root
+    properties:
+      latency:
+         type: integer #Number [ms]
+         required: true
+      packet_delay_variation:
+         type: integer #Number [ms]
+         required: true
+      packet_loss_ratio:
+         type: float
+         constraints:
+           - in_range: [ 0.0, 1.0 ]
+         required: false
+  
+  tosca.datatypes.nfv.CpProtocolData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      asscociated_layer_protocol:
+        type: string
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
+        required: true
+      address_data:
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.datatypes.nfv.VnfConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      is_autoscale_enabled:
+        type: boolean
+        required: false
+      is_autoheal_enabled:
+        type: boolean
+        required: false
+      additional_configurable_properties:
+        type: tosca.datatypes.nfv.VnfAdditionalConfigurableProperties
+        required: false
+  
+  tosca.datatypes.nfv.VnfAdditionalConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributes:
+    derived_from: tosca.datatypes.Root
+    properties:
+      extensions:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions
+        required: false
+      metadata:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata
+        required: false
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.LogicalNodeData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #TODO HPA
+      logical_node_requirements:
+        type: map # not defined in SOL001 v.6.0
+        entry_schema:
+          type: string
+        required: false
+
+#Interface Types
+#Based on R2 Design-time Resource DM clean version v10
+interface_types:
+  tosca.interfaces.nfv.vnf.lifecycle.Nfv:
+    derived_from: tosca.interfaces.Root
+    instantiate:
+      description: Invoked upon receipt of an Instantiate VNF request
+    instantiate_start:
+      description: Invoked before instantiate
+    instantiate_end:
+      description: Invoked after instantiate
+    terminate:
+      description: Invoked upon receipt Terminate VNF request
+    terminate_start:
+      description: Invoked before terminate
+    terminate_end:
+      description: Invoked after terminate
+    modify_information:
+      description: Invoked upon receipt of a Modify VNF Information request
+    modify_information_start:
+      description: Invoked before modify_information
+    modify_information_end:
+      description: Invoked after modify_information
+    change_flavour:
+      description: Invoked upon receipt of a Change VNF Flavour request
+    change_flavour_start:
+      description: Invoked before change_flavour
+    change_flavour_end:
+      description: Invoked after change_flavour
+    change_external_connectivity:
+      description: Invoked upon receipt of a Change External VNF Connectivity request
+    change_external_connectivity_start:
+      description: Invoked before change_external_connectivity
+    change_external_connectivity_end:
+      description: Invoked after change_external_connectivity
+    operate:
+      description: Invoked upon receipt of an Operate VNF request
+    operate_start:
+      description: Invoked before operate
+    operate_end:
+      description: Invoked after operate
+    heal:
+      description: Invoked upon receipt of a Heal VNF request
+    heal_start:
+      description: Invoked before heal
+    heal_end:
+      description: Invoked after heal
+    scale:
+      description: Invoked upon receipt of a Scale VNF request
+    scale_start:
+      description: Invoked before scale
+    scale_end:
+      description: Invoked after scale 
+    scale_to_level:
+      description: Invoked upon receipt of a Scale VNF to Level request
+    scale_to_level_start:
+      description: Invoked before scale_to_level
+    scale_to_level_end:
+      description: Invoked after scale_to_level
+  #  indicator_changed:
+  #    description: On receiving a VNF indicator value change notification
+
+#Node Types
+#Based on R2 Design-time Resource DM clean version v36
+node_types:
+  tosca.nodes.nfv.Vdu.Compute:
+    derived_from: tosca.nodes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      description:
+        type: string
+        required: true
+      boot_order:
+        type: list # explicit index (boot index) not necessary, contrary to IFA011
+        entry_schema:
+          type: string
+        required: false
+      nfvi_constraints:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      configurable_properties:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.VnfcConfigurableProperties
+        required: true 
+      vdu_profile:
+        type: tosca.datatypes.nfv.VduProfile
+        required: true
+      inject_files: #Aligned with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        #type: list
+        #entry_schema:
+        #TODO workaround of SDC bug
+        type: tosca.datatypes.nfv.injectFile
+        required: false
+      meta_data: #metadata attached to the VM or container
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      user_data: #cloudinit userdata script support
+        type: string
+        required: false
+    #attributes: NOT DEFINED IN ONAP IM and SOL001
+      #private_address:
+      #  status: deprecated
+      #public_address:
+      #  status: deprecated
+      #networks:
+      #  status: deprecated
+      #ports:
+      #  status: deprecated
+    capabilities:
+      virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+      virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences: [1, UNBOUNDED]
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+    requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          relationship: tosca.relationships.nfv.Vdu.AttachedTo
+          node: tosca.nodes.nfv.Vdu.VirtualStorage
+          occurrences: [ 0, UNBOUNDED ]
+    #artifacts:
+    #  - sw_image:
+    #      file:
+    #      type: tosca.artifacts.nfv.SwImage
+  
+  tosca.nodes.nfv.Vdu.VirtualStorage:
+    derived_from: tosca.nodes.Root
+    properties:
+      #id:
+        # node name
+      type_of_storage:
+        type: string
+        constraints:
+          - valid_values: [volume, object, root, block]
+        required: true
+      size_of_storage:
+        type: scalar-unit.size
+        required: true
+      #TODO HPA
+      vdu_storage_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      rdma_enabled:
+        type: boolean
+        required: false
+    capabilities:
+      virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+    #artifacts:
+    #  - sw_image:
+    #     file:
+    #     type: tosca.artifacts.Deployment.Image
+  
+  tosca.nodes.nfv.Cp:
+    derived_from: tosca.nodes.Root
+    properties:
+      layer_protocol:
+        type: list
+        entry_schema:
+          constraints:
+            - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]
+          type: string
+        required: true
+      role: #Name in ETSI NFV IFA011 v0.7.3 cpRole
+        type: string
+        constraints:
+          - valid_values: [ root, leaf ]
+        required: false
+      description:
+        type: string
+        required: false
+      protocol_data:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.CpProtocolData
+        required: true
+      trunk_mode:
+        type: boolean
+        required: true
+      allowedAddressData: # Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.nodes.nfv.VduCp:
+    derived_from: tosca.nodes.nfv.Cp
+    properties:
+      bitrate_requirement:
+        type: integer
+        required: false
+      vnic_name: #  Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        required: false
+      vnic_order: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: integer
+        required: false
+      vnic_type: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        constraints:
+            - valid_values: [normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder]
+        required: false
+      virtual_network_interface_requirements:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+        required: false
+      #order:
+      #  type: integer
+      #  required: false
+      #  constraints:
+      #    - greater_or_equal: 0
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink   
+      - virtual_binding:
+          capability: tosca.capabilities.nfv.VirtualBindable
+          relationship: tosca.relationships.nfv.VirtualBindsTo
+          node: tosca.nodes.nfv.Vdu.Compute
+  
+  tosca.nodes.nfv.VnfVirtualLink:
+    derived_from: tosca.nodes.Root
+    properties:
+      connectivity_type:
+        type: tosca.datatypes.nfv.ConnectivityType
+        required: true
+      description:
+        type: string
+        required: false
+      test_access:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      vl_profile:
+        type: tosca.datatypes.nfv.VlProfile
+        required: true
+    capabilities:
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+      virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+  
+  tosca.nodes.nfv.VNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id: # instead of vnfd_id
+        type: string # GUID
+        required: true
+      descriptor_version: # instead of vnfd_version
+        type: string
+        required: true
+      provider: # instead of vnf_provider
+        type: string
+        required: true
+      product_name: # instead of vnf_product_name
+        type: string
+        required: true
+      software_version: # instead of vnf_software_version
+        type: string
+        required: true
+      product_info_name: # instead of vnf_product_info_name
+        type: string
+        required: false
+      product_info_description: # instead of vnf_product_info_description
+        type: string
+        required: false
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        required: true
+      localization_languages:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      default_localization_language:
+        type: string
+        required: false
+      configurable_properties:
+        type: tosca.datatypes.nfv.VnfConfigurableProperties
+        required: false
+      modifiable_attributes:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributes
+        required: false  # true in IFA011, but all of members are false
+      flavour_id:
+        type: string
+        required: true
+      flavour_description:
+        type: string
+        required: true
+    #capabilities:
+      # monitoring_parameter:
+        # modelled as ad hoc capabilities in the VNF node template
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink
+          occurrences: [ 0, UNBOUNDED ]
+    interfaces:
+      Nfv:
+        type: tosca.interfaces.nfv.vnf.lifecycle.Nfv
+
+#Relationship Types
+#Based on R2 Design-time Resource DM clean version v4
+relationship_types:
+  tosca.relationships.nfv.VirtualBindsTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualBindable]
+  
+  tosca.relationships.nfv.VirtualLinksTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable]
+
+  tosca.relationships.nfv.Vdu.AttachedTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualStorage]
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/MainServiceTemplate.mf b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/MainServiceTemplate.mf
new file mode 100644 (file)
index 0000000..3967e5a
--- /dev/null
@@ -0,0 +1,8 @@
+metadata:
+    vnf_product_name: vcpe_vbng
+    vnf_provider_id: ONAP
+    vnf_package_version: 1.0
+    vnf_release_data_time: 2018.05.06T13:00+08:00
+
+Source: MainServiceTemplate.yaml
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..a4e54bd
--- /dev/null
@@ -0,0 +1,436 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vbng
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_vbng
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vbng:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-5555-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-5555-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vbng ] ]
+        default: vcpe_vbng
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+#  substitution_mappings:
+#    node_type: onap.vcpe_vbng
+#    requirements:
+#      virtual_link: [ Cp_vbng_public, virtual_link ] # expose as external CP
+#      virtual_link: [ Cp_vbng_onap_private, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    brgemu_bng_private_net_id:
+      type: string
+      description: Private network that connects vBRG to vBNG
+      default: zdfw1bngin01_private
+    brgemu_bng_private_net_cidr:
+      type: string
+      description: The CIDR of the input side of vBNG private network
+      default: 10.3.0.0/24
+    bng_gmux_private_net_id:
+      type: string
+      description: Private network that connects vBNG to vGMUX
+      default: zdfw1bngmux01_private
+    bng_gmux_private_net_cidr:
+      type: string
+      description: The CIDR of the input side of vGMUX private network
+      default: 10.1.0.0/24
+    cpe_signal_net_id:
+      type: string
+      description: Private network that connects vCPE elements with vCPE infrastructure elements
+      default: zdfw1cpe01_private
+    cpe_signal_private_net_cidr:
+      type: string
+      description: The CIDR of the vAAA private network
+      default: 10.4.0.0/24
+    vbng_private_ip_0:
+      type: string
+      description: Private IP address that is assigned to the vBNG IN
+      default: 10.3.0.1
+    vbng_private_ip_1:
+      type: string
+      description: Private IP address that is assigned to the vBNG to communicate with ONAP components
+      default: 10.0.101.10
+    vbng_private_ip_2:
+      type: string
+      description: Private IP address that is assigned to the vBNG in the CPE_SIGNAL network
+      default: 10.4.0.3
+    vbng_private_ip_3:
+      type: string
+      description: Private IP address that is assigned to the vBNG to vGMUX port
+      default: 10.1.0.10
+    vbng_name_0:
+      type: string
+      description: Name of the vBNG
+      default: zdcpe1cpe01bng01
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_Metro_vBNG_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Intrastructure_Metro_vBNG
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: integer
+      description: dcae collector port
+      default: 8080
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    sdnc_ip_addr:
+      type: string
+      description: IP address of the SDNC
+      default: 10.0.7.1
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #Private network that connects vBRG to vBNG
+    VL_brgemu_bng_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: brgemu_bng_private_net_id}
+          cidr: { get_input: brgemu_bng_private_net_cidr }
+          dhcpEnabled: false
+
+    #cpe signal network
+    VL_cpe_signal:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: cpe_signal_net_id}
+          cidr: { get_input: cpe_signal_private_net_cidr }
+          dhcpEnabled: false
+
+    #Private network that connects vBNG to vGMUX
+    VL_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: bng_gmux_private_net_id}
+          cidr: { get_input: bng_gmux_private_net_cidr }
+          dhcpEnabled: false
+
+    # vbng related
+    Cp_vbng_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        #- virtual_link: VL_public
+
+    Cp_vbng_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        #- virtual_link: VL_onap_private
+
+    Cp_vbng_brgemu_bng_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_0 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            # TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        - virtual_link: VL_brgemu_bng_private_net
+
+    Cp_vbng_cpe_signal:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_2 }
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        - virtual_link: VL_cpe_signal
+
+    Cp_vbng_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_3 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            # TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        - virtual_link: VL_bng_gmux_private_net
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vbng_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vbng_name_0 }
+        description: vbng
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+
+          brgemu_bng_net_ipaddr: { get_input: vbng_private_ip_0 }
+          cpe_signal_net_ipaddr: { get_input: vbng_private_ip_2 }
+          bng_gmux_net_ipaddr: { get_input: vbng_private_ip_3 }
+          oam_ipaddr: { get_input: vbng_private_ip_1 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          bng_gmux_cidr: { get_input: bng_gmux_private_net_cidr }
+          cpe_signal_cidr: { get_input: cpe_signal_private_net_cidr }
+          brgemu_bng_cidr: { get_input: brgemu_bng_private_net_cidr }
+          dcae_collector_ip: { get_input: dcae_collector_ip }
+          dcae_collector_port: { get_input: dcae_collector_port }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          sdnc_ip: { get_input: sdnc_ip_addr }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata brgemu_bng_net_ipaddr)" > /opt/config/brgemu_bng_net_ipaddr.txt
+          echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
+          echo "$(get_metadata bng_gmux_net_ipaddr)" > /opt/config/bng_gmux_net_ipaddr.txt
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata bng_gmux_cidr)" > /opt/config/bng_gmux_net_cidr.txt
+          echo "$(get_metadata cpe_signal_cidr)" > /opt/config/cpe_signal_net_cidr.txt
+          echo "$(get_metadata brgemu_bng_cidr)" > /opt/config/brgemu_bng_net_cidr.txt
+          echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
+          echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_bng_install.sh
+          cd /opt
+          chmod +x v_bng_install.sh
+          ./v_bng_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              # HPA requirements
+              vdu_memory_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/TOSCA-Metadata/TOSCA.meta b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbng/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..4eaf193
--- /dev/null
@@ -0,0 +1,4 @@
+TOSCA-Meta-File-Version: 1.0
+CSAR-Version: 1.1
+Created-By: ONAP
+Entry-Definitions: Definitions/MainServiceTemplate.yaml
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu.csar b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu.csar
deleted file mode 100644 (file)
index 730ea8d..0000000
Binary files a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu.csar and /dev/null differ
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Artifacts/images/ubuntu_16.04 b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Artifacts/images/ubuntu_16.04
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Artifacts/keys/authorized_keys b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Artifacts/keys/authorized_keys
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Artifacts/keys/id_rsa b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Artifacts/keys/id_rsa
new file mode 100644 (file)
index 0000000..6059757
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAxsekiqwLgs9VfChnr2bnpLC3VqD1iT+s969vWe05j1RDozPu
+zyD3krNgVUcd65x2QQJWrDK2fnyQUtubbPb3wviLXs0Gof4a/b65JsMQkeeC2/OK
+aFvrE6D3heouXmWO1vo1iXy2hUhcfXdr6eM3rP3zpU9zb2Al25/90Ha8kKBpe1RS
+PKHpmcqVXIpGVxJSXnioAFXUsJ687qrTv7Zm13AHkm2L1Y5IvMsGHLFjFTGFlFoY
+ftQQAepF507CFqs66tD378vvNVg8LYqrKpnfdx2PIRNLHAa1xQWc0EvwGHyBQZRL
+hTXS3M3IZ7Y22dJ+3Zg15PMx7QmWDZO5MG/JPwIDAQABAoIBAE5KS1AiutXmezDP
+aSb4TLvcrhj8hDhuT92txxmQCV+ePJWG2sPRpDCvXX246NvnX9vy49gmkSH4RY+c
+1vZvvt2XrqzD65zZzB+sgpf1tA0DNdMTdKvtqASvHU4tEd4z+bJKEdP4vpp4CZWQ
+93vC9ia4TsIJLNns8Hwz42+7lEEResKYZA2djGnzHl+83vR1dm0GGBD6BKR1C3Cx
+HbEhqx42EV61+8nAweQNjWKxeAc2hg+H8o8qWJM1aKy0TnqW6kudOYRyYIpX0rJA
+siE2HwvDA1mDd5M8ntZ/Cx0pnTc/cuZB8BQJ0jN1JXbrJGbWspBNXformw7isbyO
+WIOjvEECgYEA84XKV3aPrTE2JBs5vzzs59NMPV+5frw+xzDyPxqK5Q7+jjVKDwxh
+/WRatCaTdRxhOI905HfVsDYjrsPOpmF9MHsLxmBhwk8zBFOu/xtYr7zBNkJhmCsq
+kZMdxf8bpu08E7kMQJ2MvT7OhM5HRlWIUR0jdja8Hz51Ro4oOb/po7kCgYEA0Pb5
+v12ZsaSHMF0r4l983PifNwYmI22iQIEtRT2DxgTkDKgBTjbRzqZmEhaADMAO48o9
+sIZy+KJ/a8G9fPQVwMgBID8zOHnWsrFmM3qkj5hhrAQdtq7OE71zgaP0tyE1TG4u
+Zs3a7eSyuoildHHFqX88oXSYsTlfV8vn23UpwLcCgYEAwXiCuBger8dQL0FeEJwz
+zz5k7MG3WoPuEEzHuPC6dp8CCDM4IlqBI1JuaX/YWQtyBgCbKsQ2BigNE1THQhJj
+5ndrdHCwWjKX4pElj9HHFN+OVTBJ3x40VLGfzuUNsAH8X+L9Y/yHivZyFrrXj352
+rZLL0KhNrzjs7WAVf0QEOCkCgYBe2s1xnZZnueyX+qMyBfBTChST0Jm9WUXejAS1
+un+3gn7Wc+jrzRyd9pC8wzPrFb9sjWBFYjKMRI8cpfxS3SWGtgM01Rt2FnBr+vUO
+hyxt9ljX0aJ/S4hGE6h7/6XU/yEHibhMeENZ24d5/w9D9WUpVJV8IMYzJHzwCKI9
+z0hdrwKBgQDMKvY3DBpZjhZe9YnOgdj4SRpNwaasUSf3a3SZYY1JyOZVUzeSSzoX
+rYLfxBRDjkJ8Nnod+nR/JSRqYa/SJYEMZEZFsC+k/pvBiaP6tk694IlpLD/2MXN6
+14FUV5LH/rGSbZJMSfZ9yNX1XZDowH8nOu+qlmlU4lmgiOuityTmtw==
+-----END RSA PRIVATE KEY-----
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Artifacts/keys/id_rsa.pub b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Artifacts/keys/id_rsa.pub
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Definitions/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Definitions/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..ffeceaa
--- /dev/null
@@ -0,0 +1,290 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vbrgemu
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_vbrgemu
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vbrgemu:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-4444-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-4444-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vbrgemu ] ]
+        default: vcpe_vbrgemu
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+#  substitution_mappings:
+#    node_type: onap.vcpe_vbrgemu
+#    requirements:
+#      virtual_link: [ Cp_vbrgemu_public, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    vbrgemu_bng_private_net_id:
+      type: string
+      description: Private network that connects vBRGEMU to vBNG
+      default: zdfw1bngin01_private
+    vbrgemu_bng_private_net_cidr:
+      type: string
+      description: The CIDR of the input side of vBNG private network
+      default: 10.3.0.0/24
+    vbrgemu_private_ip_0:
+      type: string
+      description: Private IP address towards the BRGEMU-BNG network
+      default: 10.3.0.4
+    vbrgemu_name_0:
+      type: string
+      description: Name of the vBRGEMU
+      default: zdcpe1cpe01brgemu01
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_BGREMU_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Customer_BRGEMU
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    sdnc_ip_addr:
+      type: string
+      description: SDNC ip address used to set NAT
+      default: 10.0.7.1
+    compile_state:
+      type: string
+      description: State to compile code or not (done, auto or build)
+      default: auto
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #Private network that connects vBRGEMU to vBNG
+    VL_vbrgemu_bng_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: vbrgemu_bng_private_net_id}
+          cidr: { get_input: vbrgemu_bng_private_net_cidr }
+          dhcpEnabled: false
+
+    # vbrgemu related
+    Cp_vbrgemu_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vbrgemu_0
+        #- virtual_link: VL_public
+
+    Cp_vbrgemu_vbrgemu_bng_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbrgemu_private_ip_0 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            # TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vbrgemu_0
+        - virtual_link: VL_vbrgemu_bng_private_net
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vbrgemu_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vbrgemu_name_0 }
+        description: vbrgemu
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          vbrgemu_bng_private_net_cidr: { get_input: vbrgemu_bng_private_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          sdnc_ip: { get_input: sdnc_ip_addr }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata vbrgemu_bng_private_net_cidr)" > /opt/config/brgemu_bng_private_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_brgemu_install.sh
+          cd /opt
+          chmod +x v_brgemu_install.sh
+          ./v_brgemu_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              # HPA requirements
+              vdu_memory_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Definitions/onap_dm.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/Definitions/onap_dm.yaml
new file mode 100644 (file)
index 0000000..0a3faba
--- /dev/null
@@ -0,0 +1,827 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+#Artifact Types
+#Based on R2 Design-time Resource DM clean version v8
+artifact_types:
+  tosca.artifacts.nfv.SwImage:
+    derived_from: tosca.artifacts.Deployment.Image
+
+#Capabilities Type
+#Based on R2 Design-time Resource DM clean version v21
+capability_types:
+  tosca.capabilities.nfv.VirtualBindable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.Metric:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.VirtualCompute:
+    derived_from: tosca.capabilities.Root
+    properties:
+      logical_node:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+      compute_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      requested_additional_capabilities:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.RequestedAdditionalCapability
+        required: false
+      virtual_memory:
+        type: tosca.datatypes.nfv.VirtualMemory
+        required: true
+      virtual_cpu:
+        type: tosca.datatypes.nfv.VirtualCpu
+        required: true
+
+  tosca.capabilities.nfv.VirtualStorage:
+    derived_from: tosca.capabilities.Root
+
+  tosca.capabilities.nfv.VirtualLinkable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.ExtVirtualLinkable:
+    derived_from: tosca.capabilities.Root
+
+#Data Types
+#Based on R2 Design-time Resource DM clean version v45
+data_types:
+  tosca.datatypes.nfv.L2AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      mac_address_assignment:
+        type: boolean
+        required: true
+
+  tosca.datatypes.nfv.injectFile:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      source_path:
+        type: string
+        required: true
+      dest_path:
+        type: string
+        required: true
+
+  tosca.datatypes.nfv.L3AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      ip_address_assignment:
+        type: boolean
+        required: true   
+      floating_ip_activated:
+        type: boolean
+        required: true
+      ip_address_type:
+        type: string
+        required: false
+        constraints:
+          - valid_values: [ipv4, ipv6]
+      number_of_ip_address:
+        type: integer
+        required: false
+      fixed_ip_address:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+
+  tosca.datatypes.nfv.AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      address_type:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [mac_address, ip_address]    
+      l2_address_data:
+        type: tosca.datatypes.nfv.L2AddressData # empty in "GS NFV IFA011 V0.7.3"
+        required: false
+      l3_address_data:
+        type: tosca.datatypes.nfv.L3AddressData
+        required: false 
+  
+  tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      name:
+        type: string
+        required: false   
+      description:
+        type: string
+        required: false
+      support_mandatory:
+        type: boolean
+        required: true
+      #TODO HPA
+      network_interface_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: true
+      nic_io_requirements:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+  
+  tosca.datatypes.nfv.ConnectivityType:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      layer_protocol:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]  
+      flow_pattern:
+        type: string
+        required: false
+        constraints: # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          - valid_values: [Line, Tree, Mesh]
+  
+  tosca.datatypes.nfv.RequestedAdditionalCapability:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #name:
+        # key of containing map
+      support_mandatory:
+        type: boolean
+        required: true
+      min_requested_additional_capability_version:
+        type: string
+        required: false
+      preferred_requested_additional_capability_version:
+        type: string
+        required: false
+      requested_additional_capability_name:
+        type: string
+        required: true
+      target_performance_parameters:
+        type: map
+        entry_schema:
+          type: string
+        required: true     
+  
+  tosca.datatypes.nfv.VirtualMemory:
+      derived_from: tosca.datatypes.Root
+      properties:
+        virtual_mem_size:
+          type: scalar-unit.size # Number
+          required: true
+        virtual_mem_oversubscription_policy:
+          type: string
+          required: false
+        #TODO HPA
+        vdu_memory_requirements:
+          type: map
+          entry_schema:
+           type: string
+          required: false
+        numa_enabled:
+          type: boolean
+          required: false
+  
+  tosca.datatypes.nfv.VirtualCpu:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_architecture:
+        type: string
+        required: false
+      num_virtual_cpu:
+        type: integer
+        required: true
+      virtual_cpu_clock:
+        type: scalar-unit.frequency
+        required: false
+      virtual_cpu_oversubscription_policy:
+        type: string
+        required: false
+      #TODO HPA
+      vdu_cpu_requirements:
+        type: map
+        entry_schema:
+           type: string
+        required: false
+      virtual_cpu_pinning:
+        type: tosca.datatypes.nfv.VirtualCpuPinning
+        required: false
+  
+  tosca.datatypes.nfv.VirtualCpuPinning:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_pinning_policy:
+        type: string # CpuPinningPolicy
+        constraints:
+          - valid_values: [ static, dynamic ]
+        required: false
+      cpu_pinning_map:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VnfcConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      additional_vnfc_configurable_properties:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VduProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_number_of_instances:
+          type: integer
+          required: true
+        max_number_of_instances:
+          type: integer
+          required: true
+        #localAffinityOrAntiAffinityRule:  # not defined in SOL001 v.6.0
+        #  type: tosca.datatype.nfv.LocalAffinityOrAntiAffinityRule
+        #  required: true
+        #affinityOrAntiAffinityGroupId: # not defined in SOL001 v.6.0
+        #  type: string
+        #  required: true
+        watchdog: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: string
+          required: true
+        vmBootUpTimeOut: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: integer
+          required: false
+  
+   
+  tosca.datatypes.nfv.VlProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        max_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        min_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        qos:
+           type: tosca.datatypes.nfv.Qos
+           required: false
+        initiationParameters: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: map
+           entry_schema:
+             type: string
+           required: false
+        cidr: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkName:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        startIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        endIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        gatewayIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        segmentationId:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: integer
+           required: false
+        physicalNetwork:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkType:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+           constraints:
+             - valid_values: [VLAN, VXLAN]
+        dhcpEnabled:  # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+        vlanTransparent:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+  
+  tosca.datatypes.nfv.InstantiationLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        description:
+          type: string
+          required: true
+        vdu_levels:
+          type: map # key: vduId
+          required: true
+          entry_schema:
+            type: tosca.datatypes.nfv.VduLevel
+        scale_info:
+          type: map # key: aspectId
+          required: false
+          entry_schema:
+            type: tosca.datatypes.nfv.ScaleInfo
+  
+  tosca.datatypes.nfv.VduLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        number_of_instances:
+          type: integer
+          required: true
+  
+  tosca.datatypes.nfv.VnfLcmOperationsConfiguration: 
+    derived_from: tosca.datatypes.Root 
+    properties: 
+      instantiate: 
+        type: tosca.datatypes.nfv.VnfInstantiateOperationConfiguration 
+      scale:
+        type: tosca.datatypes.nfv.VnfScaleOperationConfiguration 
+      scale_to_level: 
+        type: tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration 
+      heal: 
+        type: tosca.datatypes.nfv.VnfHealOperationConfiguration
+      terminate:
+        type: tosca.datatypes.nfv.VnfTerminateOperationConfiguration
+      operate: 
+        type: tosca.datatypes.nfv.VnfOperateOperationConfiguration
+  
+  tosca.datatypes.nfv.VnfInstantiateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      #properties:
+        #parameters:
+            #modeled as part of operation parameter list
+  
+  tosca.datatypes.nfv.VnfScaleOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        scaling_by_more_than_one_step_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        arbitrary_target_levels_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfHealOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        causes:
+           type: list
+           entry_schema:
+             type: string
+  
+  tosca.datatypes.nfv.VnfTerminateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_graceful_termination_timeout:
+           type: integer
+        max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.VnfOperateOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    properties:
+      min_graceful_termination_timeout:
+           type: integer
+      max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.ScaleInfo:
+    derived_from: tosca.datatypes.Root
+    properties:
+      scaleLevel:
+           type: integer
+           required: true
+  
+  tosca.datatypes.nfv.ScaleAspect:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+         type: string
+         required: true
+      description:
+         type: string
+         required: true
+      associated_group:
+         type: string #Identifier
+         required: false
+      max_scale_level:
+         type: integer #PositiveInteger
+         required: true
+  
+  tosca.datatypes.nfv.LinkBitRateRequirements:
+    derived_from: tosca.datatypes.Root
+    properties:
+      root:
+         type: integer
+         required: true
+      leaf:
+         type: integer
+         required: true
+  
+  tosca.datatypes.nfv.Qos:
+    derived_from: tosca.datatypes.Root
+    properties:
+      latency:
+         type: integer #Number [ms]
+         required: true
+      packet_delay_variation:
+         type: integer #Number [ms]
+         required: true
+      packet_loss_ratio:
+         type: float
+         constraints:
+           - in_range: [ 0.0, 1.0 ]
+         required: false
+  
+  tosca.datatypes.nfv.CpProtocolData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      asscociated_layer_protocol:
+        type: string
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
+        required: true
+      address_data:
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.datatypes.nfv.VnfConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      is_autoscale_enabled:
+        type: boolean
+        required: false
+      is_autoheal_enabled:
+        type: boolean
+        required: false
+      additional_configurable_properties:
+        type: tosca.datatypes.nfv.VnfAdditionalConfigurableProperties
+        required: false
+  
+  tosca.datatypes.nfv.VnfAdditionalConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributes:
+    derived_from: tosca.datatypes.Root
+    properties:
+      extensions:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions
+        required: false
+      metadata:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata
+        required: false
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.LogicalNodeData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #TODO HPA
+      logical_node_requirements:
+        type: map # not defined in SOL001 v.6.0
+        entry_schema:
+          type: string
+        required: false
+
+#Interface Types
+#Based on R2 Design-time Resource DM clean version v10
+interface_types:
+  tosca.interfaces.nfv.vnf.lifecycle.Nfv:
+    derived_from: tosca.interfaces.Root
+    instantiate:
+      description: Invoked upon receipt of an Instantiate VNF request
+    instantiate_start:
+      description: Invoked before instantiate
+    instantiate_end:
+      description: Invoked after instantiate
+    terminate:
+      description: Invoked upon receipt Terminate VNF request
+    terminate_start:
+      description: Invoked before terminate
+    terminate_end:
+      description: Invoked after terminate
+    modify_information:
+      description: Invoked upon receipt of a Modify VNF Information request
+    modify_information_start:
+      description: Invoked before modify_information
+    modify_information_end:
+      description: Invoked after modify_information
+    change_flavour:
+      description: Invoked upon receipt of a Change VNF Flavour request
+    change_flavour_start:
+      description: Invoked before change_flavour
+    change_flavour_end:
+      description: Invoked after change_flavour
+    change_external_connectivity:
+      description: Invoked upon receipt of a Change External VNF Connectivity request
+    change_external_connectivity_start:
+      description: Invoked before change_external_connectivity
+    change_external_connectivity_end:
+      description: Invoked after change_external_connectivity
+    operate:
+      description: Invoked upon receipt of an Operate VNF request
+    operate_start:
+      description: Invoked before operate
+    operate_end:
+      description: Invoked after operate
+    heal:
+      description: Invoked upon receipt of a Heal VNF request
+    heal_start:
+      description: Invoked before heal
+    heal_end:
+      description: Invoked after heal
+    scale:
+      description: Invoked upon receipt of a Scale VNF request
+    scale_start:
+      description: Invoked before scale
+    scale_end:
+      description: Invoked after scale 
+    scale_to_level:
+      description: Invoked upon receipt of a Scale VNF to Level request
+    scale_to_level_start:
+      description: Invoked before scale_to_level
+    scale_to_level_end:
+      description: Invoked after scale_to_level
+  #  indicator_changed:
+  #    description: On receiving a VNF indicator value change notification
+
+#Node Types
+#Based on R2 Design-time Resource DM clean version v36
+node_types:
+  tosca.nodes.nfv.Vdu.Compute:
+    derived_from: tosca.nodes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      description:
+        type: string
+        required: true
+      boot_order:
+        type: list # explicit index (boot index) not necessary, contrary to IFA011
+        entry_schema:
+          type: string
+        required: false
+      nfvi_constraints:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      configurable_properties:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.VnfcConfigurableProperties
+        required: true 
+      vdu_profile:
+        type: tosca.datatypes.nfv.VduProfile
+        required: true
+      inject_files: #Aligned with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        #type: list
+        #entry_schema:
+        #TODO workaround of SDC bug
+        type: tosca.datatypes.nfv.injectFile
+        required: false
+      meta_data: #metadata attached to the VM or container
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      user_data: #cloudinit userdata script support
+        type: string
+        required: false
+    #attributes: NOT DEFINED IN ONAP IM and SOL001
+      #private_address:
+      #  status: deprecated
+      #public_address:
+      #  status: deprecated
+      #networks:
+      #  status: deprecated
+      #ports:
+      #  status: deprecated
+    capabilities:
+      virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+      virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences: [1, UNBOUNDED]
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+    requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          relationship: tosca.relationships.nfv.Vdu.AttachedTo
+          node: tosca.nodes.nfv.Vdu.VirtualStorage
+          occurrences: [ 0, UNBOUNDED ]
+    #artifacts:
+    #  - sw_image:
+    #      file:
+    #      type: tosca.artifacts.nfv.SwImage
+  
+  tosca.nodes.nfv.Vdu.VirtualStorage:
+    derived_from: tosca.nodes.Root
+    properties:
+      #id:
+        # node name
+      type_of_storage:
+        type: string
+        constraints:
+          - valid_values: [volume, object, root, block]
+        required: true
+      size_of_storage:
+        type: scalar-unit.size
+        required: true
+      #TODO HPA
+      vdu_storage_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      rdma_enabled:
+        type: boolean
+        required: false
+    capabilities:
+      virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+    #artifacts:
+    #  - sw_image:
+    #     file:
+    #     type: tosca.artifacts.Deployment.Image
+  
+  tosca.nodes.nfv.Cp:
+    derived_from: tosca.nodes.Root
+    properties:
+      layer_protocol:
+        type: list
+        entry_schema:
+          constraints:
+            - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]
+          type: string
+        required: true
+      role: #Name in ETSI NFV IFA011 v0.7.3 cpRole
+        type: string
+        constraints:
+          - valid_values: [ root, leaf ]
+        required: false
+      description:
+        type: string
+        required: false
+      protocol_data:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.CpProtocolData
+        required: true
+      trunk_mode:
+        type: boolean
+        required: true
+      allowedAddressData: # Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.nodes.nfv.VduCp:
+    derived_from: tosca.nodes.nfv.Cp
+    properties:
+      bitrate_requirement:
+        type: integer
+        required: false
+      vnic_name: #  Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        required: false
+      vnic_order: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: integer
+        required: false
+      vnic_type: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        constraints:
+            - valid_values: [normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder]
+        required: false
+      virtual_network_interface_requirements:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+        required: false
+      #order:
+      #  type: integer
+      #  required: false
+      #  constraints:
+      #    - greater_or_equal: 0
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink   
+      - virtual_binding:
+          capability: tosca.capabilities.nfv.VirtualBindable
+          relationship: tosca.relationships.nfv.VirtualBindsTo
+          node: tosca.nodes.nfv.Vdu.Compute
+  
+  tosca.nodes.nfv.VnfVirtualLink:
+    derived_from: tosca.nodes.Root
+    properties:
+      connectivity_type:
+        type: tosca.datatypes.nfv.ConnectivityType
+        required: true
+      description:
+        type: string
+        required: false
+      test_access:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      vl_profile:
+        type: tosca.datatypes.nfv.VlProfile
+        required: true
+    capabilities:
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+      virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+  
+  tosca.nodes.nfv.VNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id: # instead of vnfd_id
+        type: string # GUID
+        required: true
+      descriptor_version: # instead of vnfd_version
+        type: string
+        required: true
+      provider: # instead of vnf_provider
+        type: string
+        required: true
+      product_name: # instead of vnf_product_name
+        type: string
+        required: true
+      software_version: # instead of vnf_software_version
+        type: string
+        required: true
+      product_info_name: # instead of vnf_product_info_name
+        type: string
+        required: false
+      product_info_description: # instead of vnf_product_info_description
+        type: string
+        required: false
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        required: true
+      localization_languages:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      default_localization_language:
+        type: string
+        required: false
+      configurable_properties:
+        type: tosca.datatypes.nfv.VnfConfigurableProperties
+        required: false
+      modifiable_attributes:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributes
+        required: false  # true in IFA011, but all of members are false
+      flavour_id:
+        type: string
+        required: true
+      flavour_description:
+        type: string
+        required: true
+    #capabilities:
+      # monitoring_parameter:
+        # modelled as ad hoc capabilities in the VNF node template
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink
+          occurrences: [ 0, UNBOUNDED ]
+    interfaces:
+      Nfv:
+        type: tosca.interfaces.nfv.vnf.lifecycle.Nfv
+
+#Relationship Types
+#Based on R2 Design-time Resource DM clean version v4
+relationship_types:
+  tosca.relationships.nfv.VirtualBindsTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualBindable]
+  
+  tosca.relationships.nfv.VirtualLinksTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable]
+
+  tosca.relationships.nfv.Vdu.AttachedTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualStorage]
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/MainServiceTemplate.mf b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/MainServiceTemplate.mf
new file mode 100644 (file)
index 0000000..c6a971a
--- /dev/null
@@ -0,0 +1,8 @@
+metadata:
+    vnf_product_name: vcpe_vbrgemu
+    vnf_provider_id: ONAP
+    vnf_package_version: 1.0
+    vnf_release_data_time: 2018.05.06T13:00+08:00
+
+Source: MainServiceTemplate.yaml
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..ffeceaa
--- /dev/null
@@ -0,0 +1,290 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vbrgemu
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_vbrgemu
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vbrgemu:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-4444-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-4444-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vbrgemu ] ]
+        default: vcpe_vbrgemu
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+#  substitution_mappings:
+#    node_type: onap.vcpe_vbrgemu
+#    requirements:
+#      virtual_link: [ Cp_vbrgemu_public, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    vbrgemu_bng_private_net_id:
+      type: string
+      description: Private network that connects vBRGEMU to vBNG
+      default: zdfw1bngin01_private
+    vbrgemu_bng_private_net_cidr:
+      type: string
+      description: The CIDR of the input side of vBNG private network
+      default: 10.3.0.0/24
+    vbrgemu_private_ip_0:
+      type: string
+      description: Private IP address towards the BRGEMU-BNG network
+      default: 10.3.0.4
+    vbrgemu_name_0:
+      type: string
+      description: Name of the vBRGEMU
+      default: zdcpe1cpe01brgemu01
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_BGREMU_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Customer_BRGEMU
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    sdnc_ip_addr:
+      type: string
+      description: SDNC ip address used to set NAT
+      default: 10.0.7.1
+    compile_state:
+      type: string
+      description: State to compile code or not (done, auto or build)
+      default: auto
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #Private network that connects vBRGEMU to vBNG
+    VL_vbrgemu_bng_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: vbrgemu_bng_private_net_id}
+          cidr: { get_input: vbrgemu_bng_private_net_cidr }
+          dhcpEnabled: false
+
+    # vbrgemu related
+    Cp_vbrgemu_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vbrgemu_0
+        #- virtual_link: VL_public
+
+    Cp_vbrgemu_vbrgemu_bng_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbrgemu_private_ip_0 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            # TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vbrgemu_0
+        - virtual_link: VL_vbrgemu_bng_private_net
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vbrgemu_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vbrgemu_name_0 }
+        description: vbrgemu
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          vbrgemu_bng_private_net_cidr: { get_input: vbrgemu_bng_private_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          sdnc_ip: { get_input: sdnc_ip_addr }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata vbrgemu_bng_private_net_cidr)" > /opt/config/brgemu_bng_private_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_brgemu_install.sh
+          cd /opt
+          chmod +x v_brgemu_install.sh
+          ./v_brgemu_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              # HPA requirements
+              vdu_memory_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/TOSCA-Metadata/TOSCA.meta b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vbrgemu/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..4eaf193
--- /dev/null
@@ -0,0 +1,4 @@
+TOSCA-Meta-File-Version: 1.0
+CSAR-Version: 1.1
+Created-By: ONAP
+Entry-Definitions: Definitions/MainServiceTemplate.yaml
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux.csar b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux.csar
deleted file mode 100644 (file)
index b0f37a7..0000000
Binary files a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux.csar and /dev/null differ
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Artifacts/images/ubuntu_16.04 b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Artifacts/images/ubuntu_16.04
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Artifacts/keys/authorized_keys b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Artifacts/keys/authorized_keys
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Artifacts/keys/id_rsa b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Artifacts/keys/id_rsa
new file mode 100644 (file)
index 0000000..6059757
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAxsekiqwLgs9VfChnr2bnpLC3VqD1iT+s969vWe05j1RDozPu
+zyD3krNgVUcd65x2QQJWrDK2fnyQUtubbPb3wviLXs0Gof4a/b65JsMQkeeC2/OK
+aFvrE6D3heouXmWO1vo1iXy2hUhcfXdr6eM3rP3zpU9zb2Al25/90Ha8kKBpe1RS
+PKHpmcqVXIpGVxJSXnioAFXUsJ687qrTv7Zm13AHkm2L1Y5IvMsGHLFjFTGFlFoY
+ftQQAepF507CFqs66tD378vvNVg8LYqrKpnfdx2PIRNLHAa1xQWc0EvwGHyBQZRL
+hTXS3M3IZ7Y22dJ+3Zg15PMx7QmWDZO5MG/JPwIDAQABAoIBAE5KS1AiutXmezDP
+aSb4TLvcrhj8hDhuT92txxmQCV+ePJWG2sPRpDCvXX246NvnX9vy49gmkSH4RY+c
+1vZvvt2XrqzD65zZzB+sgpf1tA0DNdMTdKvtqASvHU4tEd4z+bJKEdP4vpp4CZWQ
+93vC9ia4TsIJLNns8Hwz42+7lEEResKYZA2djGnzHl+83vR1dm0GGBD6BKR1C3Cx
+HbEhqx42EV61+8nAweQNjWKxeAc2hg+H8o8qWJM1aKy0TnqW6kudOYRyYIpX0rJA
+siE2HwvDA1mDd5M8ntZ/Cx0pnTc/cuZB8BQJ0jN1JXbrJGbWspBNXformw7isbyO
+WIOjvEECgYEA84XKV3aPrTE2JBs5vzzs59NMPV+5frw+xzDyPxqK5Q7+jjVKDwxh
+/WRatCaTdRxhOI905HfVsDYjrsPOpmF9MHsLxmBhwk8zBFOu/xtYr7zBNkJhmCsq
+kZMdxf8bpu08E7kMQJ2MvT7OhM5HRlWIUR0jdja8Hz51Ro4oOb/po7kCgYEA0Pb5
+v12ZsaSHMF0r4l983PifNwYmI22iQIEtRT2DxgTkDKgBTjbRzqZmEhaADMAO48o9
+sIZy+KJ/a8G9fPQVwMgBID8zOHnWsrFmM3qkj5hhrAQdtq7OE71zgaP0tyE1TG4u
+Zs3a7eSyuoildHHFqX88oXSYsTlfV8vn23UpwLcCgYEAwXiCuBger8dQL0FeEJwz
+zz5k7MG3WoPuEEzHuPC6dp8CCDM4IlqBI1JuaX/YWQtyBgCbKsQ2BigNE1THQhJj
+5ndrdHCwWjKX4pElj9HHFN+OVTBJ3x40VLGfzuUNsAH8X+L9Y/yHivZyFrrXj352
+rZLL0KhNrzjs7WAVf0QEOCkCgYBe2s1xnZZnueyX+qMyBfBTChST0Jm9WUXejAS1
+un+3gn7Wc+jrzRyd9pC8wzPrFb9sjWBFYjKMRI8cpfxS3SWGtgM01Rt2FnBr+vUO
+hyxt9ljX0aJ/S4hGE6h7/6XU/yEHibhMeENZ24d5/w9D9WUpVJV8IMYzJHzwCKI9
+z0hdrwKBgQDMKvY3DBpZjhZe9YnOgdj4SRpNwaasUSf3a3SZYY1JyOZVUzeSSzoX
+rYLfxBRDjkJ8Nnod+nR/JSRqYa/SJYEMZEZFsC+k/pvBiaP6tk694IlpLD/2MXN6
+14FUV5LH/rGSbZJMSfZ9yNX1XZDowH8nOu+qlmlU4lmgiOuityTmtw==
+-----END RSA PRIVATE KEY-----
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Artifacts/keys/id_rsa.pub b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Artifacts/keys/id_rsa.pub
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Definitions/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Definitions/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..0d1b8aa
--- /dev/null
@@ -0,0 +1,381 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vgmux
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_vgmux
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vgmux:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-3333-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-3333-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vgmux ] ]
+        default: vcpe_vgmux
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+#  substitution_mappings:
+#    node_type: onap.vcpe_vgmux
+#    requirements:
+#      virtual_link: [ Cp_vgmux_public, virtual_link ] # expose as external CP
+#      virtual_link: [ Cp_vgmux_onap_private, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    bng_gmux_private_net_id:
+      type: string
+      description: Private network that connects vBNG to vGMUX
+      default: zdfw1bngmux01_private
+    bng_gmux_private_net_cidr:
+      type: string
+      description: The CIDR of the vBNG-vGMUX private network
+      default: 10.1.0.0/24
+    mux_gw_private_net_id:
+      type: string
+      description: Private network that connects vGMUX to vGWs
+      default: zdfw1muxgw01_private
+    mux_gw_private_net_cidr:
+      type: string
+      description: The CIDR of the vGMUX private network
+      default: 10.5.0.0/24
+    brgemu_bng_private_net_cidr:
+      type: string
+      description: The CIDR of the vBRG-vBNG private network
+      default: 10.3.0.0/24
+    vgmux_private_ip_0:
+      type: string
+      description: Private IP address that is assigned to the vGMUX to communicate with the vBNG
+      default: 10.1.0.20
+    vgmux_private_ip_1:
+      type: string
+      description: Private IP address that is assigned to the vGMUX to communicate with ONAP components
+      default: 10.0.101.20
+    vgmux_private_ip_2:
+      type: string
+      description: Private IP address that is assigned to the vGMUX to communicate with vGWs
+      default: 10.5.0.20
+    vgmux_name_0:
+      type: string
+      description: Name of the vGMUX
+      default: zdcpe1cpe01mux01
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_vGMUX_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Intrastructure_Metro_vGMUX
+    bng_gmux_private_ip:
+      type: string
+      description: Private IP address that is assigned to the vBNG to communicate with the vGMUX
+      default: 10.1.0.10
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: integer
+      description: dcae collector port
+      default: 8080
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #Private network that connects vBNG to vGMUX
+    VL_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: bng_gmux_private_net_id}
+          cidr: { get_input: bng_gmux_private_net_cidr }
+          dhcpEnabled: false
+
+    #Private network that connects vGMUX to vGWs
+    VL_mux_gw_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: mux_gw_private_net_id}
+          cidr: { get_input: mux_gw_private_net_cidr }
+          dhcpEnabled: false
+
+    # vgmux related
+    Cp_vgmux_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        #- virtual_link: VL_public
+
+    Cp_vgmux_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgmux_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        #- virtual_link: VL_onap_private
+
+    Cp_vgmux_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgmux_private_ip_0 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            #TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        - virtual_link: VL_bng_gmux_private_net
+
+    Cp_vgmux_mux_gw_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgmux_private_ip_2 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            #TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        - virtual_link: VL_mux_gw_private_net
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vgmux_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vgmux_name_0 }
+        description: vgmux
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          mux_to_bng_net_ipaddr: { get_input: vgmux_private_ip_0 }
+          oam_ipaddr: { get_input: vgmux_private_ip_1 }
+          mux_gw_net_ipaddr: { get_input: vgmux_private_ip_2 }
+          bng_to_mux_net_ipaddr: { get_input: bng_gmux_private_ip }
+          bng_mux_net_cidr: { get_input: bng_gmux_private_net_cidr }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          mux_gw_net_cidr: { get_input: mux_gw_private_net_cidr }
+          brg_bng_net_cidr: { get_input: brgemu_bng_private_net_cidr }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata mux_to_bng_net_ipaddr)" > /opt/config/mux_to_bng_net_ipaddr.txt
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata mux_gw_net_ipaddr)" > /opt/config/mux_gw_net_ipaddr.txt
+          echo "$(get_metadata bng_to_mux_net_ipaddr)" > /opt/config/bng_to_mux_net_ipaddr.txt
+          echo "$(get_metadata bng_mux_net_cidr)" > /opt/config/bng_mux_net_cidr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata mux_gw_net_cidr)" > /opt/config/mux_gw_net_cidr.txt
+          echo "$(get_metadata brg_bng_net_cidr)" > /opt/config/brg_bng_net_cidr.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gmux_install.sh
+          cd /opt
+          chmod +x v_gmux_install.sh
+          ./v_gmux_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              # HPA requirements
+              vdu_memory_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Definitions/onap_dm.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/Definitions/onap_dm.yaml
new file mode 100644 (file)
index 0000000..0a3faba
--- /dev/null
@@ -0,0 +1,827 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+#Artifact Types
+#Based on R2 Design-time Resource DM clean version v8
+artifact_types:
+  tosca.artifacts.nfv.SwImage:
+    derived_from: tosca.artifacts.Deployment.Image
+
+#Capabilities Type
+#Based on R2 Design-time Resource DM clean version v21
+capability_types:
+  tosca.capabilities.nfv.VirtualBindable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.Metric:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.VirtualCompute:
+    derived_from: tosca.capabilities.Root
+    properties:
+      logical_node:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+      compute_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      requested_additional_capabilities:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.RequestedAdditionalCapability
+        required: false
+      virtual_memory:
+        type: tosca.datatypes.nfv.VirtualMemory
+        required: true
+      virtual_cpu:
+        type: tosca.datatypes.nfv.VirtualCpu
+        required: true
+
+  tosca.capabilities.nfv.VirtualStorage:
+    derived_from: tosca.capabilities.Root
+
+  tosca.capabilities.nfv.VirtualLinkable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.ExtVirtualLinkable:
+    derived_from: tosca.capabilities.Root
+
+#Data Types
+#Based on R2 Design-time Resource DM clean version v45
+data_types:
+  tosca.datatypes.nfv.L2AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      mac_address_assignment:
+        type: boolean
+        required: true
+
+  tosca.datatypes.nfv.injectFile:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      source_path:
+        type: string
+        required: true
+      dest_path:
+        type: string
+        required: true
+
+  tosca.datatypes.nfv.L3AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      ip_address_assignment:
+        type: boolean
+        required: true   
+      floating_ip_activated:
+        type: boolean
+        required: true
+      ip_address_type:
+        type: string
+        required: false
+        constraints:
+          - valid_values: [ipv4, ipv6]
+      number_of_ip_address:
+        type: integer
+        required: false
+      fixed_ip_address:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+
+  tosca.datatypes.nfv.AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      address_type:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [mac_address, ip_address]    
+      l2_address_data:
+        type: tosca.datatypes.nfv.L2AddressData # empty in "GS NFV IFA011 V0.7.3"
+        required: false
+      l3_address_data:
+        type: tosca.datatypes.nfv.L3AddressData
+        required: false 
+  
+  tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      name:
+        type: string
+        required: false   
+      description:
+        type: string
+        required: false
+      support_mandatory:
+        type: boolean
+        required: true
+      #TODO HPA
+      network_interface_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: true
+      nic_io_requirements:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+  
+  tosca.datatypes.nfv.ConnectivityType:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      layer_protocol:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]  
+      flow_pattern:
+        type: string
+        required: false
+        constraints: # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          - valid_values: [Line, Tree, Mesh]
+  
+  tosca.datatypes.nfv.RequestedAdditionalCapability:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #name:
+        # key of containing map
+      support_mandatory:
+        type: boolean
+        required: true
+      min_requested_additional_capability_version:
+        type: string
+        required: false
+      preferred_requested_additional_capability_version:
+        type: string
+        required: false
+      requested_additional_capability_name:
+        type: string
+        required: true
+      target_performance_parameters:
+        type: map
+        entry_schema:
+          type: string
+        required: true     
+  
+  tosca.datatypes.nfv.VirtualMemory:
+      derived_from: tosca.datatypes.Root
+      properties:
+        virtual_mem_size:
+          type: scalar-unit.size # Number
+          required: true
+        virtual_mem_oversubscription_policy:
+          type: string
+          required: false
+        #TODO HPA
+        vdu_memory_requirements:
+          type: map
+          entry_schema:
+           type: string
+          required: false
+        numa_enabled:
+          type: boolean
+          required: false
+  
+  tosca.datatypes.nfv.VirtualCpu:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_architecture:
+        type: string
+        required: false
+      num_virtual_cpu:
+        type: integer
+        required: true
+      virtual_cpu_clock:
+        type: scalar-unit.frequency
+        required: false
+      virtual_cpu_oversubscription_policy:
+        type: string
+        required: false
+      #TODO HPA
+      vdu_cpu_requirements:
+        type: map
+        entry_schema:
+           type: string
+        required: false
+      virtual_cpu_pinning:
+        type: tosca.datatypes.nfv.VirtualCpuPinning
+        required: false
+  
+  tosca.datatypes.nfv.VirtualCpuPinning:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_pinning_policy:
+        type: string # CpuPinningPolicy
+        constraints:
+          - valid_values: [ static, dynamic ]
+        required: false
+      cpu_pinning_map:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VnfcConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      additional_vnfc_configurable_properties:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VduProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_number_of_instances:
+          type: integer
+          required: true
+        max_number_of_instances:
+          type: integer
+          required: true
+        #localAffinityOrAntiAffinityRule:  # not defined in SOL001 v.6.0
+        #  type: tosca.datatype.nfv.LocalAffinityOrAntiAffinityRule
+        #  required: true
+        #affinityOrAntiAffinityGroupId: # not defined in SOL001 v.6.0
+        #  type: string
+        #  required: true
+        watchdog: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: string
+          required: true
+        vmBootUpTimeOut: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: integer
+          required: false
+  
+   
+  tosca.datatypes.nfv.VlProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        max_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        min_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        qos:
+           type: tosca.datatypes.nfv.Qos
+           required: false
+        initiationParameters: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: map
+           entry_schema:
+             type: string
+           required: false
+        cidr: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkName:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        startIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        endIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        gatewayIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        segmentationId:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: integer
+           required: false
+        physicalNetwork:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkType:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+           constraints:
+             - valid_values: [VLAN, VXLAN]
+        dhcpEnabled:  # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+        vlanTransparent:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+  
+  tosca.datatypes.nfv.InstantiationLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        description:
+          type: string
+          required: true
+        vdu_levels:
+          type: map # key: vduId
+          required: true
+          entry_schema:
+            type: tosca.datatypes.nfv.VduLevel
+        scale_info:
+          type: map # key: aspectId
+          required: false
+          entry_schema:
+            type: tosca.datatypes.nfv.ScaleInfo
+  
+  tosca.datatypes.nfv.VduLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        number_of_instances:
+          type: integer
+          required: true
+  
+  tosca.datatypes.nfv.VnfLcmOperationsConfiguration: 
+    derived_from: tosca.datatypes.Root 
+    properties: 
+      instantiate: 
+        type: tosca.datatypes.nfv.VnfInstantiateOperationConfiguration 
+      scale:
+        type: tosca.datatypes.nfv.VnfScaleOperationConfiguration 
+      scale_to_level: 
+        type: tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration 
+      heal: 
+        type: tosca.datatypes.nfv.VnfHealOperationConfiguration
+      terminate:
+        type: tosca.datatypes.nfv.VnfTerminateOperationConfiguration
+      operate: 
+        type: tosca.datatypes.nfv.VnfOperateOperationConfiguration
+  
+  tosca.datatypes.nfv.VnfInstantiateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      #properties:
+        #parameters:
+            #modeled as part of operation parameter list
+  
+  tosca.datatypes.nfv.VnfScaleOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        scaling_by_more_than_one_step_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        arbitrary_target_levels_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfHealOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        causes:
+           type: list
+           entry_schema:
+             type: string
+  
+  tosca.datatypes.nfv.VnfTerminateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_graceful_termination_timeout:
+           type: integer
+        max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.VnfOperateOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    properties:
+      min_graceful_termination_timeout:
+           type: integer
+      max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.ScaleInfo:
+    derived_from: tosca.datatypes.Root
+    properties:
+      scaleLevel:
+           type: integer
+           required: true
+  
+  tosca.datatypes.nfv.ScaleAspect:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+         type: string
+         required: true
+      description:
+         type: string
+         required: true
+      associated_group:
+         type: string #Identifier
+         required: false
+      max_scale_level:
+         type: integer #PositiveInteger
+         required: true
+  
+  tosca.datatypes.nfv.LinkBitRateRequirements:
+    derived_from: tosca.datatypes.Root
+    properties:
+      root:
+         type: integer
+         required: true
+      leaf:
+         type: integer
+         required: true
+  
+  tosca.datatypes.nfv.Qos:
+    derived_from: tosca.datatypes.Root
+    properties:
+      latency:
+         type: integer #Number [ms]
+         required: true
+      packet_delay_variation:
+         type: integer #Number [ms]
+         required: true
+      packet_loss_ratio:
+         type: float
+         constraints:
+           - in_range: [ 0.0, 1.0 ]
+         required: false
+  
+  tosca.datatypes.nfv.CpProtocolData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      asscociated_layer_protocol:
+        type: string
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
+        required: true
+      address_data:
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.datatypes.nfv.VnfConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      is_autoscale_enabled:
+        type: boolean
+        required: false
+      is_autoheal_enabled:
+        type: boolean
+        required: false
+      additional_configurable_properties:
+        type: tosca.datatypes.nfv.VnfAdditionalConfigurableProperties
+        required: false
+  
+  tosca.datatypes.nfv.VnfAdditionalConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributes:
+    derived_from: tosca.datatypes.Root
+    properties:
+      extensions:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions
+        required: false
+      metadata:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata
+        required: false
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.LogicalNodeData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #TODO HPA
+      logical_node_requirements:
+        type: map # not defined in SOL001 v.6.0
+        entry_schema:
+          type: string
+        required: false
+
+#Interface Types
+#Based on R2 Design-time Resource DM clean version v10
+interface_types:
+  tosca.interfaces.nfv.vnf.lifecycle.Nfv:
+    derived_from: tosca.interfaces.Root
+    instantiate:
+      description: Invoked upon receipt of an Instantiate VNF request
+    instantiate_start:
+      description: Invoked before instantiate
+    instantiate_end:
+      description: Invoked after instantiate
+    terminate:
+      description: Invoked upon receipt Terminate VNF request
+    terminate_start:
+      description: Invoked before terminate
+    terminate_end:
+      description: Invoked after terminate
+    modify_information:
+      description: Invoked upon receipt of a Modify VNF Information request
+    modify_information_start:
+      description: Invoked before modify_information
+    modify_information_end:
+      description: Invoked after modify_information
+    change_flavour:
+      description: Invoked upon receipt of a Change VNF Flavour request
+    change_flavour_start:
+      description: Invoked before change_flavour
+    change_flavour_end:
+      description: Invoked after change_flavour
+    change_external_connectivity:
+      description: Invoked upon receipt of a Change External VNF Connectivity request
+    change_external_connectivity_start:
+      description: Invoked before change_external_connectivity
+    change_external_connectivity_end:
+      description: Invoked after change_external_connectivity
+    operate:
+      description: Invoked upon receipt of an Operate VNF request
+    operate_start:
+      description: Invoked before operate
+    operate_end:
+      description: Invoked after operate
+    heal:
+      description: Invoked upon receipt of a Heal VNF request
+    heal_start:
+      description: Invoked before heal
+    heal_end:
+      description: Invoked after heal
+    scale:
+      description: Invoked upon receipt of a Scale VNF request
+    scale_start:
+      description: Invoked before scale
+    scale_end:
+      description: Invoked after scale 
+    scale_to_level:
+      description: Invoked upon receipt of a Scale VNF to Level request
+    scale_to_level_start:
+      description: Invoked before scale_to_level
+    scale_to_level_end:
+      description: Invoked after scale_to_level
+  #  indicator_changed:
+  #    description: On receiving a VNF indicator value change notification
+
+#Node Types
+#Based on R2 Design-time Resource DM clean version v36
+node_types:
+  tosca.nodes.nfv.Vdu.Compute:
+    derived_from: tosca.nodes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      description:
+        type: string
+        required: true
+      boot_order:
+        type: list # explicit index (boot index) not necessary, contrary to IFA011
+        entry_schema:
+          type: string
+        required: false
+      nfvi_constraints:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      configurable_properties:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.VnfcConfigurableProperties
+        required: true 
+      vdu_profile:
+        type: tosca.datatypes.nfv.VduProfile
+        required: true
+      inject_files: #Aligned with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        #type: list
+        #entry_schema:
+        #TODO workaround of SDC bug
+        type: tosca.datatypes.nfv.injectFile
+        required: false
+      meta_data: #metadata attached to the VM or container
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      user_data: #cloudinit userdata script support
+        type: string
+        required: false
+    #attributes: NOT DEFINED IN ONAP IM and SOL001
+      #private_address:
+      #  status: deprecated
+      #public_address:
+      #  status: deprecated
+      #networks:
+      #  status: deprecated
+      #ports:
+      #  status: deprecated
+    capabilities:
+      virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+      virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences: [1, UNBOUNDED]
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+    requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          relationship: tosca.relationships.nfv.Vdu.AttachedTo
+          node: tosca.nodes.nfv.Vdu.VirtualStorage
+          occurrences: [ 0, UNBOUNDED ]
+    #artifacts:
+    #  - sw_image:
+    #      file:
+    #      type: tosca.artifacts.nfv.SwImage
+  
+  tosca.nodes.nfv.Vdu.VirtualStorage:
+    derived_from: tosca.nodes.Root
+    properties:
+      #id:
+        # node name
+      type_of_storage:
+        type: string
+        constraints:
+          - valid_values: [volume, object, root, block]
+        required: true
+      size_of_storage:
+        type: scalar-unit.size
+        required: true
+      #TODO HPA
+      vdu_storage_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      rdma_enabled:
+        type: boolean
+        required: false
+    capabilities:
+      virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+    #artifacts:
+    #  - sw_image:
+    #     file:
+    #     type: tosca.artifacts.Deployment.Image
+  
+  tosca.nodes.nfv.Cp:
+    derived_from: tosca.nodes.Root
+    properties:
+      layer_protocol:
+        type: list
+        entry_schema:
+          constraints:
+            - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]
+          type: string
+        required: true
+      role: #Name in ETSI NFV IFA011 v0.7.3 cpRole
+        type: string
+        constraints:
+          - valid_values: [ root, leaf ]
+        required: false
+      description:
+        type: string
+        required: false
+      protocol_data:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.CpProtocolData
+        required: true
+      trunk_mode:
+        type: boolean
+        required: true
+      allowedAddressData: # Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.nodes.nfv.VduCp:
+    derived_from: tosca.nodes.nfv.Cp
+    properties:
+      bitrate_requirement:
+        type: integer
+        required: false
+      vnic_name: #  Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        required: false
+      vnic_order: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: integer
+        required: false
+      vnic_type: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        constraints:
+            - valid_values: [normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder]
+        required: false
+      virtual_network_interface_requirements:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+        required: false
+      #order:
+      #  type: integer
+      #  required: false
+      #  constraints:
+      #    - greater_or_equal: 0
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink   
+      - virtual_binding:
+          capability: tosca.capabilities.nfv.VirtualBindable
+          relationship: tosca.relationships.nfv.VirtualBindsTo
+          node: tosca.nodes.nfv.Vdu.Compute
+  
+  tosca.nodes.nfv.VnfVirtualLink:
+    derived_from: tosca.nodes.Root
+    properties:
+      connectivity_type:
+        type: tosca.datatypes.nfv.ConnectivityType
+        required: true
+      description:
+        type: string
+        required: false
+      test_access:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      vl_profile:
+        type: tosca.datatypes.nfv.VlProfile
+        required: true
+    capabilities:
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+      virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+  
+  tosca.nodes.nfv.VNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id: # instead of vnfd_id
+        type: string # GUID
+        required: true
+      descriptor_version: # instead of vnfd_version
+        type: string
+        required: true
+      provider: # instead of vnf_provider
+        type: string
+        required: true
+      product_name: # instead of vnf_product_name
+        type: string
+        required: true
+      software_version: # instead of vnf_software_version
+        type: string
+        required: true
+      product_info_name: # instead of vnf_product_info_name
+        type: string
+        required: false
+      product_info_description: # instead of vnf_product_info_description
+        type: string
+        required: false
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        required: true
+      localization_languages:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      default_localization_language:
+        type: string
+        required: false
+      configurable_properties:
+        type: tosca.datatypes.nfv.VnfConfigurableProperties
+        required: false
+      modifiable_attributes:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributes
+        required: false  # true in IFA011, but all of members are false
+      flavour_id:
+        type: string
+        required: true
+      flavour_description:
+        type: string
+        required: true
+    #capabilities:
+      # monitoring_parameter:
+        # modelled as ad hoc capabilities in the VNF node template
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink
+          occurrences: [ 0, UNBOUNDED ]
+    interfaces:
+      Nfv:
+        type: tosca.interfaces.nfv.vnf.lifecycle.Nfv
+
+#Relationship Types
+#Based on R2 Design-time Resource DM clean version v4
+relationship_types:
+  tosca.relationships.nfv.VirtualBindsTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualBindable]
+  
+  tosca.relationships.nfv.VirtualLinksTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable]
+
+  tosca.relationships.nfv.Vdu.AttachedTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualStorage]
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/MainServiceTemplate.mf b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/MainServiceTemplate.mf
new file mode 100644 (file)
index 0000000..c096351
--- /dev/null
@@ -0,0 +1,8 @@
+metadata:
+    vnf_product_name: vcpe_vgmux
+    vnf_provider_id: ONAP
+    vnf_package_version: 1.0
+    vnf_release_data_time: 2018.05.06T13:00+08:00
+
+Source: MainServiceTemplate.yaml
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..0d1b8aa
--- /dev/null
@@ -0,0 +1,381 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vgmux
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_vgmux
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vgmux:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-3333-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-3333-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vgmux ] ]
+        default: vcpe_vgmux
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+#  substitution_mappings:
+#    node_type: onap.vcpe_vgmux
+#    requirements:
+#      virtual_link: [ Cp_vgmux_public, virtual_link ] # expose as external CP
+#      virtual_link: [ Cp_vgmux_onap_private, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    bng_gmux_private_net_id:
+      type: string
+      description: Private network that connects vBNG to vGMUX
+      default: zdfw1bngmux01_private
+    bng_gmux_private_net_cidr:
+      type: string
+      description: The CIDR of the vBNG-vGMUX private network
+      default: 10.1.0.0/24
+    mux_gw_private_net_id:
+      type: string
+      description: Private network that connects vGMUX to vGWs
+      default: zdfw1muxgw01_private
+    mux_gw_private_net_cidr:
+      type: string
+      description: The CIDR of the vGMUX private network
+      default: 10.5.0.0/24
+    brgemu_bng_private_net_cidr:
+      type: string
+      description: The CIDR of the vBRG-vBNG private network
+      default: 10.3.0.0/24
+    vgmux_private_ip_0:
+      type: string
+      description: Private IP address that is assigned to the vGMUX to communicate with the vBNG
+      default: 10.1.0.20
+    vgmux_private_ip_1:
+      type: string
+      description: Private IP address that is assigned to the vGMUX to communicate with ONAP components
+      default: 10.0.101.20
+    vgmux_private_ip_2:
+      type: string
+      description: Private IP address that is assigned to the vGMUX to communicate with vGWs
+      default: 10.5.0.20
+    vgmux_name_0:
+      type: string
+      description: Name of the vGMUX
+      default: zdcpe1cpe01mux01
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_vGMUX_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Intrastructure_Metro_vGMUX
+    bng_gmux_private_ip:
+      type: string
+      description: Private IP address that is assigned to the vBNG to communicate with the vGMUX
+      default: 10.1.0.10
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: integer
+      description: dcae collector port
+      default: 8080
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #Private network that connects vBNG to vGMUX
+    VL_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: bng_gmux_private_net_id}
+          cidr: { get_input: bng_gmux_private_net_cidr }
+          dhcpEnabled: false
+
+    #Private network that connects vGMUX to vGWs
+    VL_mux_gw_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: mux_gw_private_net_id}
+          cidr: { get_input: mux_gw_private_net_cidr }
+          dhcpEnabled: false
+
+    # vgmux related
+    Cp_vgmux_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        #- virtual_link: VL_public
+
+    Cp_vgmux_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgmux_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        #- virtual_link: VL_onap_private
+
+    Cp_vgmux_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgmux_private_ip_0 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            #TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        - virtual_link: VL_bng_gmux_private_net
+
+    Cp_vgmux_mux_gw_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgmux_private_ip_2 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            #TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        - virtual_link: VL_mux_gw_private_net
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vgmux_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vgmux_name_0 }
+        description: vgmux
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          mux_to_bng_net_ipaddr: { get_input: vgmux_private_ip_0 }
+          oam_ipaddr: { get_input: vgmux_private_ip_1 }
+          mux_gw_net_ipaddr: { get_input: vgmux_private_ip_2 }
+          bng_to_mux_net_ipaddr: { get_input: bng_gmux_private_ip }
+          bng_mux_net_cidr: { get_input: bng_gmux_private_net_cidr }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          mux_gw_net_cidr: { get_input: mux_gw_private_net_cidr }
+          brg_bng_net_cidr: { get_input: brgemu_bng_private_net_cidr }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata mux_to_bng_net_ipaddr)" > /opt/config/mux_to_bng_net_ipaddr.txt
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata mux_gw_net_ipaddr)" > /opt/config/mux_gw_net_ipaddr.txt
+          echo "$(get_metadata bng_to_mux_net_ipaddr)" > /opt/config/bng_to_mux_net_ipaddr.txt
+          echo "$(get_metadata bng_mux_net_cidr)" > /opt/config/bng_mux_net_cidr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata mux_gw_net_cidr)" > /opt/config/mux_gw_net_cidr.txt
+          echo "$(get_metadata brg_bng_net_cidr)" > /opt/config/brg_bng_net_cidr.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gmux_install.sh
+          cd /opt
+          chmod +x v_gmux_install.sh
+          ./v_gmux_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              # HPA requirements
+              vdu_memory_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/TOSCA-Metadata/TOSCA.meta b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgmux/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..4eaf193
--- /dev/null
@@ -0,0 +1,4 @@
+TOSCA-Meta-File-Version: 1.0
+CSAR-Version: 1.1
+Created-By: ONAP
+Entry-Definitions: Definitions/MainServiceTemplate.yaml
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw.csar b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw.csar
deleted file mode 100644 (file)
index ca652bf..0000000
Binary files a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw.csar and /dev/null differ
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Artifacts/images/ubuntu_16.04 b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Artifacts/images/ubuntu_16.04
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Artifacts/keys/authorized_keys b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Artifacts/keys/authorized_keys
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Artifacts/keys/id_rsa b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Artifacts/keys/id_rsa
new file mode 100644 (file)
index 0000000..6059757
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAxsekiqwLgs9VfChnr2bnpLC3VqD1iT+s969vWe05j1RDozPu
+zyD3krNgVUcd65x2QQJWrDK2fnyQUtubbPb3wviLXs0Gof4a/b65JsMQkeeC2/OK
+aFvrE6D3heouXmWO1vo1iXy2hUhcfXdr6eM3rP3zpU9zb2Al25/90Ha8kKBpe1RS
+PKHpmcqVXIpGVxJSXnioAFXUsJ687qrTv7Zm13AHkm2L1Y5IvMsGHLFjFTGFlFoY
+ftQQAepF507CFqs66tD378vvNVg8LYqrKpnfdx2PIRNLHAa1xQWc0EvwGHyBQZRL
+hTXS3M3IZ7Y22dJ+3Zg15PMx7QmWDZO5MG/JPwIDAQABAoIBAE5KS1AiutXmezDP
+aSb4TLvcrhj8hDhuT92txxmQCV+ePJWG2sPRpDCvXX246NvnX9vy49gmkSH4RY+c
+1vZvvt2XrqzD65zZzB+sgpf1tA0DNdMTdKvtqASvHU4tEd4z+bJKEdP4vpp4CZWQ
+93vC9ia4TsIJLNns8Hwz42+7lEEResKYZA2djGnzHl+83vR1dm0GGBD6BKR1C3Cx
+HbEhqx42EV61+8nAweQNjWKxeAc2hg+H8o8qWJM1aKy0TnqW6kudOYRyYIpX0rJA
+siE2HwvDA1mDd5M8ntZ/Cx0pnTc/cuZB8BQJ0jN1JXbrJGbWspBNXformw7isbyO
+WIOjvEECgYEA84XKV3aPrTE2JBs5vzzs59NMPV+5frw+xzDyPxqK5Q7+jjVKDwxh
+/WRatCaTdRxhOI905HfVsDYjrsPOpmF9MHsLxmBhwk8zBFOu/xtYr7zBNkJhmCsq
+kZMdxf8bpu08E7kMQJ2MvT7OhM5HRlWIUR0jdja8Hz51Ro4oOb/po7kCgYEA0Pb5
+v12ZsaSHMF0r4l983PifNwYmI22iQIEtRT2DxgTkDKgBTjbRzqZmEhaADMAO48o9
+sIZy+KJ/a8G9fPQVwMgBID8zOHnWsrFmM3qkj5hhrAQdtq7OE71zgaP0tyE1TG4u
+Zs3a7eSyuoildHHFqX88oXSYsTlfV8vn23UpwLcCgYEAwXiCuBger8dQL0FeEJwz
+zz5k7MG3WoPuEEzHuPC6dp8CCDM4IlqBI1JuaX/YWQtyBgCbKsQ2BigNE1THQhJj
+5ndrdHCwWjKX4pElj9HHFN+OVTBJ3x40VLGfzuUNsAH8X+L9Y/yHivZyFrrXj352
+rZLL0KhNrzjs7WAVf0QEOCkCgYBe2s1xnZZnueyX+qMyBfBTChST0Jm9WUXejAS1
+un+3gn7Wc+jrzRyd9pC8wzPrFb9sjWBFYjKMRI8cpfxS3SWGtgM01Rt2FnBr+vUO
+hyxt9ljX0aJ/S4hGE6h7/6XU/yEHibhMeENZ24d5/w9D9WUpVJV8IMYzJHzwCKI9
+z0hdrwKBgQDMKvY3DBpZjhZe9YnOgdj4SRpNwaasUSf3a3SZYY1JyOZVUzeSSzoX
+rYLfxBRDjkJ8Nnod+nR/JSRqYa/SJYEMZEZFsC+k/pvBiaP6tk694IlpLD/2MXN6
+14FUV5LH/rGSbZJMSfZ9yNX1XZDowH8nOu+qlmlU4lmgiOuityTmtw==
+-----END RSA PRIVATE KEY-----
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Artifacts/keys/id_rsa.pub b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Artifacts/keys/id_rsa.pub
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Definitions/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Definitions/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..f36574d
--- /dev/null
@@ -0,0 +1,377 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vgw
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_vgw
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vgw:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-2222-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vgw ] ]
+        default: vcpe_vgw
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+  #substitution_mappings:
+  #  node_type: onap.vcpe_vgw
+  #  requirements:
+  #    virtual_link: [ Cp_vgw_public, virtual_link ] # expose as external CP
+  #    virtual_link: [ Cp_vgw_onap_private, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    mux_gw_private_net_id:
+      type: string
+      description: Private network that connects vGMUX to vGWs
+      default: zdfw1muxgw01_private
+    mux_gw_private_net_cidr:
+      type: string
+      description: he CIDR of the vGMUX private network
+      default: 10.5.0.0/24
+    cpe_public_net_id:
+      type: string
+      description: cpe public net name
+      default: zdfw1cpe01_public
+    cpe_public_net_cidr:
+      type: string
+      description: cpe public net cidr
+      default: 10.2.0.0/24
+    vgw_private_ip_0:
+      type: string
+      description: Private IP address that is assigned to the vGW to communicate with vGMUX
+      default: 10.5.0.21
+    vgw_private_ip_1:
+      type: string
+      description: Private IP address that is assigned to the vGW to communicate with ONAP components
+      default: 10.0.101.30
+    vgw_private_ip_2:
+      type: string
+      description: Private IP address that is assigned to the vGW to communicate with vCPE public network
+      default: 10.2.0.3
+    vgw_name_0:
+      type: string
+      description: Name of the vGW
+      default: zdcpe1cpe01gw01
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: integer
+      description: dcae collector port
+      default: 8080
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    mux_ip_addr:
+      type: string
+      description: IP address of vGMUX
+      default: 10.5.0.20
+    vg_vgmux_tunnel_vni:
+      type: integer
+      description: vni value of vG-vGMUX vxlan tunnel
+      default: 100
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_GW_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Customer_GW
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #Private network that connects vGMUX to vGWs
+    VL_mux_gw_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: mux_gw_private_net_id}
+          cidr: { get_input: mux_gw_private_net_cidr }
+          dhcpEnabled: false
+
+    #cpe public network
+    VL_cpe_public:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: cpe_public_net_id}
+          cidr: { get_input: cpe_public_net_cidr }
+          dhcpEnabled: false
+
+    # vgw related
+    Cp_vgw_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vgw_0
+        #- virtual_link: VL_public
+
+    Cp_vgw_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgw_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vgw_0
+        #- virtual_link: VL_onap_private
+
+    Cp_vgw_mux_gw_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgw_private_ip_0 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            #TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vgw_0
+        - virtual_link: VL_mux_gw_private_net
+
+    Cp_vgw_cpe_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgw_private_ip_2 }
+      requirements:
+        - virtual_binding: VDU_vgw_0
+        - virtual_link: VL_cpe_public
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vgw_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vgw_name_0 }
+        description: vgw
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: # TODO SDC BUG
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          mux_gw_private_net_ipaddr: { get_input: vgw_private_ip_0 }
+          oam_ipaddr: { get_input: vgw_private_ip_1 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
+          mux_gw_private_net_cidr: { get_input: mux_gw_private_net_cidr }
+          mux_ip_addr: { get_input: mux_ip_addr }
+          vg_vgmux_tunnel_vni: { get_input: vg_vgmux_tunnel_vni }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
+          echo "$(get_metadata mux_gw_private_net_ipaddr)" > /opt/config/mux_gw_private_net_ipaddr.txt
+          echo "$(get_metadata mux_gw_private_net_cidr)" > /opt/config/mux_gw_private_net_cidr.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata mux_ip_addr)" > /opt/config/mux_ip_addr.txt
+          echo "$(get_metadata vg_vgmux_tunnel_vni)" > /opt/config/vg_vgmux_tunnel_vni.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gw_install.sh
+          cd /opt
+          chmod +x v_gw_install.sh
+          ./v_gw_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              # HPA requirements
+              vdu_memory_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Definitions/onap_dm.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/Definitions/onap_dm.yaml
new file mode 100644 (file)
index 0000000..0a3faba
--- /dev/null
@@ -0,0 +1,827 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+#Artifact Types
+#Based on R2 Design-time Resource DM clean version v8
+artifact_types:
+  tosca.artifacts.nfv.SwImage:
+    derived_from: tosca.artifacts.Deployment.Image
+
+#Capabilities Type
+#Based on R2 Design-time Resource DM clean version v21
+capability_types:
+  tosca.capabilities.nfv.VirtualBindable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.Metric:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.VirtualCompute:
+    derived_from: tosca.capabilities.Root
+    properties:
+      logical_node:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+      compute_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      requested_additional_capabilities:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.RequestedAdditionalCapability
+        required: false
+      virtual_memory:
+        type: tosca.datatypes.nfv.VirtualMemory
+        required: true
+      virtual_cpu:
+        type: tosca.datatypes.nfv.VirtualCpu
+        required: true
+
+  tosca.capabilities.nfv.VirtualStorage:
+    derived_from: tosca.capabilities.Root
+
+  tosca.capabilities.nfv.VirtualLinkable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.ExtVirtualLinkable:
+    derived_from: tosca.capabilities.Root
+
+#Data Types
+#Based on R2 Design-time Resource DM clean version v45
+data_types:
+  tosca.datatypes.nfv.L2AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      mac_address_assignment:
+        type: boolean
+        required: true
+
+  tosca.datatypes.nfv.injectFile:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      source_path:
+        type: string
+        required: true
+      dest_path:
+        type: string
+        required: true
+
+  tosca.datatypes.nfv.L3AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      ip_address_assignment:
+        type: boolean
+        required: true   
+      floating_ip_activated:
+        type: boolean
+        required: true
+      ip_address_type:
+        type: string
+        required: false
+        constraints:
+          - valid_values: [ipv4, ipv6]
+      number_of_ip_address:
+        type: integer
+        required: false
+      fixed_ip_address:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+
+  tosca.datatypes.nfv.AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      address_type:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [mac_address, ip_address]    
+      l2_address_data:
+        type: tosca.datatypes.nfv.L2AddressData # empty in "GS NFV IFA011 V0.7.3"
+        required: false
+      l3_address_data:
+        type: tosca.datatypes.nfv.L3AddressData
+        required: false 
+  
+  tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      name:
+        type: string
+        required: false   
+      description:
+        type: string
+        required: false
+      support_mandatory:
+        type: boolean
+        required: true
+      #TODO HPA
+      network_interface_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: true
+      nic_io_requirements:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+  
+  tosca.datatypes.nfv.ConnectivityType:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      layer_protocol:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]  
+      flow_pattern:
+        type: string
+        required: false
+        constraints: # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          - valid_values: [Line, Tree, Mesh]
+  
+  tosca.datatypes.nfv.RequestedAdditionalCapability:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #name:
+        # key of containing map
+      support_mandatory:
+        type: boolean
+        required: true
+      min_requested_additional_capability_version:
+        type: string
+        required: false
+      preferred_requested_additional_capability_version:
+        type: string
+        required: false
+      requested_additional_capability_name:
+        type: string
+        required: true
+      target_performance_parameters:
+        type: map
+        entry_schema:
+          type: string
+        required: true     
+  
+  tosca.datatypes.nfv.VirtualMemory:
+      derived_from: tosca.datatypes.Root
+      properties:
+        virtual_mem_size:
+          type: scalar-unit.size # Number
+          required: true
+        virtual_mem_oversubscription_policy:
+          type: string
+          required: false
+        #TODO HPA
+        vdu_memory_requirements:
+          type: map
+          entry_schema:
+           type: string
+          required: false
+        numa_enabled:
+          type: boolean
+          required: false
+  
+  tosca.datatypes.nfv.VirtualCpu:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_architecture:
+        type: string
+        required: false
+      num_virtual_cpu:
+        type: integer
+        required: true
+      virtual_cpu_clock:
+        type: scalar-unit.frequency
+        required: false
+      virtual_cpu_oversubscription_policy:
+        type: string
+        required: false
+      #TODO HPA
+      vdu_cpu_requirements:
+        type: map
+        entry_schema:
+           type: string
+        required: false
+      virtual_cpu_pinning:
+        type: tosca.datatypes.nfv.VirtualCpuPinning
+        required: false
+  
+  tosca.datatypes.nfv.VirtualCpuPinning:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_pinning_policy:
+        type: string # CpuPinningPolicy
+        constraints:
+          - valid_values: [ static, dynamic ]
+        required: false
+      cpu_pinning_map:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VnfcConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      additional_vnfc_configurable_properties:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VduProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_number_of_instances:
+          type: integer
+          required: true
+        max_number_of_instances:
+          type: integer
+          required: true
+        #localAffinityOrAntiAffinityRule:  # not defined in SOL001 v.6.0
+        #  type: tosca.datatype.nfv.LocalAffinityOrAntiAffinityRule
+        #  required: true
+        #affinityOrAntiAffinityGroupId: # not defined in SOL001 v.6.0
+        #  type: string
+        #  required: true
+        watchdog: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: string
+          required: true
+        vmBootUpTimeOut: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: integer
+          required: false
+  
+   
+  tosca.datatypes.nfv.VlProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        max_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        min_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        qos:
+           type: tosca.datatypes.nfv.Qos
+           required: false
+        initiationParameters: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: map
+           entry_schema:
+             type: string
+           required: false
+        cidr: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkName:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        startIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        endIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        gatewayIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        segmentationId:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: integer
+           required: false
+        physicalNetwork:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkType:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+           constraints:
+             - valid_values: [VLAN, VXLAN]
+        dhcpEnabled:  # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+        vlanTransparent:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+  
+  tosca.datatypes.nfv.InstantiationLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        description:
+          type: string
+          required: true
+        vdu_levels:
+          type: map # key: vduId
+          required: true
+          entry_schema:
+            type: tosca.datatypes.nfv.VduLevel
+        scale_info:
+          type: map # key: aspectId
+          required: false
+          entry_schema:
+            type: tosca.datatypes.nfv.ScaleInfo
+  
+  tosca.datatypes.nfv.VduLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        number_of_instances:
+          type: integer
+          required: true
+  
+  tosca.datatypes.nfv.VnfLcmOperationsConfiguration: 
+    derived_from: tosca.datatypes.Root 
+    properties: 
+      instantiate: 
+        type: tosca.datatypes.nfv.VnfInstantiateOperationConfiguration 
+      scale:
+        type: tosca.datatypes.nfv.VnfScaleOperationConfiguration 
+      scale_to_level: 
+        type: tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration 
+      heal: 
+        type: tosca.datatypes.nfv.VnfHealOperationConfiguration
+      terminate:
+        type: tosca.datatypes.nfv.VnfTerminateOperationConfiguration
+      operate: 
+        type: tosca.datatypes.nfv.VnfOperateOperationConfiguration
+  
+  tosca.datatypes.nfv.VnfInstantiateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      #properties:
+        #parameters:
+            #modeled as part of operation parameter list
+  
+  tosca.datatypes.nfv.VnfScaleOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        scaling_by_more_than_one_step_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        arbitrary_target_levels_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfHealOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        causes:
+           type: list
+           entry_schema:
+             type: string
+  
+  tosca.datatypes.nfv.VnfTerminateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_graceful_termination_timeout:
+           type: integer
+        max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.VnfOperateOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    properties:
+      min_graceful_termination_timeout:
+           type: integer
+      max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.ScaleInfo:
+    derived_from: tosca.datatypes.Root
+    properties:
+      scaleLevel:
+           type: integer
+           required: true
+  
+  tosca.datatypes.nfv.ScaleAspect:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+         type: string
+         required: true
+      description:
+         type: string
+         required: true
+      associated_group:
+         type: string #Identifier
+         required: false
+      max_scale_level:
+         type: integer #PositiveInteger
+         required: true
+  
+  tosca.datatypes.nfv.LinkBitRateRequirements:
+    derived_from: tosca.datatypes.Root
+    properties:
+      root:
+         type: integer
+         required: true
+      leaf:
+         type: integer
+         required: true
+  
+  tosca.datatypes.nfv.Qos:
+    derived_from: tosca.datatypes.Root
+    properties:
+      latency:
+         type: integer #Number [ms]
+         required: true
+      packet_delay_variation:
+         type: integer #Number [ms]
+         required: true
+      packet_loss_ratio:
+         type: float
+         constraints:
+           - in_range: [ 0.0, 1.0 ]
+         required: false
+  
+  tosca.datatypes.nfv.CpProtocolData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      asscociated_layer_protocol:
+        type: string
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
+        required: true
+      address_data:
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.datatypes.nfv.VnfConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      is_autoscale_enabled:
+        type: boolean
+        required: false
+      is_autoheal_enabled:
+        type: boolean
+        required: false
+      additional_configurable_properties:
+        type: tosca.datatypes.nfv.VnfAdditionalConfigurableProperties
+        required: false
+  
+  tosca.datatypes.nfv.VnfAdditionalConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributes:
+    derived_from: tosca.datatypes.Root
+    properties:
+      extensions:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions
+        required: false
+      metadata:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata
+        required: false
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.LogicalNodeData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #TODO HPA
+      logical_node_requirements:
+        type: map # not defined in SOL001 v.6.0
+        entry_schema:
+          type: string
+        required: false
+
+#Interface Types
+#Based on R2 Design-time Resource DM clean version v10
+interface_types:
+  tosca.interfaces.nfv.vnf.lifecycle.Nfv:
+    derived_from: tosca.interfaces.Root
+    instantiate:
+      description: Invoked upon receipt of an Instantiate VNF request
+    instantiate_start:
+      description: Invoked before instantiate
+    instantiate_end:
+      description: Invoked after instantiate
+    terminate:
+      description: Invoked upon receipt Terminate VNF request
+    terminate_start:
+      description: Invoked before terminate
+    terminate_end:
+      description: Invoked after terminate
+    modify_information:
+      description: Invoked upon receipt of a Modify VNF Information request
+    modify_information_start:
+      description: Invoked before modify_information
+    modify_information_end:
+      description: Invoked after modify_information
+    change_flavour:
+      description: Invoked upon receipt of a Change VNF Flavour request
+    change_flavour_start:
+      description: Invoked before change_flavour
+    change_flavour_end:
+      description: Invoked after change_flavour
+    change_external_connectivity:
+      description: Invoked upon receipt of a Change External VNF Connectivity request
+    change_external_connectivity_start:
+      description: Invoked before change_external_connectivity
+    change_external_connectivity_end:
+      description: Invoked after change_external_connectivity
+    operate:
+      description: Invoked upon receipt of an Operate VNF request
+    operate_start:
+      description: Invoked before operate
+    operate_end:
+      description: Invoked after operate
+    heal:
+      description: Invoked upon receipt of a Heal VNF request
+    heal_start:
+      description: Invoked before heal
+    heal_end:
+      description: Invoked after heal
+    scale:
+      description: Invoked upon receipt of a Scale VNF request
+    scale_start:
+      description: Invoked before scale
+    scale_end:
+      description: Invoked after scale 
+    scale_to_level:
+      description: Invoked upon receipt of a Scale VNF to Level request
+    scale_to_level_start:
+      description: Invoked before scale_to_level
+    scale_to_level_end:
+      description: Invoked after scale_to_level
+  #  indicator_changed:
+  #    description: On receiving a VNF indicator value change notification
+
+#Node Types
+#Based on R2 Design-time Resource DM clean version v36
+node_types:
+  tosca.nodes.nfv.Vdu.Compute:
+    derived_from: tosca.nodes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      description:
+        type: string
+        required: true
+      boot_order:
+        type: list # explicit index (boot index) not necessary, contrary to IFA011
+        entry_schema:
+          type: string
+        required: false
+      nfvi_constraints:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      configurable_properties:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.VnfcConfigurableProperties
+        required: true 
+      vdu_profile:
+        type: tosca.datatypes.nfv.VduProfile
+        required: true
+      inject_files: #Aligned with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        #type: list
+        #entry_schema:
+        #TODO workaround of SDC bug
+        type: tosca.datatypes.nfv.injectFile
+        required: false
+      meta_data: #metadata attached to the VM or container
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      user_data: #cloudinit userdata script support
+        type: string
+        required: false
+    #attributes: NOT DEFINED IN ONAP IM and SOL001
+      #private_address:
+      #  status: deprecated
+      #public_address:
+      #  status: deprecated
+      #networks:
+      #  status: deprecated
+      #ports:
+      #  status: deprecated
+    capabilities:
+      virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+      virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences: [1, UNBOUNDED]
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+    requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          relationship: tosca.relationships.nfv.Vdu.AttachedTo
+          node: tosca.nodes.nfv.Vdu.VirtualStorage
+          occurrences: [ 0, UNBOUNDED ]
+    #artifacts:
+    #  - sw_image:
+    #      file:
+    #      type: tosca.artifacts.nfv.SwImage
+  
+  tosca.nodes.nfv.Vdu.VirtualStorage:
+    derived_from: tosca.nodes.Root
+    properties:
+      #id:
+        # node name
+      type_of_storage:
+        type: string
+        constraints:
+          - valid_values: [volume, object, root, block]
+        required: true
+      size_of_storage:
+        type: scalar-unit.size
+        required: true
+      #TODO HPA
+      vdu_storage_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      rdma_enabled:
+        type: boolean
+        required: false
+    capabilities:
+      virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+    #artifacts:
+    #  - sw_image:
+    #     file:
+    #     type: tosca.artifacts.Deployment.Image
+  
+  tosca.nodes.nfv.Cp:
+    derived_from: tosca.nodes.Root
+    properties:
+      layer_protocol:
+        type: list
+        entry_schema:
+          constraints:
+            - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]
+          type: string
+        required: true
+      role: #Name in ETSI NFV IFA011 v0.7.3 cpRole
+        type: string
+        constraints:
+          - valid_values: [ root, leaf ]
+        required: false
+      description:
+        type: string
+        required: false
+      protocol_data:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.CpProtocolData
+        required: true
+      trunk_mode:
+        type: boolean
+        required: true
+      allowedAddressData: # Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.nodes.nfv.VduCp:
+    derived_from: tosca.nodes.nfv.Cp
+    properties:
+      bitrate_requirement:
+        type: integer
+        required: false
+      vnic_name: #  Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        required: false
+      vnic_order: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: integer
+        required: false
+      vnic_type: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        constraints:
+            - valid_values: [normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder]
+        required: false
+      virtual_network_interface_requirements:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+        required: false
+      #order:
+      #  type: integer
+      #  required: false
+      #  constraints:
+      #    - greater_or_equal: 0
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink   
+      - virtual_binding:
+          capability: tosca.capabilities.nfv.VirtualBindable
+          relationship: tosca.relationships.nfv.VirtualBindsTo
+          node: tosca.nodes.nfv.Vdu.Compute
+  
+  tosca.nodes.nfv.VnfVirtualLink:
+    derived_from: tosca.nodes.Root
+    properties:
+      connectivity_type:
+        type: tosca.datatypes.nfv.ConnectivityType
+        required: true
+      description:
+        type: string
+        required: false
+      test_access:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      vl_profile:
+        type: tosca.datatypes.nfv.VlProfile
+        required: true
+    capabilities:
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+      virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+  
+  tosca.nodes.nfv.VNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id: # instead of vnfd_id
+        type: string # GUID
+        required: true
+      descriptor_version: # instead of vnfd_version
+        type: string
+        required: true
+      provider: # instead of vnf_provider
+        type: string
+        required: true
+      product_name: # instead of vnf_product_name
+        type: string
+        required: true
+      software_version: # instead of vnf_software_version
+        type: string
+        required: true
+      product_info_name: # instead of vnf_product_info_name
+        type: string
+        required: false
+      product_info_description: # instead of vnf_product_info_description
+        type: string
+        required: false
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        required: true
+      localization_languages:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      default_localization_language:
+        type: string
+        required: false
+      configurable_properties:
+        type: tosca.datatypes.nfv.VnfConfigurableProperties
+        required: false
+      modifiable_attributes:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributes
+        required: false  # true in IFA011, but all of members are false
+      flavour_id:
+        type: string
+        required: true
+      flavour_description:
+        type: string
+        required: true
+    #capabilities:
+      # monitoring_parameter:
+        # modelled as ad hoc capabilities in the VNF node template
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink
+          occurrences: [ 0, UNBOUNDED ]
+    interfaces:
+      Nfv:
+        type: tosca.interfaces.nfv.vnf.lifecycle.Nfv
+
+#Relationship Types
+#Based on R2 Design-time Resource DM clean version v4
+relationship_types:
+  tosca.relationships.nfv.VirtualBindsTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualBindable]
+  
+  tosca.relationships.nfv.VirtualLinksTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable]
+
+  tosca.relationships.nfv.Vdu.AttachedTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualStorage]
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/MainServiceTemplate.mf b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/MainServiceTemplate.mf
new file mode 100644 (file)
index 0000000..808bc28
--- /dev/null
@@ -0,0 +1,8 @@
+metadata:
+    vnf_product_name: vcpe_vgw
+    vnf_provider_id: ONAP
+    vnf_package_version: 1.0
+    vnf_release_data_time: 2018.05.06T13:00+08:00
+
+Source: MainServiceTemplate.yaml
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..f36574d
--- /dev/null
@@ -0,0 +1,377 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vgw
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_vgw
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vgw:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-2222-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vgw ] ]
+        default: vcpe_vgw
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+  #substitution_mappings:
+  #  node_type: onap.vcpe_vgw
+  #  requirements:
+  #    virtual_link: [ Cp_vgw_public, virtual_link ] # expose as external CP
+  #    virtual_link: [ Cp_vgw_onap_private, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    mux_gw_private_net_id:
+      type: string
+      description: Private network that connects vGMUX to vGWs
+      default: zdfw1muxgw01_private
+    mux_gw_private_net_cidr:
+      type: string
+      description: he CIDR of the vGMUX private network
+      default: 10.5.0.0/24
+    cpe_public_net_id:
+      type: string
+      description: cpe public net name
+      default: zdfw1cpe01_public
+    cpe_public_net_cidr:
+      type: string
+      description: cpe public net cidr
+      default: 10.2.0.0/24
+    vgw_private_ip_0:
+      type: string
+      description: Private IP address that is assigned to the vGW to communicate with vGMUX
+      default: 10.5.0.21
+    vgw_private_ip_1:
+      type: string
+      description: Private IP address that is assigned to the vGW to communicate with ONAP components
+      default: 10.0.101.30
+    vgw_private_ip_2:
+      type: string
+      description: Private IP address that is assigned to the vGW to communicate with vCPE public network
+      default: 10.2.0.3
+    vgw_name_0:
+      type: string
+      description: Name of the vGW
+      default: zdcpe1cpe01gw01
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: integer
+      description: dcae collector port
+      default: 8080
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    mux_ip_addr:
+      type: string
+      description: IP address of vGMUX
+      default: 10.5.0.20
+    vg_vgmux_tunnel_vni:
+      type: integer
+      description: vni value of vG-vGMUX vxlan tunnel
+      default: 100
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_GW_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Customer_GW
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #Private network that connects vGMUX to vGWs
+    VL_mux_gw_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: mux_gw_private_net_id}
+          cidr: { get_input: mux_gw_private_net_cidr }
+          dhcpEnabled: false
+
+    #cpe public network
+    VL_cpe_public:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: cpe_public_net_id}
+          cidr: { get_input: cpe_public_net_cidr }
+          dhcpEnabled: false
+
+    # vgw related
+    Cp_vgw_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vgw_0
+        #- virtual_link: VL_public
+
+    Cp_vgw_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgw_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vgw_0
+        #- virtual_link: VL_onap_private
+
+    Cp_vgw_mux_gw_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgw_private_ip_0 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            #TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vgw_0
+        - virtual_link: VL_mux_gw_private_net
+
+    Cp_vgw_cpe_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgw_private_ip_2 }
+      requirements:
+        - virtual_binding: VDU_vgw_0
+        - virtual_link: VL_cpe_public
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vgw_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vgw_name_0 }
+        description: vgw
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: # TODO SDC BUG
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          mux_gw_private_net_ipaddr: { get_input: vgw_private_ip_0 }
+          oam_ipaddr: { get_input: vgw_private_ip_1 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
+          mux_gw_private_net_cidr: { get_input: mux_gw_private_net_cidr }
+          mux_ip_addr: { get_input: mux_ip_addr }
+          vg_vgmux_tunnel_vni: { get_input: vg_vgmux_tunnel_vni }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
+          echo "$(get_metadata mux_gw_private_net_ipaddr)" > /opt/config/mux_gw_private_net_ipaddr.txt
+          echo "$(get_metadata mux_gw_private_net_cidr)" > /opt/config/mux_gw_private_net_cidr.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata mux_ip_addr)" > /opt/config/mux_ip_addr.txt
+          echo "$(get_metadata vg_vgmux_tunnel_vni)" > /opt/config/vg_vgmux_tunnel_vni.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gw_install.sh
+          cd /opt
+          chmod +x v_gw_install.sh
+          ./v_gw_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              # HPA requirements
+              vdu_memory_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/TOSCA-Metadata/TOSCA.meta b/catalog/pub/utils/toscaparser/testdata/vnf/vcpedpdk/vgw/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..4eaf193
--- /dev/null
@@ -0,0 +1,4 @@
+TOSCA-Meta-File-Version: 1.0
+CSAR-Version: 1.1
+Created-By: ONAP
+Entry-Definitions: Definitions/MainServiceTemplate.yaml
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra.csar b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra.csar
deleted file mode 100644 (file)
index c91c034..0000000
Binary files a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra.csar and /dev/null differ
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Artifacts/images/ubuntu_16.04 b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Artifacts/images/ubuntu_16.04
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Artifacts/keys/authorized_keys b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Artifacts/keys/authorized_keys
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Artifacts/keys/id_rsa b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Artifacts/keys/id_rsa
new file mode 100644 (file)
index 0000000..6059757
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAxsekiqwLgs9VfChnr2bnpLC3VqD1iT+s969vWe05j1RDozPu
+zyD3krNgVUcd65x2QQJWrDK2fnyQUtubbPb3wviLXs0Gof4a/b65JsMQkeeC2/OK
+aFvrE6D3heouXmWO1vo1iXy2hUhcfXdr6eM3rP3zpU9zb2Al25/90Ha8kKBpe1RS
+PKHpmcqVXIpGVxJSXnioAFXUsJ687qrTv7Zm13AHkm2L1Y5IvMsGHLFjFTGFlFoY
+ftQQAepF507CFqs66tD378vvNVg8LYqrKpnfdx2PIRNLHAa1xQWc0EvwGHyBQZRL
+hTXS3M3IZ7Y22dJ+3Zg15PMx7QmWDZO5MG/JPwIDAQABAoIBAE5KS1AiutXmezDP
+aSb4TLvcrhj8hDhuT92txxmQCV+ePJWG2sPRpDCvXX246NvnX9vy49gmkSH4RY+c
+1vZvvt2XrqzD65zZzB+sgpf1tA0DNdMTdKvtqASvHU4tEd4z+bJKEdP4vpp4CZWQ
+93vC9ia4TsIJLNns8Hwz42+7lEEResKYZA2djGnzHl+83vR1dm0GGBD6BKR1C3Cx
+HbEhqx42EV61+8nAweQNjWKxeAc2hg+H8o8qWJM1aKy0TnqW6kudOYRyYIpX0rJA
+siE2HwvDA1mDd5M8ntZ/Cx0pnTc/cuZB8BQJ0jN1JXbrJGbWspBNXformw7isbyO
+WIOjvEECgYEA84XKV3aPrTE2JBs5vzzs59NMPV+5frw+xzDyPxqK5Q7+jjVKDwxh
+/WRatCaTdRxhOI905HfVsDYjrsPOpmF9MHsLxmBhwk8zBFOu/xtYr7zBNkJhmCsq
+kZMdxf8bpu08E7kMQJ2MvT7OhM5HRlWIUR0jdja8Hz51Ro4oOb/po7kCgYEA0Pb5
+v12ZsaSHMF0r4l983PifNwYmI22iQIEtRT2DxgTkDKgBTjbRzqZmEhaADMAO48o9
+sIZy+KJ/a8G9fPQVwMgBID8zOHnWsrFmM3qkj5hhrAQdtq7OE71zgaP0tyE1TG4u
+Zs3a7eSyuoildHHFqX88oXSYsTlfV8vn23UpwLcCgYEAwXiCuBger8dQL0FeEJwz
+zz5k7MG3WoPuEEzHuPC6dp8CCDM4IlqBI1JuaX/YWQtyBgCbKsQ2BigNE1THQhJj
+5ndrdHCwWjKX4pElj9HHFN+OVTBJ3x40VLGfzuUNsAH8X+L9Y/yHivZyFrrXj352
+rZLL0KhNrzjs7WAVf0QEOCkCgYBe2s1xnZZnueyX+qMyBfBTChST0Jm9WUXejAS1
+un+3gn7Wc+jrzRyd9pC8wzPrFb9sjWBFYjKMRI8cpfxS3SWGtgM01Rt2FnBr+vUO
+hyxt9ljX0aJ/S4hGE6h7/6XU/yEHibhMeENZ24d5/w9D9WUpVJV8IMYzJHzwCKI9
+z0hdrwKBgQDMKvY3DBpZjhZe9YnOgdj4SRpNwaasUSf3a3SZYY1JyOZVUzeSSzoX
+rYLfxBRDjkJ8Nnod+nR/JSRqYa/SJYEMZEZFsC+k/pvBiaP6tk694IlpLD/2MXN6
+14FUV5LH/rGSbZJMSfZ9yNX1XZDowH8nOu+qlmlU4lmgiOuityTmtw==
+-----END RSA PRIVATE KEY-----
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Artifacts/keys/id_rsa.pub b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Artifacts/keys/id_rsa.pub
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Definitions/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Definitions/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..e9aa59f
--- /dev/null
@@ -0,0 +1,738 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_infra
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_infra
+
+imports:
+  - onap_dm.yaml
+
+topology_template:
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    mr_ip_addr:
+      type: string
+      description: message router ip that for vDHCP configuration 
+      default: 10.0.11.1
+    mr_ip_port:
+      type: integer
+      # label: Message Router Port
+      description: IP port of the Message Router that for vDHCP configuration
+      default: 80
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: integer
+      description: dcae collector port
+      default: 8080
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    cpe_signal_net_id:
+      type: string
+      description: cpe signal net name
+      default: zdfw1cpe01_private
+    cpe_signal_net_cidr:
+      type: string
+      description: cpe signal net cidr
+      default: 10.4.0.0/24
+    cpe_public_net_id:
+      type: string
+      description: cpe public net name
+      default: zdfw1cpe01_public
+    cpe_public_net_cidr:
+      type: string
+      description: cpe public net cidr
+      default: 10.2.0.0/24
+    vdhcp_name_0:
+      type: string
+      description: vdu vdhcp_0 name
+      default: zdcpe1cpe01dhcp01
+    vdhcp_private_ip_0:
+      type: string
+      description: ip of vdhcp port to cpe signal net
+      default: 10.4.0.1
+    vdhcp_private_ip_1:
+      type: string
+      description: ip of vdhcp port to onap oam net
+      default: 10.0.101.1
+    vaaa_name_0:
+      type: string
+      description: vdu vaaa_0 name
+      default: zdcpe1cpe01aaa01
+    vaaa_private_ip_0:
+      type: string
+      description: ip of vaaa port to cpe signal net
+      default: 10.4.0.4
+    vaaa_private_ip_1:
+      type: string
+      description: ip of vaaa port to onap oam net
+      default: 10.0.101.2
+    vdns_name_0:
+      type: string
+      description: vdu vdns_0 name
+      default: zdcpe1cpe01dns01
+    vdns_private_ip_0:
+      type: string
+      description: ip of vdns port to cpe public net
+      default: 10.2.0.1
+    vdns_private_ip_1:
+      type: string
+      description: ip of vdns port to onap oam net
+      default: 10.0.101.3
+    vweb_name_0:
+      type: string
+      description: vdu vweb_0 name
+      default: zdcpe1cpe01web01
+    vweb_private_ip_0:
+      type: string
+      description: ip of vweb port to cpe public net
+      default: 10.2.0.10
+    vweb_private_ip_1:
+      type: string
+      description: ip of vweb port to onap oam net
+      default: 10.0.101.40
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Intrastructure
+
+  substitution_mappings:
+    node_type: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id: b1bb0ce7-1111-4fa7-95ed-4840d70a1177
+      provider: onap
+      product_name: vcpe_infra
+      software_version: '1.0'
+      descriptor_version: '1.0'
+      flavour_id: simple
+      flavour_description: simple
+      vnfm_info: [ 'gvnfm' ]
+
+    requirements:
+      - virtual_link: [ Cp_vaaa_public, virtual_link ] # expose as external CP
+      - virtual_link: [ Cp_vaaa_onap_private, virtual_link ] # expose as external CP
+      - virtual_link: [ Cp_vdns_public, virtual_link ]
+      - virtual_link: [ Cp_vdns_onap_private, virtual_link ]
+      - virtual_link: [ Cp_vdhcp_public, virtual_link ]
+      - virtual_link: [ Cp_vdhcp_onap_private, virtual_link ]
+      - virtual_link: [ Cp_vweb_public, virtual_link ]
+      - virtual_link: [ Cp_vweb_onap_private, virtual_link ]
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #cpe signal network
+    VL_cpe_signal:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: cpe_signal_net_id}
+          cidr: { get_input: cpe_signal_net_cidr }
+          dhcpEnabled: false
+
+    #cpe public network
+    VL_cpe_public:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: cpe_public_net_id}
+          cidr: { get_input: cpe_public_net_cidr }
+          dhcpEnabled: false
+
+    # vaaa related
+    Cp_vaaa_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vaaa_0
+#        - virtual_link: VL_public
+
+    Cp_vaaa_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vaaa_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vaaa_0
+#        - virtual_link: VL_onap_private
+
+    Cp_vaaa_cpe_signal:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vaaa_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vaaa_0
+        - virtual_link: VL_cpe_signal
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vaaa_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vaaa_name_0 }
+        description: vaaa
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC Bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          dcae_collector_ip: { get_input: dcae_collector_ip }
+          dcae_collector_port: { get_input: dcae_collector_port }
+          cpe_signal_net_ipaddr: { get_input: vaaa_private_ip_0 }
+          oam_ipaddr: { get_input: vaaa_private_ip_1 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
+          echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
+          echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_aaa_install.sh
+          cd /opt
+          chmod +x v_aaa_install.sh
+          ./v_aaa_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
+    # vdns related
+    Cp_vdns_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vdns_0
+#        - virtual_link: VL_public
+
+    Cp_vdns_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdns_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vdns_0
+        #- virtual_link: VL_onap_private
+
+    Cp_vdns_cpe_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdns_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vdns_0
+        - virtual_link: VL_cpe_public
+
+    VDU_vdns_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vdns_name_0 }
+        description: vdns
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: # TODO SDC Bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          oam_ipaddr: { get_input: vdns_private_ip_1 }
+          cpe_public_net_ipaddr: { get_input: vdns_private_ip_0 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata cpe_public_net_ipaddr)" > /opt/config/cpe_public_net_ipaddr.txt
+          echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dns_install.sh
+          cd /opt
+          chmod +x v_dns_install.sh
+          ./v_dns_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
+    # vdhcp related
+    Cp_vdhcp_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vdhcp_0
+#        - virtual_link: VL_public
+
+    Cp_vdhcp_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdhcp_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vdhcp_0
+#        - virtual_link: VL_onap_private
+
+    Cp_vdhcp_cpe_signal:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdhcp_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vdhcp_0
+        - virtual_link: VL_cpe_signal
+
+    VDU_vdhcp_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vdhcp_name_0 }
+        description: vdhcp
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #SDC Bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          oam_ipaddr: { get_input: vdhcp_private_ip_1 }
+          cpe_signal_ipaddr: { get_input: vdhcp_private_ip_0 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
+          mr_ip_addr: { get_input: mr_ip_addr }
+          mr_ip_port: { get_input: mr_ip_port }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata cpe_signal_ipaddr)" > /opt/config/cpe_signal_ipaddr.txt
+          echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
+          echo "$(get_metadata mr_ip_addr)" > /opt/config/mr_ip_addr.txt
+          echo "$(get_metadata mr_ip_port)" > /opt/config/mr_ip_port.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dhcp_install.sh
+          cd /opt
+          chmod +x v_dhcp_install.sh
+          ./v_dhcp_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
+    # vweb related
+    Cp_vweb_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vweb_0
+#        - virtual_link: VL_public
+
+    Cp_vweb_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vweb_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vweb_0
+#        - virtual_link: VL_onap_private
+
+    Cp_vweb_cpe_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vweb_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vweb_0
+        - virtual_link: VL_cpe_public
+
+    VDU_vweb_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vweb_name_0 }
+        description: vweb
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: # TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          oam_ipaddr: { get_input: vweb_private_ip_1 }
+          cpe_public_ipaddr: { get_input: vweb_private_ip_0 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata cpe_public_ipaddr)" > /opt/config/cpe_public_ipaddr.txt
+          echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_web_install.sh
+          cd /opt
+          chmod +x v_web_install.sh
+          ./v_web_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Definitions/onap_dm.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/Definitions/onap_dm.yaml
new file mode 100644 (file)
index 0000000..0a3faba
--- /dev/null
@@ -0,0 +1,827 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+#Artifact Types
+#Based on R2 Design-time Resource DM clean version v8
+artifact_types:
+  tosca.artifacts.nfv.SwImage:
+    derived_from: tosca.artifacts.Deployment.Image
+
+#Capabilities Type
+#Based on R2 Design-time Resource DM clean version v21
+capability_types:
+  tosca.capabilities.nfv.VirtualBindable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.Metric:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.VirtualCompute:
+    derived_from: tosca.capabilities.Root
+    properties:
+      logical_node:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+      compute_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      requested_additional_capabilities:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.RequestedAdditionalCapability
+        required: false
+      virtual_memory:
+        type: tosca.datatypes.nfv.VirtualMemory
+        required: true
+      virtual_cpu:
+        type: tosca.datatypes.nfv.VirtualCpu
+        required: true
+
+  tosca.capabilities.nfv.VirtualStorage:
+    derived_from: tosca.capabilities.Root
+
+  tosca.capabilities.nfv.VirtualLinkable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.ExtVirtualLinkable:
+    derived_from: tosca.capabilities.Root
+
+#Data Types
+#Based on R2 Design-time Resource DM clean version v45
+data_types:
+  tosca.datatypes.nfv.L2AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      mac_address_assignment:
+        type: boolean
+        required: true
+
+  tosca.datatypes.nfv.injectFile:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      source_path:
+        type: string
+        required: true
+      dest_path:
+        type: string
+        required: true
+
+  tosca.datatypes.nfv.L3AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      ip_address_assignment:
+        type: boolean
+        required: true   
+      floating_ip_activated:
+        type: boolean
+        required: true
+      ip_address_type:
+        type: string
+        required: false
+        constraints:
+          - valid_values: [ipv4, ipv6]
+      number_of_ip_address:
+        type: integer
+        required: false
+      fixed_ip_address:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+
+  tosca.datatypes.nfv.AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      address_type:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [mac_address, ip_address]    
+      l2_address_data:
+        type: tosca.datatypes.nfv.L2AddressData # empty in "GS NFV IFA011 V0.7.3"
+        required: false
+      l3_address_data:
+        type: tosca.datatypes.nfv.L3AddressData
+        required: false 
+  
+  tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      name:
+        type: string
+        required: false   
+      description:
+        type: string
+        required: false
+      support_mandatory:
+        type: boolean
+        required: true
+      #TODO HPA
+      network_interface_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: true
+      nic_io_requirements:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+  
+  tosca.datatypes.nfv.ConnectivityType:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      layer_protocol:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]  
+      flow_pattern:
+        type: string
+        required: false
+        constraints: # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          - valid_values: [Line, Tree, Mesh]
+  
+  tosca.datatypes.nfv.RequestedAdditionalCapability:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #name:
+        # key of containing map
+      support_mandatory:
+        type: boolean
+        required: true
+      min_requested_additional_capability_version:
+        type: string
+        required: false
+      preferred_requested_additional_capability_version:
+        type: string
+        required: false
+      requested_additional_capability_name:
+        type: string
+        required: true
+      target_performance_parameters:
+        type: map
+        entry_schema:
+          type: string
+        required: true     
+  
+  tosca.datatypes.nfv.VirtualMemory:
+      derived_from: tosca.datatypes.Root
+      properties:
+        virtual_mem_size:
+          type: scalar-unit.size # Number
+          required: true
+        virtual_mem_oversubscription_policy:
+          type: string
+          required: false
+        #TODO HPA
+        vdu_memory_requirements:
+          type: map
+          entry_schema:
+           type: string
+          required: false
+        numa_enabled:
+          type: boolean
+          required: false
+  
+  tosca.datatypes.nfv.VirtualCpu:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_architecture:
+        type: string
+        required: false
+      num_virtual_cpu:
+        type: integer
+        required: true
+      virtual_cpu_clock:
+        type: scalar-unit.frequency
+        required: false
+      virtual_cpu_oversubscription_policy:
+        type: string
+        required: false
+      #TODO HPA
+      vdu_cpu_requirements:
+        type: map
+        entry_schema:
+           type: string
+        required: false
+      virtual_cpu_pinning:
+        type: tosca.datatypes.nfv.VirtualCpuPinning
+        required: false
+  
+  tosca.datatypes.nfv.VirtualCpuPinning:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_pinning_policy:
+        type: string # CpuPinningPolicy
+        constraints:
+          - valid_values: [ static, dynamic ]
+        required: false
+      cpu_pinning_map:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VnfcConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      additional_vnfc_configurable_properties:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VduProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_number_of_instances:
+          type: integer
+          required: true
+        max_number_of_instances:
+          type: integer
+          required: true
+        #localAffinityOrAntiAffinityRule:  # not defined in SOL001 v.6.0
+        #  type: tosca.datatype.nfv.LocalAffinityOrAntiAffinityRule
+        #  required: true
+        #affinityOrAntiAffinityGroupId: # not defined in SOL001 v.6.0
+        #  type: string
+        #  required: true
+        watchdog: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: string
+          required: true
+        vmBootUpTimeOut: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: integer
+          required: false
+  
+   
+  tosca.datatypes.nfv.VlProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        max_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        min_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        qos:
+           type: tosca.datatypes.nfv.Qos
+           required: false
+        initiationParameters: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: map
+           entry_schema:
+             type: string
+           required: false
+        cidr: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkName:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        startIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        endIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        gatewayIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        segmentationId:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: integer
+           required: false
+        physicalNetwork:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkType:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+           constraints:
+             - valid_values: [VLAN, VXLAN]
+        dhcpEnabled:  # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+        vlanTransparent:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+  
+  tosca.datatypes.nfv.InstantiationLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        description:
+          type: string
+          required: true
+        vdu_levels:
+          type: map # key: vduId
+          required: true
+          entry_schema:
+            type: tosca.datatypes.nfv.VduLevel
+        scale_info:
+          type: map # key: aspectId
+          required: false
+          entry_schema:
+            type: tosca.datatypes.nfv.ScaleInfo
+  
+  tosca.datatypes.nfv.VduLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        number_of_instances:
+          type: integer
+          required: true
+  
+  tosca.datatypes.nfv.VnfLcmOperationsConfiguration: 
+    derived_from: tosca.datatypes.Root 
+    properties: 
+      instantiate: 
+        type: tosca.datatypes.nfv.VnfInstantiateOperationConfiguration 
+      scale:
+        type: tosca.datatypes.nfv.VnfScaleOperationConfiguration 
+      scale_to_level: 
+        type: tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration 
+      heal: 
+        type: tosca.datatypes.nfv.VnfHealOperationConfiguration
+      terminate:
+        type: tosca.datatypes.nfv.VnfTerminateOperationConfiguration
+      operate: 
+        type: tosca.datatypes.nfv.VnfOperateOperationConfiguration
+  
+  tosca.datatypes.nfv.VnfInstantiateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      #properties:
+        #parameters:
+            #modeled as part of operation parameter list
+  
+  tosca.datatypes.nfv.VnfScaleOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        scaling_by_more_than_one_step_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        arbitrary_target_levels_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfHealOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        causes:
+           type: list
+           entry_schema:
+             type: string
+  
+  tosca.datatypes.nfv.VnfTerminateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_graceful_termination_timeout:
+           type: integer
+        max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.VnfOperateOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    properties:
+      min_graceful_termination_timeout:
+           type: integer
+      max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.ScaleInfo:
+    derived_from: tosca.datatypes.Root
+    properties:
+      scaleLevel:
+           type: integer
+           required: true
+  
+  tosca.datatypes.nfv.ScaleAspect:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+         type: string
+         required: true
+      description:
+         type: string
+         required: true
+      associated_group:
+         type: string #Identifier
+         required: false
+      max_scale_level:
+         type: integer #PositiveInteger
+         required: true
+  
+  tosca.datatypes.nfv.LinkBitRateRequirements:
+    derived_from: tosca.datatypes.Root
+    properties:
+      root:
+         type: integer
+         required: true
+      leaf:
+         type: integer
+         required: true
+  
+  tosca.datatypes.nfv.Qos:
+    derived_from: tosca.datatypes.Root
+    properties:
+      latency:
+         type: integer #Number [ms]
+         required: true
+      packet_delay_variation:
+         type: integer #Number [ms]
+         required: true
+      packet_loss_ratio:
+         type: float
+         constraints:
+           - in_range: [ 0.0, 1.0 ]
+         required: false
+  
+  tosca.datatypes.nfv.CpProtocolData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      asscociated_layer_protocol:
+        type: string
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
+        required: true
+      address_data:
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.datatypes.nfv.VnfConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      is_autoscale_enabled:
+        type: boolean
+        required: false
+      is_autoheal_enabled:
+        type: boolean
+        required: false
+      additional_configurable_properties:
+        type: tosca.datatypes.nfv.VnfAdditionalConfigurableProperties
+        required: false
+  
+  tosca.datatypes.nfv.VnfAdditionalConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributes:
+    derived_from: tosca.datatypes.Root
+    properties:
+      extensions:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions
+        required: false
+      metadata:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata
+        required: false
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.LogicalNodeData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #TODO HPA
+      logical_node_requirements:
+        type: map # not defined in SOL001 v.6.0
+        entry_schema:
+          type: string
+        required: false
+
+#Interface Types
+#Based on R2 Design-time Resource DM clean version v10
+interface_types:
+  tosca.interfaces.nfv.vnf.lifecycle.Nfv:
+    derived_from: tosca.interfaces.Root
+    instantiate:
+      description: Invoked upon receipt of an Instantiate VNF request
+    instantiate_start:
+      description: Invoked before instantiate
+    instantiate_end:
+      description: Invoked after instantiate
+    terminate:
+      description: Invoked upon receipt Terminate VNF request
+    terminate_start:
+      description: Invoked before terminate
+    terminate_end:
+      description: Invoked after terminate
+    modify_information:
+      description: Invoked upon receipt of a Modify VNF Information request
+    modify_information_start:
+      description: Invoked before modify_information
+    modify_information_end:
+      description: Invoked after modify_information
+    change_flavour:
+      description: Invoked upon receipt of a Change VNF Flavour request
+    change_flavour_start:
+      description: Invoked before change_flavour
+    change_flavour_end:
+      description: Invoked after change_flavour
+    change_external_connectivity:
+      description: Invoked upon receipt of a Change External VNF Connectivity request
+    change_external_connectivity_start:
+      description: Invoked before change_external_connectivity
+    change_external_connectivity_end:
+      description: Invoked after change_external_connectivity
+    operate:
+      description: Invoked upon receipt of an Operate VNF request
+    operate_start:
+      description: Invoked before operate
+    operate_end:
+      description: Invoked after operate
+    heal:
+      description: Invoked upon receipt of a Heal VNF request
+    heal_start:
+      description: Invoked before heal
+    heal_end:
+      description: Invoked after heal
+    scale:
+      description: Invoked upon receipt of a Scale VNF request
+    scale_start:
+      description: Invoked before scale
+    scale_end:
+      description: Invoked after scale 
+    scale_to_level:
+      description: Invoked upon receipt of a Scale VNF to Level request
+    scale_to_level_start:
+      description: Invoked before scale_to_level
+    scale_to_level_end:
+      description: Invoked after scale_to_level
+  #  indicator_changed:
+  #    description: On receiving a VNF indicator value change notification
+
+#Node Types
+#Based on R2 Design-time Resource DM clean version v36
+node_types:
+  tosca.nodes.nfv.Vdu.Compute:
+    derived_from: tosca.nodes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      description:
+        type: string
+        required: true
+      boot_order:
+        type: list # explicit index (boot index) not necessary, contrary to IFA011
+        entry_schema:
+          type: string
+        required: false
+      nfvi_constraints:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      configurable_properties:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.VnfcConfigurableProperties
+        required: true 
+      vdu_profile:
+        type: tosca.datatypes.nfv.VduProfile
+        required: true
+      inject_files: #Aligned with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        #type: list
+        #entry_schema:
+        #TODO workaround of SDC bug
+        type: tosca.datatypes.nfv.injectFile
+        required: false
+      meta_data: #metadata attached to the VM or container
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      user_data: #cloudinit userdata script support
+        type: string
+        required: false
+    #attributes: NOT DEFINED IN ONAP IM and SOL001
+      #private_address:
+      #  status: deprecated
+      #public_address:
+      #  status: deprecated
+      #networks:
+      #  status: deprecated
+      #ports:
+      #  status: deprecated
+    capabilities:
+      virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+      virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences: [1, UNBOUNDED]
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+    requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          relationship: tosca.relationships.nfv.Vdu.AttachedTo
+          node: tosca.nodes.nfv.Vdu.VirtualStorage
+          occurrences: [ 0, UNBOUNDED ]
+    #artifacts:
+    #  - sw_image:
+    #      file:
+    #      type: tosca.artifacts.nfv.SwImage
+  
+  tosca.nodes.nfv.Vdu.VirtualStorage:
+    derived_from: tosca.nodes.Root
+    properties:
+      #id:
+        # node name
+      type_of_storage:
+        type: string
+        constraints:
+          - valid_values: [volume, object, root, block]
+        required: true
+      size_of_storage:
+        type: scalar-unit.size
+        required: true
+      #TODO HPA
+      vdu_storage_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      rdma_enabled:
+        type: boolean
+        required: false
+    capabilities:
+      virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+    #artifacts:
+    #  - sw_image:
+    #     file:
+    #     type: tosca.artifacts.Deployment.Image
+  
+  tosca.nodes.nfv.Cp:
+    derived_from: tosca.nodes.Root
+    properties:
+      layer_protocol:
+        type: list
+        entry_schema:
+          constraints:
+            - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]
+          type: string
+        required: true
+      role: #Name in ETSI NFV IFA011 v0.7.3 cpRole
+        type: string
+        constraints:
+          - valid_values: [ root, leaf ]
+        required: false
+      description:
+        type: string
+        required: false
+      protocol_data:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.CpProtocolData
+        required: true
+      trunk_mode:
+        type: boolean
+        required: true
+      allowedAddressData: # Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.nodes.nfv.VduCp:
+    derived_from: tosca.nodes.nfv.Cp
+    properties:
+      bitrate_requirement:
+        type: integer
+        required: false
+      vnic_name: #  Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        required: false
+      vnic_order: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: integer
+        required: false
+      vnic_type: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        constraints:
+            - valid_values: [normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder]
+        required: false
+      virtual_network_interface_requirements:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+        required: false
+      #order:
+      #  type: integer
+      #  required: false
+      #  constraints:
+      #    - greater_or_equal: 0
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink   
+      - virtual_binding:
+          capability: tosca.capabilities.nfv.VirtualBindable
+          relationship: tosca.relationships.nfv.VirtualBindsTo
+          node: tosca.nodes.nfv.Vdu.Compute
+  
+  tosca.nodes.nfv.VnfVirtualLink:
+    derived_from: tosca.nodes.Root
+    properties:
+      connectivity_type:
+        type: tosca.datatypes.nfv.ConnectivityType
+        required: true
+      description:
+        type: string
+        required: false
+      test_access:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      vl_profile:
+        type: tosca.datatypes.nfv.VlProfile
+        required: true
+    capabilities:
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+      virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+  
+  tosca.nodes.nfv.VNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id: # instead of vnfd_id
+        type: string # GUID
+        required: true
+      descriptor_version: # instead of vnfd_version
+        type: string
+        required: true
+      provider: # instead of vnf_provider
+        type: string
+        required: true
+      product_name: # instead of vnf_product_name
+        type: string
+        required: true
+      software_version: # instead of vnf_software_version
+        type: string
+        required: true
+      product_info_name: # instead of vnf_product_info_name
+        type: string
+        required: false
+      product_info_description: # instead of vnf_product_info_description
+        type: string
+        required: false
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        required: true
+      localization_languages:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      default_localization_language:
+        type: string
+        required: false
+      configurable_properties:
+        type: tosca.datatypes.nfv.VnfConfigurableProperties
+        required: false
+      modifiable_attributes:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributes
+        required: false  # true in IFA011, but all of members are false
+      flavour_id:
+        type: string
+        required: true
+      flavour_description:
+        type: string
+        required: true
+    #capabilities:
+      # monitoring_parameter:
+        # modelled as ad hoc capabilities in the VNF node template
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink
+          occurrences: [ 0, UNBOUNDED ]
+    interfaces:
+      Nfv:
+        type: tosca.interfaces.nfv.vnf.lifecycle.Nfv
+
+#Relationship Types
+#Based on R2 Design-time Resource DM clean version v4
+relationship_types:
+  tosca.relationships.nfv.VirtualBindsTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualBindable]
+  
+  tosca.relationships.nfv.VirtualLinksTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable]
+
+  tosca.relationships.nfv.Vdu.AttachedTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualStorage]
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/MainServiceTemplate.mf b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/MainServiceTemplate.mf
new file mode 100644 (file)
index 0000000..67f80e5
--- /dev/null
@@ -0,0 +1,8 @@
+metadata:
+    vnf_product_name: vcpe_infra
+    vnf_provider_id: ONAP
+    vnf_package_version: 1.0
+    vnf_release_data_time: 2018.05.06T13:00+08:00
+
+Source: MainServiceTemplate.yaml
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..fa1b1fa
--- /dev/null
@@ -0,0 +1,758 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_infra
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_infra
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_infra:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+      provider:
+        type: string
+      product_name:
+        type: string
+      software_version:
+        type: string
+      descriptor_version:
+        type: string
+      flavour_id:
+        type: string
+      flavour_description:
+        type: string
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+
+topology_template:
+  substitution_mappings:
+    node_type: onap.vcpe_infra
+    properties:
+      descriptor_id: b1bb0ce7-1111-4fa7-95ed-4840d70a1177
+      provider: onap
+      product_name: vcpe_infra
+      software_version: '1.0'
+      descriptor_version: '1.0'
+      flavour_id: simple
+      flavour_description: simple
+      vnfm_info: gvnfm
+    requirements:
+      virtual_link: [ Cp_vaaa_public, virtual_link ] # expose as external CP
+      virtual_link: [ Cp_vaaa_onap_private, virtual_link ] # expose as external CP
+      virtual_link: [ Cp_vdns_public, virtual_link ]
+      virtual_link: [ Cp_vdns_onap_private, virtual_link ]
+      virtual_link: [ Cp_vdhcp_public, virtual_link ]
+      virtual_link: [ Cp_vdhcp_onap_private, virtual_link ]
+      virtual_link: [ Cp_vweb_public, virtual_link ]
+      virtual_link: [ Cp_vweb_onap_private, virtual_link ]
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    mr_ip_addr:
+      type: string
+      description: message router ip that for vDHCP configuration 
+      default: 10.0.11.1
+    mr_ip_port:
+      type: string
+      label: Message Router Port 
+      description: IP port of the Message Router that for vDHCP configuration 
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: integer
+      description: dcae collector port
+      default: 8080
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    cpe_signal_net_id:
+      type: string
+      description: cpe signal net name
+      default: zdfw1cpe01_private
+    cpe_signal_net_cidr:
+      type: string
+      description: cpe signal net cidr
+      default: 10.4.0.0/24
+    cpe_public_net_id:
+      type: string
+      description: cpe public net name
+      default: zdfw1cpe01_public
+    cpe_public_net_cidr:
+      type: string
+      description: cpe public net cidr
+      default: 10.2.0.0/24
+    vdhcp_name_0:
+      type: string
+      description: vdu vdhcp_0 name
+      default: zdcpe1cpe01dhcp01
+    vdhcp_private_ip_0:
+      type: string
+      description: ip of vdhcp port to cpe signal net
+      default: 10.4.0.1
+    vdhcp_private_ip_1:
+      type: string
+      description: ip of vdhcp port to onap oam net
+      default: 10.0.101.1
+    vaaa_name_0:
+      type: string
+      description: vdu vaaa_0 name
+      default: zdcpe1cpe01aaa01
+    vaaa_private_ip_0:
+      type: string
+      description: ip of vaaa port to cpe signal net
+      default: 10.4.0.4
+    vaaa_private_ip_1:
+      type: string
+      description: ip of vaaa port to onap oam net
+      default: 10.0.101.2
+    vdns_name_0:
+      type: string
+      description: vdu vdns_0 name
+      default: zdcpe1cpe01dns01
+    vdns_private_ip_0:
+      type: string
+      description: ip of vdns port to cpe public net
+      default: 10.2.0.1
+    vdns_private_ip_1:
+      type: string
+      description: ip of vdns port to onap oam net
+      default: 10.0.101.3
+    vweb_name_0:
+      type: string
+      description: vdu vweb_0 name
+      default: zdcpe1cpe01web01
+    vweb_private_ip_0:
+      type: string
+      description: ip of vweb port to cpe public net
+      default: 10.2.0.10
+    vweb_private_ip_1:
+      type: string
+      description: ip of vweb port to onap oam net
+      default: 10.0.101.40
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Intrastructure
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #cpe signal network
+    VL_cpe_signal:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: cpe_signal_net_id}
+          cidr: { get_input: cpe_signal_net_cidr }
+          dhcpEnabled: false
+
+    #cpe public network
+    VL_cpe_public:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: cpe_public_net_id}
+          cidr: { get_input: cpe_public_net_cidr }
+          dhcpEnabled: false
+
+    # vaaa related
+    Cp_vaaa_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vaaa_0
+#        - virtual_link: VL_public
+
+    Cp_vaaa_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vaaa_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vaaa_0
+#        - virtual_link: VL_onap_private
+
+    Cp_vaaa_cpe_signal:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vaaa_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vaaa_0
+        - virtual_link: VL_cpe_signal
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vaaa_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vaaa_name_0 }
+        description: vaaa
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC Bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          dcae_collector_ip: { get_input: dcae_collector_ip }
+          dcae_collector_port: { get_input: dcae_collector_port }
+          cpe_signal_net_ipaddr: { get_input: vaaa_private_ip_0 }
+          oam_ipaddr: { get_input: vaaa_private_ip_1 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
+          echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
+          echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_aaa_install.sh
+          cd /opt
+          chmod +x v_aaa_install.sh
+          ./v_aaa_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
+    # vdns related
+    Cp_vdns_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vdns_0
+#        - virtual_link: VL_public
+
+    Cp_vdns_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdns_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vdns_0
+        #- virtual_link: VL_onap_private
+
+    Cp_vdns_cpe_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdns_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vdns_0
+        - virtual_link: VL_cpe_public
+
+    VDU_vdns_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vdns_name_0 }
+        description: vdns
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: # TODO SDC Bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          oam_ipaddr: { get_input: vdns_private_ip_1 }
+          cpe_public_net_ipaddr: { get_input: vdns_private_ip_0 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata cpe_public_net_ipaddr)" > /opt/config/cpe_public_net_ipaddr.txt
+          echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dns_install.sh
+          cd /opt
+          chmod +x v_dns_install.sh
+          ./v_dns_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
+    # vdhcp related
+    Cp_vdhcp_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vdhcp_0
+#        - virtual_link: VL_public
+
+    Cp_vdhcp_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdhcp_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vdhcp_0
+#        - virtual_link: VL_onap_private
+
+    Cp_vdhcp_cpe_signal:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vdhcp_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vdhcp_0
+        - virtual_link: VL_cpe_signal
+
+    VDU_vdhcp_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vdhcp_name_0 }
+        description: vdhcp
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #SDC Bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          oam_ipaddr: { get_input: vdhcp_private_ip_1 }
+          cpe_signal_ipaddr: { get_input: vdhcp_private_ip_0 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
+          mr_ip_addr: { get_input: mr_ip_addr }
+          mr_ip_port: { get_input: mr_ip_port }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata cpe_signal_ipaddr)" > /opt/config/cpe_signal_ipaddr.txt
+          echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
+          echo "$(get_metadata mr_ip_addr)" > /opt/config/mr_ip_addr.txt
+          echo "$(get_metadata mr_ip_port)" > /opt/config/mr_ip_port.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dhcp_install.sh
+          cd /opt
+          chmod +x v_dhcp_install.sh
+          ./v_dhcp_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
+    # vweb related
+    Cp_vweb_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vweb_0
+#        - virtual_link: VL_public
+
+    Cp_vweb_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vweb_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vweb_0
+#        - virtual_link: VL_onap_private
+
+    Cp_vweb_cpe_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vweb_private_ip_0 }
+      requirements:
+        - virtual_binding: VDU_vweb_0
+        - virtual_link: VL_cpe_public
+
+    VDU_vweb_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vweb_name_0 }
+        description: vweb
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: # TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          oam_ipaddr: { get_input: vweb_private_ip_1 }
+          cpe_public_ipaddr: { get_input: vweb_private_ip_0 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata cpe_public_ipaddr)" > /opt/config/cpe_public_ipaddr.txt
+          echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_web_install.sh
+          cd /opt
+          chmod +x v_web_install.sh
+          ./v_web_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            #TODO add local disk size
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+            virtual_cpu:
+              num_virtual_cpu: 2
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/TOSCA-Metadata/TOSCA.meta b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/infra/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..4eaf193
--- /dev/null
@@ -0,0 +1,4 @@
+TOSCA-Meta-File-Version: 1.0
+CSAR-Version: 1.1
+Created-By: ONAP
+Entry-Definitions: Definitions/MainServiceTemplate.yaml
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng.csar b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng.csar
deleted file mode 100644 (file)
index 5011563..0000000
Binary files a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng.csar and /dev/null differ
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Artifacts/images/ubuntu_16.04 b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Artifacts/images/ubuntu_16.04
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Artifacts/keys/authorized_keys b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Artifacts/keys/authorized_keys
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Artifacts/keys/id_rsa b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Artifacts/keys/id_rsa
new file mode 100644 (file)
index 0000000..6059757
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAxsekiqwLgs9VfChnr2bnpLC3VqD1iT+s969vWe05j1RDozPu
+zyD3krNgVUcd65x2QQJWrDK2fnyQUtubbPb3wviLXs0Gof4a/b65JsMQkeeC2/OK
+aFvrE6D3heouXmWO1vo1iXy2hUhcfXdr6eM3rP3zpU9zb2Al25/90Ha8kKBpe1RS
+PKHpmcqVXIpGVxJSXnioAFXUsJ687qrTv7Zm13AHkm2L1Y5IvMsGHLFjFTGFlFoY
+ftQQAepF507CFqs66tD378vvNVg8LYqrKpnfdx2PIRNLHAa1xQWc0EvwGHyBQZRL
+hTXS3M3IZ7Y22dJ+3Zg15PMx7QmWDZO5MG/JPwIDAQABAoIBAE5KS1AiutXmezDP
+aSb4TLvcrhj8hDhuT92txxmQCV+ePJWG2sPRpDCvXX246NvnX9vy49gmkSH4RY+c
+1vZvvt2XrqzD65zZzB+sgpf1tA0DNdMTdKvtqASvHU4tEd4z+bJKEdP4vpp4CZWQ
+93vC9ia4TsIJLNns8Hwz42+7lEEResKYZA2djGnzHl+83vR1dm0GGBD6BKR1C3Cx
+HbEhqx42EV61+8nAweQNjWKxeAc2hg+H8o8qWJM1aKy0TnqW6kudOYRyYIpX0rJA
+siE2HwvDA1mDd5M8ntZ/Cx0pnTc/cuZB8BQJ0jN1JXbrJGbWspBNXformw7isbyO
+WIOjvEECgYEA84XKV3aPrTE2JBs5vzzs59NMPV+5frw+xzDyPxqK5Q7+jjVKDwxh
+/WRatCaTdRxhOI905HfVsDYjrsPOpmF9MHsLxmBhwk8zBFOu/xtYr7zBNkJhmCsq
+kZMdxf8bpu08E7kMQJ2MvT7OhM5HRlWIUR0jdja8Hz51Ro4oOb/po7kCgYEA0Pb5
+v12ZsaSHMF0r4l983PifNwYmI22iQIEtRT2DxgTkDKgBTjbRzqZmEhaADMAO48o9
+sIZy+KJ/a8G9fPQVwMgBID8zOHnWsrFmM3qkj5hhrAQdtq7OE71zgaP0tyE1TG4u
+Zs3a7eSyuoildHHFqX88oXSYsTlfV8vn23UpwLcCgYEAwXiCuBger8dQL0FeEJwz
+zz5k7MG3WoPuEEzHuPC6dp8CCDM4IlqBI1JuaX/YWQtyBgCbKsQ2BigNE1THQhJj
+5ndrdHCwWjKX4pElj9HHFN+OVTBJ3x40VLGfzuUNsAH8X+L9Y/yHivZyFrrXj352
+rZLL0KhNrzjs7WAVf0QEOCkCgYBe2s1xnZZnueyX+qMyBfBTChST0Jm9WUXejAS1
+un+3gn7Wc+jrzRyd9pC8wzPrFb9sjWBFYjKMRI8cpfxS3SWGtgM01Rt2FnBr+vUO
+hyxt9ljX0aJ/S4hGE6h7/6XU/yEHibhMeENZ24d5/w9D9WUpVJV8IMYzJHzwCKI9
+z0hdrwKBgQDMKvY3DBpZjhZe9YnOgdj4SRpNwaasUSf3a3SZYY1JyOZVUzeSSzoX
+rYLfxBRDjkJ8Nnod+nR/JSRqYa/SJYEMZEZFsC+k/pvBiaP6tk694IlpLD/2MXN6
+14FUV5LH/rGSbZJMSfZ9yNX1XZDowH8nOu+qlmlU4lmgiOuityTmtw==
+-----END RSA PRIVATE KEY-----
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Artifacts/keys/id_rsa.pub b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Artifacts/keys/id_rsa.pub
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Definitions/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Definitions/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..a4e54bd
--- /dev/null
@@ -0,0 +1,436 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vbng
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_vbng
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vbng:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-5555-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-5555-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vbng ] ]
+        default: vcpe_vbng
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+#  substitution_mappings:
+#    node_type: onap.vcpe_vbng
+#    requirements:
+#      virtual_link: [ Cp_vbng_public, virtual_link ] # expose as external CP
+#      virtual_link: [ Cp_vbng_onap_private, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    brgemu_bng_private_net_id:
+      type: string
+      description: Private network that connects vBRG to vBNG
+      default: zdfw1bngin01_private
+    brgemu_bng_private_net_cidr:
+      type: string
+      description: The CIDR of the input side of vBNG private network
+      default: 10.3.0.0/24
+    bng_gmux_private_net_id:
+      type: string
+      description: Private network that connects vBNG to vGMUX
+      default: zdfw1bngmux01_private
+    bng_gmux_private_net_cidr:
+      type: string
+      description: The CIDR of the input side of vGMUX private network
+      default: 10.1.0.0/24
+    cpe_signal_net_id:
+      type: string
+      description: Private network that connects vCPE elements with vCPE infrastructure elements
+      default: zdfw1cpe01_private
+    cpe_signal_private_net_cidr:
+      type: string
+      description: The CIDR of the vAAA private network
+      default: 10.4.0.0/24
+    vbng_private_ip_0:
+      type: string
+      description: Private IP address that is assigned to the vBNG IN
+      default: 10.3.0.1
+    vbng_private_ip_1:
+      type: string
+      description: Private IP address that is assigned to the vBNG to communicate with ONAP components
+      default: 10.0.101.10
+    vbng_private_ip_2:
+      type: string
+      description: Private IP address that is assigned to the vBNG in the CPE_SIGNAL network
+      default: 10.4.0.3
+    vbng_private_ip_3:
+      type: string
+      description: Private IP address that is assigned to the vBNG to vGMUX port
+      default: 10.1.0.10
+    vbng_name_0:
+      type: string
+      description: Name of the vBNG
+      default: zdcpe1cpe01bng01
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_Metro_vBNG_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Intrastructure_Metro_vBNG
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: integer
+      description: dcae collector port
+      default: 8080
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    sdnc_ip_addr:
+      type: string
+      description: IP address of the SDNC
+      default: 10.0.7.1
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #Private network that connects vBRG to vBNG
+    VL_brgemu_bng_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: brgemu_bng_private_net_id}
+          cidr: { get_input: brgemu_bng_private_net_cidr }
+          dhcpEnabled: false
+
+    #cpe signal network
+    VL_cpe_signal:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: cpe_signal_net_id}
+          cidr: { get_input: cpe_signal_private_net_cidr }
+          dhcpEnabled: false
+
+    #Private network that connects vBNG to vGMUX
+    VL_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: bng_gmux_private_net_id}
+          cidr: { get_input: bng_gmux_private_net_cidr }
+          dhcpEnabled: false
+
+    # vbng related
+    Cp_vbng_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        #- virtual_link: VL_public
+
+    Cp_vbng_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        #- virtual_link: VL_onap_private
+
+    Cp_vbng_brgemu_bng_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_0 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            # TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        - virtual_link: VL_brgemu_bng_private_net
+
+    Cp_vbng_cpe_signal:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_2 }
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        - virtual_link: VL_cpe_signal
+
+    Cp_vbng_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_3 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            # TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        - virtual_link: VL_bng_gmux_private_net
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vbng_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vbng_name_0 }
+        description: vbng
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+
+          brgemu_bng_net_ipaddr: { get_input: vbng_private_ip_0 }
+          cpe_signal_net_ipaddr: { get_input: vbng_private_ip_2 }
+          bng_gmux_net_ipaddr: { get_input: vbng_private_ip_3 }
+          oam_ipaddr: { get_input: vbng_private_ip_1 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          bng_gmux_cidr: { get_input: bng_gmux_private_net_cidr }
+          cpe_signal_cidr: { get_input: cpe_signal_private_net_cidr }
+          brgemu_bng_cidr: { get_input: brgemu_bng_private_net_cidr }
+          dcae_collector_ip: { get_input: dcae_collector_ip }
+          dcae_collector_port: { get_input: dcae_collector_port }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          sdnc_ip: { get_input: sdnc_ip_addr }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata brgemu_bng_net_ipaddr)" > /opt/config/brgemu_bng_net_ipaddr.txt
+          echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
+          echo "$(get_metadata bng_gmux_net_ipaddr)" > /opt/config/bng_gmux_net_ipaddr.txt
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata bng_gmux_cidr)" > /opt/config/bng_gmux_net_cidr.txt
+          echo "$(get_metadata cpe_signal_cidr)" > /opt/config/cpe_signal_net_cidr.txt
+          echo "$(get_metadata brgemu_bng_cidr)" > /opt/config/brgemu_bng_net_cidr.txt
+          echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
+          echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_bng_install.sh
+          cd /opt
+          chmod +x v_bng_install.sh
+          ./v_bng_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              # HPA requirements
+              vdu_memory_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Definitions/onap_dm.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/Definitions/onap_dm.yaml
new file mode 100644 (file)
index 0000000..0a3faba
--- /dev/null
@@ -0,0 +1,827 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+#Artifact Types
+#Based on R2 Design-time Resource DM clean version v8
+artifact_types:
+  tosca.artifacts.nfv.SwImage:
+    derived_from: tosca.artifacts.Deployment.Image
+
+#Capabilities Type
+#Based on R2 Design-time Resource DM clean version v21
+capability_types:
+  tosca.capabilities.nfv.VirtualBindable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.Metric:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.VirtualCompute:
+    derived_from: tosca.capabilities.Root
+    properties:
+      logical_node:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+      compute_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      requested_additional_capabilities:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.RequestedAdditionalCapability
+        required: false
+      virtual_memory:
+        type: tosca.datatypes.nfv.VirtualMemory
+        required: true
+      virtual_cpu:
+        type: tosca.datatypes.nfv.VirtualCpu
+        required: true
+
+  tosca.capabilities.nfv.VirtualStorage:
+    derived_from: tosca.capabilities.Root
+
+  tosca.capabilities.nfv.VirtualLinkable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.ExtVirtualLinkable:
+    derived_from: tosca.capabilities.Root
+
+#Data Types
+#Based on R2 Design-time Resource DM clean version v45
+data_types:
+  tosca.datatypes.nfv.L2AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      mac_address_assignment:
+        type: boolean
+        required: true
+
+  tosca.datatypes.nfv.injectFile:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      source_path:
+        type: string
+        required: true
+      dest_path:
+        type: string
+        required: true
+
+  tosca.datatypes.nfv.L3AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      ip_address_assignment:
+        type: boolean
+        required: true   
+      floating_ip_activated:
+        type: boolean
+        required: true
+      ip_address_type:
+        type: string
+        required: false
+        constraints:
+          - valid_values: [ipv4, ipv6]
+      number_of_ip_address:
+        type: integer
+        required: false
+      fixed_ip_address:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+
+  tosca.datatypes.nfv.AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      address_type:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [mac_address, ip_address]    
+      l2_address_data:
+        type: tosca.datatypes.nfv.L2AddressData # empty in "GS NFV IFA011 V0.7.3"
+        required: false
+      l3_address_data:
+        type: tosca.datatypes.nfv.L3AddressData
+        required: false 
+  
+  tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      name:
+        type: string
+        required: false   
+      description:
+        type: string
+        required: false
+      support_mandatory:
+        type: boolean
+        required: true
+      #TODO HPA
+      network_interface_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: true
+      nic_io_requirements:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+  
+  tosca.datatypes.nfv.ConnectivityType:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      layer_protocol:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]  
+      flow_pattern:
+        type: string
+        required: false
+        constraints: # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          - valid_values: [Line, Tree, Mesh]
+  
+  tosca.datatypes.nfv.RequestedAdditionalCapability:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #name:
+        # key of containing map
+      support_mandatory:
+        type: boolean
+        required: true
+      min_requested_additional_capability_version:
+        type: string
+        required: false
+      preferred_requested_additional_capability_version:
+        type: string
+        required: false
+      requested_additional_capability_name:
+        type: string
+        required: true
+      target_performance_parameters:
+        type: map
+        entry_schema:
+          type: string
+        required: true     
+  
+  tosca.datatypes.nfv.VirtualMemory:
+      derived_from: tosca.datatypes.Root
+      properties:
+        virtual_mem_size:
+          type: scalar-unit.size # Number
+          required: true
+        virtual_mem_oversubscription_policy:
+          type: string
+          required: false
+        #TODO HPA
+        vdu_memory_requirements:
+          type: map
+          entry_schema:
+           type: string
+          required: false
+        numa_enabled:
+          type: boolean
+          required: false
+  
+  tosca.datatypes.nfv.VirtualCpu:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_architecture:
+        type: string
+        required: false
+      num_virtual_cpu:
+        type: integer
+        required: true
+      virtual_cpu_clock:
+        type: scalar-unit.frequency
+        required: false
+      virtual_cpu_oversubscription_policy:
+        type: string
+        required: false
+      #TODO HPA
+      vdu_cpu_requirements:
+        type: map
+        entry_schema:
+           type: string
+        required: false
+      virtual_cpu_pinning:
+        type: tosca.datatypes.nfv.VirtualCpuPinning
+        required: false
+  
+  tosca.datatypes.nfv.VirtualCpuPinning:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_pinning_policy:
+        type: string # CpuPinningPolicy
+        constraints:
+          - valid_values: [ static, dynamic ]
+        required: false
+      cpu_pinning_map:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VnfcConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      additional_vnfc_configurable_properties:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VduProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_number_of_instances:
+          type: integer
+          required: true
+        max_number_of_instances:
+          type: integer
+          required: true
+        #localAffinityOrAntiAffinityRule:  # not defined in SOL001 v.6.0
+        #  type: tosca.datatype.nfv.LocalAffinityOrAntiAffinityRule
+        #  required: true
+        #affinityOrAntiAffinityGroupId: # not defined in SOL001 v.6.0
+        #  type: string
+        #  required: true
+        watchdog: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: string
+          required: true
+        vmBootUpTimeOut: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: integer
+          required: false
+  
+   
+  tosca.datatypes.nfv.VlProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        max_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        min_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        qos:
+           type: tosca.datatypes.nfv.Qos
+           required: false
+        initiationParameters: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: map
+           entry_schema:
+             type: string
+           required: false
+        cidr: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkName:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        startIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        endIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        gatewayIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        segmentationId:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: integer
+           required: false
+        physicalNetwork:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkType:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+           constraints:
+             - valid_values: [VLAN, VXLAN]
+        dhcpEnabled:  # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+        vlanTransparent:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+  
+  tosca.datatypes.nfv.InstantiationLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        description:
+          type: string
+          required: true
+        vdu_levels:
+          type: map # key: vduId
+          required: true
+          entry_schema:
+            type: tosca.datatypes.nfv.VduLevel
+        scale_info:
+          type: map # key: aspectId
+          required: false
+          entry_schema:
+            type: tosca.datatypes.nfv.ScaleInfo
+  
+  tosca.datatypes.nfv.VduLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        number_of_instances:
+          type: integer
+          required: true
+  
+  tosca.datatypes.nfv.VnfLcmOperationsConfiguration: 
+    derived_from: tosca.datatypes.Root 
+    properties: 
+      instantiate: 
+        type: tosca.datatypes.nfv.VnfInstantiateOperationConfiguration 
+      scale:
+        type: tosca.datatypes.nfv.VnfScaleOperationConfiguration 
+      scale_to_level: 
+        type: tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration 
+      heal: 
+        type: tosca.datatypes.nfv.VnfHealOperationConfiguration
+      terminate:
+        type: tosca.datatypes.nfv.VnfTerminateOperationConfiguration
+      operate: 
+        type: tosca.datatypes.nfv.VnfOperateOperationConfiguration
+  
+  tosca.datatypes.nfv.VnfInstantiateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      #properties:
+        #parameters:
+            #modeled as part of operation parameter list
+  
+  tosca.datatypes.nfv.VnfScaleOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        scaling_by_more_than_one_step_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        arbitrary_target_levels_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfHealOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        causes:
+           type: list
+           entry_schema:
+             type: string
+  
+  tosca.datatypes.nfv.VnfTerminateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_graceful_termination_timeout:
+           type: integer
+        max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.VnfOperateOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    properties:
+      min_graceful_termination_timeout:
+           type: integer
+      max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.ScaleInfo:
+    derived_from: tosca.datatypes.Root
+    properties:
+      scaleLevel:
+           type: integer
+           required: true
+  
+  tosca.datatypes.nfv.ScaleAspect:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+         type: string
+         required: true
+      description:
+         type: string
+         required: true
+      associated_group:
+         type: string #Identifier
+         required: false
+      max_scale_level:
+         type: integer #PositiveInteger
+         required: true
+  
+  tosca.datatypes.nfv.LinkBitRateRequirements:
+    derived_from: tosca.datatypes.Root
+    properties:
+      root:
+         type: integer
+         required: true
+      leaf:
+         type: integer
+         required: true
+  
+  tosca.datatypes.nfv.Qos:
+    derived_from: tosca.datatypes.Root
+    properties:
+      latency:
+         type: integer #Number [ms]
+         required: true
+      packet_delay_variation:
+         type: integer #Number [ms]
+         required: true
+      packet_loss_ratio:
+         type: float
+         constraints:
+           - in_range: [ 0.0, 1.0 ]
+         required: false
+  
+  tosca.datatypes.nfv.CpProtocolData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      asscociated_layer_protocol:
+        type: string
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
+        required: true
+      address_data:
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.datatypes.nfv.VnfConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      is_autoscale_enabled:
+        type: boolean
+        required: false
+      is_autoheal_enabled:
+        type: boolean
+        required: false
+      additional_configurable_properties:
+        type: tosca.datatypes.nfv.VnfAdditionalConfigurableProperties
+        required: false
+  
+  tosca.datatypes.nfv.VnfAdditionalConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributes:
+    derived_from: tosca.datatypes.Root
+    properties:
+      extensions:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions
+        required: false
+      metadata:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata
+        required: false
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.LogicalNodeData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #TODO HPA
+      logical_node_requirements:
+        type: map # not defined in SOL001 v.6.0
+        entry_schema:
+          type: string
+        required: false
+
+#Interface Types
+#Based on R2 Design-time Resource DM clean version v10
+interface_types:
+  tosca.interfaces.nfv.vnf.lifecycle.Nfv:
+    derived_from: tosca.interfaces.Root
+    instantiate:
+      description: Invoked upon receipt of an Instantiate VNF request
+    instantiate_start:
+      description: Invoked before instantiate
+    instantiate_end:
+      description: Invoked after instantiate
+    terminate:
+      description: Invoked upon receipt Terminate VNF request
+    terminate_start:
+      description: Invoked before terminate
+    terminate_end:
+      description: Invoked after terminate
+    modify_information:
+      description: Invoked upon receipt of a Modify VNF Information request
+    modify_information_start:
+      description: Invoked before modify_information
+    modify_information_end:
+      description: Invoked after modify_information
+    change_flavour:
+      description: Invoked upon receipt of a Change VNF Flavour request
+    change_flavour_start:
+      description: Invoked before change_flavour
+    change_flavour_end:
+      description: Invoked after change_flavour
+    change_external_connectivity:
+      description: Invoked upon receipt of a Change External VNF Connectivity request
+    change_external_connectivity_start:
+      description: Invoked before change_external_connectivity
+    change_external_connectivity_end:
+      description: Invoked after change_external_connectivity
+    operate:
+      description: Invoked upon receipt of an Operate VNF request
+    operate_start:
+      description: Invoked before operate
+    operate_end:
+      description: Invoked after operate
+    heal:
+      description: Invoked upon receipt of a Heal VNF request
+    heal_start:
+      description: Invoked before heal
+    heal_end:
+      description: Invoked after heal
+    scale:
+      description: Invoked upon receipt of a Scale VNF request
+    scale_start:
+      description: Invoked before scale
+    scale_end:
+      description: Invoked after scale 
+    scale_to_level:
+      description: Invoked upon receipt of a Scale VNF to Level request
+    scale_to_level_start:
+      description: Invoked before scale_to_level
+    scale_to_level_end:
+      description: Invoked after scale_to_level
+  #  indicator_changed:
+  #    description: On receiving a VNF indicator value change notification
+
+#Node Types
+#Based on R2 Design-time Resource DM clean version v36
+node_types:
+  tosca.nodes.nfv.Vdu.Compute:
+    derived_from: tosca.nodes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      description:
+        type: string
+        required: true
+      boot_order:
+        type: list # explicit index (boot index) not necessary, contrary to IFA011
+        entry_schema:
+          type: string
+        required: false
+      nfvi_constraints:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      configurable_properties:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.VnfcConfigurableProperties
+        required: true 
+      vdu_profile:
+        type: tosca.datatypes.nfv.VduProfile
+        required: true
+      inject_files: #Aligned with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        #type: list
+        #entry_schema:
+        #TODO workaround of SDC bug
+        type: tosca.datatypes.nfv.injectFile
+        required: false
+      meta_data: #metadata attached to the VM or container
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      user_data: #cloudinit userdata script support
+        type: string
+        required: false
+    #attributes: NOT DEFINED IN ONAP IM and SOL001
+      #private_address:
+      #  status: deprecated
+      #public_address:
+      #  status: deprecated
+      #networks:
+      #  status: deprecated
+      #ports:
+      #  status: deprecated
+    capabilities:
+      virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+      virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences: [1, UNBOUNDED]
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+    requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          relationship: tosca.relationships.nfv.Vdu.AttachedTo
+          node: tosca.nodes.nfv.Vdu.VirtualStorage
+          occurrences: [ 0, UNBOUNDED ]
+    #artifacts:
+    #  - sw_image:
+    #      file:
+    #      type: tosca.artifacts.nfv.SwImage
+  
+  tosca.nodes.nfv.Vdu.VirtualStorage:
+    derived_from: tosca.nodes.Root
+    properties:
+      #id:
+        # node name
+      type_of_storage:
+        type: string
+        constraints:
+          - valid_values: [volume, object, root, block]
+        required: true
+      size_of_storage:
+        type: scalar-unit.size
+        required: true
+      #TODO HPA
+      vdu_storage_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      rdma_enabled:
+        type: boolean
+        required: false
+    capabilities:
+      virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+    #artifacts:
+    #  - sw_image:
+    #     file:
+    #     type: tosca.artifacts.Deployment.Image
+  
+  tosca.nodes.nfv.Cp:
+    derived_from: tosca.nodes.Root
+    properties:
+      layer_protocol:
+        type: list
+        entry_schema:
+          constraints:
+            - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]
+          type: string
+        required: true
+      role: #Name in ETSI NFV IFA011 v0.7.3 cpRole
+        type: string
+        constraints:
+          - valid_values: [ root, leaf ]
+        required: false
+      description:
+        type: string
+        required: false
+      protocol_data:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.CpProtocolData
+        required: true
+      trunk_mode:
+        type: boolean
+        required: true
+      allowedAddressData: # Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.nodes.nfv.VduCp:
+    derived_from: tosca.nodes.nfv.Cp
+    properties:
+      bitrate_requirement:
+        type: integer
+        required: false
+      vnic_name: #  Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        required: false
+      vnic_order: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: integer
+        required: false
+      vnic_type: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        constraints:
+            - valid_values: [normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder]
+        required: false
+      virtual_network_interface_requirements:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+        required: false
+      #order:
+      #  type: integer
+      #  required: false
+      #  constraints:
+      #    - greater_or_equal: 0
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink   
+      - virtual_binding:
+          capability: tosca.capabilities.nfv.VirtualBindable
+          relationship: tosca.relationships.nfv.VirtualBindsTo
+          node: tosca.nodes.nfv.Vdu.Compute
+  
+  tosca.nodes.nfv.VnfVirtualLink:
+    derived_from: tosca.nodes.Root
+    properties:
+      connectivity_type:
+        type: tosca.datatypes.nfv.ConnectivityType
+        required: true
+      description:
+        type: string
+        required: false
+      test_access:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      vl_profile:
+        type: tosca.datatypes.nfv.VlProfile
+        required: true
+    capabilities:
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+      virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+  
+  tosca.nodes.nfv.VNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id: # instead of vnfd_id
+        type: string # GUID
+        required: true
+      descriptor_version: # instead of vnfd_version
+        type: string
+        required: true
+      provider: # instead of vnf_provider
+        type: string
+        required: true
+      product_name: # instead of vnf_product_name
+        type: string
+        required: true
+      software_version: # instead of vnf_software_version
+        type: string
+        required: true
+      product_info_name: # instead of vnf_product_info_name
+        type: string
+        required: false
+      product_info_description: # instead of vnf_product_info_description
+        type: string
+        required: false
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        required: true
+      localization_languages:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      default_localization_language:
+        type: string
+        required: false
+      configurable_properties:
+        type: tosca.datatypes.nfv.VnfConfigurableProperties
+        required: false
+      modifiable_attributes:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributes
+        required: false  # true in IFA011, but all of members are false
+      flavour_id:
+        type: string
+        required: true
+      flavour_description:
+        type: string
+        required: true
+    #capabilities:
+      # monitoring_parameter:
+        # modelled as ad hoc capabilities in the VNF node template
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink
+          occurrences: [ 0, UNBOUNDED ]
+    interfaces:
+      Nfv:
+        type: tosca.interfaces.nfv.vnf.lifecycle.Nfv
+
+#Relationship Types
+#Based on R2 Design-time Resource DM clean version v4
+relationship_types:
+  tosca.relationships.nfv.VirtualBindsTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualBindable]
+  
+  tosca.relationships.nfv.VirtualLinksTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable]
+
+  tosca.relationships.nfv.Vdu.AttachedTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualStorage]
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/MainServiceTemplate.mf b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/MainServiceTemplate.mf
new file mode 100644 (file)
index 0000000..3967e5a
--- /dev/null
@@ -0,0 +1,8 @@
+metadata:
+    vnf_product_name: vcpe_vbng
+    vnf_provider_id: ONAP
+    vnf_package_version: 1.0
+    vnf_release_data_time: 2018.05.06T13:00+08:00
+
+Source: MainServiceTemplate.yaml
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..2684899
--- /dev/null
@@ -0,0 +1,444 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vbng
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_vbng
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vbng:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-5555-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-5555-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vbng ] ]
+        default: vcpe_vbng
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+#  substitution_mappings:
+#    node_type: onap.vcpe_vbng
+#    requirements:
+#      virtual_link: [ Cp_vbng_public, virtual_link ] # expose as external CP
+#      virtual_link: [ Cp_vbng_onap_private, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    brgemu_bng_private_net_id:
+      type: string
+      description: Private network that connects vBRG to vBNG
+      default: zdfw1bngin01_private
+    brgemu_bng_private_net_cidr:
+      type: string
+      description: The CIDR of the input side of vBNG private network
+      default: 10.3.0.0/24
+    bng_gmux_private_net_id:
+      type: string
+      description: Private network that connects vBNG to vGMUX
+      default: zdfw1bngmux01_private
+    bng_gmux_private_net_cidr:
+      type: string
+      description: The CIDR of the input side of vGMUX private network
+      default: 10.1.0.0/24
+    cpe_signal_net_id:
+      type: string
+      description: Private network that connects vCPE elements with vCPE infrastructure elements
+      default: zdfw1cpe01_private
+    cpe_signal_private_net_cidr:
+      type: string
+      description: The CIDR of the vAAA private network
+      default: 10.4.0.0/24
+    vbng_private_ip_0:
+      type: string
+      description: Private IP address that is assigned to the vBNG IN
+      default: 10.3.0.1
+    vbng_private_ip_1:
+      type: string
+      description: Private IP address that is assigned to the vBNG to communicate with ONAP components
+      default: 10.0.101.10
+    vbng_private_ip_2:
+      type: string
+      description: Private IP address that is assigned to the vBNG in the CPE_SIGNAL network
+      default: 10.4.0.3
+    vbng_private_ip_3:
+      type: string
+      description: Private IP address that is assigned to the vBNG to vGMUX port
+      default: 10.1.0.10
+    vbng_name_0:
+      type: string
+      description: Name of the vBNG
+      default: zdcpe1cpe01bng01
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_Metro_vBNG_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Intrastructure_Metro_vBNG
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: integer
+      description: dcae collector port
+      default: 8080
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    sdnc_ip_addr:
+      type: string
+      description: IP address of the SDNC
+      default: 10.0.7.1
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #Private network that connects vBRG to vBNG
+    VL_brgemu_bng_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: brgemu_bng_private_net_id}
+          cidr: { get_input: brgemu_bng_private_net_cidr }
+          dhcpEnabled: false
+          physicalNetwork: "physnet1"
+
+    #cpe signal network
+    VL_cpe_signal:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: cpe_signal_net_id}
+          cidr: { get_input: cpe_signal_private_net_cidr }
+          dhcpEnabled: false
+
+    #Private network that connects vBNG to vGMUX
+    VL_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: bng_gmux_private_net_id}
+          cidr: { get_input: bng_gmux_private_net_cidr }
+          dhcpEnabled: false
+          physicalNetwork: "physnet1"
+
+    # vbng related
+    Cp_vbng_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        #- virtual_link: VL_public
+
+    Cp_vbng_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        #- virtual_link: VL_onap_private
+
+    Cp_vbng_brgemu_bng_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_0 }
+        vnic_type: "direct"
+        virtual_network_interface_requirements:
+          - name: "sriov-support"
+            support_mandatory: true
+            network_interface_requirements:
+              interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
+            nic_io_requirements:
+              pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
+              pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
+              pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        - virtual_link: VL_brgemu_bng_private_net
+
+    Cp_vbng_cpe_signal:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_2 }
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        - virtual_link: VL_cpe_signal
+
+    Cp_vbng_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbng_private_ip_3 }
+        vnic_type: "direct"
+        virtual_network_interface_requirements:
+          - name: "sriov-support"
+            support_mandatory: true
+            network_interface_requirements:
+              interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
+            nic_io_requirements:
+              pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
+              pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
+              pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
+      requirements:
+        - virtual_binding: VDU_vbng_0
+        - virtual_link: VL_bng_gmux_private_net
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vbng_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vbng_name_0 }
+        description: vbng
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+
+          brgemu_bng_net_ipaddr: { get_input: vbng_private_ip_0 }
+          cpe_signal_net_ipaddr: { get_input: vbng_private_ip_2 }
+          bng_gmux_net_ipaddr: { get_input: vbng_private_ip_3 }
+          oam_ipaddr: { get_input: vbng_private_ip_1 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          bng_gmux_cidr: { get_input: bng_gmux_private_net_cidr }
+          cpe_signal_cidr: { get_input: cpe_signal_private_net_cidr }
+          brgemu_bng_cidr: { get_input: brgemu_bng_private_net_cidr }
+          dcae_collector_ip: { get_input: dcae_collector_ip }
+          dcae_collector_port: { get_input: dcae_collector_port }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          sdnc_ip: { get_input: sdnc_ip_addr }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata brgemu_bng_net_ipaddr)" > /opt/config/brgemu_bng_net_ipaddr.txt
+          echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
+          echo "$(get_metadata bng_gmux_net_ipaddr)" > /opt/config/bng_gmux_net_ipaddr.txt
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata bng_gmux_cidr)" > /opt/config/bng_gmux_net_cidr.txt
+          echo "$(get_metadata cpe_signal_cidr)" > /opt/config/cpe_signal_net_cidr.txt
+          echo "$(get_metadata brgemu_bng_cidr)" > /opt/config/brgemu_bng_net_cidr.txt
+          echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
+          echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_bng_install.sh
+          cd /opt
+          chmod +x v_bng_install.sh
+          ./v_bng_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              # HPA requirements
+              vdu_memory_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/TOSCA-Metadata/TOSCA.meta b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbng/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..4eaf193
--- /dev/null
@@ -0,0 +1,4 @@
+TOSCA-Meta-File-Version: 1.0
+CSAR-Version: 1.1
+Created-By: ONAP
+Entry-Definitions: Definitions/MainServiceTemplate.yaml
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu.csar b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu.csar
deleted file mode 100644 (file)
index 0f99199..0000000
Binary files a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu.csar and /dev/null differ
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Artifacts/images/ubuntu_16.04 b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Artifacts/images/ubuntu_16.04
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Artifacts/keys/authorized_keys b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Artifacts/keys/authorized_keys
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Artifacts/keys/id_rsa b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Artifacts/keys/id_rsa
new file mode 100644 (file)
index 0000000..6059757
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAxsekiqwLgs9VfChnr2bnpLC3VqD1iT+s969vWe05j1RDozPu
+zyD3krNgVUcd65x2QQJWrDK2fnyQUtubbPb3wviLXs0Gof4a/b65JsMQkeeC2/OK
+aFvrE6D3heouXmWO1vo1iXy2hUhcfXdr6eM3rP3zpU9zb2Al25/90Ha8kKBpe1RS
+PKHpmcqVXIpGVxJSXnioAFXUsJ687qrTv7Zm13AHkm2L1Y5IvMsGHLFjFTGFlFoY
+ftQQAepF507CFqs66tD378vvNVg8LYqrKpnfdx2PIRNLHAa1xQWc0EvwGHyBQZRL
+hTXS3M3IZ7Y22dJ+3Zg15PMx7QmWDZO5MG/JPwIDAQABAoIBAE5KS1AiutXmezDP
+aSb4TLvcrhj8hDhuT92txxmQCV+ePJWG2sPRpDCvXX246NvnX9vy49gmkSH4RY+c
+1vZvvt2XrqzD65zZzB+sgpf1tA0DNdMTdKvtqASvHU4tEd4z+bJKEdP4vpp4CZWQ
+93vC9ia4TsIJLNns8Hwz42+7lEEResKYZA2djGnzHl+83vR1dm0GGBD6BKR1C3Cx
+HbEhqx42EV61+8nAweQNjWKxeAc2hg+H8o8qWJM1aKy0TnqW6kudOYRyYIpX0rJA
+siE2HwvDA1mDd5M8ntZ/Cx0pnTc/cuZB8BQJ0jN1JXbrJGbWspBNXformw7isbyO
+WIOjvEECgYEA84XKV3aPrTE2JBs5vzzs59NMPV+5frw+xzDyPxqK5Q7+jjVKDwxh
+/WRatCaTdRxhOI905HfVsDYjrsPOpmF9MHsLxmBhwk8zBFOu/xtYr7zBNkJhmCsq
+kZMdxf8bpu08E7kMQJ2MvT7OhM5HRlWIUR0jdja8Hz51Ro4oOb/po7kCgYEA0Pb5
+v12ZsaSHMF0r4l983PifNwYmI22iQIEtRT2DxgTkDKgBTjbRzqZmEhaADMAO48o9
+sIZy+KJ/a8G9fPQVwMgBID8zOHnWsrFmM3qkj5hhrAQdtq7OE71zgaP0tyE1TG4u
+Zs3a7eSyuoildHHFqX88oXSYsTlfV8vn23UpwLcCgYEAwXiCuBger8dQL0FeEJwz
+zz5k7MG3WoPuEEzHuPC6dp8CCDM4IlqBI1JuaX/YWQtyBgCbKsQ2BigNE1THQhJj
+5ndrdHCwWjKX4pElj9HHFN+OVTBJ3x40VLGfzuUNsAH8X+L9Y/yHivZyFrrXj352
+rZLL0KhNrzjs7WAVf0QEOCkCgYBe2s1xnZZnueyX+qMyBfBTChST0Jm9WUXejAS1
+un+3gn7Wc+jrzRyd9pC8wzPrFb9sjWBFYjKMRI8cpfxS3SWGtgM01Rt2FnBr+vUO
+hyxt9ljX0aJ/S4hGE6h7/6XU/yEHibhMeENZ24d5/w9D9WUpVJV8IMYzJHzwCKI9
+z0hdrwKBgQDMKvY3DBpZjhZe9YnOgdj4SRpNwaasUSf3a3SZYY1JyOZVUzeSSzoX
+rYLfxBRDjkJ8Nnod+nR/JSRqYa/SJYEMZEZFsC+k/pvBiaP6tk694IlpLD/2MXN6
+14FUV5LH/rGSbZJMSfZ9yNX1XZDowH8nOu+qlmlU4lmgiOuityTmtw==
+-----END RSA PRIVATE KEY-----
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Artifacts/keys/id_rsa.pub b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Artifacts/keys/id_rsa.pub
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Definitions/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Definitions/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..ffeceaa
--- /dev/null
@@ -0,0 +1,290 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vbrgemu
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_vbrgemu
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vbrgemu:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-4444-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-4444-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vbrgemu ] ]
+        default: vcpe_vbrgemu
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+#  substitution_mappings:
+#    node_type: onap.vcpe_vbrgemu
+#    requirements:
+#      virtual_link: [ Cp_vbrgemu_public, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    vbrgemu_bng_private_net_id:
+      type: string
+      description: Private network that connects vBRGEMU to vBNG
+      default: zdfw1bngin01_private
+    vbrgemu_bng_private_net_cidr:
+      type: string
+      description: The CIDR of the input side of vBNG private network
+      default: 10.3.0.0/24
+    vbrgemu_private_ip_0:
+      type: string
+      description: Private IP address towards the BRGEMU-BNG network
+      default: 10.3.0.4
+    vbrgemu_name_0:
+      type: string
+      description: Name of the vBRGEMU
+      default: zdcpe1cpe01brgemu01
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_BGREMU_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Customer_BRGEMU
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    sdnc_ip_addr:
+      type: string
+      description: SDNC ip address used to set NAT
+      default: 10.0.7.1
+    compile_state:
+      type: string
+      description: State to compile code or not (done, auto or build)
+      default: auto
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #Private network that connects vBRGEMU to vBNG
+    VL_vbrgemu_bng_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: vbrgemu_bng_private_net_id}
+          cidr: { get_input: vbrgemu_bng_private_net_cidr }
+          dhcpEnabled: false
+
+    # vbrgemu related
+    Cp_vbrgemu_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vbrgemu_0
+        #- virtual_link: VL_public
+
+    Cp_vbrgemu_vbrgemu_bng_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbrgemu_private_ip_0 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            # TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vbrgemu_0
+        - virtual_link: VL_vbrgemu_bng_private_net
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vbrgemu_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vbrgemu_name_0 }
+        description: vbrgemu
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          vbrgemu_bng_private_net_cidr: { get_input: vbrgemu_bng_private_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          sdnc_ip: { get_input: sdnc_ip_addr }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata vbrgemu_bng_private_net_cidr)" > /opt/config/brgemu_bng_private_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_brgemu_install.sh
+          cd /opt
+          chmod +x v_brgemu_install.sh
+          ./v_brgemu_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              # HPA requirements
+              vdu_memory_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Definitions/onap_dm.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/Definitions/onap_dm.yaml
new file mode 100644 (file)
index 0000000..0a3faba
--- /dev/null
@@ -0,0 +1,827 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+#Artifact Types
+#Based on R2 Design-time Resource DM clean version v8
+artifact_types:
+  tosca.artifacts.nfv.SwImage:
+    derived_from: tosca.artifacts.Deployment.Image
+
+#Capabilities Type
+#Based on R2 Design-time Resource DM clean version v21
+capability_types:
+  tosca.capabilities.nfv.VirtualBindable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.Metric:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.VirtualCompute:
+    derived_from: tosca.capabilities.Root
+    properties:
+      logical_node:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+      compute_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      requested_additional_capabilities:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.RequestedAdditionalCapability
+        required: false
+      virtual_memory:
+        type: tosca.datatypes.nfv.VirtualMemory
+        required: true
+      virtual_cpu:
+        type: tosca.datatypes.nfv.VirtualCpu
+        required: true
+
+  tosca.capabilities.nfv.VirtualStorage:
+    derived_from: tosca.capabilities.Root
+
+  tosca.capabilities.nfv.VirtualLinkable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.ExtVirtualLinkable:
+    derived_from: tosca.capabilities.Root
+
+#Data Types
+#Based on R2 Design-time Resource DM clean version v45
+data_types:
+  tosca.datatypes.nfv.L2AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      mac_address_assignment:
+        type: boolean
+        required: true
+
+  tosca.datatypes.nfv.injectFile:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      source_path:
+        type: string
+        required: true
+      dest_path:
+        type: string
+        required: true
+
+  tosca.datatypes.nfv.L3AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      ip_address_assignment:
+        type: boolean
+        required: true   
+      floating_ip_activated:
+        type: boolean
+        required: true
+      ip_address_type:
+        type: string
+        required: false
+        constraints:
+          - valid_values: [ipv4, ipv6]
+      number_of_ip_address:
+        type: integer
+        required: false
+      fixed_ip_address:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+
+  tosca.datatypes.nfv.AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      address_type:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [mac_address, ip_address]    
+      l2_address_data:
+        type: tosca.datatypes.nfv.L2AddressData # empty in "GS NFV IFA011 V0.7.3"
+        required: false
+      l3_address_data:
+        type: tosca.datatypes.nfv.L3AddressData
+        required: false 
+  
+  tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      name:
+        type: string
+        required: false   
+      description:
+        type: string
+        required: false
+      support_mandatory:
+        type: boolean
+        required: true
+      #TODO HPA
+      network_interface_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: true
+      nic_io_requirements:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+  
+  tosca.datatypes.nfv.ConnectivityType:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      layer_protocol:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]  
+      flow_pattern:
+        type: string
+        required: false
+        constraints: # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          - valid_values: [Line, Tree, Mesh]
+  
+  tosca.datatypes.nfv.RequestedAdditionalCapability:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #name:
+        # key of containing map
+      support_mandatory:
+        type: boolean
+        required: true
+      min_requested_additional_capability_version:
+        type: string
+        required: false
+      preferred_requested_additional_capability_version:
+        type: string
+        required: false
+      requested_additional_capability_name:
+        type: string
+        required: true
+      target_performance_parameters:
+        type: map
+        entry_schema:
+          type: string
+        required: true     
+  
+  tosca.datatypes.nfv.VirtualMemory:
+      derived_from: tosca.datatypes.Root
+      properties:
+        virtual_mem_size:
+          type: scalar-unit.size # Number
+          required: true
+        virtual_mem_oversubscription_policy:
+          type: string
+          required: false
+        #TODO HPA
+        vdu_memory_requirements:
+          type: map
+          entry_schema:
+           type: string
+          required: false
+        numa_enabled:
+          type: boolean
+          required: false
+  
+  tosca.datatypes.nfv.VirtualCpu:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_architecture:
+        type: string
+        required: false
+      num_virtual_cpu:
+        type: integer
+        required: true
+      virtual_cpu_clock:
+        type: scalar-unit.frequency
+        required: false
+      virtual_cpu_oversubscription_policy:
+        type: string
+        required: false
+      #TODO HPA
+      vdu_cpu_requirements:
+        type: map
+        entry_schema:
+           type: string
+        required: false
+      virtual_cpu_pinning:
+        type: tosca.datatypes.nfv.VirtualCpuPinning
+        required: false
+  
+  tosca.datatypes.nfv.VirtualCpuPinning:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_pinning_policy:
+        type: string # CpuPinningPolicy
+        constraints:
+          - valid_values: [ static, dynamic ]
+        required: false
+      cpu_pinning_map:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VnfcConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      additional_vnfc_configurable_properties:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VduProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_number_of_instances:
+          type: integer
+          required: true
+        max_number_of_instances:
+          type: integer
+          required: true
+        #localAffinityOrAntiAffinityRule:  # not defined in SOL001 v.6.0
+        #  type: tosca.datatype.nfv.LocalAffinityOrAntiAffinityRule
+        #  required: true
+        #affinityOrAntiAffinityGroupId: # not defined in SOL001 v.6.0
+        #  type: string
+        #  required: true
+        watchdog: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: string
+          required: true
+        vmBootUpTimeOut: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: integer
+          required: false
+  
+   
+  tosca.datatypes.nfv.VlProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        max_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        min_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        qos:
+           type: tosca.datatypes.nfv.Qos
+           required: false
+        initiationParameters: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: map
+           entry_schema:
+             type: string
+           required: false
+        cidr: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkName:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        startIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        endIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        gatewayIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        segmentationId:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: integer
+           required: false
+        physicalNetwork:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkType:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+           constraints:
+             - valid_values: [VLAN, VXLAN]
+        dhcpEnabled:  # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+        vlanTransparent:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+  
+  tosca.datatypes.nfv.InstantiationLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        description:
+          type: string
+          required: true
+        vdu_levels:
+          type: map # key: vduId
+          required: true
+          entry_schema:
+            type: tosca.datatypes.nfv.VduLevel
+        scale_info:
+          type: map # key: aspectId
+          required: false
+          entry_schema:
+            type: tosca.datatypes.nfv.ScaleInfo
+  
+  tosca.datatypes.nfv.VduLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        number_of_instances:
+          type: integer
+          required: true
+  
+  tosca.datatypes.nfv.VnfLcmOperationsConfiguration: 
+    derived_from: tosca.datatypes.Root 
+    properties: 
+      instantiate: 
+        type: tosca.datatypes.nfv.VnfInstantiateOperationConfiguration 
+      scale:
+        type: tosca.datatypes.nfv.VnfScaleOperationConfiguration 
+      scale_to_level: 
+        type: tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration 
+      heal: 
+        type: tosca.datatypes.nfv.VnfHealOperationConfiguration
+      terminate:
+        type: tosca.datatypes.nfv.VnfTerminateOperationConfiguration
+      operate: 
+        type: tosca.datatypes.nfv.VnfOperateOperationConfiguration
+  
+  tosca.datatypes.nfv.VnfInstantiateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      #properties:
+        #parameters:
+            #modeled as part of operation parameter list
+  
+  tosca.datatypes.nfv.VnfScaleOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        scaling_by_more_than_one_step_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        arbitrary_target_levels_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfHealOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        causes:
+           type: list
+           entry_schema:
+             type: string
+  
+  tosca.datatypes.nfv.VnfTerminateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_graceful_termination_timeout:
+           type: integer
+        max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.VnfOperateOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    properties:
+      min_graceful_termination_timeout:
+           type: integer
+      max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.ScaleInfo:
+    derived_from: tosca.datatypes.Root
+    properties:
+      scaleLevel:
+           type: integer
+           required: true
+  
+  tosca.datatypes.nfv.ScaleAspect:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+         type: string
+         required: true
+      description:
+         type: string
+         required: true
+      associated_group:
+         type: string #Identifier
+         required: false
+      max_scale_level:
+         type: integer #PositiveInteger
+         required: true
+  
+  tosca.datatypes.nfv.LinkBitRateRequirements:
+    derived_from: tosca.datatypes.Root
+    properties:
+      root:
+         type: integer
+         required: true
+      leaf:
+         type: integer
+         required: true
+  
+  tosca.datatypes.nfv.Qos:
+    derived_from: tosca.datatypes.Root
+    properties:
+      latency:
+         type: integer #Number [ms]
+         required: true
+      packet_delay_variation:
+         type: integer #Number [ms]
+         required: true
+      packet_loss_ratio:
+         type: float
+         constraints:
+           - in_range: [ 0.0, 1.0 ]
+         required: false
+  
+  tosca.datatypes.nfv.CpProtocolData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      asscociated_layer_protocol:
+        type: string
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
+        required: true
+      address_data:
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.datatypes.nfv.VnfConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      is_autoscale_enabled:
+        type: boolean
+        required: false
+      is_autoheal_enabled:
+        type: boolean
+        required: false
+      additional_configurable_properties:
+        type: tosca.datatypes.nfv.VnfAdditionalConfigurableProperties
+        required: false
+  
+  tosca.datatypes.nfv.VnfAdditionalConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributes:
+    derived_from: tosca.datatypes.Root
+    properties:
+      extensions:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions
+        required: false
+      metadata:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata
+        required: false
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.LogicalNodeData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #TODO HPA
+      logical_node_requirements:
+        type: map # not defined in SOL001 v.6.0
+        entry_schema:
+          type: string
+        required: false
+
+#Interface Types
+#Based on R2 Design-time Resource DM clean version v10
+interface_types:
+  tosca.interfaces.nfv.vnf.lifecycle.Nfv:
+    derived_from: tosca.interfaces.Root
+    instantiate:
+      description: Invoked upon receipt of an Instantiate VNF request
+    instantiate_start:
+      description: Invoked before instantiate
+    instantiate_end:
+      description: Invoked after instantiate
+    terminate:
+      description: Invoked upon receipt Terminate VNF request
+    terminate_start:
+      description: Invoked before terminate
+    terminate_end:
+      description: Invoked after terminate
+    modify_information:
+      description: Invoked upon receipt of a Modify VNF Information request
+    modify_information_start:
+      description: Invoked before modify_information
+    modify_information_end:
+      description: Invoked after modify_information
+    change_flavour:
+      description: Invoked upon receipt of a Change VNF Flavour request
+    change_flavour_start:
+      description: Invoked before change_flavour
+    change_flavour_end:
+      description: Invoked after change_flavour
+    change_external_connectivity:
+      description: Invoked upon receipt of a Change External VNF Connectivity request
+    change_external_connectivity_start:
+      description: Invoked before change_external_connectivity
+    change_external_connectivity_end:
+      description: Invoked after change_external_connectivity
+    operate:
+      description: Invoked upon receipt of an Operate VNF request
+    operate_start:
+      description: Invoked before operate
+    operate_end:
+      description: Invoked after operate
+    heal:
+      description: Invoked upon receipt of a Heal VNF request
+    heal_start:
+      description: Invoked before heal
+    heal_end:
+      description: Invoked after heal
+    scale:
+      description: Invoked upon receipt of a Scale VNF request
+    scale_start:
+      description: Invoked before scale
+    scale_end:
+      description: Invoked after scale 
+    scale_to_level:
+      description: Invoked upon receipt of a Scale VNF to Level request
+    scale_to_level_start:
+      description: Invoked before scale_to_level
+    scale_to_level_end:
+      description: Invoked after scale_to_level
+  #  indicator_changed:
+  #    description: On receiving a VNF indicator value change notification
+
+#Node Types
+#Based on R2 Design-time Resource DM clean version v36
+node_types:
+  tosca.nodes.nfv.Vdu.Compute:
+    derived_from: tosca.nodes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      description:
+        type: string
+        required: true
+      boot_order:
+        type: list # explicit index (boot index) not necessary, contrary to IFA011
+        entry_schema:
+          type: string
+        required: false
+      nfvi_constraints:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      configurable_properties:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.VnfcConfigurableProperties
+        required: true 
+      vdu_profile:
+        type: tosca.datatypes.nfv.VduProfile
+        required: true
+      inject_files: #Aligned with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        #type: list
+        #entry_schema:
+        #TODO workaround of SDC bug
+        type: tosca.datatypes.nfv.injectFile
+        required: false
+      meta_data: #metadata attached to the VM or container
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      user_data: #cloudinit userdata script support
+        type: string
+        required: false
+    #attributes: NOT DEFINED IN ONAP IM and SOL001
+      #private_address:
+      #  status: deprecated
+      #public_address:
+      #  status: deprecated
+      #networks:
+      #  status: deprecated
+      #ports:
+      #  status: deprecated
+    capabilities:
+      virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+      virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences: [1, UNBOUNDED]
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+    requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          relationship: tosca.relationships.nfv.Vdu.AttachedTo
+          node: tosca.nodes.nfv.Vdu.VirtualStorage
+          occurrences: [ 0, UNBOUNDED ]
+    #artifacts:
+    #  - sw_image:
+    #      file:
+    #      type: tosca.artifacts.nfv.SwImage
+  
+  tosca.nodes.nfv.Vdu.VirtualStorage:
+    derived_from: tosca.nodes.Root
+    properties:
+      #id:
+        # node name
+      type_of_storage:
+        type: string
+        constraints:
+          - valid_values: [volume, object, root, block]
+        required: true
+      size_of_storage:
+        type: scalar-unit.size
+        required: true
+      #TODO HPA
+      vdu_storage_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      rdma_enabled:
+        type: boolean
+        required: false
+    capabilities:
+      virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+    #artifacts:
+    #  - sw_image:
+    #     file:
+    #     type: tosca.artifacts.Deployment.Image
+  
+  tosca.nodes.nfv.Cp:
+    derived_from: tosca.nodes.Root
+    properties:
+      layer_protocol:
+        type: list
+        entry_schema:
+          constraints:
+            - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]
+          type: string
+        required: true
+      role: #Name in ETSI NFV IFA011 v0.7.3 cpRole
+        type: string
+        constraints:
+          - valid_values: [ root, leaf ]
+        required: false
+      description:
+        type: string
+        required: false
+      protocol_data:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.CpProtocolData
+        required: true
+      trunk_mode:
+        type: boolean
+        required: true
+      allowedAddressData: # Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.nodes.nfv.VduCp:
+    derived_from: tosca.nodes.nfv.Cp
+    properties:
+      bitrate_requirement:
+        type: integer
+        required: false
+      vnic_name: #  Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        required: false
+      vnic_order: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: integer
+        required: false
+      vnic_type: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        constraints:
+            - valid_values: [normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder]
+        required: false
+      virtual_network_interface_requirements:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+        required: false
+      #order:
+      #  type: integer
+      #  required: false
+      #  constraints:
+      #    - greater_or_equal: 0
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink   
+      - virtual_binding:
+          capability: tosca.capabilities.nfv.VirtualBindable
+          relationship: tosca.relationships.nfv.VirtualBindsTo
+          node: tosca.nodes.nfv.Vdu.Compute
+  
+  tosca.nodes.nfv.VnfVirtualLink:
+    derived_from: tosca.nodes.Root
+    properties:
+      connectivity_type:
+        type: tosca.datatypes.nfv.ConnectivityType
+        required: true
+      description:
+        type: string
+        required: false
+      test_access:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      vl_profile:
+        type: tosca.datatypes.nfv.VlProfile
+        required: true
+    capabilities:
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+      virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+  
+  tosca.nodes.nfv.VNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id: # instead of vnfd_id
+        type: string # GUID
+        required: true
+      descriptor_version: # instead of vnfd_version
+        type: string
+        required: true
+      provider: # instead of vnf_provider
+        type: string
+        required: true
+      product_name: # instead of vnf_product_name
+        type: string
+        required: true
+      software_version: # instead of vnf_software_version
+        type: string
+        required: true
+      product_info_name: # instead of vnf_product_info_name
+        type: string
+        required: false
+      product_info_description: # instead of vnf_product_info_description
+        type: string
+        required: false
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        required: true
+      localization_languages:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      default_localization_language:
+        type: string
+        required: false
+      configurable_properties:
+        type: tosca.datatypes.nfv.VnfConfigurableProperties
+        required: false
+      modifiable_attributes:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributes
+        required: false  # true in IFA011, but all of members are false
+      flavour_id:
+        type: string
+        required: true
+      flavour_description:
+        type: string
+        required: true
+    #capabilities:
+      # monitoring_parameter:
+        # modelled as ad hoc capabilities in the VNF node template
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink
+          occurrences: [ 0, UNBOUNDED ]
+    interfaces:
+      Nfv:
+        type: tosca.interfaces.nfv.vnf.lifecycle.Nfv
+
+#Relationship Types
+#Based on R2 Design-time Resource DM clean version v4
+relationship_types:
+  tosca.relationships.nfv.VirtualBindsTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualBindable]
+  
+  tosca.relationships.nfv.VirtualLinksTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable]
+
+  tosca.relationships.nfv.Vdu.AttachedTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualStorage]
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/MainServiceTemplate.mf b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/MainServiceTemplate.mf
new file mode 100644 (file)
index 0000000..c6a971a
--- /dev/null
@@ -0,0 +1,8 @@
+metadata:
+    vnf_product_name: vcpe_vbrgemu
+    vnf_provider_id: ONAP
+    vnf_package_version: 1.0
+    vnf_release_data_time: 2018.05.06T13:00+08:00
+
+Source: MainServiceTemplate.yaml
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..3af4243
--- /dev/null
@@ -0,0 +1,293 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vbrgemu
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_vbrgemu
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vbrgemu:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-4444-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-4444-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vbrgemu ] ]
+        default: vcpe_vbrgemu
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+#  substitution_mappings:
+#    node_type: onap.vcpe_vbrgemu
+#    requirements:
+#      virtual_link: [ Cp_vbrgemu_public, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    vbrgemu_bng_private_net_id:
+      type: string
+      description: Private network that connects vBRGEMU to vBNG
+      default: zdfw1bngin01_private
+    vbrgemu_bng_private_net_cidr:
+      type: string
+      description: The CIDR of the input side of vBNG private network
+      default: 10.3.0.0/24
+    vbrgemu_private_ip_0:
+      type: string
+      description: Private IP address towards the BRGEMU-BNG network
+      default: 10.3.0.4
+    vbrgemu_name_0:
+      type: string
+      description: Name of the vBRGEMU
+      default: zdcpe1cpe01brgemu01
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_BGREMU_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Customer_BRGEMU
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    sdnc_ip_addr:
+      type: string
+      description: SDNC ip address used to set NAT
+      default: 10.0.7.1
+    compile_state:
+      type: string
+      description: State to compile code or not (done, auto or build)
+      default: auto
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #Private network that connects vBRGEMU to vBNG
+    VL_vbrgemu_bng_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: vbrgemu_bng_private_net_id}
+          cidr: { get_input: vbrgemu_bng_private_net_cidr }
+          dhcpEnabled: false
+          physicalNetwork: "physnet1"
+
+    # vbrgemu related
+    Cp_vbrgemu_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vbrgemu_0
+        #- virtual_link: VL_public
+
+    Cp_vbrgemu_vbrgemu_bng_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vbrgemu_private_ip_0 }
+        vnic_type: "direct"
+        virtual_network_interface_requirements:
+          - name: "sriov-support"
+            support_mandatory: true
+            network_interface_requirements:
+              interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
+            nic_io_requirements:
+              pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
+              pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
+              pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
+      requirements:
+        - virtual_binding: VDU_vbrgemu_0
+        - virtual_link: VL_vbrgemu_bng_private_net
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vbrgemu_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vbrgemu_name_0 }
+        description: vbrgemu
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          vbrgemu_bng_private_net_cidr: { get_input: vbrgemu_bng_private_net_cidr }
+          demo_artifacts_version: { get_input: demo_artifacts_version }
+          install_script_version: { get_input: install_script_version }
+          sdnc_ip: { get_input: sdnc_ip_addr }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata vbrgemu_bng_private_net_cidr)" > /opt/config/brgemu_bng_private_net_cidr.txt
+          echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata sdnc_ip)" > /opt/config/sdnc_ip.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_brgemu_install.sh
+          cd /opt
+          chmod +x v_brgemu_install.sh
+          ./v_brgemu_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              # HPA requirements
+              vdu_memory_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacats/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/TOSCA-Metadata/TOSCA.meta b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vbrgemu/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..4eaf193
--- /dev/null
@@ -0,0 +1,4 @@
+TOSCA-Meta-File-Version: 1.0
+CSAR-Version: 1.1
+Created-By: ONAP
+Entry-Definitions: Definitions/MainServiceTemplate.yaml
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux.csar b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux.csar
deleted file mode 100644 (file)
index 3d2dbf7..0000000
Binary files a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux.csar and /dev/null differ
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Artifacts/images/ubuntu_16.04 b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Artifacts/images/ubuntu_16.04
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Artifacts/keys/authorized_keys b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Artifacts/keys/authorized_keys
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Artifacts/keys/id_rsa b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Artifacts/keys/id_rsa
new file mode 100644 (file)
index 0000000..6059757
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAxsekiqwLgs9VfChnr2bnpLC3VqD1iT+s969vWe05j1RDozPu
+zyD3krNgVUcd65x2QQJWrDK2fnyQUtubbPb3wviLXs0Gof4a/b65JsMQkeeC2/OK
+aFvrE6D3heouXmWO1vo1iXy2hUhcfXdr6eM3rP3zpU9zb2Al25/90Ha8kKBpe1RS
+PKHpmcqVXIpGVxJSXnioAFXUsJ687qrTv7Zm13AHkm2L1Y5IvMsGHLFjFTGFlFoY
+ftQQAepF507CFqs66tD378vvNVg8LYqrKpnfdx2PIRNLHAa1xQWc0EvwGHyBQZRL
+hTXS3M3IZ7Y22dJ+3Zg15PMx7QmWDZO5MG/JPwIDAQABAoIBAE5KS1AiutXmezDP
+aSb4TLvcrhj8hDhuT92txxmQCV+ePJWG2sPRpDCvXX246NvnX9vy49gmkSH4RY+c
+1vZvvt2XrqzD65zZzB+sgpf1tA0DNdMTdKvtqASvHU4tEd4z+bJKEdP4vpp4CZWQ
+93vC9ia4TsIJLNns8Hwz42+7lEEResKYZA2djGnzHl+83vR1dm0GGBD6BKR1C3Cx
+HbEhqx42EV61+8nAweQNjWKxeAc2hg+H8o8qWJM1aKy0TnqW6kudOYRyYIpX0rJA
+siE2HwvDA1mDd5M8ntZ/Cx0pnTc/cuZB8BQJ0jN1JXbrJGbWspBNXformw7isbyO
+WIOjvEECgYEA84XKV3aPrTE2JBs5vzzs59NMPV+5frw+xzDyPxqK5Q7+jjVKDwxh
+/WRatCaTdRxhOI905HfVsDYjrsPOpmF9MHsLxmBhwk8zBFOu/xtYr7zBNkJhmCsq
+kZMdxf8bpu08E7kMQJ2MvT7OhM5HRlWIUR0jdja8Hz51Ro4oOb/po7kCgYEA0Pb5
+v12ZsaSHMF0r4l983PifNwYmI22iQIEtRT2DxgTkDKgBTjbRzqZmEhaADMAO48o9
+sIZy+KJ/a8G9fPQVwMgBID8zOHnWsrFmM3qkj5hhrAQdtq7OE71zgaP0tyE1TG4u
+Zs3a7eSyuoildHHFqX88oXSYsTlfV8vn23UpwLcCgYEAwXiCuBger8dQL0FeEJwz
+zz5k7MG3WoPuEEzHuPC6dp8CCDM4IlqBI1JuaX/YWQtyBgCbKsQ2BigNE1THQhJj
+5ndrdHCwWjKX4pElj9HHFN+OVTBJ3x40VLGfzuUNsAH8X+L9Y/yHivZyFrrXj352
+rZLL0KhNrzjs7WAVf0QEOCkCgYBe2s1xnZZnueyX+qMyBfBTChST0Jm9WUXejAS1
+un+3gn7Wc+jrzRyd9pC8wzPrFb9sjWBFYjKMRI8cpfxS3SWGtgM01Rt2FnBr+vUO
+hyxt9ljX0aJ/S4hGE6h7/6XU/yEHibhMeENZ24d5/w9D9WUpVJV8IMYzJHzwCKI9
+z0hdrwKBgQDMKvY3DBpZjhZe9YnOgdj4SRpNwaasUSf3a3SZYY1JyOZVUzeSSzoX
+rYLfxBRDjkJ8Nnod+nR/JSRqYa/SJYEMZEZFsC+k/pvBiaP6tk694IlpLD/2MXN6
+14FUV5LH/rGSbZJMSfZ9yNX1XZDowH8nOu+qlmlU4lmgiOuityTmtw==
+-----END RSA PRIVATE KEY-----
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Artifacts/keys/id_rsa.pub b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Artifacts/keys/id_rsa.pub
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Definitions/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Definitions/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..0d1b8aa
--- /dev/null
@@ -0,0 +1,381 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vgmux
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_vgmux
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vgmux:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-3333-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-3333-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vgmux ] ]
+        default: vcpe_vgmux
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+#  substitution_mappings:
+#    node_type: onap.vcpe_vgmux
+#    requirements:
+#      virtual_link: [ Cp_vgmux_public, virtual_link ] # expose as external CP
+#      virtual_link: [ Cp_vgmux_onap_private, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    bng_gmux_private_net_id:
+      type: string
+      description: Private network that connects vBNG to vGMUX
+      default: zdfw1bngmux01_private
+    bng_gmux_private_net_cidr:
+      type: string
+      description: The CIDR of the vBNG-vGMUX private network
+      default: 10.1.0.0/24
+    mux_gw_private_net_id:
+      type: string
+      description: Private network that connects vGMUX to vGWs
+      default: zdfw1muxgw01_private
+    mux_gw_private_net_cidr:
+      type: string
+      description: The CIDR of the vGMUX private network
+      default: 10.5.0.0/24
+    brgemu_bng_private_net_cidr:
+      type: string
+      description: The CIDR of the vBRG-vBNG private network
+      default: 10.3.0.0/24
+    vgmux_private_ip_0:
+      type: string
+      description: Private IP address that is assigned to the vGMUX to communicate with the vBNG
+      default: 10.1.0.20
+    vgmux_private_ip_1:
+      type: string
+      description: Private IP address that is assigned to the vGMUX to communicate with ONAP components
+      default: 10.0.101.20
+    vgmux_private_ip_2:
+      type: string
+      description: Private IP address that is assigned to the vGMUX to communicate with vGWs
+      default: 10.5.0.20
+    vgmux_name_0:
+      type: string
+      description: Name of the vGMUX
+      default: zdcpe1cpe01mux01
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_vGMUX_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Intrastructure_Metro_vGMUX
+    bng_gmux_private_ip:
+      type: string
+      description: Private IP address that is assigned to the vBNG to communicate with the vGMUX
+      default: 10.1.0.10
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: integer
+      description: dcae collector port
+      default: 8080
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #Private network that connects vBNG to vGMUX
+    VL_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: bng_gmux_private_net_id}
+          cidr: { get_input: bng_gmux_private_net_cidr }
+          dhcpEnabled: false
+
+    #Private network that connects vGMUX to vGWs
+    VL_mux_gw_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: mux_gw_private_net_id}
+          cidr: { get_input: mux_gw_private_net_cidr }
+          dhcpEnabled: false
+
+    # vgmux related
+    Cp_vgmux_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        #- virtual_link: VL_public
+
+    Cp_vgmux_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgmux_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        #- virtual_link: VL_onap_private
+
+    Cp_vgmux_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgmux_private_ip_0 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            #TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        - virtual_link: VL_bng_gmux_private_net
+
+    Cp_vgmux_mux_gw_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgmux_private_ip_2 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            #TODO HPA
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        - virtual_link: VL_mux_gw_private_net
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vgmux_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vgmux_name_0 }
+        description: vgmux
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          mux_to_bng_net_ipaddr: { get_input: vgmux_private_ip_0 }
+          oam_ipaddr: { get_input: vgmux_private_ip_1 }
+          mux_gw_net_ipaddr: { get_input: vgmux_private_ip_2 }
+          bng_to_mux_net_ipaddr: { get_input: bng_gmux_private_ip }
+          bng_mux_net_cidr: { get_input: bng_gmux_private_net_cidr }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          mux_gw_net_cidr: { get_input: mux_gw_private_net_cidr }
+          brg_bng_net_cidr: { get_input: brgemu_bng_private_net_cidr }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata mux_to_bng_net_ipaddr)" > /opt/config/mux_to_bng_net_ipaddr.txt
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata mux_gw_net_ipaddr)" > /opt/config/mux_gw_net_ipaddr.txt
+          echo "$(get_metadata bng_to_mux_net_ipaddr)" > /opt/config/bng_to_mux_net_ipaddr.txt
+          echo "$(get_metadata bng_mux_net_cidr)" > /opt/config/bng_mux_net_cidr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata mux_gw_net_cidr)" > /opt/config/mux_gw_net_cidr.txt
+          echo "$(get_metadata brg_bng_net_cidr)" > /opt/config/brg_bng_net_cidr.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gmux_install.sh
+          cd /opt
+          chmod +x v_gmux_install.sh
+          ./v_gmux_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              # HPA requirements
+              vdu_memory_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Definitions/onap_dm.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/Definitions/onap_dm.yaml
new file mode 100644 (file)
index 0000000..0a3faba
--- /dev/null
@@ -0,0 +1,827 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+#Artifact Types
+#Based on R2 Design-time Resource DM clean version v8
+artifact_types:
+  tosca.artifacts.nfv.SwImage:
+    derived_from: tosca.artifacts.Deployment.Image
+
+#Capabilities Type
+#Based on R2 Design-time Resource DM clean version v21
+capability_types:
+  tosca.capabilities.nfv.VirtualBindable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.Metric:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.VirtualCompute:
+    derived_from: tosca.capabilities.Root
+    properties:
+      logical_node:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+      compute_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      requested_additional_capabilities:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.RequestedAdditionalCapability
+        required: false
+      virtual_memory:
+        type: tosca.datatypes.nfv.VirtualMemory
+        required: true
+      virtual_cpu:
+        type: tosca.datatypes.nfv.VirtualCpu
+        required: true
+
+  tosca.capabilities.nfv.VirtualStorage:
+    derived_from: tosca.capabilities.Root
+
+  tosca.capabilities.nfv.VirtualLinkable:
+    derived_from: tosca.capabilities.Root
+  
+  tosca.capabilities.nfv.ExtVirtualLinkable:
+    derived_from: tosca.capabilities.Root
+
+#Data Types
+#Based on R2 Design-time Resource DM clean version v45
+data_types:
+  tosca.datatypes.nfv.L2AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      mac_address_assignment:
+        type: boolean
+        required: true
+
+  tosca.datatypes.nfv.injectFile:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      source_path:
+        type: string
+        required: true
+      dest_path:
+        type: string
+        required: true
+
+  tosca.datatypes.nfv.L3AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      ip_address_assignment:
+        type: boolean
+        required: true   
+      floating_ip_activated:
+        type: boolean
+        required: true
+      ip_address_type:
+        type: string
+        required: false
+        constraints:
+          - valid_values: [ipv4, ipv6]
+      number_of_ip_address:
+        type: integer
+        required: false
+      fixed_ip_address:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+
+  tosca.datatypes.nfv.AddressData:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      address_type:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [mac_address, ip_address]    
+      l2_address_data:
+        type: tosca.datatypes.nfv.L2AddressData # empty in "GS NFV IFA011 V0.7.3"
+        required: false
+      l3_address_data:
+        type: tosca.datatypes.nfv.L3AddressData
+        required: false 
+  
+  tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      name:
+        type: string
+        required: false   
+      description:
+        type: string
+        required: false
+      support_mandatory:
+        type: boolean
+        required: true
+      #TODO HPA
+      network_interface_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: true
+      nic_io_requirements:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        required: false
+  
+  tosca.datatypes.nfv.ConnectivityType:
+    derived_from: tosca.datatypes.Root
+    properties: 
+      layer_protocol:
+        type: string
+        required: true
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]  
+      flow_pattern:
+        type: string
+        required: false
+        constraints: # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          - valid_values: [Line, Tree, Mesh]
+  
+  tosca.datatypes.nfv.RequestedAdditionalCapability:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #name:
+        # key of containing map
+      support_mandatory:
+        type: boolean
+        required: true
+      min_requested_additional_capability_version:
+        type: string
+        required: false
+      preferred_requested_additional_capability_version:
+        type: string
+        required: false
+      requested_additional_capability_name:
+        type: string
+        required: true
+      target_performance_parameters:
+        type: map
+        entry_schema:
+          type: string
+        required: true     
+  
+  tosca.datatypes.nfv.VirtualMemory:
+      derived_from: tosca.datatypes.Root
+      properties:
+        virtual_mem_size:
+          type: scalar-unit.size # Number
+          required: true
+        virtual_mem_oversubscription_policy:
+          type: string
+          required: false
+        #TODO HPA
+        vdu_memory_requirements:
+          type: map
+          entry_schema:
+           type: string
+          required: false
+        numa_enabled:
+          type: boolean
+          required: false
+  
+  tosca.datatypes.nfv.VirtualCpu:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_architecture:
+        type: string
+        required: false
+      num_virtual_cpu:
+        type: integer
+        required: true
+      virtual_cpu_clock:
+        type: scalar-unit.frequency
+        required: false
+      virtual_cpu_oversubscription_policy:
+        type: string
+        required: false
+      #TODO HPA
+      vdu_cpu_requirements:
+        type: map
+        entry_schema:
+           type: string
+        required: false
+      virtual_cpu_pinning:
+        type: tosca.datatypes.nfv.VirtualCpuPinning
+        required: false
+  
+  tosca.datatypes.nfv.VirtualCpuPinning:
+    derived_from: tosca.datatypes.Root
+    properties:
+      cpu_pinning_policy:
+        type: string # CpuPinningPolicy
+        constraints:
+          - valid_values: [ static, dynamic ]
+        required: false
+      cpu_pinning_map:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VnfcConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      additional_vnfc_configurable_properties:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+  
+  tosca.datatypes.nfv.VduProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_number_of_instances:
+          type: integer
+          required: true
+        max_number_of_instances:
+          type: integer
+          required: true
+        #localAffinityOrAntiAffinityRule:  # not defined in SOL001 v.6.0
+        #  type: tosca.datatype.nfv.LocalAffinityOrAntiAffinityRule
+        #  required: true
+        #affinityOrAntiAffinityGroupId: # not defined in SOL001 v.6.0
+        #  type: string
+        #  required: true
+        watchdog: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: string
+          required: true
+        vmBootUpTimeOut: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+          type: integer
+          required: false
+  
+   
+  tosca.datatypes.nfv.VlProfile:
+      derived_from: tosca.datatypes.Root
+      properties:
+        max_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        min_bit_rate_requirements:
+           type: tosca.datatypes.nfv.LinkBitRateRequirements
+           required: true
+        qos:
+           type: tosca.datatypes.nfv.Qos
+           required: false
+        initiationParameters: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: map
+           entry_schema:
+             type: string
+           required: false
+        cidr: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkName:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        startIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        endIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        gatewayIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        segmentationId:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: integer
+           required: false
+        physicalNetwork:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+        networkType:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: string
+           required: false
+           constraints:
+             - valid_values: [VLAN, VXLAN]
+        dhcpEnabled:  # not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+        vlanTransparent:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
+           type: boolean
+           required: false
+  
+  tosca.datatypes.nfv.InstantiationLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        description:
+          type: string
+          required: true
+        vdu_levels:
+          type: map # key: vduId
+          required: true
+          entry_schema:
+            type: tosca.datatypes.nfv.VduLevel
+        scale_info:
+          type: map # key: aspectId
+          required: false
+          entry_schema:
+            type: tosca.datatypes.nfv.ScaleInfo
+  
+  tosca.datatypes.nfv.VduLevel:
+      derived_from: tosca.datatypes.Root
+      properties:
+        number_of_instances:
+          type: integer
+          required: true
+  
+  tosca.datatypes.nfv.VnfLcmOperationsConfiguration: 
+    derived_from: tosca.datatypes.Root 
+    properties: 
+      instantiate: 
+        type: tosca.datatypes.nfv.VnfInstantiateOperationConfiguration 
+      scale:
+        type: tosca.datatypes.nfv.VnfScaleOperationConfiguration 
+      scale_to_level: 
+        type: tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration 
+      heal: 
+        type: tosca.datatypes.nfv.VnfHealOperationConfiguration
+      terminate:
+        type: tosca.datatypes.nfv.VnfTerminateOperationConfiguration
+      operate: 
+        type: tosca.datatypes.nfv.VnfOperateOperationConfiguration
+  
+  tosca.datatypes.nfv.VnfInstantiateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      #properties:
+        #parameters:
+            #modeled as part of operation parameter list
+  
+  tosca.datatypes.nfv.VnfScaleOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        scaling_by_more_than_one_step_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        arbitrary_target_levels_supported:
+           type: boolean
+  
+  tosca.datatypes.nfv.VnfHealOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        #parameters:
+           #modeled as part of the operation parameter list
+        causes:
+           type: list
+           entry_schema:
+             type: string
+  
+  tosca.datatypes.nfv.VnfTerminateOperationConfiguration:
+      derived_from: tosca.datatypes.Root
+      properties:
+        min_graceful_termination_timeout:
+           type: integer
+        max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.VnfOperateOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    properties:
+      min_graceful_termination_timeout:
+           type: integer
+      max_recommended_graceful_termination_timeout:
+           type: integer
+  
+  tosca.datatypes.nfv.ScaleInfo:
+    derived_from: tosca.datatypes.Root
+    properties:
+      scaleLevel:
+           type: integer
+           required: true
+  
+  tosca.datatypes.nfv.ScaleAspect:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+         type: string
+         required: true
+      description:
+         type: string
+         required: true
+      associated_group:
+         type: string #Identifier
+         required: false
+      max_scale_level:
+         type: integer #PositiveInteger
+         required: true
+  
+  tosca.datatypes.nfv.LinkBitRateRequirements:
+    derived_from: tosca.datatypes.Root
+    properties:
+      root:
+         type: integer
+         required: true
+      leaf:
+         type: integer
+         required: true
+  
+  tosca.datatypes.nfv.Qos:
+    derived_from: tosca.datatypes.Root
+    properties:
+      latency:
+         type: integer #Number [ms]
+         required: true
+      packet_delay_variation:
+         type: integer #Number [ms]
+         required: true
+      packet_loss_ratio:
+         type: float
+         constraints:
+           - in_range: [ 0.0, 1.0 ]
+         required: false
+  
+  tosca.datatypes.nfv.CpProtocolData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      asscociated_layer_protocol:
+        type: string
+        constraints:
+          - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
+        required: true
+      address_data:
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.datatypes.nfv.VnfConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    properties:
+      is_autoscale_enabled:
+        type: boolean
+        required: false
+      is_autoheal_enabled:
+        type: boolean
+        required: false
+      additional_configurable_properties:
+        type: tosca.datatypes.nfv.VnfAdditionalConfigurableProperties
+        required: false
+  
+  tosca.datatypes.nfv.VnfAdditionalConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributes:
+    derived_from: tosca.datatypes.Root
+    properties:
+      extensions:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions
+        required: false
+      metadata:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata
+        required: false
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata:
+    derived_from: tosca.datatypes.Root
+  
+  tosca.datatypes.nfv.LogicalNodeData:
+    derived_from: tosca.datatypes.Root
+    properties:
+      #TODO HPA
+      logical_node_requirements:
+        type: map # not defined in SOL001 v.6.0
+        entry_schema:
+          type: string
+        required: false
+
+#Interface Types
+#Based on R2 Design-time Resource DM clean version v10
+interface_types:
+  tosca.interfaces.nfv.vnf.lifecycle.Nfv:
+    derived_from: tosca.interfaces.Root
+    instantiate:
+      description: Invoked upon receipt of an Instantiate VNF request
+    instantiate_start:
+      description: Invoked before instantiate
+    instantiate_end:
+      description: Invoked after instantiate
+    terminate:
+      description: Invoked upon receipt Terminate VNF request
+    terminate_start:
+      description: Invoked before terminate
+    terminate_end:
+      description: Invoked after terminate
+    modify_information:
+      description: Invoked upon receipt of a Modify VNF Information request
+    modify_information_start:
+      description: Invoked before modify_information
+    modify_information_end:
+      description: Invoked after modify_information
+    change_flavour:
+      description: Invoked upon receipt of a Change VNF Flavour request
+    change_flavour_start:
+      description: Invoked before change_flavour
+    change_flavour_end:
+      description: Invoked after change_flavour
+    change_external_connectivity:
+      description: Invoked upon receipt of a Change External VNF Connectivity request
+    change_external_connectivity_start:
+      description: Invoked before change_external_connectivity
+    change_external_connectivity_end:
+      description: Invoked after change_external_connectivity
+    operate:
+      description: Invoked upon receipt of an Operate VNF request
+    operate_start:
+      description: Invoked before operate
+    operate_end:
+      description: Invoked after operate
+    heal:
+      description: Invoked upon receipt of a Heal VNF request
+    heal_start:
+      description: Invoked before heal
+    heal_end:
+      description: Invoked after heal
+    scale:
+      description: Invoked upon receipt of a Scale VNF request
+    scale_start:
+      description: Invoked before scale
+    scale_end:
+      description: Invoked after scale 
+    scale_to_level:
+      description: Invoked upon receipt of a Scale VNF to Level request
+    scale_to_level_start:
+      description: Invoked before scale_to_level
+    scale_to_level_end:
+      description: Invoked after scale_to_level
+  #  indicator_changed:
+  #    description: On receiving a VNF indicator value change notification
+
+#Node Types
+#Based on R2 Design-time Resource DM clean version v36
+node_types:
+  tosca.nodes.nfv.Vdu.Compute:
+    derived_from: tosca.nodes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      description:
+        type: string
+        required: true
+      boot_order:
+        type: list # explicit index (boot index) not necessary, contrary to IFA011
+        entry_schema:
+          type: string
+        required: false
+      nfvi_constraints:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      configurable_properties:
+        type: map
+        entry_schema:
+           type: tosca.datatypes.nfv.VnfcConfigurableProperties
+        required: true 
+      vdu_profile:
+        type: tosca.datatypes.nfv.VduProfile
+        required: true
+      inject_files: #Aligned with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        #type: list
+        #entry_schema:
+        #TODO workaround of SDC bug
+        type: tosca.datatypes.nfv.injectFile
+        required: false
+      meta_data: #metadata attached to the VM or container
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      user_data: #cloudinit userdata script support
+        type: string
+        required: false
+    #attributes: NOT DEFINED IN ONAP IM and SOL001
+      #private_address:
+      #  status: deprecated
+      #public_address:
+      #  status: deprecated
+      #networks:
+      #  status: deprecated
+      #ports:
+      #  status: deprecated
+    capabilities:
+      virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+      virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences: [1, UNBOUNDED]
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+    requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          relationship: tosca.relationships.nfv.Vdu.AttachedTo
+          node: tosca.nodes.nfv.Vdu.VirtualStorage
+          occurrences: [ 0, UNBOUNDED ]
+    #artifacts:
+    #  - sw_image:
+    #      file:
+    #      type: tosca.artifacts.nfv.SwImage
+  
+  tosca.nodes.nfv.Vdu.VirtualStorage:
+    derived_from: tosca.nodes.Root
+    properties:
+      #id:
+        # node name
+      type_of_storage:
+        type: string
+        constraints:
+          - valid_values: [volume, object, root, block]
+        required: true
+      size_of_storage:
+        type: scalar-unit.size
+        required: true
+      #TODO HPA
+      vdu_storage_requirements:
+        type: map
+        entry_schema:
+          type: string
+        required: false
+      rdma_enabled:
+        type: boolean
+        required: false
+    capabilities:
+      virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+    #artifacts:
+    #  - sw_image:
+    #     file:
+    #     type: tosca.artifacts.Deployment.Image
+  
+  tosca.nodes.nfv.Cp:
+    derived_from: tosca.nodes.Root
+    properties:
+      layer_protocol:
+        type: list
+        entry_schema:
+          constraints:
+            - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]
+          type: string
+        required: true
+      role: #Name in ETSI NFV IFA011 v0.7.3 cpRole
+        type: string
+        constraints:
+          - valid_values: [ root, leaf ]
+        required: false
+      description:
+        type: string
+        required: false
+      protocol_data:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.CpProtocolData
+        required: true
+      trunk_mode:
+        type: boolean
+        required: true
+      allowedAddressData: # Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: tosca.datatypes.nfv.AddressData
+        required: false
+  
+  tosca.nodes.nfv.VduCp:
+    derived_from: tosca.nodes.nfv.Cp
+    properties:
+      bitrate_requirement:
+        type: integer
+        required: false
+      vnic_name: #  Aligned with ONAP R2 Im.not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        required: false
+      vnic_order: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: integer
+        required: false
+      vnic_type: # Aligned with ONAP R2 Im. not defined in IFA011 v2.4.1 and SOL001 v0.6.0
+        type: string
+        constraints:
+            - valid_values: [normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder]
+        required: false
+      virtual_network_interface_requirements:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+        required: false
+      #order:
+      #  type: integer
+      #  required: false
+      #  constraints:
+      #    - greater_or_equal: 0
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink   
+      - virtual_binding:
+          capability: tosca.capabilities.nfv.VirtualBindable
+          relationship: tosca.relationships.nfv.VirtualBindsTo
+          node: tosca.nodes.nfv.Vdu.Compute
+  
+  tosca.nodes.nfv.VnfVirtualLink:
+    derived_from: tosca.nodes.Root
+    properties:
+      connectivity_type:
+        type: tosca.datatypes.nfv.ConnectivityType
+        required: true
+      description:
+        type: string
+        required: false
+      test_access:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      vl_profile:
+        type: tosca.datatypes.nfv.VlProfile
+        required: true
+    capabilities:
+      monitoring_parameter:
+        type: tosca.capabilities.nfv.Metric
+        occurrences: [0, UNBOUNDED]
+      virtual_linkable:
+        type: tosca.capabilities.nfv.VirtualLinkable
+  
+  tosca.nodes.nfv.VNF:
+    derived_from: tosca.nodes.Root
+    properties:
+      descriptor_id: # instead of vnfd_id
+        type: string # GUID
+        required: true
+      descriptor_version: # instead of vnfd_version
+        type: string
+        required: true
+      provider: # instead of vnf_provider
+        type: string
+        required: true
+      product_name: # instead of vnf_product_name
+        type: string
+        required: true
+      software_version: # instead of vnf_software_version
+        type: string
+        required: true
+      product_info_name: # instead of vnf_product_info_name
+        type: string
+        required: false
+      product_info_description: # instead of vnf_product_info_description
+        type: string
+        required: false
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        required: true
+      localization_languages:
+        type: list
+        entry_schema:
+          type: string
+        required: false
+      default_localization_language:
+        type: string
+        required: false
+      configurable_properties:
+        type: tosca.datatypes.nfv.VnfConfigurableProperties
+        required: false
+      modifiable_attributes:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributes
+        required: false  # true in IFA011, but all of members are false
+      flavour_id:
+        type: string
+        required: true
+      flavour_description:
+        type: string
+        required: true
+    #capabilities:
+      # monitoring_parameter:
+        # modelled as ad hoc capabilities in the VNF node template
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          node: tosca.nodes.nfv.VnfVirtualLink
+          occurrences: [ 0, UNBOUNDED ]
+    interfaces:
+      Nfv:
+        type: tosca.interfaces.nfv.vnf.lifecycle.Nfv
+
+#Relationship Types
+#Based on R2 Design-time Resource DM clean version v4
+relationship_types:
+  tosca.relationships.nfv.VirtualBindsTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualBindable]
+  
+  tosca.relationships.nfv.VirtualLinksTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable]
+
+  tosca.relationships.nfv.Vdu.AttachedTo:
+    derived_from: tosca.relationships.DependsOn
+    valid_target_types: [ tosca.capabilities.nfv.VirtualStorage]
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/MainServiceTemplate.mf b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/MainServiceTemplate.mf
new file mode 100644 (file)
index 0000000..c096351
--- /dev/null
@@ -0,0 +1,8 @@
+metadata:
+    vnf_product_name: vcpe_vgmux
+    vnf_provider_id: ONAP
+    vnf_package_version: 1.0
+    vnf_release_data_time: 2018.05.06T13:00+08:00
+
+Source: MainServiceTemplate.yaml
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..ff10975
--- /dev/null
@@ -0,0 +1,389 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vgmux
+  template_version: "1.0"
+  template_author: onap
+description: vCPE_vgmux
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vgmux:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-3333-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-3333-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vgmux ] ]
+        default: vcpe_vgmux
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: simple
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+
+topology_template:
+#  substitution_mappings:
+#    node_type: onap.vcpe_vgmux
+#    requirements:
+#      virtual_link: [ Cp_vgmux_public, virtual_link ] # expose as external CP
+#      virtual_link: [ Cp_vgmux_onap_private, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    bng_gmux_private_net_id:
+      type: string
+      description: Private network that connects vBNG to vGMUX
+      default: zdfw1bngmux01_private
+    bng_gmux_private_net_cidr:
+      type: string
+      description: The CIDR of the vBNG-vGMUX private network
+      default: 10.1.0.0/24
+    mux_gw_private_net_id:
+      type: string
+      description: Private network that connects vGMUX to vGWs
+      default: zdfw1muxgw01_private
+    mux_gw_private_net_cidr:
+      type: string
+      description: The CIDR of the vGMUX private network
+      default: 10.5.0.0/24
+    brgemu_bng_private_net_cidr:
+      type: string
+      description: The CIDR of the vBRG-vBNG private network
+      default: 10.3.0.0/24
+    vgmux_private_ip_0:
+      type: string
+      description: Private IP address that is assigned to the vGMUX to communicate with the vBNG
+      default: 10.1.0.20
+    vgmux_private_ip_1:
+      type: string
+      description: Private IP address that is assigned to the vGMUX to communicate with ONAP components
+      default: 10.0.101.20
+    vgmux_private_ip_2:
+      type: string
+      description: Private IP address that is assigned to the vGMUX to communicate with vGWs
+      default: 10.5.0.20
+    vgmux_name_0:
+      type: string
+      description: Name of the vGMUX
+      default: zdcpe1cpe01mux01
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_vGMUX_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Intrastructure_Metro_vGMUX
+    bng_gmux_private_ip:
+      type: string
+      description: Private IP address that is assigned to the vBNG to communicate with the vGMUX
+      default: 10.1.0.10
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: integer
+      description: dcae collector port
+      default: 8080
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+
+  node_templates:
+    #onap public net
+#    VL_public:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: public_net_id }
+#
+#    #onap oam net
+#    VL_onap_private:
+#      type: tosca.nodes.nfv.VnfVirtualLink
+#      properties:
+#        connectivity_type:
+#          layer_protocol: ipv4
+#        vl_profile:
+#          max_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          min_bit_rate_requirements:
+#            root: 10000000
+#            leaf: 10000000
+#          networkName: { get_input: onap_private_net_id }
+#          cidr: { get_input: onap_private_net_cidr }
+
+    #Private network that connects vBNG to vGMUX
+    VL_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: bng_gmux_private_net_id}
+          cidr: { get_input: bng_gmux_private_net_cidr }
+          dhcpEnabled: false
+          physicalNetwork: "physnet1"
+
+    #Private network that connects vGMUX to vGWs
+    VL_mux_gw_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocol: ipv4
+        vl_profile:
+          max_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bit_rate_requirements:
+            root: 10000000
+            leaf: 10000000
+          networkName: { get_input: mux_gw_private_net_id}
+          cidr: { get_input: mux_gw_private_net_cidr }
+          dhcpEnabled: false
+          physicalNetwork: "physnet1"
+
+    # vgmux related
+    Cp_vgmux_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        #- virtual_link: VL_public
+
+    Cp_vgmux_onap_private:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgmux_private_ip_1 }
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        #- virtual_link: VL_onap_private
+
+    Cp_vgmux_bng_gmux_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgmux_private_ip_0 }
+        vnic_type: "direct"
+        virtual_network_interface_requirements:
+          - name: "sriov-support"
+            support_mandatory: true
+            network_interface_requirements:
+              interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
+            nic_io_requirements:
+              pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
+              pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
+              pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        - virtual_link: VL_bng_gmux_private_net
+
+    Cp_vgmux_mux_gw_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocol: [ipv4]
+        trunk_mode: false
+        protocol_data:
+          - asscociated_layer_protocol: ipv4
+            address_data:
+              address_type: ip_address
+              l3_address_data:
+                ip_address_assignment: false
+                floating_ip_activated: false
+                fixed_ip_address:
+                  - { get_input: vgmux_private_ip_2 }
+        vnic_type: "direct"
+        virtual_network_interface_requirements:
+          - name: "sriov-support"
+            support_mandatory: true
+            network_interface_requirements:
+              interfaceType: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "SR-IOV"}'
+            nic_io_requirements:
+              pciVendorId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1234"}'
+              pciDeviceId: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "5678"}'
+              pciNumDevices: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1"}'
+      requirements:
+        - virtual_binding: VDU_vgmux_0
+        - virtual_link: VL_mux_gw_private_net
+
+    VirtualStorage_root_all:
+      # this indicate the VDU root storage size
+      type: tosca.nodes.nfv.Vdu.VirtualStorage
+      properties:
+        type_of_storage: root
+        size_of_storage: 40 GB
+
+    VDU_vgmux_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vgmux_name_0 }
+        description: vgmux
+        configurable_properties:
+          additional_vnfc_configurable_properties: {}
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: #TODO SDC bug
+          source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          mux_to_bng_net_ipaddr: { get_input: vgmux_private_ip_0 }
+          oam_ipaddr: { get_input: vgmux_private_ip_1 }
+          mux_gw_net_ipaddr: { get_input: vgmux_private_ip_2 }
+          bng_to_mux_net_ipaddr: { get_input: bng_gmux_private_ip }
+          bng_mux_net_cidr: { get_input: bng_gmux_private_net_cidr }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          mux_gw_net_cidr: { get_input: mux_gw_private_net_cidr }
+          brg_bng_net_cidr: { get_input: brgemu_bng_private_net_cidr }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        user_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata mux_to_bng_net_ipaddr)" > /opt/config/mux_to_bng_net_ipaddr.txt
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata mux_gw_net_ipaddr)" > /opt/config/mux_gw_net_ipaddr.txt
+          echo "$(get_metadata bng_to_mux_net_ipaddr)" > /opt/config/bng_to_mux_net_ipaddr.txt
+          echo "$(get_metadata bng_mux_net_cidr)" > /opt/config/bng_mux_net_cidr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata mux_gw_net_cidr)" > /opt/config/mux_gw_net_cidr.txt
+          echo "$(get_metadata brg_bng_net_cidr)" > /opt/config/brg_bng_net_cidr.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gmux_install.sh
+          cd /opt
+          chmod +x v_gmux_install.sh
+          ./v_gmux_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              # HPA requirements
+              vdu_memory_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+      requirements:
+        - virtual_storage: VirtualStorage_root_all
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/images/ubuntu_16.04
+          type: tosca.artifacts.nfv.SwImage
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/TOSCA-Metadata/TOSCA.meta b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgmux/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..4eaf193
--- /dev/null
@@ -0,0 +1,4 @@
+TOSCA-Meta-File-Version: 1.0
+CSAR-Version: 1.1
+Created-By: ONAP
+Entry-Definitions: Definitions/MainServiceTemplate.yaml
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw.csar b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw.csar
deleted file mode 100644 (file)
index 79e0d20..0000000
Binary files a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw.csar and /dev/null differ
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Artifacts/Deployment/OTHER/authorized_keys b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Artifacts/Deployment/OTHER/authorized_keys
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Artifacts/Deployment/OTHER/id_rsa b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Artifacts/Deployment/OTHER/id_rsa
new file mode 100644 (file)
index 0000000..6059757
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAxsekiqwLgs9VfChnr2bnpLC3VqD1iT+s969vWe05j1RDozPu
+zyD3krNgVUcd65x2QQJWrDK2fnyQUtubbPb3wviLXs0Gof4a/b65JsMQkeeC2/OK
+aFvrE6D3heouXmWO1vo1iXy2hUhcfXdr6eM3rP3zpU9zb2Al25/90Ha8kKBpe1RS
+PKHpmcqVXIpGVxJSXnioAFXUsJ687qrTv7Zm13AHkm2L1Y5IvMsGHLFjFTGFlFoY
+ftQQAepF507CFqs66tD378vvNVg8LYqrKpnfdx2PIRNLHAa1xQWc0EvwGHyBQZRL
+hTXS3M3IZ7Y22dJ+3Zg15PMx7QmWDZO5MG/JPwIDAQABAoIBAE5KS1AiutXmezDP
+aSb4TLvcrhj8hDhuT92txxmQCV+ePJWG2sPRpDCvXX246NvnX9vy49gmkSH4RY+c
+1vZvvt2XrqzD65zZzB+sgpf1tA0DNdMTdKvtqASvHU4tEd4z+bJKEdP4vpp4CZWQ
+93vC9ia4TsIJLNns8Hwz42+7lEEResKYZA2djGnzHl+83vR1dm0GGBD6BKR1C3Cx
+HbEhqx42EV61+8nAweQNjWKxeAc2hg+H8o8qWJM1aKy0TnqW6kudOYRyYIpX0rJA
+siE2HwvDA1mDd5M8ntZ/Cx0pnTc/cuZB8BQJ0jN1JXbrJGbWspBNXformw7isbyO
+WIOjvEECgYEA84XKV3aPrTE2JBs5vzzs59NMPV+5frw+xzDyPxqK5Q7+jjVKDwxh
+/WRatCaTdRxhOI905HfVsDYjrsPOpmF9MHsLxmBhwk8zBFOu/xtYr7zBNkJhmCsq
+kZMdxf8bpu08E7kMQJ2MvT7OhM5HRlWIUR0jdja8Hz51Ro4oOb/po7kCgYEA0Pb5
+v12ZsaSHMF0r4l983PifNwYmI22iQIEtRT2DxgTkDKgBTjbRzqZmEhaADMAO48o9
+sIZy+KJ/a8G9fPQVwMgBID8zOHnWsrFmM3qkj5hhrAQdtq7OE71zgaP0tyE1TG4u
+Zs3a7eSyuoildHHFqX88oXSYsTlfV8vn23UpwLcCgYEAwXiCuBger8dQL0FeEJwz
+zz5k7MG3WoPuEEzHuPC6dp8CCDM4IlqBI1JuaX/YWQtyBgCbKsQ2BigNE1THQhJj
+5ndrdHCwWjKX4pElj9HHFN+OVTBJ3x40VLGfzuUNsAH8X+L9Y/yHivZyFrrXj352
+rZLL0KhNrzjs7WAVf0QEOCkCgYBe2s1xnZZnueyX+qMyBfBTChST0Jm9WUXejAS1
+un+3gn7Wc+jrzRyd9pC8wzPrFb9sjWBFYjKMRI8cpfxS3SWGtgM01Rt2FnBr+vUO
+hyxt9ljX0aJ/S4hGE6h7/6XU/yEHibhMeENZ24d5/w9D9WUpVJV8IMYzJHzwCKI9
+z0hdrwKBgQDMKvY3DBpZjhZe9YnOgdj4SRpNwaasUSf3a3SZYY1JyOZVUzeSSzoX
+rYLfxBRDjkJ8Nnod+nR/JSRqYa/SJYEMZEZFsC+k/pvBiaP6tk694IlpLD/2MXN6
+14FUV5LH/rGSbZJMSfZ9yNX1XZDowH8nOu+qlmlU4lmgiOuityTmtw==
+-----END RSA PRIVATE KEY-----
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Artifacts/Deployment/OTHER/id_rsa.pub b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Artifacts/Deployment/OTHER/id_rsa.pub
new file mode 100644 (file)
index 0000000..444ca79
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Artifacts/Deployment/OTHER/image b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Artifacts/Deployment/OTHER/image
new file mode 100644 (file)
index 0000000..f31d15d
--- /dev/null
@@ -0,0 +1 @@
+ubuntu_16.04
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Definitions/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Definitions/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..2caae19
--- /dev/null
@@ -0,0 +1,345 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vgw
+  template_version: "1.0"
+  template_author: onap
+  VNFD_SCHEMA_VERSION: "2.5.1+1"
+description: vCPE_vgw
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vgw:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-2222-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vgw ] ]
+        default: vcpe_vgw
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: ""
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+    requirements:
+      - virtual_link_public:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          occurrences: [ 0, 1 ]     
+      - virtual_link_private:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          occurrences: [ 0, 1 ]     
+
+topology_template:
+  substitution_mappings:
+    node_type: onap.vcpe_vgw
+    requirements:
+      virtual_link_public: [ Cp_vgw_public, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    mux_gw_private_net_id:
+      type: string
+      description: Private network that connects vGMUX to vGWs
+      default: zdfw1muxgw01_private
+    mux_gw_private_net_cidr:
+      type: string
+      description: he CIDR of the vGMUX private network
+      default: 10.5.0.0/24
+    cpe_public_net_id:
+      type: string
+      description: cpe public net name
+      default: zdfw1cpe01_public
+    cpe_public_net_cidr:
+      type: string
+      description: cpe public net cidr
+      default: 10.2.0.0/24
+    vgw_private_ip_0:
+      type: string
+      description: Private IP address that is assigned to the vGW to communicate with vGMUX
+      default: 10.5.0.21
+    vgw_private_ip_1:
+      type: string
+      description: Private IP address that is assigned to the vGW to communicate with ONAP components
+      default: 10.0.101.30
+    vgw_private_ip_2:
+      type: string
+      description: Private IP address that is assigned to the vGW to communicate with vCPE public network
+      default: 10.2.0.3
+    vgw_name_0:
+      type: string
+      description: Name of the vGW
+      default: zdcpe1cpe01gw01
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: string
+      description: dcae collector port
+      default: "8080"
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    mux_ip_addr:
+      type: string
+      description: IP address of vGMUX
+      default: 10.5.0.20
+    vg_vgmux_tunnel_vni:
+      type: string
+      description: vni value of vG-vGMUX vxlan tunnel
+      default: "100"
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_GW_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Customer_GW
+
+  node_templates:
+    LLU_VNF:
+      type: onap.vcpe_vgw
+      properties:
+        descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
+        provider: onap
+        product_name: vcpe_vgw
+        software_version: '1.0'
+        descriptor_version: '1.0'
+        flavour_id: simple
+        flavour_description: simple
+        vnfm_info: ['gvnfm']
+
+    #Private network that connects vGMUX to vGWs
+    VL_mux_gw_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocols: [ipv4]
+        vl_profile:
+          max_bitrate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bitrate_requirements:
+            root: 10000000
+            leaf: 10000000
+          virtual_link_protocol_data:
+            - associated_layer_protocol: ipv4
+              l3_protocol_data:
+                name: { get_input: mux_gw_private_net_id }
+                ip_version: ipv4
+                cidr: { get_input: mux_gw_private_net_cidr }
+                dhcp_enabled: false
+
+    #cpe public network
+    VL_cpe_public:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocols: [ipv4]
+        vl_profile:
+          max_bitrate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bitrate_requirements:
+            root: 10000000
+            leaf: 10000000
+          virtual_link_protocol_data:
+            - associated_layer_protocol: ipv4
+              l3_protocol_data:
+                name: { get_input: cpe_public_net_id }
+                ip_version: ipv4
+                cidr: { get_input: cpe_public_net_cidr }
+                dhcp_enabled: false
+
+    # vgw related
+    Cp_vgw_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocols: [ipv4]
+        trunk_mode: false
+        protocol:
+          - associated_layer_protocol: ipv4
+            address_data:
+              - address_type: ip_address
+                l3_address_data:
+                  ip_address_assignment: false
+                  floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vgw_0
+        #- virtual_link: VL_public
+
+    Cp_vgw_mux_gw_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocols: [ipv4]
+        trunk_mode: false
+        protocol:
+          - associated_layer_protocol: ipv4
+            address_data:
+              - address_type: ip_address
+                l3_address_data:
+                  ip_address_assignment: false
+                  floating_ip_activated: false
+                  fixed_ip_address:
+                    - { get_input: vgw_private_ip_0 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vgw_0
+        - virtual_link: VL_mux_gw_private_net
+
+    Cp_vgw_cpe_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocols: [ipv4]
+        trunk_mode: false
+        protocol:
+          - associated_layer_protocol: ipv4
+            address_data:
+              - address_type: ip_address
+                l3_address_data:
+                  ip_address_assignment: false
+                  floating_ip_activated: false
+                  fixed_ip_address:
+                    - { get_input: vgw_private_ip_2 }
+      requirements:
+        - virtual_binding: VDU_vgw_0
+        - virtual_link: VL_cpe_public
+
+    VDU_vgw_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vgw_name_0 }
+        description: vgw
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: # TODO SDC BUG
+          source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          mux_gw_private_net_ipaddr: { get_input: vgw_private_ip_0 }
+          oam_ipaddr: { get_input: vgw_private_ip_1 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
+          mux_gw_private_net_cidr: { get_input: mux_gw_private_net_cidr }
+          mux_ip_addr: { get_input: mux_ip_addr }
+          vg_vgmux_tunnel_vni: { get_input: vg_vgmux_tunnel_vni }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        boot_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
+          echo "$(get_metadata mux_gw_private_net_ipaddr)" > /opt/config/mux_gw_private_net_ipaddr.txt
+          echo "$(get_metadata mux_gw_private_net_cidr)" > /opt/config/mux_gw_private_net_cidr.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata mux_ip_addr)" > /opt/config/mux_ip_addr.txt
+          echo "$(get_metadata vg_vgmux_tunnel_vni)" > /opt/config/vg_vgmux_tunnel_vni.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gw_install.sh
+          cd /opt
+          chmod +x v_gw_install.sh
+          ./v_gw_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              vdu_mem_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+            virtual_local_storage:
+              - size_of_storage: 40 GB
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/Deployment/OTHER/image
+          type: tosca.artifacts.nfv.SwImage
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Definitions/onap_dm.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/Definitions/onap_dm.yaml
new file mode 100644 (file)
index 0000000..80d1153
--- /dev/null
@@ -0,0 +1,1695 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+artifact_types:
+  tosca.artifacts.nfv.SwImage:
+    derived_from: tosca.artifacts.Deployment.Image
+    description: describes the software image which is directly loaded on the virtualisation container realizing of the VDU or is to be loaded on a virtual
+  tosca.artifacts.Implementation.nfv.Mistral:
+    derived_from: tosca.artifacts.Implementation
+    description: artifacts for Mistral workflows
+    mime_type: application/x-yaml
+    file_ext: [ yaml ]
+
+capability_types:
+  tosca.capabilities.nfv.VirtualStorage:
+    derived_from: tosca.capabilities.Root
+    description: Describes the attachment capabilities related to Vdu.Storage
+  tosca.capabilities.nfv.VirtualCompute:
+    derived_from: tosca.capabilities.Node
+    description: Describes the capabilities related to virtual compute resources
+    properties:
+      logical_node:
+        type: map
+        description: Describes the Logical Node requirements
+        required: false
+        entry_schema:
+          type: tosca.datatypes.nfv.LogicalNodeData
+      requested_additional_capabilities:
+        type: map
+        description: Describes additional capability for a particular VDU
+        required: false
+        entry_schema:
+          type: tosca.datatypes.nfv.RequestedAdditionalCapability
+      compute_requirements:
+        type: map
+        required: false
+        entry_schema:
+          type: string
+      virtual_memory:
+        type: tosca.datatypes.nfv.VirtualMemory
+        description: Describes virtual memory of the virtualized compute
+        required: true
+      virtual_cpu:
+        type: tosca.datatypes.nfv.VirtualCpu
+        description: Describes virtual CPU(s) of the virtualized compute
+        required: true
+      virtual_local_storage:
+        type: list
+        description: A list of virtual system disks created and destroyed as part of the VM lifecycle
+        required: false
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualBlockStorageData
+          description: virtual system disk definition
+  tosca.capabilities.nfv.VirtualBindable:
+    derived_from: tosca.capabilities.Node
+    description: Indicates that the node that includes it can be pointed by a tosca.relationships.nfv.VirtualBindsTo relationship type which is used to model the VduHasCpd association
+  tosca.capabilities.nfv.VirtualLinkable:
+    derived_from: tosca.capabilities.Root
+    description: A node type that includes the VirtualLinkable capability indicates that it can be pointed by tosca.relationships.nfv.VirtualLinksTo relationship type
+  tosca.capabilities.nfv.ExtVirtualLinkable:
+    derived_from: tosca.capabilities.Root
+  tosca.capabilities.nfv.Forwarder:
+    derived_from: tosca.capabilities.Root
+  tosca.capabilities.nfv.ext.GuestOs:
+    derived_from: tosca.capabilities.Root
+  tosca.capabilities.nfv.ext.ImageFile:
+    derived_from: tosca.capabilities.Root
+  tosca.capabilities.nfv.ext.LocalAttachment:
+    derived_from: tosca.capabilities.Root
+  tosca.capabilities.nfv.ext.Compute.Container.Architecture:
+    derived_from: tosca.capabilities.Root
+    properties:
+      num_cpus:
+        type: string
+        required: false
+      flavor_extra_specs:
+        type: map
+        required: false
+        entry_schema:
+          type: string
+      mem_size:
+        type: string
+        required: false
+
+data_types:
+  tosca.datatypes.nfv.VnfcAdditionalConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    description: VnfcAdditionalConfigurableProperties type is an empty base type for deriving data types for describing additional configurable properties for a given VNFC.
+    # below description properties added as optional, since atleast one property required to define a dataType in SDC
+    properties:
+      description:
+        type: string
+        required: false
+  tosca.datatypes.nfv.VnfcConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    description: Defines the configurable properties of a VNFC
+    properties:
+      additional_vnfc_configurable_properties:
+        type: tosca.datatypes.nfv.VnfcAdditionalConfigurableProperties
+        description: Describes additional configuration for VNFC that can be modified using the ModifyVnfInfo operation
+        required: false
+      # derived types are expected to introduce
+      # additional_vnfc_configurable_properties with its type derived from
+      # tosca.datatypes.nfv.VnfcAdditionalConfigurableProperties
+  tosca.datatypes.nfv.RequestedAdditionalCapability:
+    derived_from: tosca.datatypes.Root
+    description: describes requested additional capability for a particular VDU
+    properties:
+      requested_additional_capability_name:
+        type: string
+        description: Identifies a requested additional capability for the VDU.
+        required: true
+      support_mandatory:
+        type: boolean
+        description: Indicates whether the requested additional capability is mandatory for successful operation.
+        required: true
+      min_requested_additional_capability_version:
+        type: string
+        description: Identifies the minimum version of the requested additional capability.
+        required: false
+      preferred_requested_additional_capability_version:
+        type: string
+        description: Identifies the preferred version of the requested additional capability.
+        required: false
+      target_performance_parameters:
+        type: map
+        description: Identifies specific attributes, dependent on the requested additional capability type.
+        required: true
+        entry_schema:
+          type: string
+  tosca.datatypes.nfv.VirtualMemory:
+    derived_from: tosca.datatypes.Root
+    description: supports the specification of requirements related to virtual memory of a virtual compute resource
+    properties:
+      virtual_mem_size:
+        type: scalar-unit.size
+        description: Amount of virtual memory.
+        required: true
+      virtual_mem_oversubscription_policy:
+        type: string
+        description: The memory core oversubscription policy in terms of virtual memory to physical memory on the platform.
+        required: false
+      vdu_mem_requirements:
+        type: map
+        description: The hardware platform specific VDU memory requirements. A map of strings that contains a set of key-value pairs that describes hardware platform specific VDU memory requirements.
+        required: false
+        entry_schema:
+          type: string
+      numa_enabled:
+        type: boolean
+        description: It specifies the memory allocation to be cognisant of the relevant process/core allocation.
+        required: false
+        default: false
+  tosca.datatypes.nfv.VirtualCpuPinning:
+    derived_from: tosca.datatypes.Root
+    description: Supports the specification of requirements related to the virtual CPU pinning configuration of a virtual compute resource
+    properties:
+      virtual_cpu_pinning_policy:
+        type: string
+        description: 'Indicates the policy for CPU pinning. The policy can take values of "static" or "dynamic". In case of "dynamic" the allocation of virtual CPU cores to logical CPU cores is decided by the VIM. (e.g.: SMT (Simultaneous Multi-Threading) requirements). In case of "static" the allocation is requested to be according to the virtual_cpu_pinning_rule.'
+        required: false
+        constraints:
+          - valid_values: [ static, dynamic ]
+      virtual_cpu_pinning_rule:
+        type: list
+        description: Provides the list of rules for allocating virtual CPU cores to logical CPU cores/threads
+        required: false
+        entry_schema:
+          type: string
+  tosca.datatypes.nfv.VirtualCpu:
+    derived_from: tosca.datatypes.Root
+    description: Supports the specification of requirements related to virtual CPU(s) of a virtual compute resource
+    properties:
+      cpu_architecture:
+        type: string
+        description: CPU architecture type. Examples are x86, ARM
+        required: false
+      num_virtual_cpu:
+        type: integer
+        description: Number of virtual CPUs
+        required: true
+        constraints:
+          - greater_than: 0
+      virtual_cpu_clock:
+        type: scalar-unit.frequency
+        description: Minimum virtual CPU clock rate
+        required: false
+      virtual_cpu_oversubscription_policy:
+        type: string
+        description: CPU core oversubscription policy e.g. the relation of virtual CPU cores to physical CPU cores/threads.
+        required: false
+      vdu_cpu_requirements:
+        type: map
+        description: The hardware platform specific VDU CPU requirements. A map of strings that contains a set of key-value pairs describing VDU CPU specific hardware platform requirements.
+        required: false
+        entry_schema:
+          type: string
+      virtual_cpu_pinning:
+        type: tosca.datatypes.nfv.VirtualCpuPinning
+        description: The virtual CPU pinning configuration for the virtualised compute resource.
+        required: false
+  tosca.datatypes.nfv.LogicalNodeData:
+    derived_from: tosca.datatypes.Root
+    description: Describes compute, memory and I/O requirements associated with a particular VDU.
+    properties:
+      logical_node_requirements:
+        type: map
+        description: The logical node-level compute, memory and I/O requirements. A map  of strings that contains a set of key-value pairs that describes hardware platform specific deployment requirements, including the number of CPU cores on this logical node, a memory configuration specific to a logical node  or a requirement related to the association of an I/O device with the logical node.
+        required: false
+        entry_schema:
+          type: string
+  tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:
+    derived_from: tosca.datatypes.Root
+    description: Describes requirements on a virtual network interface
+    properties:
+      name:
+        type: string
+        description: Provides a human readable name for the requirement.
+        required: false
+      description:
+        type: string
+        description: Provides a human readable description of the requirement.
+        required: false
+      support_mandatory:
+        type: boolean
+        description: Indicates whether fulfilling the constraint is mandatory (TRUE) for successful operation or desirable (FALSE).
+        required: true
+      network_interface_requirements:
+        type: map
+        description: The network interface requirements. A map of strings that contain a set of key-value pairs that describes the hardware platform specific  network interface deployment requirements.
+        required: true
+        entry_schema:
+          type: string
+      nic_io_requirements:
+        type: tosca.datatypes.nfv.LogicalNodeData
+        description: references (couples) the CP with any logical node I/O requirements (for network devices) that may have been created. Linking these attributes is necessary so that so that I/O requirements that need to be articulated at the logical node level can be associated with the network interface requirements associated with the CP.
+        required: false
+  
+  tosca.datatypes.nfv.injectFile: #used for vCPE usecase
+    derived_from: tosca.datatypes.Root
+    properties:
+      source_path:
+        type: string
+        required: true
+      dest_path:
+        type: string
+        required: true
+  tosca.datatypes.nfv.L2AddressData:
+    derived_from: tosca.datatypes.Root
+    description: Describes the information on the MAC addresses to be assigned to a connection point.
+    properties:
+      mac_address_assignment:
+        type: boolean
+        description: Specifies if the address assignment is the responsibility of management and orchestration function or not. If it is set to True, it is the management and orchestration function responsibility
+        required: true
+  tosca.datatypes.nfv.L3AddressData:
+    derived_from: tosca.datatypes.Root
+    description: Provides information about Layer 3 level addressing scheme and parameters applicable to a CP
+    properties:
+      ip_address_assignment:
+        type: boolean
+        description: Specifies if the address assignment is the responsibility of management and orchestration function or not. If it is set to True, it is the management and orchestration function responsibility
+        required: true
+      floating_ip_activated:
+        type: boolean
+        description: Specifies if the floating IP scheme is activated on the Connection Point or not
+        required: true
+      ip_address_type:
+        type: string
+        description: Defines address type. The address type should be aligned with the address type supported by the layer_protocols properties of the parent VnfExtCp
+        required: false
+        constraints:
+          - valid_values: [ ipv4, ipv6 ]
+      number_of_ip_address:
+        type: integer
+        description: Minimum number of IP addresses to be assigned
+        required: false
+        constraints:
+          - greater_than: 0
+      fixed_ip_address: #Introduced from Beijing release, only used for vCPE usecase
+        type: list
+        entry_schema:
+          type: string
+        required: false
+  tosca.datatypes.nfv.AddressData:
+    derived_from: tosca.datatypes.Root
+    description: Describes information about the addressing scheme and parameters applicable to a CP
+    properties:
+      address_type:
+        type: string
+        description: Describes the type of the address to be assigned to a connection point. The content type shall be aligned with the address type supported by the layerProtocol property of the connection point
+        required: true
+        constraints:
+          - valid_values: [ mac_address, ip_address ]
+      l2_address_data:
+        type: tosca.datatypes.nfv.L2AddressData
+        description: Provides the information on the MAC addresses to be assigned to a connection point.
+        required: false
+      l3_address_data:
+        type: tosca.datatypes.nfv.L3AddressData
+        description: Provides the information on the IP addresses to be assigned to a connection point
+        required: false
+  tosca.datatypes.nfv.ConnectivityType:
+    derived_from: tosca.datatypes.Root
+    description: describes additional connectivity information of a virtualLink
+    properties:
+      layer_protocols:
+        type: list
+        description: Identifies the protocol a virtualLink gives access to (ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire).The top layer protocol of the virtualLink protocol stack shall always be provided. The lower layer protocols may be included when there are specific requirements on these layers.
+        required: true
+        entry_schema:
+          type: string
+          constraints:
+            - valid_values: [ ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
+      flow_pattern:
+        type: string
+        description: Identifies the flow pattern of the connectivity
+        required: false
+        constraints:
+          - valid_values: [ line, tree, mesh ]
+  tosca.datatypes.nfv.VlFlavour:
+    derived_from: tosca.datatypes.Root
+    properties:
+      flavourId:
+        type: string
+  tosca.datatypes.nfv.ext.AddressPairs:
+    properties:
+      ip:
+        type: string
+        required: false
+      mac:
+        type: string
+        required: false
+  tosca.datatypes.nfv.ext.FloatingIP:
+    properties:
+      external_network:
+        type: string
+        required: false
+      ip_address:
+        type: string
+        required: false
+  tosca.datatypes.nfv.ext.LocationInfo:
+    properties:
+      availability_zone:
+        type: string
+        required: false
+      vimid:
+        type: integer
+        required: false
+      tenant:
+        type: string
+        required: false
+  tosca.datatypes.nfv.ext.HostRouteInfo:
+    properties:
+      destination:
+        type: string
+        required: false
+      nexthop:
+        type: string
+        required: false
+  tosca.datatypes.nfv.ext.InjectData:
+    properties:
+      file_name:
+        type: string
+        required: false
+      file_data:
+        type: string
+        required: false
+  tosca.datatypes.nfv.ext.zte.WatchDog:
+    properties:
+      enable_delay:
+        type: integer
+        required: false
+      action:
+        type: string
+        required: false
+  tosca.datatypes.nfv.ext.LocalAffinityOrAntiAffinityRule:
+    properties:
+      scope:
+        type: string
+        required: false
+      affinity_antiaffinity:
+        type: string
+        required: false
+  tosca.datatypes.nfv.VduProfile:
+    derived_from: tosca.datatypes.Root
+    description: describes additional instantiation data for a given Vdu.Compute used in a specific deployment flavour.
+    properties:
+      min_number_of_instances:
+        type: integer
+        description: Minimum number of instances of the VNFC based on this Vdu.Compute that is permitted to exist for a particular VNF deployment flavour.
+        required: true
+        constraints:
+          - greater_or_equal: 0
+      max_number_of_instances:
+        type: integer
+        description: Maximum number of instances of the VNFC based on this Vdu.Compute that is permitted to exist for a particular VNF deployment flavour.
+        required: true
+        constraints:
+          - greater_or_equal: 0
+      watchdog: #Introduced from Beijing release, only used for vCPE usecase, outside the scope of SOL001 v2.5.1
+        type: string
+        required: true
+      vmBootUpTimeOut: #Introduced from Beijing release, only used for vCPE usecase, outside the scope of SOL001 v2.5.1
+        type: integer
+        required: false
+  tosca.datatypes.nfv.LinkBitrateRequirements:
+    derived_from: tosca.datatypes.Root
+    description: describes the requirements in terms of bitrate for a virtual link
+    properties:
+      root:
+        type: integer # in bits per second
+        description: Specifies the throughput requirement in bits per second of the link (e.g. bitrate of E-Line, root bitrate of E-Tree, aggregate capacity of E-LAN).
+        required: true
+        constraints:
+          - greater_or_equal: 0
+      leaf:
+        type: integer # in bits per second
+        description: Specifies the throughput requirement in bits per second of leaf connections to the link when applicable to the connectivity type (e.g. for E-Tree and E LAN branches).
+        required: false
+        constraints:
+          - greater_or_equal: 0
+  tosca.datatypes.nfv.Qos:
+    derived_from: tosca.datatypes.Root
+    description: describes QoS data for a given VL used in a VNF deployment flavour
+    properties:
+      latency:
+        type: scalar-unit.time #Number [ms]
+        description: Specifies the maximum latency
+        required: true
+        constraints:
+          - greater_than: 0 s
+      packet_delay_variation:
+        type: scalar-unit.time #Number [ms]
+        description: Specifies the maximum jitter
+        required: true
+        constraints:
+          - greater_or_equal: 0 s
+      packet_loss_ratio:
+        type: float #Number [0 ..1]
+        description: Specifies the maximum packet loss ratio
+        required: false
+        constraints:
+          - in_range: [ 0.0, 1.0 ]
+  tosca.datatypes.nfv.IpAllocationPool:
+    derived_from: tosca.datatypes.Root
+    description: Specifies a range of IP addresses
+    properties:
+      start_ip_address:
+        type: string
+        description: The IP address to be used as the first one in a pool of addresses derived from the cidr block full IP range
+        required: true
+      end_ip_address:
+        type: string
+        description: The IP address to be used as the last one in a pool of addresses derived from the cidr block full IP range
+        required: true
+  tosca.datatypes.nfv.L2ProtocolData:
+    derived_from: tosca.datatypes.Root
+    description: describes L2 protocol data for a given virtual link used in a specific VNF deployment flavour.
+    properties:
+      name:
+        type: string
+        description: Identifies the network name associated with this L2 protocol.
+        required: false
+      network_type:
+        type: string
+        description: Specifies the network type for this L2 protocol.The value may be overridden at run-time.
+        required: false
+        constraints:
+          - valid_values: [ flat, vlan, vxlan, gre ]
+      vlan_transparent:
+        type: boolean
+        description: Specifies whether to support VLAN transparency for this L2 protocol or not.
+        required: false
+        default: false
+      mtu:
+        type: integer
+        description: Specifies the maximum transmission unit (MTU) value for this L2 protocol.
+        required: false
+        constraints:
+          - greater_than: 0
+      segmentation_id:  #Introduced from Beijing release, only used for vCPE usecase, outside the scope of SOL001 v2.5.1
+        type: integer
+        required: false
+      physical_network:  #Introduced from Beijing release, only used for vCPE usecase, outside the scope of SOL001 v2.5.1
+        type: string
+        required: false
+  tosca.datatypes.nfv.L3ProtocolData:
+    derived_from: tosca.datatypes.Root
+    description: describes L3 protocol data for a given virtual link used in a specific VNF deployment flavour.
+    properties:
+      name:
+        type: string
+        description: Identifies the network name associated with this L3 protocol.
+        required: false
+      ip_version:
+        type: string
+        description: Specifies IP version of this L3 protocol.The value of the ip_version property shall be consistent with the value of the layer_protocol in the connectivity_type property of the virtual link node.
+        required: true
+        constraints:
+          - valid_values: [ ipv4, ipv6 ]
+      cidr:
+        type: string
+        description: Specifies the CIDR (Classless Inter-Domain Routing) of this L3 protocol. The value may be overridden at run-time.
+        required: true
+      ip_allocation_pools:
+        type: list
+        description: Specifies the allocation pools with start and end IP addresses for this L3 protocol. The value may be overridden at run-time.
+        required: false
+        entry_schema:
+          type: tosca.datatypes.nfv.IpAllocationPool
+      gateway_ip:
+        type: string
+        description: Specifies the gateway IP address for this L3 protocol. The value may be overridden at run-time.
+        required: false
+      dhcp_enabled:
+        type: boolean
+        description: Indicates whether DHCP (Dynamic Host Configuration Protocol) is enabled or disabled for this L3 protocol. The value may be overridden at run-time.
+        required: false
+      ipv6_address_mode:
+        type: string
+        description: Specifies IPv6 address mode. May be present when the value of the ipVersion attribute is "ipv6" and shall be absent otherwise. The value may be overridden at run-time.
+        required: false
+        constraints:
+          - valid_values: [ slaac, dhcpv6-stateful, dhcpv6-stateless ]
+  tosca.datatypes.nfv.VirtualLinkProtocolData:
+    derived_from: tosca.datatypes.Root
+    description: describes one protocol layer and associated protocol data for a given virtual link used in a specific VNF deployment flavour
+    properties:
+      associated_layer_protocol:
+         type: string
+         description: Identifies one of the protocols a virtualLink gives access to (ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire) as specified by the connectivity_type property.
+         required: true
+         constraints:
+           - valid_values: [ ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
+      l2_protocol_data:
+         type: tosca.datatypes.nfv.L2ProtocolData
+         description: Specifies the L2 protocol data for a virtual link. Shall be present when the associatedLayerProtocol attribute indicates a L2 protocol and shall be absent otherwise.
+         required: false
+      l3_protocol_data:
+         type: tosca.datatypes.nfv.L3ProtocolData
+         description: Specifies the L3 protocol data for this virtual link.  Shall be present when the associatedLayerProtocol attribute indicates a L3 protocol and shall be absent otherwise.
+         required: false
+  
+  tosca.datatypes.nfv.VlProfile:
+    derived_from: tosca.datatypes.Root
+    description: Describes additional instantiation data for a given VL used in a specific VNF deployment flavour.
+    properties:
+      max_bitrate_requirements:
+        type: tosca.datatypes.nfv.LinkBitrateRequirements
+        description: Specifies the maximum bitrate requirements for a VL instantiated according to this profile.
+        required: true
+      min_bitrate_requirements:
+        type: tosca.datatypes.nfv.LinkBitrateRequirements
+        description: Specifies the minimum bitrate requirements for a VL instantiated according to this profile.
+        required: true
+      qos:
+        type: tosca.datatypes.nfv.Qos
+        description: Specifies the QoS requirements of a VL instantiated according to this profile.
+        required: false
+      virtual_link_protocol_data:
+        type: list
+        description: Specifies the protocol data for a virtual link.
+        required: false
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualLinkProtocolData
+  tosca.datatypes.nfv.VduLevel:
+    derived_from: tosca.datatypes.Root
+    description: Indicates for a given Vdu.Compute in a given level the number of instances to deploy
+    properties:
+      number_of_instances:
+        type: integer
+        description: Number of instances of VNFC based on this VDU to deploy for this level.
+        required: true
+        constraints:
+          - greater_or_equal: 0
+  tosca.datatypes.nfv.ScaleInfo:
+    derived_from: tosca.datatypes.Root
+    description: Indicates for a given scaleAspect the corresponding scaleLevel
+    properties:
+      scale_level:
+        type: integer
+        description: The scale level for a particular aspect
+        required: true
+        constraints:
+          - greater_or_equal: 0
+  tosca.datatypes.nfv.ScalingAspect:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      description:
+        type: string
+        required: true
+      max_scale_level:
+        type: integer # positiveInteger
+        required: true
+        constraints:
+          - greater_or_equal: 0
+      step_deltas:
+        type: list
+        required: false
+        entry_schema:
+          type: string # Identifier
+  tosca.datatypes.nfv.InstantiationLevel:
+    derived_from: tosca.datatypes.Root
+    description: Describes the scale level for each aspect that corresponds to a given level of resources to be instantiated within a deployment flavour in term of the number VNFC instances
+    properties:
+      description:
+        type: string
+        description: Human readable description of the level
+        required: true
+      scale_info:
+        type: map # key: aspectId
+        description: Represents for each aspect the scale level that corresponds to this instantiation level. scale_info shall be present if the VNF supports scaling.
+        required: false
+        entry_schema:
+          type: tosca.datatypes.nfv.ScaleInfo
+  tosca.datatypes.nfv.VnfInstantiateOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    description: represents information that affect the invocation of the InstantiateVnf operation.
+    properties:
+      description:
+        type: string
+        required: false
+  tosca.datatypes.nfv.VnfScaleOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    description: Represents information that affect the invocation of the ScaleVnf operation
+    properties:
+      scaling_by_more_than_one_step_supported:
+        type: boolean
+        description: Signals whether passing a value larger than one in the numScalingSteps parameter of the ScaleVnf operation is supported by this VNF.
+        required: false
+        default: false
+  tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    description: represents information that affect the invocation of the ScaleVnfToLevel operation
+    properties:
+      arbitrary_target_levels_supported:
+        type: boolean
+        description: Signals whether scaling according to the parameter "scaleInfo" is supported by this VNF
+        required: true
+  tosca.datatypes.nfv.VnfHealOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    description: represents information that affect the invocation of the HealVnf operation
+    properties:
+      causes:
+        type: list
+        description: Supported "cause" parameter values
+        required: false
+        entry_schema:
+          type: string
+  tosca.datatypes.nfv.VnfTerminateOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    description: represents information that affect the invocation of the TerminateVnf
+    properties:
+      min_graceful_termination_timeout:
+        type: scalar-unit.time # For TOSCA V1.2 use type as scalar-unit.time  instead of integer
+        description: Minimum timeout value for graceful termination of a VNF instance
+        required: true
+      max_recommended_graceful_termination_timeout:
+        type: scalar-unit.time # For TOSCA V1.2 use type as scalar-unit.time  instead of integer
+        description: Maximum recommended timeout value that can be needed to gracefully terminate a VNF instance of a particular type under certain conditions, such as maximum load condition. This is provided by VNF provider as information for the operator facilitating the selection of optimal timeout value. This value is not used as constraint
+        required: false
+  tosca.datatypes.nfv.VnfOperateOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    description: represents information that affect the invocation of the OperateVnf operation
+    properties:
+      min_graceful_stop_timeout:
+        type: scalar-unit.time
+        description: Minimum timeout value for graceful stop of a VNF instance
+        required: true
+      max_recommended_graceful_stop_timeout:
+        type: scalar-unit.time
+        description: Maximum recommended timeout value that can be needed to gracefully stop a VNF instance of a particular type under certain conditions, such as maximum load condition. This is provided by VNF provider as information for the operator facilitating the selection of optimal timeout value. This value is not used as constraint
+        required: false
+  tosca.datatypes.nfv.VnfChangeFlavourOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    description: represents information that affect the invocation of the ChangeVnfFlavour operation
+    properties:
+      description:
+        type: string
+        required: false
+  tosca.datatypes.nfv.VnfProfile:
+    derived_from: tosca.datatypes.Root
+    description: describes a profile for instantiating VNFs of a particular NS DF according to a specific VNFD and VNF DF.
+    properties:
+      instantiation_level:
+        type: string
+        description: Identifier of the instantiation level of the VNF DF to be used for instantiation. If not present, the default instantiation level as declared in the VNFD shall be used.
+        required: false
+      min_number_of_instances:
+        type: integer
+        description: Minimum number of instances of the VNF based on this VNFD that is permitted to exist for this VnfProfile.
+        required: true
+        constraints:
+          - greater_or_equal: 0
+      max_number_of_instances:
+        type: integer
+        description: Maximum number of instances of the VNF based on this VNFD that is permitted to exist for this VnfProfile.
+        required: true
+        constraints:
+          - greater_or_equal: 0
+  tosca.datatypes.nfv.UriAuthority:
+    derived_from: tosca.datatypes.Root
+    description: information that corresponds to the authority component of a URI as specified in IETF RFC 3986 [8]
+    properties:
+      user_info:
+        type: string # shall comply with IETF RFC 3986
+        description: user_info field of the authority component of a URI
+        required: false
+      host:
+        type: string # shall comply with IETF RFC 3986
+        description: host field of the authority component of a URI
+        required: false
+      port:
+        type: string # shall comply with IETF RFC 3986
+        description: port field of the authority component of a URI
+        required: false
+  tosca.datatypes.nfv.UriComponents:
+    derived_from: tosca.datatypes.Root
+    description: information used to build a URI that complies with IETF RFC 3986 [8].
+    properties:
+      scheme:
+        type: string # shall comply with IETF RFC3986
+        description: scheme component of a URI.
+        required: true
+      authority:
+        type: tosca.datatypes.nfv.UriAuthority
+        description: Authority component of a URI
+        required: false
+      path:
+        type: string # shall comply with IETF RFC 3986
+        description: path component of a URI.
+        required: false
+      query:
+        type: string # shall comply with IETF RFC 3986
+        description: query component of a URI.
+        required: false
+      fragment:
+        type: string # shall comply with IETF RFC 3986
+        description: fragment component of a URI.
+        required: false
+  tosca.datatypes.nfv.InterfaceDetails:
+    derived_from: tosca.datatypes.Root
+    description: information used to access an interface exposed by a VNF
+    properties:
+      uri_components:
+        type: tosca.datatypes.nfv.UriComponents
+        description: Provides components to build a Uniform Ressource Identifier (URI) where to access the interface end point.
+        required: false
+      interface_specific_data:
+        type: map
+        description: Provides additional details that are specific to the type of interface considered.
+        required: false
+        entry_schema:
+          type: string
+  tosca.datatypes.nfv.VirtualLinkMonitoringParameter:
+    derived_from: tosca.datatypes.Root
+    description: Represents information on virtualised resource related performance metrics applicable to the VNF.
+    properties:
+      name:
+        type: string
+        description: Human readable name of the monitoring parameter
+        required: true
+      performance_metric:
+        type: string
+        description: Identifies a performance metric derived from those defined in ETSI GS NFV-IFA 027.The packetOutgoingVirtualLink and packetIncomingVirtualLink metrics shall be obtained by aggregation the PacketOutgoing and PacketIncoming measurements defined in clause 7.1 of GS NFV-IFA 027 of all virtual link ports attached to the virtual link to which the metrics apply.
+        required: true
+        constraints:
+           - valid_values: [ packet_outgoing_virtual_link, packet_incoming_virtual_link ]
+      collection_period:
+        type: scalar-unit.time
+        description: Describes the recommended periodicity at which to collect the performance information.
+        required: false
+        constraints:
+          - greater_than: 0 s
+  tosca.datatypes.nfv.VnfcMonitoringParameter:
+    derived_from: tosca.datatypes.Root
+    description: Represents information on virtualised resource related performance metrics applicable to the VNF.
+    properties:
+      name:
+        type: string
+        description: Human readable name of the monitoring parameter
+        required: true
+      performance_metric:
+        type: string
+        description: Identifies the performance metric, according to ETSI GS NFV-IFA 027.
+        required: true
+        constraints:
+          - valid_values: [ v_cpu_usage_mean_vnf, v_cpu_usage_peak_vnf, v_memory_usage_mean_vnf, v_memory_usage_peak_vnf, v_disk_usage_mean_vnf, v_disk_usage_peak_vnf, byte_incoming_vnf_int_cp, byte_outgoing_vnf_int_cp, packet_incoming_vnf_int_cp, packet_outgoing_vnf_int_cp ]
+      collection_period:
+        type: scalar-unit.time
+        description: Describes the recommended periodicity at which to collect the performance information.
+        required: false
+        constraints:
+          - greater_than: 0 s
+  tosca.datatypes.nfv.VnfChangeExtConnectivityOperationConfiguration:
+    derived_from: tosca.datatypes.Root
+    description: represents information that affect the invocation of the ChangeExtVnfConnectivity operation
+    properties:
+      description:
+        type: string
+        required: false
+  tosca.datatypes.nfv.VnfMonitoringParameter:
+    derived_from: tosca.datatypes.Root
+    description: Represents information on virtualised resource related performance metrics applicable to the VNF.
+    properties:
+      name:
+        type: string
+        description: Human readable name of the monitoring parameter
+        required: true
+      performance_metric:
+        type: string
+        description: Identifies the performance metric, according to ETSI GS NFV-IFA 027.
+        required: true
+        constraints:
+          - valid_values: [ v_cpu_usage_mean_vnf, v_cpu_usage_peak_vnf, v_memory_usage_mean_vnf, v_memory_usage_peak_vnf, v_disk_usage_mean_vnf, v_disk_usage_peak_vnf, byte_incoming_vnf_ext_cp, byte_outgoing_vnf_ext_cp, packet_incoming_vnf_ext_cp, packet_outgoing_vnf_ext_cp ]
+      collection_period:
+        type: scalar-unit.time
+        description: Describes the recommended periodicity at which to collect the performance information.
+        required: false
+        constraints:
+          - greater_than: 0 s
+  tosca.datatypes.nfv.VnfLcmOperationsConfiguration:
+    derived_from: tosca.datatypes.Root
+    description: Represents information to configure lifecycle management operations
+    properties:
+      instantiate:
+        type: tosca.datatypes.nfv.VnfInstantiateOperationConfiguration
+        description: Configuration parameters for the InstantiateVnf operation
+        required: false
+      scale:
+        type: tosca.datatypes.nfv.VnfScaleOperationConfiguration
+        description: Configuration parameters for the ScaleVnf operation
+        required: false
+      scale_to_level:
+        type: tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration
+        description: Configuration parameters for the ScaleVnfToLevel operation
+        required: false
+      change_flavour:
+        type: tosca.datatypes.nfv.VnfChangeFlavourOperationConfiguration
+        description: Configuration parameters for the changeVnfFlavourOpConfig operation
+        required: false
+      heal:
+        type: tosca.datatypes.nfv.VnfHealOperationConfiguration
+        description: Configuration parameters for the HealVnf operation
+        required: false
+      terminate:
+        type: tosca.datatypes.nfv.VnfTerminateOperationConfiguration
+        description: Configuration parameters for the TerminateVnf operation
+        required: false
+      operate:
+        type: tosca.datatypes.nfv.VnfOperateOperationConfiguration
+        description: Configuration parameters for the OperateVnf operation
+        required: false
+      change_ext_connectivity:
+        type:   tosca.datatypes.nfv.VnfChangeExtConnectivityOperationConfiguration
+        description: Configuration parameters for the changeExtVnfConnectivityOpConfig operation
+        required: false
+  tosca.datatypes.nfv.CpProtocolData:
+    derived_from: tosca.datatypes.Root
+    description: Describes and associates the protocol layer that a CP uses together with other protocol and connection point information
+    properties:
+      associated_layer_protocol:
+        type: string
+        required: true
+        description: One of the values of the property layer_protocols of the CP
+        constraints:
+          - valid_values: [ ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
+      address_data:
+        type: list
+        description: Provides information on the addresses to be assigned to the CP
+        entry_schema:
+          type: tosca.datatypes.nfv.AddressData
+        required: false
+  tosca.datatypes.nfv.VnfAdditionalConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    description: is an empty base type for deriving data types for describing additional configurable properties for a given VNF
+    # below description properties added as optional, since atleast one property required to define a dataType in SDC
+    properties:
+      description:
+        type: string
+        required: false
+  tosca.datatypes.nfv.VnfConfigurableProperties:
+    derived_from: tosca.datatypes.Root
+    description: indicates configuration properties for a given VNF (e.g. related to auto scaling and auto healing).
+    properties:
+      is_autoscale_enabled:
+        type: boolean
+        description: It permits to enable (TRUE)/disable (FALSE) the auto-scaling functionality. If the properties is not present for configuring, then VNF property is not supported
+        required: false
+      is_autoheal_enabled:
+        type: boolean
+        description: It permits to enable (TRUE)/disable (FALSE) the auto-healing functionality. If the properties is not present for configuring, then VNF property is not supported
+        required: false
+      additional_configurable_properties:
+        description: It provides VNF specific configurable properties that can be modified using the ModifyVnfInfo operation
+        required: false
+        type: tosca.datatypes.nfv.VnfAdditionalConfigurableProperties
+      # derived types are expected to introduce
+      # additional_configurable_properties with its type derived from
+      # tosca.datatypes.nfv.VnfAdditionalConfigurableProperties
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions:
+    derived_from: tosca.datatypes.Root
+    description: is an empty base type for deriving data types for describing VNF-specific extension
+    # below description properties added as optional, since atleast one property required to define a dataType in SDC
+    properties:
+      description:
+        type: string
+        required: false
+  tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata:
+    derived_from: tosca.datatypes.Root
+    description: is an empty base type for deriving data types for describing VNF-specific metadata
+    # below description properties added as optional, since atleast one property required to define a dataType in SDC
+    properties:
+      description:
+        type: string
+        required: false
+  tosca.datatypes.nfv.VnfInfoModifiableAttributes:
+    derived_from: tosca.datatypes.Root
+    description: Describes VNF-specific extension and metadata for a given VNF
+    properties:
+      extensions:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions
+        description: \"Extension\" properties of VnfInfo that are writeable
+        required: false
+        # derived types are expected to introduce
+        # extensions with its type derived from
+        # tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions
+      metadata:
+        type: tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata
+        description: \"Metadata\" properties of VnfInfo that are writeable
+        required: false
+        # derived types are expected to introduce
+        # metadata with its type derived from
+        # tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata
+  tosca.datatypes.nfv.VirtualLinkBitrateLevel:
+    derived_from: tosca.datatypes.Root
+    description: Describes bitrate requirements applicable to the virtual link instantiated from a particicular VnfVirtualLink
+    properties:
+      description:
+        type: string
+        required: false
+      bitrate_requirements:
+        type: tosca.datatypes.nfv.LinkBitrateRequirements
+        description: Virtual link bitrate requirements for an instantiation level or bitrate delta for a scaling step
+        required: true
+  tosca.datatypes.nfv.VnfOperationAdditionalParameters:
+    derived_from: tosca.datatypes.Root
+    description: Is an empty base type for deriving data type for describing VNF-specific parameters to be passed when invoking lifecycle management operations
+    # below description properties added as optional, since atleast one property required to define a dataType in SDC
+    properties:
+      description:
+        type: string
+        required: false
+  tosca.datatypes.nfv.VirtualFileStorageData:
+    derived_from: tosca.datatypes.Root
+    description: VirtualFileStorageData describes file storage requirements associated with compute resources in a particular VDU
+    properties:
+      size_of_storage:
+        type: scalar-unit.size
+        description: Size of virtualized storage resource
+        required: true
+      file_system_protocol:
+        type: string
+        description: The shared file system protocol (e.g. NFS, CIFS)
+        required: true
+  tosca.datatypes.nfv.VirtualObjectStorageData:
+    derived_from: tosca.datatypes.Root
+    description: VirtualObjectStorageData describes object storage requirements associated with compute resources in a particular VDU
+    properties:
+      max_size_of_storage:
+        type: scalar-unit.size
+        description: Maximum size of virtualized storage resource
+        required: false
+  tosca.datatypes.nfv.VirtualBlockStorageData:
+    derived_from: tosca.datatypes.Root
+    description: VirtualBlockStorageData describes block storage requirements associated with compute resources in a particular VDU, either as a local disk or as virtual attached storage
+    properties:
+      size_of_storage:
+        type: scalar-unit.size
+        description: Size of virtualised storage resource
+        required: true
+      vdu_storage_requirements:
+        type: map
+        description: The hardware platform specific storage requirements. A map of strings that contains a set of key-value pairs that represents the hardware platform specific storage deployment requirements.
+        required: false
+        entry_schema:
+          type: string
+      rdma_enabled:
+        type: boolean
+        description: Indicates if the storage support RDMA
+        required: false
+        default: false
+  tosca.datatypes.nfv.SwImageData:
+    derived_from: tosca.datatypes.Root
+    description: describes information  related to a software image artifact
+    properties: # in SOL001 v0.8.0: "properties or metadata:"
+      name:
+        type: string
+        description: Name of this software image
+        required: true
+      version:
+        type: string
+        description: Version of this software image
+        required: true
+      checksum:
+        type: string
+        description:  Checksum of the software image file
+        required: true
+      container_format:
+        type: string
+        description: The container format describes the container file format in which software image is provided
+        required: true
+        constraints:
+          - valid_values: [ aki, ami, ari, bare, docker, ova, ovf ]
+      disk_format:
+        type: string
+        description: The disk format of a software image is the format of the underlying disk image
+        required: true
+        constraints:
+          - valid_values: [ aki, ami, ari, iso, qcow2, raw, vdi, vhd, vhdx, vmdk ]
+      min_disk:
+        type: scalar-unit.size # Number
+        description:  The minimal disk size requirement for this software image
+        required: true
+      min_ram:
+        type: scalar-unit.size # Number
+        description: The minimal RAM requirement for this software image
+        required: false
+      size:
+        type: scalar-unit.size # Number
+        description: The size of this software image
+        required: true
+      operating_system:
+        type: string
+        description: Identifies the operating system used in the software image
+        required: false
+      supported_virtualisation_environments:
+        type: list
+        description: Identifies the virtualisation environments (e.g. hypervisor) compatible with this software image
+        required: false
+        entry_schema:
+          type: string
+
+interface_types:
+  tosca.interfaces.nfv.Vnflcm:
+    #derived_from: tosca.interfaces.Root
+    #description: This interface encompasses a set of TOSCA operations corresponding to the VNF LCM operations defined in ETSI GS NFV-IFA 007 as well as to preamble and postamble procedures to the execution of the VNF LCM operations.
+    instantiate:
+      description: Invoked upon receipt of an Instantiate VNF request
+      # inputs:
+        # additional_parameters:
+          # type: tosca.datatypes.nfv.VnfOperationAdditionalParameters
+          # required: false
+        # derived types are expected to introduce additional_parameters with
+        # its type derived from
+        # tosca.datatypes.nfv.VnfOperationAdditionalParameters
+    instantiate_start:
+      description: Invoked before instantiate
+    instantiate_end:
+      description: Invoked after instantiate
+    terminate:
+      description: Invoked upon receipt Terminate VNF request
+      # inputs:
+        # additional_parameters:
+          # type: tosca.datatypes.nfv.VnfOperationAdditionalParameters
+          # required: false
+        # derived types are expected to introduce additional_parameters with
+        # its type derived from
+        # tosca.datatypes.nfv.VnfOperationAdditionalParameters
+    terminate_start:
+      description: Invoked before terminate
+    terminate_end:
+      description: Invoked after terminate
+    modify_information:
+      description: Invoked upon receipt of a Modify VNF Information request
+    modify_information_start:
+      description: Invoked before modify_information
+    modify_information_end:
+      description: Invoked after modify_information
+    change_flavour:
+      description: Invoked upon receipt of a Change VNF Flavour request
+      # inputs:
+        # additional_parameters:
+          # type: tosca.datatypes.nfv.VnfOperationAdditionalParameters
+          # required: false
+        # derived types are expected to introduce additional_parameters with
+        # its type derived from
+        # tosca.datatypes.nfv.VnfOperationAdditionalParameters
+    change_flavour_start:
+      description: Invoked before change_flavour
+    change_flavour_end:
+      description: Invoked after change_flavour
+    change_external_connectivity:
+      description: Invoked upon receipt of a Change External VNF Connectivity   request
+      # inputs:
+        # additional_parameters:
+          # type: tosca.datatypes.nfv.VnfOperationAdditionalParameters
+          # required: false
+        # derived types are expected to introduce additional_parameters with
+        # its type derived from
+        # tosca.datatypes.nfv.VnfOperationAdditionalParameters
+    change_external_connectivity_start:
+      description: Invoked before change_external_connectivity
+    change_external_connectivity_end:
+      description: Invoked after change_external_connectivity
+    operate:
+      description: Invoked upon receipt of an Operate VNF request
+      # inputs:
+        # additional_parameters:
+          # type: tosca.datatypes.nfv.VnfOperationAdditionalParameters
+          # required: false
+        # derived types are expected to introduce additional_parameters with
+        # its type derived from
+        # tosca.datatypes.nfv.VnfOperationAdditionalParameters
+    operate_start:
+      description: Invoked before operate
+    operate_end:
+      description: Invoked after operate
+    heal:
+      description: Invoked upon receipt of a Heal VNF request
+      # inputs:
+        # additional_parameters:
+          # type: tosca.datatypes.nfv.VnfOperationAdditionalParameters
+          # required: false
+        # derived types are expected to introduce additional_parameters with
+        # its type derived from
+        # tosca.datatypes.nfv.VnfOperationAdditionalParameters
+    heal_start:
+      description: Invoked before heal
+    heal_end:
+      description: Invoked after heal
+    scale:
+      description: Invoked upon receipt of a Scale VNF request
+      # inputs:
+        # additional_parameters:
+          # type: tosca.datatypes.nfv.VnfOperationAdditionalParameters
+          # required: false
+        # derived types are expected to introduce additional_parameters with
+        # its type derived from
+        # tosca.datatypes.nfv.VnfOperationAdditionalParameters
+    scale_start:
+      description: Invoked before scale
+    scale_end:
+      description: Invoked after scale
+    scale_to_level:
+      description: Invoked upon receipt of a Scale VNF to Level request
+      # inputs:
+        # additional_parameters:
+          # type: tosca.datatypes.nfv.VnfOperationAdditionalParameters
+          # required: false
+        # derived types are expected to introduce additional_parameters with
+        # its type derived from
+        # tosca.datatypes.nfv.VnfOperationAdditionalParameters
+    scale_to_level_start:
+      description: Invoked before scale_to_level
+    scale_to_level_end:
+      description: Invoked after scale_to_level
+
+node_types:
+  tosca.nodes.nfv.Vdu.Compute:
+    derived_from: tosca.nodes.Root
+    description:  Describes the virtual compute part of a VDU which is a construct   supporting the description of the deployment and operational behavior of a VNFC
+    properties:
+      name:
+        type: string
+        description: Human readable name of the VDU
+        required: true
+      description:
+        type: string
+        description: Human readable description of the VDU
+        required: true
+      boot_order:
+        type: list # explicit index (boot index) not necessary, contrary to IFA011
+        description: References a node template name from which a valid boot device is created
+        required: false
+        entry_schema:
+          type: string
+      nfvi_constraints:
+        type: list
+        description: Describes constraints on the NFVI for the VNFC instance(s) created from this VDU
+        required: false
+        entry_schema:
+          type: string
+      monitoring_parameters:
+        type: list
+        description: Describes monitoring parameters applicable to a VNFC instantiated from this VDU
+        required: false
+        entry_schema:
+          type: tosca.datatypes.nfv.VnfcMonitoringParameter
+      #configurable_properties:
+         #type: tosca.datatypes.nfv.VnfcConfigurableProperties
+         #required: false
+         # derived types are expected to introduce
+         # configurable_properties with its type derived from
+         # tosca.datatypes.nfv.VnfcConfigurableProperties
+      vdu_profile:
+        type: tosca.datatypes.nfv.VduProfile
+        description: Defines additional instantiation data for the VDU.Compute node
+        required: true
+      sw_image_data:
+        type: tosca.datatypes.nfv.SwImageData
+        description: Defines information related to a SwImage artifact used by this Vdu.Compute node
+        required: false # property is required when the node template has an associated artifact of type tosca.artifacts.nfv.SwImage and not required otherwise
+      boot_data:
+        type: string
+        description: Contains a string or a URL to a file contained in the VNF package used to customize a virtualised compute resource at boot time. The bootData may contain variable parts that are replaced by deployment specific values before being sent to the VIM.
+        required: false
+      inject_files: #Introduced from Beijing release, used for vCPE usecase, outside the scope of SOL001 v2.5.1
+        type: tosca.datatypes.nfv.injectFile
+        required: false  #Aligned with ONAP R2 IM. it should be false.
+      meta_data: #Introduced from Beijing release, used for metadata attached to the VM or container, outside the scope of SOL001 v2.5.1
+        type: map
+        entry_schema:
+          type: string
+        required: false
+    capabilities:
+      virtual_compute:
+        type: tosca.capabilities.nfv.VirtualCompute
+        occurrences: [ 1, 1 ]
+      virtual_binding:
+        type: tosca.capabilities.nfv.VirtualBindable
+        occurrences: [ 1, UNBOUNDED ]
+    requirements:
+      - virtual_storage:
+          capability: tosca.capabilities.nfv.VirtualStorage
+          relationship: tosca.relationships.nfv.AttachesTo
+          occurrences: [ 0, UNBOUNDED ]
+  tosca.nodes.nfv.Vdu.VirtualBlockStorage:
+    derived_from: tosca.nodes.Root
+    description: This node type describes the specifications of requirements related to virtual block storage resources
+    properties:
+      virtual_block_storage_data:
+        type: tosca.datatypes.nfv.VirtualBlockStorageData
+        description: Describes the block storage characteristics.
+        required: true
+      sw_image_data:
+        type: tosca.datatypes.nfv.SwImageData
+        description: Defines information related to a SwImage artifact used by this Vdu.Compute node.
+        required: false # property is required when the node template has an associated artifact of type tosca.artifacts.nfv.SwImage and not required otherwise
+    capabilities:
+      virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        description: Defines the capabilities of virtual_storage.
+  tosca.nodes.nfv.Vdu.VirtualFileStorage:
+    derived_from: tosca.nodes.Root
+    description: This node type describes the specifications of requirements related to virtual file storage resources
+    properties:
+      virtual_file_storage_data:
+        type: tosca.datatypes.nfv.VirtualFileStorageData
+        description: Describes the file  storage characteristics.
+        required: true
+    capabilities:
+      virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        description: Defines the capabilities of virtual_storage.
+    requirements:
+     - virtual_link:
+         capability: tosca.capabilities.nfv.VirtualLinkable
+         relationship: tosca.relationships.nfv.VirtualLinksTo
+         #description: Describes the requirements for linking to virtual link
+  tosca.nodes.nfv.Vdu.VirtualObjectStorage:
+    derived_from: tosca.nodes.Root
+    description: This node type describes the specifications of requirements related to virtual object storage resources
+    properties:
+      virtual_object_storage_data:
+        type: tosca.datatypes.nfv.VirtualObjectStorageData
+        description: Describes the object  storage characteristics.
+        required: true
+    capabilities:
+      virtual_storage:
+        type: tosca.capabilities.nfv.VirtualStorage
+        description: Defines the capabilities of virtual_storage.
+  tosca.nodes.nfv.Cp:
+    derived_from: tosca.nodes.Root
+    description:  Provides information regarding the purpose of the connection point
+    properties:
+      layer_protocols:
+        type: list
+        description: Identifies which protocol the connection point uses for connectivity purposes
+        required: true
+        entry_schema:
+          type: string
+          constraints:
+            - valid_values: [ ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
+      role: #Name in ETSI NFV IFA011 v0.7.3: cpRole
+        type: string
+        description: Identifies the role of the port in the context of the traffic flow patterns in the VNF or parent NS
+        required: false
+        constraints:
+          - valid_values: [ root, leaf ]
+      description:
+        type: string
+        description: Provides human-readable information on the purpose of the connection point
+        required: false
+      protocol:
+        type: list
+        description: Provides information on the addresses to be assigned to the connection point(s) instantiated from this Connection Point Descriptor
+        required: false
+        entry_schema:
+          type: tosca.datatypes.nfv.CpProtocolData
+      trunk_mode:
+        type: boolean
+        description: Provides information about whether the CP instantiated from this Cp is in Trunk mode (802.1Q or other), When operating in "trunk mode", the Cp is capable of carrying traffic for several VLANs. Absence of this property implies that trunkMode is not configured for the Cp i.e. It is equivalent to boolean value "false".
+        required: false
+      allowed_address_data: # #Introduced from Beijing release, align with resource IM, outside the scope of SOL001 v2.5.1
+        type: tosca.datatypes.nfv.AddressData   # In the IM, it is a array, but here it is not a array. TBD.
+        required: false
+  tosca.nodes.nfv.VduCp:
+    derived_from: tosca.nodes.nfv.Cp
+    description: describes network connectivity between a VNFC instance based on this VDU and an internal VL
+    properties:
+      bitrate_requirement:
+        type: integer   # in bits per second
+        description: Bitrate requirement in bit per second on this connection point
+        required: false
+        constraints:
+          - greater_or_equal: 0
+      virtual_network_interface_requirements:
+        type: list
+        description: Specifies requirements on a virtual network interface realising the CPs instantiated from this CPD
+        required: false
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+      order:
+        type: integer
+        description: The order of the NIC on the compute instance (e.g.eth2)
+        required: false
+        constraints:
+          - greater_or_equal: 0
+      vnic_type:
+        type: string
+        description: Describes the type of the virtual network interface realizing the CPs instantiated from this CPD
+        required: false
+        constraints:
+        - valid_values: [ direct, normal, virtio, direct-physical ]
+      vnic_name: # Introduced from Beijing release, aligned with ONAP resource IM, outside the scope of SOL001 v2.5.1
+        type: string
+        required: false
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+      - virtual_binding:
+          capability: tosca.capabilities.nfv.VirtualBindable
+          relationship: tosca.relationships.nfv.VirtualBindsTo
+          node: tosca.nodes.nfv.Vdu.Compute
+  tosca.nodes.nfv.VnfVirtualLink:
+      derived_from: tosca.nodes.Root
+      description: Describes the information about an internal VNF VL
+      properties:
+        connectivity_type:
+          type: tosca.datatypes.nfv.ConnectivityType
+          description: Specifies the protocol exposed by the VL and the flow pattern supported by the VL
+          required: true
+        description:
+          type: string
+          description: Provides human-readable information on the purpose of the VL
+          required: false
+        test_access:
+          type: list
+          description: Test access facilities available on the VL
+          required: false
+          entry_schema:
+            type: string
+            constraints:
+              - valid_values: [ passive_monitoring, active_loopback ]
+        vl_profile:
+          type: tosca.datatypes.nfv.VlProfile
+          description: Defines additional data for the VL
+          required: true
+        monitoring_parameters:
+          type: list
+          description: Describes monitoring parameters applicable to the VL
+          required: false
+          entry_schema:
+            type: tosca.datatypes.nfv.VirtualLinkMonitoringParameter
+      capabilities:
+        virtual_linkable:
+          type: tosca.capabilities.nfv.VirtualLinkable
+  tosca.nodes.nfv.VNF:
+    derived_from: tosca.nodes.Root
+    description: The generic abstract type from which all VNF specific abstract node types shall be derived to form, together with other node types, the TOSCA service template(s) representing the VNFD
+    properties:
+      descriptor_id: # instead of vnfd_id
+        type: string # GUID
+        description: Globally unique identifier of the VNFD
+        required: true
+      descriptor_version: # instead of vnfd_version
+        type: string
+        description: Identifies the version of the VNFD
+        required: true
+      provider: # instead of vnf_provider
+        type: string
+        description: Provider of the VNF and of the VNFD
+        required: true
+      product_name: # instead of vnf_product_name
+        type: string
+        description: Human readable name for the VNF Product
+        required: true
+      software_version: # instead of vnf_software_version
+        type: string
+        description: Software version of the VNF
+        required: true
+      product_info_name: # instead of vnf_product_info_name
+        type: string
+        description: Human readable name for the VNF Product
+        required: false
+      product_info_description: # instead of vnf_product_info_description
+        type: string
+        description: Human readable description of the VNF Product
+        required: false
+      vnfm_info:
+        type: list
+        required: true
+        description: Identifies VNFM(s) compatible with the VNF
+        entry_schema:
+          type: string
+      localization_languages:
+        type: list
+        description: Information about localization languages of the VNF
+        required: false
+        entry_schema:
+          type: string #IETF RFC 5646 string
+      default_localization_language:
+        type: string #IETF RFC 5646 string
+        description: Default localization language that is instantiated if no information about selected localization language is available
+        required: false
+      #configurable_properties:
+        #type: tosca.datatypes.nfv.VnfConfigurableProperties
+        #description: Describes the configurable properties of the VNF
+        #required: false
+        # derived types are expected to introduce configurable_properties
+        # with its type derived from
+        # tosca.datatypes.nfv.VnfConfigurableProperties
+      #modifiable_attributes:
+        #type: tosca.datatypes.nfv.VnfInfoModifiableAttributes
+        #description: Describes the modifiable attributes of the VNF
+        #required: false
+        # derived types are expected to introduce modifiable_attributes
+        # with its type derived from
+        # tosca.datatypes.nfv.VnfInfoModifiableAttributes
+      lcm_operations_configuration:
+        type: tosca.datatypes.nfv.VnfLcmOperationsConfiguration
+        description: Describes the configuration parameters for the VNF LCM operations
+        required: false
+      monitoring_parameters:
+        type: list
+        entry_schema:
+          type: tosca.datatypes.nfv.VnfMonitoringParameter
+        description: Describes monitoring parameters applicable to the VNF.
+        required: false
+      flavour_id:
+        type: string
+        description: Identifier of the Deployment Flavour within the VNFD
+        required: true
+      flavour_description:
+        type: string
+        description: Human readable description of the DF
+        required: true
+      #vnf_profile:
+      #  type: tosca.datatypes.nfv.VnfProfile
+      #  description: Describes a profile for instantiating VNFs of a particular NS DF according to a specific VNFD and VNF DF
+      #  required: false
+    requirements:
+      - virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          occurrences: [ 0, 1 ]
+    interfaces:
+      Vnflcm:
+        type: tosca.interfaces.nfv.Vnflcm
+  tosca.nodes.nfv.VnfExtCp:
+    derived_from: tosca.nodes.nfv.Cp
+    description: Describes a logical external connection point, exposed by the VNF enabling connection with an external Virtual Link
+    properties:
+      virtual_network_interface_requirements:
+        type: list
+        description: The actual virtual NIC requirements that is been assigned when instantiating the connection point
+        required: false
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+    requirements:
+      - external_virtual_link:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+      - internal_virtual_link: #name in ETSI NFV IFA011 v0.7.3: intVirtualLinkDesc
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+
+relationship_types:
+  tosca.relationships.nfv.VirtualBindsTo:
+    derived_from: tosca.relationships.DependsOn
+    description: Represents an association relationship between Vdu.Compute and VduCp node types
+    valid_target_types: [ tosca.capabilities.nfv.VirtualBindable ]
+  tosca.relationships.nfv.VirtualLinksTo:
+    derived_from: tosca.relationships.DependsOn
+    description: Represents an association relationship between the VduCp and VnfVirtualLink node types
+    valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable ]
+  tosca.relationships.nfv.AttachesTo:
+    derived_from: tosca.relationships.Root
+    description: Represents an association relationship between the Vdu.Compute and one of the node types, Vdu.VirtualBlockStorage, Vdu.VirtualObjectStorage or Vdu.VirtualFileStorage
+    valid_target_types: [ tosca.capabilities.nfv.VirtualStorage ]
+
+group_types:
+  tosca.groups.nfv.PlacementGroup:
+    derived_from: tosca.groups.Root
+    description: PlacementGroup is used for describing the affinity or anti-affinity relationship applicable between the virtualization containers to be created based on different VDUs, or between internal VLs to be created based on different VnfVirtualLinkDesc(s)
+    properties:
+      description:
+        type: string
+        description: Human readable description of the group
+        required: true
+    members: [ tosca.nodes.nfv.Vdu.Compute, tosca.nodes.nfv.VnfVirtualLink ]
+
+policy_types:
+  tosca.policies.nfv.InstantiationLevels:
+    derived_from: tosca.policies.Root
+    description: The InstantiationLevels type is a policy type representing all the instantiation levels of resources to be instantiated within a deployment flavour and including default instantiation level in term of the number of VNFC instances to be created as defined in ETSI GS NFV-IFA 011 [1].
+    properties:
+      levels:
+        type: map # key: levelId
+        description: Describes the various levels of resources that can be used to instantiate the VNF using this flavour.
+        required: true
+        entry_schema:
+          type: tosca.datatypes.nfv.InstantiationLevel
+      default_level:
+        type: string # levelId
+        description: The default instantiation level for this flavour.
+        required: false # required if multiple entries in levels
+  tosca.policies.nfv.VduInstantiationLevels:
+    derived_from: tosca.policies.Root
+    description:  The VduInstantiationLevels type is a policy type representing all the instantiation levels of resources to be instantiated within a deployment flavour in term of the number of VNFC instances to be created from each vdu.Compute. as defined in ETSI GS NFV-IFA 011 [1]
+    properties:
+      levels:
+        type: map # key: levelId
+        description: Describes the Vdu.Compute levels of resources that can be used to instantiate the VNF using this flavour
+        required: true
+        entry_schema:
+          type: tosca.datatypes.nfv.VduLevel
+    targets: [ tosca.nodes.nfv.Vdu.Compute ]
+  tosca.policies.nfv.VirtualLinkInstantiationLevels:
+    derived_from: tosca.policies.Root
+    description:  The VirtualLinkInstantiationLevels type is a policy type representing all the instantiation levels of virtual link resources to be instantiated within a deployment flavour as defined in ETSI GS NFV-IFA 011 [1].
+    properties:
+      levels:
+        type: map # key: levelId
+        description: Describes the virtual link levels of resources that can be used to instantiate the VNF using this flavour.
+        required: true
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualLinkBitrateLevel
+    targets: [ tosca.nodes.nfv.VnfVirtualLink ]
+  tosca.policies.nfv.ScalingAspects:
+    derived_from: tosca.policies.Root
+    description: The ScalingAspects type is a policy type representing the scaling aspects used for horizontal scaling as defined in ETSI GS NFV-IFA 011 [1].
+    properties:
+      aspects:
+        type: map # key: aspectId
+        description: Describe maximum scale level for total number of scaling steps that can be applied to a particular aspect
+        required: true
+        entry_schema:
+          type: tosca.datatypes.nfv.ScalingAspect
+  tosca.policies.nfv.VduScalingAspectDeltas:
+    derived_from: tosca.policies.Root
+    description: The VduScalingAspectDeltas type is a policy type representing the Vdu.Compute detail of an aspect deltas used for horizontal scaling, as defined in ETSI GS NFV-IFA 011 [1].
+    properties:
+      aspect:
+        type: string
+        description: Represents the scaling aspect to which this policy applies
+        required: true
+      deltas:
+        type: map # key: scalingDeltaId
+        description: Describes the Vdu.Compute scaling deltas to be applied for every scaling steps of a particular aspect.
+        required: true
+        entry_schema:
+          type: tosca.datatypes.nfv.VduLevel
+    targets: [ tosca.nodes.nfv.Vdu.Compute ]
+  tosca.policies.nfv.VirtualLinkBitrateScalingAspectDeltas:
+    derived_from: tosca.policies.Root
+    description: The VirtualLinkBitrateScalingAspectDeltas type is a policy type representing the VnfVirtualLink detail of an aspect deltas used for horizontal scaling, as defined in ETSI GS NFV-IFA 011 [1].
+    properties:
+      aspect:
+        type: string
+        description: Represents the scaling aspect to which this policy applies.
+        required: true
+      deltas:
+        type: map # key: scalingDeltaId
+        description: Describes the VnfVirtualLink scaling deltas to be applied for every scaling steps of a particular aspect.
+        required: true
+        entry_schema:
+          type: tosca.datatypes.nfv.VirtualLinkBitrateLevel
+    targets: [ tosca.nodes.nfv.VnfVirtualLink ]
+  tosca.policies.nfv.VduInitialDelta:
+    derived_from: tosca.policies.Root
+    description: The VduInitialDelta type is a policy type representing the Vdu.Compute detail of an initial delta used for horizontal scaling, as defined in ETSI GS NFV-IFA 011 [1].
+    properties:
+      initial_delta:
+        type: tosca.datatypes.nfv.VduLevel
+        description: Represents the initial minimum size of the VNF.
+        required: true
+    targets: [ tosca.nodes.nfv.Vdu.Compute ]
+  tosca.policies.nfv.VirtualLinkBitrateInitialDelta:
+    derived_from: tosca.policies.Root
+    description: The VirtualLinkBitrateInitialDelta type is a policy type representing the VnfVirtualLink detail of an initial deltas used for horizontal scaling, as defined in ETSI GS NFV-IFA 011 [1].
+    properties:
+      initial_delta:
+        type: tosca.datatypes.nfv.VirtualLinkBitrateLevel
+        description: Represents the initial minimum size of the VNF.
+        required: true
+    targets: [ tosca.nodes.nfv.VnfVirtualLink ]
+  # tosca.policies.nfv.AffinityRule:
+  #   derived_from: tosca.policies.Placement
+  #   description: The AffinityRule describes the affinity rules applicable for the defined targets
+  #   properties:
+  #     scope:
+  #       type: string
+  #       description: scope of the rule is an NFVI_node, an NFVI_PoP, etc.
+  #       required: true
+  #       constraints:
+  #         - valid_values: [ nfvi_node, zone, zone_group, nfvi_pop ]
+  #   targets: [ tosca.nodes.nfv.Vdu.Compute, tosca.nodes.nfv.VnfVirtualLink, tosca.groups.nfv.PlacementGroup ]
+  #
+  # tosca.policies.nfv.AntiAffinityRule:
+  #   derived_from: tosca.policies.Placement
+  #   description: The AntiAffinityRule describes the anti-affinity rules applicable for the defined targets
+  #   properties:
+  #     scope:
+  #       type: string
+  #       description: scope of the rule is an NFVI_node, an NFVI_PoP, etc.
+  #       required: true
+  #       constraints:
+  #         - valid_values: [ nfvi_node, zone, zone_group, nfvi_pop ]
+  #   targets: [ tosca.nodes.nfv.Vdu.Compute, tosca.nodes.nfv.VnfVirtualLink, tosca.groups.nfv.PlacementGroup ]
+  tosca.policies.nfv.SecurityGroupRule:
+    derived_from: tosca.policies.Root
+    description: The SecurityGroupRule type is a policy type specified the matching criteria for the ingress and/or egress traffic to/from visited connection points as defined in ETSI GS NFV-IFA 011 [1].
+    properties:
+      description:
+        type: string
+        description: Human readable description of the security group rule.
+        required: false
+      direction:
+        type: string
+        description: The direction in which the security group rule is applied. The direction of 'ingress' or 'egress' is specified against the associated CP. I.e., 'ingress' means the packets entering a CP, while 'egress' means the packets sent out of a CP.
+        required: false
+        constraints:
+          - valid_values: [ ingress, egress ]
+        default: ingress
+      ether_type:
+        type: string
+        description: Indicates the protocol carried over the Ethernet layer.
+        required: false
+        constraints:
+          - valid_values: [ ipv4, ipv6 ]
+        default: ipv4
+      protocol:
+        type: string
+        description: Indicates the protocol carried over the IP layer. Permitted values include any protocol defined in the IANA protocol registry, e.g. TCP, UDP, ICMP, etc.
+        required: false
+        constraints:
+          - valid_values: [ hopopt, icmp, igmp, ggp, ipv4, st, tcp, cbt, egp, igp, bbn_rcc_mon, nvp_ii, pup, argus, emcon, xnet, chaos, udp, mux, dcn_meas, hmp, prm, xns_idp, trunk_1, trunk_2, leaf_1, leaf_2, rdp, irtp, iso_tp4, netblt, mfe_nsp, merit_inp, dccp, 3pc, idpr, xtp, ddp, idpr_cmtp, tp++, il, ipv6, sdrp, ipv6_route, ipv6_frag, idrp, rsvp, gre, dsr, bna, esp, ah, i_nlsp, swipe, narp, mobile, tlsp, skip, ipv6_icmp, ipv6_no_nxt, ipv6_opts, cftp, sat_expak, kryptolan, rvd, ippc, sat_mon, visa, ipcv, cpnx, cphb, wsn, pvp, br_sat_mon, sun_nd, wb_mon, wb_expak, iso_ip, vmtp, secure_vmtp, vines, ttp, iptm, nsfnet_igp, dgp, tcf, eigrp, ospfigp, sprite_rpc, larp, mtp, ax.25, ipip, micp, scc_sp, etherip, encap, gmtp, ifmp, pnni, pim, aris, scps, qnx, a/n, ip_comp, snp, compaq_peer, ipx_in_ip, vrrp, pgm, l2tp, ddx, iatp, stp, srp, uti, smp, sm, ptp, isis, fire, crtp, crudp, sscopmce, iplt, sps, pipe, sctp, fc, rsvp_e2e_ignore, mobility, udp_lite, mpls_in_ip, manet, hip, shim6, wesp, rohc ]
+        default: tcp
+      port_range_min:
+        type: integer
+        description: Indicates minimum port number in the range that is matched by the security group rule. If a value is provided at design-time, this value may be overridden at run-time based on other deployment requirements or constraints.
+        required: false
+        constraints:
+          - greater_or_equal: 0
+          - less_or_equal: 65535
+        default: 0
+      port_range_max:
+        type: integer
+        description: Indicates maximum port number in the range that is matched by the security group rule. If a value is provided at design-time, this value may be overridden at run-time based on other deployment requirements or constraints.
+        required: false
+        constraints:
+          - greater_or_equal: 0
+          - less_or_equal: 65535
+        default: 65535
+    targets: [ tosca.nodes.nfv.VduCp, tosca.nodes.nfv.VnfExtCp ]
+  tosca.policies.nfv.SupportedVnfInterface:
+    derived_from: tosca.policies.Root
+    description:  this policy type represents interfaces produced by a VNF, the details to access them and the applicable connection points to use to access these interfaces
+    properties:
+      interface_name:
+        type: string
+        description: Identifies an interface produced by the VNF.
+        required: true
+        constraints:
+          - valid_values: [ vnf_indicator, vnf_configuration ]
+      details:
+        type: tosca.datatypes.nfv.InterfaceDetails
+        description: Provide additional data to access the interface endpoint
+        required: false
+    targets: [ tosca.nodes.nfv.VnfExtCp, tosca.nodes.nfv.VduCp ]
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/MainServiceTemplate.mf b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/MainServiceTemplate.mf
new file mode 100644 (file)
index 0000000..808bc28
--- /dev/null
@@ -0,0 +1,8 @@
+metadata:
+    vnf_product_name: vcpe_vgw
+    vnf_provider_id: ONAP
+    vnf_package_version: 1.0
+    vnf_release_data_time: 2018.05.06T13:00+08:00
+
+Source: MainServiceTemplate.yaml
+
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/MainServiceTemplate.yaml b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/MainServiceTemplate.yaml
new file mode 100644 (file)
index 0000000..2caae19
--- /dev/null
@@ -0,0 +1,345 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+  template_name: vCPE_vgw
+  template_version: "1.0"
+  template_author: onap
+  VNFD_SCHEMA_VERSION: "2.5.1+1"
+description: vCPE_vgw
+
+imports:
+  - onap_dm.yaml
+
+node_types:
+  onap.vcpe_vgw:
+    derived_from: tosca.nodes.nfv.VNF
+    properties:
+      descriptor_id:
+        type: string
+        constraints: [ valid_values: [ b1bb0ce7-2222-4fa7-95ed-4840d70a1177 ] ]
+        default: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
+      provider:
+        type: string
+        constraints: [ valid_values: [ onap ] ]
+        default: onap
+      product_name:
+        type: string
+        constraints: [ valid_values: [ vcpe_vgw ] ]
+        default: vcpe_vgw
+      software_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      descriptor_version:
+        type: string
+        constraints: [ valid_values: [ '1.0' ] ]
+        default: '1.0'
+      flavour_id:
+        type: string
+        constraints: [ valid_values: [ simple ] ]  #only one and only allowed one DF in this example
+        default: simple
+      flavour_description:
+        type: string
+        default: ""
+      vnfm_info:
+        type: list
+        entry_schema:
+          type: string
+        default: ['gvnfm']
+    requirements:
+      - virtual_link_public:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          occurrences: [ 0, 1 ]     
+      - virtual_link_private:
+          capability: tosca.capabilities.nfv.VirtualLinkable
+          relationship: tosca.relationships.nfv.VirtualLinksTo
+          occurrences: [ 0, 1 ]     
+
+topology_template:
+  substitution_mappings:
+    node_type: onap.vcpe_vgw
+    requirements:
+      virtual_link_public: [ Cp_vgw_public, virtual_link ] # expose as external CP
+
+  inputs:
+    vcpe_image_name:
+      type: string
+      description: image name for vcpe in openstack glance
+      default: ubuntu_16.04
+    public_net_id:
+      type: string
+      description: public network id used during onap installation
+      default: external
+    onap_private_net_id:
+      type: string
+      description: onap OAM network id
+      default: oam_onap
+    onap_private_net_cidr:
+      type: string
+      description: oanp OAM network cidr
+      default: 10.0.0.0/16
+    mux_gw_private_net_id:
+      type: string
+      description: Private network that connects vGMUX to vGWs
+      default: zdfw1muxgw01_private
+    mux_gw_private_net_cidr:
+      type: string
+      description: he CIDR of the vGMUX private network
+      default: 10.5.0.0/24
+    cpe_public_net_id:
+      type: string
+      description: cpe public net name
+      default: zdfw1cpe01_public
+    cpe_public_net_cidr:
+      type: string
+      description: cpe public net cidr
+      default: 10.2.0.0/24
+    vgw_private_ip_0:
+      type: string
+      description: Private IP address that is assigned to the vGW to communicate with vGMUX
+      default: 10.5.0.21
+    vgw_private_ip_1:
+      type: string
+      description: Private IP address that is assigned to the vGW to communicate with ONAP components
+      default: 10.0.101.30
+    vgw_private_ip_2:
+      type: string
+      description: Private IP address that is assigned to the vGW to communicate with vCPE public network
+      default: 10.2.0.3
+    vgw_name_0:
+      type: string
+      description: Name of the vGW
+      default: zdcpe1cpe01gw01
+    dcae_collector_ip:
+      type: string
+      description: dcae collector ip
+      default: 10.0.4.102
+    dcae_collector_port:
+      type: string
+      description: dcae collector port
+      default: "8080"
+    pub_key:
+      type: string
+      description: ssh public key
+      default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
+    nexus_artifact_repo:
+      type: string
+      description: Root URL for the Nexus repository for Maven artifacts
+      default: https://nexus.onap.org
+    demo_artifacts_version:
+      type: string
+      description: artifacts version used in demo vnfs
+      default: 1.2.0
+    install_script_version:
+      type: string
+      description: install script version number
+      default: 1.2.0-SNAPSHOT
+    cloud_env:
+      type: string
+      description: cloud environment(openstack or rackspace)
+      default: openstack
+    mux_ip_addr:
+      type: string
+      description: IP address of vGMUX
+      default: 10.5.0.20
+    vg_vgmux_tunnel_vni:
+      type: string
+      description: vni value of vG-vGMUX vxlan tunnel
+      default: "100"
+    vnf_id:
+      type: string
+      description: The VNF ID is provided by ONAP
+      default: vCPE_Infrastructure_GW_demo_app
+    vf_module_id:
+      type: string
+      description: The vCPE Module ID is provided by ONAP
+      default: vCPE_Customer_GW
+
+  node_templates:
+    LLU_VNF:
+      type: onap.vcpe_vgw
+      properties:
+        descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
+        provider: onap
+        product_name: vcpe_vgw
+        software_version: '1.0'
+        descriptor_version: '1.0'
+        flavour_id: simple
+        flavour_description: simple
+        vnfm_info: ['gvnfm']
+
+    #Private network that connects vGMUX to vGWs
+    VL_mux_gw_private_net:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocols: [ipv4]
+        vl_profile:
+          max_bitrate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bitrate_requirements:
+            root: 10000000
+            leaf: 10000000
+          virtual_link_protocol_data:
+            - associated_layer_protocol: ipv4
+              l3_protocol_data:
+                name: { get_input: mux_gw_private_net_id }
+                ip_version: ipv4
+                cidr: { get_input: mux_gw_private_net_cidr }
+                dhcp_enabled: false
+
+    #cpe public network
+    VL_cpe_public:
+      type: tosca.nodes.nfv.VnfVirtualLink
+      properties:
+        connectivity_type:
+          layer_protocols: [ipv4]
+        vl_profile:
+          max_bitrate_requirements:
+            root: 10000000
+            leaf: 10000000
+          min_bitrate_requirements:
+            root: 10000000
+            leaf: 10000000
+          virtual_link_protocol_data:
+            - associated_layer_protocol: ipv4
+              l3_protocol_data:
+                name: { get_input: cpe_public_net_id }
+                ip_version: ipv4
+                cidr: { get_input: cpe_public_net_cidr }
+                dhcp_enabled: false
+
+    # vgw related
+    Cp_vgw_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocols: [ipv4]
+        trunk_mode: false
+        protocol:
+          - associated_layer_protocol: ipv4
+            address_data:
+              - address_type: ip_address
+                l3_address_data:
+                  ip_address_assignment: false
+                  floating_ip_activated: false
+      requirements:
+        - virtual_binding: VDU_vgw_0
+        #- virtual_link: VL_public
+
+    Cp_vgw_mux_gw_private_net:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocols: [ipv4]
+        trunk_mode: false
+        protocol:
+          - associated_layer_protocol: ipv4
+            address_data:
+              - address_type: ip_address
+                l3_address_data:
+                  ip_address_assignment: false
+                  floating_ip_activated: false
+                  fixed_ip_address:
+                    - { get_input: vgw_private_ip_0 }
+        virtual_network_interface_requirements:
+          - name: dpdk support
+            support_mandatory: true
+            network_interface_requirements:
+              dataProcessingAccelerationLibrary: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "DPDK"}'
+      requirements:
+        - virtual_binding: VDU_vgw_0
+        - virtual_link: VL_mux_gw_private_net
+
+    Cp_vgw_cpe_public:
+      type: tosca.nodes.nfv.VduCp
+      properties:
+        layer_protocols: [ipv4]
+        trunk_mode: false
+        protocol:
+          - associated_layer_protocol: ipv4
+            address_data:
+              - address_type: ip_address
+                l3_address_data:
+                  ip_address_assignment: false
+                  floating_ip_activated: false
+                  fixed_ip_address:
+                    - { get_input: vgw_private_ip_2 }
+      requirements:
+        - virtual_binding: VDU_vgw_0
+        - virtual_link: VL_cpe_public
+
+    VDU_vgw_0:
+      type: tosca.nodes.nfv.Vdu.Compute
+      properties:
+        name: { get_input: vgw_name_0 }
+        description: vgw
+        vdu_profile:
+          min_number_of_instances: 1
+          max_number_of_instances: 1
+          watchdog: none
+        inject_files: # TODO SDC BUG
+          source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
+          dest_path: /home/ubuntu/.ssh/authorized_keys
+        meta_data:
+          vnf_id: { get_input: vnf_id }
+          vf_module_id: { get_input: vf_module_id }
+          mux_gw_private_net_ipaddr: { get_input: vgw_private_ip_0 }
+          oam_ipaddr: { get_input: vgw_private_ip_1 }
+          oam_cidr: { get_input: onap_private_net_cidr }
+          cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
+          mux_gw_private_net_cidr: { get_input: mux_gw_private_net_cidr }
+          mux_ip_addr: { get_input: mux_ip_addr }
+          vg_vgmux_tunnel_vni: { get_input: vg_vgmux_tunnel_vni }
+          install_script_version: { get_input: install_script_version }
+          cloud_env: { get_input: cloud_env }
+          nexus_artifact_repo: { get_input: nexus_artifact_repo }
+        boot_data: |
+          #!/bin/bash
+          METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+          apt-get -y install jq
+
+          get_metadata () {
+            echo $METADATA | jq -r ".meta.$1"
+          }
+
+          # Create configuration files
+          mkdir /opt/config
+          echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+          echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+          echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
+          echo "$(get_metadata mux_gw_private_net_ipaddr)" > /opt/config/mux_gw_private_net_ipaddr.txt
+          echo "$(get_metadata mux_gw_private_net_cidr)" > /opt/config/mux_gw_private_net_cidr.txt
+          echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+          echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+          echo "$(get_metadata mux_ip_addr)" > /opt/config/mux_ip_addr.txt
+          echo "$(get_metadata vg_vgmux_tunnel_vni)" > /opt/config/vg_vgmux_tunnel_vni.txt
+          echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+          # Download and run install script
+          apt-get -y install unzip
+          INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+          NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+          if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+          curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+          unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gw_install.sh
+          cd /opt
+          chmod +x v_gw_install.sh
+          ./v_gw_install.sh
+      capabilities:
+        virtual_compute:
+          properties:
+            virtual_memory:
+              virtual_mem_size: 4096 MB
+              vdu_mem_requirements:
+                memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform": "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+                numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform": "generic","mandatory": "true", "configurationValue": "1024"}'
+            virtual_cpu:
+              num_virtual_cpu: 2
+              cpu_architecture: generic
+            virtual_local_storage:
+              - size_of_storage: 40 GB
+      artifacts:
+        sw_image: #TODO need to put glance image name here
+          #file: { get_input: vcpe_image_name }
+          file: ../Artifacts/Deployment/OTHER/image
+          type: tosca.artifacts.nfv.SwImage
diff --git a/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/TOSCA-Metadata/TOSCA.meta b/catalog/pub/utils/toscaparser/testdata/vnf/vcpesriov/vgw/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..4eaf193
--- /dev/null
@@ -0,0 +1,4 @@
+TOSCA-Meta-File-Version: 1.0
+CSAR-Version: 1.1
+Created-By: ONAP
+Entry-Definitions: Definitions/MainServiceTemplate.yaml
index 285d970..9da72f0 100644 (file)
@@ -35,30 +35,32 @@ class TestToscaparser(TestCase):
     def test_vnfd_parse(self):
         self.remove_temp_dir()
         input_parameters = [{"value": "222222", "key": "sdncontroller"}]
-        # vcpe = ["vgw", "infra", "vbng", "vbrgemu", "vgmux"]
-        vcpe_part = 'vgw'
-        sriov_path = os.path.dirname(os.path.abspath(__file__)) + "/testdata/vnf/vcpesriov"
-        csar_file = ("%s/%s.csar" % (sriov_path, vcpe_part))
-        logger.debug("csar_file:%s", csar_file)
-        vnfd_json = parse_vnfd(csar_file, input_parameters)
-        metadata = json.loads(vnfd_json).get("metadata")
-        logger.debug("sriov metadata:%s", metadata)
-        self.assertEqual(("vCPE_%s" % vcpe_part), metadata.get("template_name", ""))
-        if vcpe_part == "infra":
-            self.assertEqual("b1bb0ce7-1111-4fa7-95ed-4840d70a1177", json.loads(vnfd_json)["vnf"]["properties"]["descriptor_id"])
+        vcpe = ["vgw", "infra", "vbng", "vbrgemu", "vgmux"]
+        main_template = 'Definitions/MainServiceTemplate.yaml'
+        for vcpe_part in vcpe:
+            sriov_path = os.path.dirname(os.path.abspath(__file__)) + "/testdata/vnf/vcpesriov"
+            main_template_path = ("%s/%s/%s" % (sriov_path, vcpe_part, main_template))
+            logger.debug("main_template:%s", main_template_path)
+            vnfd_json = parse_vnfd(main_template_path, input_parameters)
+            metadata = json.loads(vnfd_json).get("metadata")
+            logger.debug("sriov metadata:%s", metadata)
+            self.assertEqual(("vCPE_%s" % vcpe_part), metadata.get("template_name", ""))
+            if vcpe_part == "infra":
+                self.assertEqual("b1bb0ce7-1111-4fa7-95ed-4840d70a1177", json.loads(vnfd_json)["vnf"]["properties"]["descriptor_id"])
 
         dpdk_path = os.path.dirname(os.path.abspath(__file__)) + "/testdata/vnf/vcpedpdk"
-        csar_file = ("%s/%s.csar" % (dpdk_path, vcpe_part))
-        logger.debug("csar_file:%s", csar_file)
-        vnfd_json = parse_vnfd(csar_file, input_parameters)
-        metadata = json.loads(vnfd_json).get("metadata")
-        logger.debug("dpdk metadata:%s", metadata)
-        self.assertEqual(("vCPE_%s" % vcpe_part), metadata.get("template_name", ""))
+        for vcpe_part in vcpe:
+            main_template_path = ("%s/%s/%s" % (dpdk_path, vcpe_part, main_template))
+            logger.debug("main_template_path:%s", main_template_path)
+            vnfd_json = parse_vnfd(main_template_path, input_parameters)
+            metadata = json.loads(vnfd_json).get("metadata")
+            logger.debug("dpdk metadata:%s", metadata)
+            self.assertEqual(("vCPE_%s" % vcpe_part), metadata.get("template_name", ""))
 
     def test_pnfd_parse(self):
         self.remove_temp_dir()
-        csar_path = os.path.dirname(os.path.abspath(__file__)) + "/testdata/pnf/ran-du.csar"
-        pnfd_json = parse_pnfd(csar_path)
+        main_template_path = os.path.dirname(os.path.abspath(__file__)) + "/testdata/pnf/ran-du/ran-du.yaml"
+        pnfd_json = parse_pnfd(main_template_path)
         pnfd_dict = json.loads(pnfd_json)
         metadata = pnfd_dict.get("metadata")
         self.assertEqual("RAN_DU", metadata.get("template_name", ""))
@@ -67,15 +69,15 @@ class TestToscaparser(TestCase):
 
     def test_nsd_parse(self):
         self.remove_temp_dir()
-        # ran_csar = os.path.dirname(os.path.abspath(__file__)) + "/testdata/ns/ran.csar"
-        nsd_json = parse_nsd(ran_csar, [])
-        logger.debug("NS ran json: %s" % nsd_json)
-        metadata = json.loads(nsd_json).get("metadata")
-        self.assertEqual("RAN-NS", metadata.get("nsd_name", ""))
+        ran_csar = os.path.dirname(os.path.abspath(__file__)) + "/testdata/ns/ran/ran-ns.yaml"
+        nsd_json = parse_nsd(ran_csar, [])
+        logger.debug("NS ran json: %s" % nsd_json)
+        metadata = json.loads(nsd_json).get("metadata")
+        self.assertEqual("RAN-NS", metadata.get("nsd_name", ""))
 
     def test_service_descriptor_parse(self):
         self.remove_temp_dir()
-        service_test_csar = os.path.dirname(os.path.abspath(__file__)) + "/testdata/ns/service-vIMS.csar"
+        service_test_csar = os.path.dirname(os.path.abspath(__file__)) + "/testdata/ns/service-vims/Definitions/service-VimsV2-template.yml"
         test_json = parse_nsd(service_test_csar, [])
         logger.debug("service-vIMS json: %s" % test_json)
         metadata = json.loads(test_json).get("metadata")
index 51c9a88..df9d5f0 100644 (file)
@@ -53,8 +53,9 @@ INSTALLED_APPS = [
     'catalog.samples',
     'catalog.swagger',
     'drf_yasg',
+    # 'django_nose'
 ]
-
+# TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
 # drf-yasg
 SWAGGER_SETTINGS = {
     'LOGIN_URL': '/admin/login',
@@ -116,6 +117,12 @@ DATABASES = {
     },
 }
 
+# DATABASES = {}
+# DATABASES['default'] = {
+#     'ENGINE': 'django.db.backends.sqlite3',
+#     'NAME': ':memory:',
+# }
+
 catalog.pub.redisco.connection_setup(host=REDIS_HOST, port=REDIS_PORT, password=REDIS_PASSWD, db=0)
 # CACHE_BACKEND = 'redis_cache.cache://%s@%s:%s' % (REDIS_PASSWD, REDIS_HOST, REDIS_PORT)