From c8a540b3c234449163f6fb1899807bba951113b4 Mon Sep 17 00:00:00 2001 From: shrek2000 Date: Mon, 11 Sep 2017 15:45:37 +0300 Subject: Create new VSP, onboard from TOSCA file - UI Change-Id: I018c6d07a4b9ec7e6b1507ab37e2550865423cfe Issue-ID: SDC-230 Signed-off-by: shrek2000 --- .../converter/impl/ToscaConverterImplTest.java | 193 ++++++++ .../impl/ToscaConvertorDefinitionsTest.java | 62 +++ .../src/test/resources/csar/vCSCF.csar | Bin 0 -> 8186 bytes .../convertMainSt/in/Artifacts/checksum.lst | 1 + .../convertMainSt/in/Artifacts/csar.meta | 3 + .../GlobalSubstitutionTypesServiceTemplate.yaml | 60 +++ .../convertMainSt/in/MainServiceTemplate.mf | 12 + .../convertMainSt/in/MainServiceTemplate.yaml | 551 +++++++++++++++++++++ .../convertMainSt/in/TOSCA-Metadata/TOSCA.meta | 135 +++++ .../convertMainSt/out/MainServiceTemplate.yaml | 546 ++++++++++++++++++++ 10 files changed, 1563 insertions(+) create mode 100644 openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/java/org/openecomp/core/converter/impl/ToscaConverterImplTest.java create mode 100644 openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/java/org/openecomp/core/converter/impl/ToscaConvertorDefinitionsTest.java create mode 100644 openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/csar/vCSCF.csar create mode 100644 openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/Artifacts/checksum.lst create mode 100644 openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/Artifacts/csar.meta create mode 100644 openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/Definitions/GlobalSubstitutionTypesServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/MainServiceTemplate.mf create mode 100644 openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/TOSCA-Metadata/TOSCA.meta create mode 100644 openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/out/MainServiceTemplate.yaml (limited to 'openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test') diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/java/org/openecomp/core/converter/impl/ToscaConverterImplTest.java b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/java/org/openecomp/core/converter/impl/ToscaConverterImplTest.java new file mode 100644 index 0000000000..4abed3e316 --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/java/org/openecomp/core/converter/impl/ToscaConverterImplTest.java @@ -0,0 +1,193 @@ +package org.openecomp.core.converter.impl; + +import org.apache.commons.collections.CollectionUtils; +import org.junit.Test; +import org.openecomp.core.converter.ToscaConverter; +import org.openecomp.core.impl.ToscaConverterImpl; +import org.openecomp.core.utilities.file.FileContentHandler; +import org.openecomp.core.utilities.file.FileUtils; +import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel; +import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate; +import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment; +import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate; +import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil; +import org.openecomp.sdc.tosca.services.YamlUtil; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.nio.file.NotDirectoryException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.ListIterator; +import java.util.Map; +import java.util.Objects; + +import static org.junit.Assert.assertEquals; +import static org.openecomp.core.converter.datatypes.Constants.globalStName; +import static org.openecomp.core.converter.datatypes.Constants.mainStName; + +public class ToscaConverterImplTest { + + private static ToscaConverter toscaConverter = new ToscaConverterImpl(); + private static String inputFilesPath; + private static String outputFilesPath; + private static Map expectedOutserviceTemplates; + + + @Test + public void testConvertMainSt() throws IOException { + inputFilesPath = "/mock/toscaConverter/convertMainSt/in"; + outputFilesPath = "/mock/toscaConverter/convertMainSt/out"; + + FileContentHandler fileContentHandler = + createFileContentHandlerFromInput(inputFilesPath); + + expectedOutserviceTemplates = new HashMap<>(); + loadServiceTemplates(outputFilesPath, new ToscaExtensionYamlUtil(), + expectedOutserviceTemplates); + + ToscaServiceModel toscaServiceModel = toscaConverter.convert(fileContentHandler); + ServiceTemplate mainSt = toscaServiceModel.getServiceTemplates().get(mainStName); + + checkSTResults(expectedOutserviceTemplates, null, mainSt); + } + + + + private FileContentHandler createFileContentHandlerFromInput(String inputFilesPath) + throws IOException { + URL inputFilesUrl = this.getClass().getResource(inputFilesPath); + String path = inputFilesUrl.getPath(); + File directory = new File(path); + File[] listFiles = directory.listFiles(); + + FileContentHandler fileContentHandler = new FileContentHandler(); + insertFilesIntoFileContentHandler(listFiles, fileContentHandler); + return fileContentHandler; + } + + private void insertFilesIntoFileContentHandler(File[] listFiles, + FileContentHandler fileContentHandler) + throws IOException { + byte[] fileContent; + if(CollectionUtils.isEmpty(fileContentHandler.getFileList())) { + fileContentHandler.setFiles(new HashMap<>()); + } + + for (File file : listFiles) { + if(!file.isDirectory()) { + try (FileInputStream fis = new FileInputStream(file)) { + fileContent = FileUtils.toByteArray(fis); + fileContentHandler.addFile(file.getPath(), fileContent); + } + }else{ + File[] currFileList = file.listFiles(); + insertFilesIntoFileContentHandler(currFileList, fileContentHandler); + } + + } + } + + private void checkSTResults( + Map expectedOutserviceTemplates, + ServiceTemplate gloablSubstitutionServiceTemplate, ServiceTemplate mainServiceTemplate) { + YamlUtil yamlUtil = new YamlUtil(); + if (Objects.nonNull(gloablSubstitutionServiceTemplate)) { + assertEquals("difference global substitution service template: ", + yamlUtil.objectToYaml(expectedOutserviceTemplates.get(globalStName)), + yamlUtil.objectToYaml(gloablSubstitutionServiceTemplate)); + } + if (Objects.nonNull(mainServiceTemplate)) { + assertEquals("difference main service template: ", + yamlUtil.objectToYaml(expectedOutserviceTemplates.get(mainStName)), + yamlUtil.objectToYaml(mainServiceTemplate)); + } + } + + public static void loadServiceTemplates(String serviceTemplatesPath, + ToscaExtensionYamlUtil toscaExtensionYamlUtil, + Map serviceTemplates) + throws IOException { + URL urlFile = ToscaConverterImplTest.class.getResource(serviceTemplatesPath); + if (urlFile != null) { + File pathFile = new File(urlFile.getFile()); + File[] files = pathFile.listFiles(); + if (files != null) { + addServiceTemplateFiles(serviceTemplates, files, toscaExtensionYamlUtil); + } else { + throw new NotDirectoryException(serviceTemplatesPath); + } + } else { + throw new NotDirectoryException(serviceTemplatesPath); + } + } + + private static void addServiceTemplateFiles(Map serviceTemplates, + File[] files, + ToscaExtensionYamlUtil toscaExtensionYamlUtil) + throws IOException { + for (File file : files) { + try (InputStream yamlFile = new FileInputStream(file)) { + ServiceTemplate serviceTemplateFromYaml = + toscaExtensionYamlUtil.yamlToObject(yamlFile, ServiceTemplate.class); + createConcreteRequirementObjectsInServiceTemplate(serviceTemplateFromYaml, toscaExtensionYamlUtil); + serviceTemplates.put(file.getName(), serviceTemplateFromYaml); + try { + yamlFile.close(); + } catch (IOException ignore) { + } + } catch (FileNotFoundException e) { + throw e; + } catch (IOException e) { + throw e; + } + } + } + + private static void createConcreteRequirementObjectsInServiceTemplate(ServiceTemplate + serviceTemplateFromYaml, + ToscaExtensionYamlUtil + toscaExtensionYamlUtil) { + + if (serviceTemplateFromYaml == null + || serviceTemplateFromYaml.getTopology_template() == null + || serviceTemplateFromYaml.getTopology_template().getNode_templates() == null) { + return; + } + + //Creating concrete objects + Map nodeTemplates = + serviceTemplateFromYaml.getTopology_template().getNode_templates(); + for (Map.Entry entry : nodeTemplates.entrySet()) { + NodeTemplate nodeTemplate = entry.getValue(); + List> requirements = nodeTemplate.getRequirements(); + List> concreteRequirementList = new ArrayList<>(); + if (requirements != null) { + ListIterator> reqListIterator = requirements + .listIterator(); + while (reqListIterator.hasNext()){ + Map requirement = reqListIterator.next(); + Map concreteRequirement = new HashMap<>(); + for (Map.Entry reqEntry : requirement.entrySet()) { + RequirementAssignment requirementAssignment = (toscaExtensionYamlUtil + .yamlToObject(toscaExtensionYamlUtil.objectToYaml(reqEntry.getValue()), + RequirementAssignment.class)); + concreteRequirement.put(reqEntry.getKey(), requirementAssignment); + concreteRequirementList.add(concreteRequirement); + reqListIterator.remove(); + } + } + requirements.clear(); + requirements.addAll(concreteRequirementList); + nodeTemplate.setRequirements(requirements); + } + System.out.println(); + //toscaExtensionYamlUtil.yamlToObject(nodeTemplate, NodeTemplate.class); + } + } +} diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/java/org/openecomp/core/converter/impl/ToscaConvertorDefinitionsTest.java b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/java/org/openecomp/core/converter/impl/ToscaConvertorDefinitionsTest.java new file mode 100644 index 0000000000..9f7071e9e7 --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/java/org/openecomp/core/converter/impl/ToscaConvertorDefinitionsTest.java @@ -0,0 +1,62 @@ +package org.openecomp.core.converter.impl; + +import org.apache.commons.io.IOUtils; +import org.junit.Test; +import org.openecomp.core.impl.GlobalSubstitutionServiceTemplate; +import org.openecomp.core.impl.ToscaConverterImpl; +import org.openecomp.core.utilities.file.FileContentHandler; +import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum; +import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel; +import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate; + +import java.net.URL; +import java.util.Map; +import java.util.Set; + +import static org.openecomp.sdc.common.utils.CommonUtil.*; +import static org.junit.Assert.*; +import static org.openecomp.core.impl.GlobalSubstitutionServiceTemplate.*; +public class ToscaConvertorDefinitionsTest { + + + @Test + public void loadCsar() throws Exception { + URL resource = ToscaConvertorDefinitionsTest.class.getResource("/csar/vCSCF.csar"); + byte[] bytes = IOUtils.toByteArray(resource); + assertNotNull(bytes); + FileContentHandler contentMap = validateAndUploadFileContent(OnboardingTypesEnum.CSAR, bytes); + ToscaConverterImpl toscaConverter = new ToscaConverterImpl(); + ToscaServiceModel convert = toscaConverter.convert(contentMap); + Map serviceTemplates = convert.getServiceTemplates(); + assertTrue(serviceTemplates.containsKey(GLOBAL_SUBSTITUTION_SERVICE_FILE_NAME)); + ServiceTemplate serviceTemplate = serviceTemplates.get(GLOBAL_SUBSTITUTION_SERVICE_FILE_NAME); + + assertNotNull(serviceTemplate); + assertTrue(serviceTemplate instanceof GlobalSubstitutionServiceTemplate); + + assertNotNull(serviceTemplate.getMetadata()); + assertFalse(serviceTemplate.getMetadata().isEmpty()); + assertTrue(serviceTemplate.getMetadata().containsKey(TEMPLATE_NAME_PROPERTY)); + + assertNotNull(serviceTemplate.getImports()); + assertFalse(serviceTemplate.getImports().isEmpty()); + assertEquals(1 ,serviceTemplate.getImports().size()); + assertTrue(serviceTemplate.getImports().get(0).containsKey(HEAT_INDEX)); + + assertEquals(DEFININTION_VERSION, serviceTemplate.getTosca_definitions_version()); + + + assertNotNull(serviceTemplate.getNode_types()); + assertEquals(7, serviceTemplate.getNode_types().size()); + Set keys = serviceTemplate.getNode_types().keySet(); + assertTrue(keys.contains("tosca.nodes.nfv.ext.zte.VDU")); + assertTrue(keys.contains("tosca.nodes.nfv.ext.zte.CP")); + assertTrue(keys.contains("tosca.nodes.nfv.ext.zte.VNF.vCSCF")); + assertTrue(keys.contains("tosca.nodes.nfv.ext.ImageFile")); + assertTrue(keys.contains("tosca.nodes.nfv.ext.LocalStorage")); + assertTrue(keys.contains("tosca.nodes.nfv.ext.zte.VNF")); + assertTrue(keys.contains("tosca.nodes.nfv.ext.zte.VL")); + } + + +} diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/csar/vCSCF.csar b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/csar/vCSCF.csar new file mode 100644 index 0000000000..f1b77554e4 Binary files /dev/null and b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/csar/vCSCF.csar differ diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/Artifacts/checksum.lst b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/Artifacts/checksum.lst new file mode 100644 index 0000000000..701f14d45d --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/Artifacts/checksum.lst @@ -0,0 +1 @@ +Definitions/openovnf__vPCRF.yaml:75bd8963ecc09bf769d0bb5cb475314d diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/Artifacts/csar.meta b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/Artifacts/csar.meta new file mode 100644 index 0000000000..aac2fed3c3 --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/Artifacts/csar.meta @@ -0,0 +1,3 @@ +Type:NFAR +Version:v1.0 +Provider:Huawei \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/Definitions/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/Definitions/GlobalSubstitutionTypesServiceTemplate.yaml new file mode 100644 index 0000000000..a88171701e --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/Definitions/GlobalSubstitutionTypesServiceTemplate.yaml @@ -0,0 +1,60 @@ +node_types: + tosca.nodes.nfv.VDU.Compute: + attributes: + private_address: + type: string + public_address: + type: string + networks: + type: string + ports: + type: string + capabilities: + scalable: + type: tosca.capabilities.Scalable + virtual_compute: + type: tosca.capabilities.nfv.VirtualCompute + endpoint: + type: tosca.capabilities.Endpoint.Admin + os: + type: tosca.capabilities.OperatingSystem + virtual_binding: + type: tosca.capabilities.nfv.VirtualBindable + host: + type: tosca.capabilities.Container + binding: + type: tosca.capabilities.network.Bindable + monitoring_parameter: + type: tosca.capabilities.nfv.Metric + derived_from: tosca.nodes.Root + properties: + configurable_properties: + entry_schema: + type: tosca.datatypes.nfv.VnfcConfigurableProperties + type: map + name: + type: string + nfvi_constraints: + entry_schema: + type: string + required: false + type: list + descrption: + type: string + boot_order: + entry_schema: + type: string + required: false + type: list + requirements: + - local_storage: + capability: tosca.capabilities.Attachment + occurrences: + - 0 + - UNBOUNDED + - virtual_storage: + capability: tosca.capabilities.nfv.VirtualStorage + occurrences: + - 0 + - UNBOUNDED +tosca_definitions_version: tosca_simple_yaml_1_0 diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/MainServiceTemplate.mf b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/MainServiceTemplate.mf new file mode 100644 index 0000000000..e45f002332 --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/MainServiceTemplate.mf @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 + +Name: Entry-Definitions +Name: MainServiceTemplate.yaml + +Name: Definitions\GlobalSubstitutionTypesServiceTemplate.yaml + +Name: Artifacts\install.sh + +Name: Artifacts\create_stack.sh + +Name: Licenses\license.xml diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/MainServiceTemplate.yaml new file mode 100644 index 0000000000..041afbacf8 --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/MainServiceTemplate.yaml @@ -0,0 +1,551 @@ +imports: +- openovnf__tosca.nodes.nfv.VNF.vPCRF.yaml +- openonfv__tosca.capabilities.Scalable.yaml +- openonfv__tosca.capabilities.nfv.Metric.yaml +- openonfv__tosca.nodes.nfv.VnfVirtualLinkDesc.yaml +- openonfv__tosca.capabilities.network.Bindable.yaml +- openonfv__tosca.capabilities.Attachment.yaml +- openonfv__tosca.capabilities.nfv.VirtualBindable.yaml +- openonfv__tosca.capabilities.nfv.VirtualLinkable.yaml +- openonfv__tosca.requirements.nfv.VirtualStorage.yaml +- openonfv__tosca.nodes.nfv.VDU.VirtualStorage.yaml +- openonfv__tosca.relationships.nfv.VirtualBindsTo.yaml +- openonfv__tosca.nodes.nfv.VDU.Compute.yaml +- openonfv__tosca.relationships.nfv.VirtualLinksTo.yaml +- openonfv__tosca.capabilities.nfv.VirtualCompute.yaml +- openonfv__tosca.capabilities.Container.yaml +- openonfv__tosca.capabilities.nfv.VirtualStorage.yaml +- openonfv__tosca.requirements.nfv.VirtualBinding.yaml +- openonfv__tosca.capabilities.Endpoint.Admin.yaml +- openonfv__tosca.capabilities.OperatingSystem.yaml +- openonfv__tosca.nodes.nfv.VduCpd.yaml +- openonfv__tosca.relationships.nfv.VDU.AttachedTo.yaml + +metadata: + vendor: Huawei + csarVersion: v1.0 + csarProvider: Huawei + id: vPCRF_NF_HW + version: v1.0 + csarType: NFAR + name: vPCRF + vnfdVersion: v1.0 + vnfmType: hwvnfm + +node_types: + org.openecomp.resource.vfc.nodes.heat.nat_fw: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server + +topology_template: + node_templates: + PUPDU_Storage: + attributes: + tosca_name: PUPDU_Storage + properties: + id: PUPDU_Storage + size_of_storage: 200G + type_of_storage: volume + type: tosca.nodes.nfv.VDU.VirtualStorage + USRSU: + attributes: + tosca_name: USRSU + capabilities: + virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 24G + requested_additional_capabilities: {} + virtual_cpu: + num_virtual_cpu: 4 + properties: + configurable_properties: + test: {"additional_vnfc_configurable_properties":{"aaa":"1"}} + name: USRSU + descrption: the virtual machine of USRSU + requirements: + - virtual_storage: + capability: virtual_storage + node: USRSU_Storage + - local_storage: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VDU.Compute + USPID3_VduCpd_Fabric: + attributes: + tosca_name: USPID3_VduCpd_Fabric + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: USPID3 + - virtual_link: + capability: virtual_linkable + node: Fabric + type: tosca.nodes.nfv.VduCpd + PUPDU_VduCpd_Base: + attributes: + tosca_name: PUPDU_VduCpd_Base + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: PUPDU + - virtual_link: + capability: virtual_linkable + node: Base + type: tosca.nodes.nfv.VduCpd + OMU_VduCpd_Fabric: + attributes: + tosca_name: OMU_VduCpd_Fabric + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: OMU + - virtual_link: + capability: virtual_linkable + node: Fabric + type: tosca.nodes.nfv.VduCpd + USPID3: + attributes: + tosca_name: USPID3 + capabilities: + virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 24G + requested_additional_capabilities: {} + virtual_cpu: + num_virtual_cpu: 4 + properties: + configurable_properties: + test: {"additional_vnfc_configurable_properties":{"aaa":"1"}} + name: USPID3 + descrption: the virtual machine of USPID3 + requirements: + - virtual_storage: + capability: virtual_storage + node: USPID3_Storage + - local_storage: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VDU.Compute + UPIRU_VduCpd_Base: + attributes: + tosca_name: UPIRU_VduCpd_Base + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: UPIRU + - virtual_link: + capability: virtual_linkable + node: Base + type: tosca.nodes.nfv.VduCpd + OMU2ManageNet: + attributes: + tosca_name: OMU2ManageNet + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + node: tosca.nodes.Root + - virtual_link: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VduCpd + OMU_Storage: + attributes: + tosca_name: OMU_Storage + properties: + id: OMU_Storage + size_of_storage: 256G + rdma_enabled: false + type_of_storage: volume + type: tosca.nodes.nfv.VDU.VirtualStorage + UPSPU: + attributes: + tosca_name: UPSPU + capabilities: + virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 24G + requested_additional_capabilities: {} + virtual_cpu: + num_virtual_cpu: 4 + properties: + configurable_properties: + test: {"additional_vnfc_configurable_properties":{"aaa":"1"}} + name: UPSPU + descrption: the virtual machine of UPSPU + requirements: + - virtual_storage: + capability: virtual_storage + node: UPSPU_Storage + - local_storage: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VDU.Compute + PUPDU_VduCpd_Fabric: + attributes: + tosca_name: PUPDU_VduCpd_Fabric + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: PUPDU + - virtual_link: + capability: virtual_linkable + node: Fabric + type: tosca.nodes.nfv.VduCpd + USPID2BossNet: + attributes: + tosca_name: USPID2BossNet + properties: + role: root + layer_protocol: ethernet + requirements: + - virtual_binding: + capability: virtual_binding + node: USPID3 + - virtual_link: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VduCpd + OMU_VduCpd_Base: + attributes: + tosca_name: OMU_VduCpd_Base + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: OMU + - virtual_link: + capability: virtual_linkable + node: Base + type: tosca.nodes.nfv.VduCpd + USPID3_Storage: + attributes: + tosca_name: USPID3_Storage + properties: + id: USPID3_Storage + size_of_storage: 300G + type_of_storage: volume + type: tosca.nodes.nfv.VDU.VirtualStorage + UPIRU2DataNet2: + attributes: + tosca_name: UPIRU2DataNet2 + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: UPIRU + - virtual_link: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VduCpd + USPID2ManageNet: + attributes: + tosca_name: USPID2ManageNet + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: USPID3 + - virtual_link: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VduCpd + UPIRU2DataNet3: + attributes: + tosca_name: UPIRU2DataNet3 + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: UPIRU + - virtual_link: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VduCpd + PUPDU2DataNet3: + attributes: + tosca_name: PUPDU2DataNet3 + properties: + role: root + layer_protocol: ethernet + requirements: + - virtual_binding: + capability: virtual_binding + node: PUPDU + - virtual_link: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VduCpd + USRSU2DataNet1: + attributes: + tosca_name: USRSU2DataNet1 + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: USRSU + - virtual_link: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VduCpd + USRSU2DataNet2: + attributes: + tosca_name: USRSU2DataNet2 + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: USRSU + - virtual_link: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VduCpd + UPIRU_Storage: + attributes: + tosca_name: UPIRU_Storage + properties: + id: UPIRU_Storage + size_of_storage: 4G + type_of_storage: volume + type: tosca.nodes.nfv.VDU.VirtualStorage + PUPDU2SignalNet1: + attributes: + tosca_name: PUPDU2SignalNet1 + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: PUPDU + - virtual_link: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VduCpd + UPIRU2DataNet1: + attributes: + tosca_name: UPIRU2DataNet1 + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: UPIRU + - virtual_link: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VduCpd + USPID3_VduCpd_Base: + attributes: + tosca_name: USPID3_VduCpd_Base + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: USPID3 + - virtual_link: + capability: virtual_linkable + node: Base + type: tosca.nodes.nfv.VduCpd + Base: + attributes: + tosca_name: Base + properties: + vl_flavours: + flavours: test2 + connectivity_type: + layer_protocol: ipv4 + flow_pattern: + type: tosca.nodes.nfv.VnfVirtualLinkDesc + USRSU_Storage: + attributes: + tosca_name: USRSU_Storage + properties: + id: USRSU_Storage + size_of_storage: 200G + type_of_storage: volume + type: tosca.nodes.nfv.VDU.VirtualStorage + UPSPU_VduCpd_Base: + attributes: + tosca_name: UPSPU_VduCpd_Base + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: UPSPU + - virtual_link: + capability: virtual_linkable + node: Base + type: tosca.nodes.nfv.VduCpd + PUPDU: + attributes: + tosca_name: PUPDU + capabilities: + virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 24G + requested_additional_capabilities: {} + virtual_cpu: + num_virtual_cpu: 4 + properties: + configurable_properties: + test: {"additional_vnfc_configurable_properties":{"aaa":"1"}} + name: PUPDU + descrption: the virtual machine of PUPDU + requirements: + - virtual_storage: + capability: virtual_storage + node: PUPDU_Storage + - local_storage: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VDU.Compute + USRSU_VduCpd_Base: + attributes: + tosca_name: USRSU_VduCpd_Base + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: USRSU + - virtual_link: + capability: virtual_linkable + node: Base + type: tosca.nodes.nfv.VduCpd + OMU: + attributes: + tosca_name: OMU + capabilities: + virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 16G + requested_additional_capabilities: {} + virtual_cpu: + num_virtual_cpu: 4 + 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 + - local_storage: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VDU.Compute + UPIRU_VduCpd_Fabric: + attributes: + tosca_name: UPIRU_VduCpd_Fabric + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: UPIRU + - virtual_link: + capability: virtual_linkable + node: Fabric + type: tosca.nodes.nfv.VduCpd + UPSPU_Storage: + attributes: + tosca_name: UPSPU_Storage + properties: + id: UPSPU_Storage + size_of_storage: 4G + type_of_storage: volume + type: tosca.nodes.nfv.VDU.VirtualStorage + PUPDU2ManageNet: + attributes: + tosca_name: PUPDU2ManageNet + properties: + role: root + layer_protocol: ethernet + requirements: + - virtual_binding: + capability: virtual_binding + node: PUPDU + - virtual_link: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VduCpd + USRSU_VduCpd_Fabric: + attributes: + tosca_name: USRSU_VduCpd_Fabric + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: USRSU + - virtual_link: + capability: virtual_linkable + node: Fabric + type: tosca.nodes.nfv.VduCpd + UPIRU2SignalNet1: + attributes: + tosca_name: UPIRU2SignalNet1 + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: UPIRU + - virtual_link: + node: tosca.nodes.Root + type: tosca.nodes.nfv.VduCpd + Fabric: + attributes: + tosca_name: Fabric + properties: + vl_flavours: + flavours: test1 + connectivity_type: + layer_protocol: ipv4 + flow_pattern: + type: tosca.nodes.nfv.VnfVirtualLinkDesc + UPSPU_VduCpd_Fabric: + attributes: + tosca_name: UPSPU_VduCpd_Fabric + properties: + role: root + layer_protocol: ipv4 + requirements: + - virtual_binding: + capability: virtual_binding + node: UPSPU + - virtual_link: + capability: virtual_linkable + node: Fabric + type: tosca.nodes.nfv.VduCpd + + substitution_mappings: + node_type: tosca.nodes.nfv.VNF.vPCRF +tosca_definitions_version: tosca_simple_yaml_1_0 \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/TOSCA-Metadata/TOSCA.meta b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/TOSCA-Metadata/TOSCA.meta new file mode 100644 index 0000000000..69f62ca864 --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/in/TOSCA-Metadata/TOSCA.meta @@ -0,0 +1,135 @@ +TOSCA-Meta-Version: 1.0 +CSAR-Version: 1.0 +Created-By: Winery 0.1.37-SNAPSHOT +Entry-Definitions: Definitions/openovnf__vPCRF.yaml + +Name: Definitions/openovnf__vPCRF.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openovnf__tosca.nodes.nfv.VNF.vPCRF.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.capabilities.Scalable.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.capabilities.nfv.Metric.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.nodes.nfv.VnfVirtualLinkDesc.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.capabilities.network.Bindable.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.capabilities.Attachment.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.capabilities.nfv.VirtualBindable.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.capabilities.nfv.VirtualLinkable.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.requirements.nfv.VirtualStorage.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.nodes.nfv.VDU.VirtualStorage.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.relationships.nfv.VirtualBindsTo.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.nodes.nfv.VDU.Compute.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.relationships.nfv.VirtualLinksTo.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.capabilities.nfv.VirtualCompute.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.capabilities.Container.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.capabilities.nfv.VirtualStorage.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.requirements.nfv.VirtualBinding.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.capabilities.Endpoint.Admin.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.capabilities.OperatingSystem.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.nodes.nfv.VduCpd.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.relationships.nfv.VDU.AttachedTo.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openonfv__tosca.requirements.nfv.VirtualLink.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: Definitions/openovnf__tosca.nodes.nfv.VNF.yaml +Content-Type: application/vnd.oasis.tosca.definitions + +Name: nodetypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.nodes.nfv.VDU.VirtualStorage/propertiesdefinition/Properties.xsd +Content-Type: text/xml + +Name: nodetypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.nodes.nfv.VnfVirtualLinkDesc/appearance/bigIcon.png +Content-Type: image/png + +Name: nodetypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.nodes.nfv.VnfVirtualLinkDesc/appearance/smallIcon.png +Content-Type: image/png + +Name: nodetypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.nodes.nfv.VDU.Compute/propertiesdefinition/Properties.xsd +Content-Type: text/xml + +Name: nodetypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.nodes.nfv.VduCpd/propertiesdefinition/Properties.xsd +Content-Type: text/xml + +Name: capabilitytypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.capabilities.nfv.VirtualCompute/propertiesdefinition/Properties.xsd +Content-Type: text/xml + +Name: nodetypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv%2Fvnf/tosca.nodes.nfv.VNF/propertiesdefinition/Properties.xsd +Content-Type: text/xml + +Name: nodetypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.nodes.nfv.VDU.VirtualStorage/appearance/bigIcon.png +Content-Type: image/png + +Name: nodetypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.nodes.nfv.VDU.VirtualStorage/appearance/smallIcon.png +Content-Type: image/png + +Name: capabilitytypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.capabilities.Container/propertiesdefinition/Properties.xsd +Content-Type: text/xml + +Name: nodetypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.nodes.nfv.VDU.Compute/appearance/bigIcon.png +Content-Type: image/png + +Name: nodetypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.nodes.nfv.VDU.Compute/appearance/smallIcon.png +Content-Type: image/png + +Name: nodetypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv%2Fvnf/tosca.nodes.nfv.VNF.vPCRF/propertiesdefinition/Properties.xsd +Content-Type: text/xml + +Name: capabilitytypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.capabilities.OperatingSystem/propertiesdefinition/Properties.xsd +Content-Type: text/xml + +Name: nodetypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.nodes.nfv.VnfVirtualLinkDesc/propertiesdefinition/Properties.xsd +Content-Type: text/xml + +Name: nodetypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.nodes.nfv.VduCpd/appearance/bigIcon.png +Content-Type: image/png + +Name: nodetypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.nodes.nfv.VduCpd/appearance/smallIcon.png +Content-Type: image/png + +Name: capabilitytypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.capabilities.Scalable/propertiesdefinition/Properties.xsd +Content-Type: text/xml + +Name: relationshiptypes/http%3A%2F%2Fwww.open-o.org%2Ftosca%2Fnfv/tosca.relationships.nfv.VDU.AttachedTo/propertiesdefinition/Properties.xsd +Content-Type: text/xml + + diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/out/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/out/MainServiceTemplate.yaml new file mode 100644 index 0000000000..77bfcac710 --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/mock/toscaConverter/convertMainSt/out/MainServiceTemplate.yaml @@ -0,0 +1,546 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 +metadata: + vnfdVersion: v1.0 + template_name: Main + vendor: Huawei + csarVersion: v1.0 + vnfmType: hwvnfm + csarProvider: Huawei + name: vPCRF + id: vPCRF_NF_HW + version: v1.0 + csarType: NFAR +imports: +- openecomp_heat_index: + file: openecomp-heat/_index.yml +- GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.nat_fw: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + node_templates: + PUPDU_Storage: + type: tosca.nodes.nfv.VDU.VirtualStorage + properties: + id: PUPDU_Storage + size_of_storage: 200G + type_of_storage: volume + attributes: + tosca_name: PUPDU_Storage + USRSU: + type: tosca.nodes.nfv.VDU.Compute + properties: + configurable_properties: + test: + additional_vnfc_configurable_properties: + aaa: '1' + name: USRSU + descrption: the virtual machine of USRSU + attributes: + tosca_name: USRSU + requirements: + - virtual_storage: + capability: virtual_storage + node: USRSU_Storage + - local_storage: + node: tosca.nodes.Root + capabilities: + - virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 24G + requested_additional_capabilities: { + } + virtual_cpu: + num_virtual_cpu: 4.0 + USPID3_VduCpd_Fabric: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: USPID3_VduCpd_Fabric + requirements: + - virtual_binding: + capability: virtual_binding + node: USPID3 + - virtual_link: + capability: virtual_linkable + node: Fabric + PUPDU_VduCpd_Base: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: PUPDU_VduCpd_Base + requirements: + - virtual_binding: + capability: virtual_binding + node: PUPDU + - virtual_link: + capability: virtual_linkable + node: Base + OMU_VduCpd_Fabric: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: OMU_VduCpd_Fabric + requirements: + - virtual_binding: + capability: virtual_binding + node: OMU + - virtual_link: + capability: virtual_linkable + node: Fabric + USPID3: + type: tosca.nodes.nfv.VDU.Compute + properties: + configurable_properties: + test: + additional_vnfc_configurable_properties: + aaa: '1' + name: USPID3 + descrption: the virtual machine of USPID3 + attributes: + tosca_name: USPID3 + requirements: + - virtual_storage: + capability: virtual_storage + node: USPID3_Storage + - local_storage: + node: tosca.nodes.Root + capabilities: + - virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 24G + requested_additional_capabilities: { + } + virtual_cpu: + num_virtual_cpu: 4.0 + UPIRU_VduCpd_Base: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: UPIRU_VduCpd_Base + requirements: + - virtual_binding: + capability: virtual_binding + node: UPIRU + - virtual_link: + capability: virtual_linkable + node: Base + OMU2ManageNet: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: OMU2ManageNet + requirements: + - virtual_binding: + node: tosca.nodes.Root + - virtual_link: + node: tosca.nodes.Root + OMU_Storage: + type: tosca.nodes.nfv.VDU.VirtualStorage + properties: + id: OMU_Storage + size_of_storage: 256G + rdma_enabled: false + type_of_storage: volume + attributes: + tosca_name: OMU_Storage + UPSPU: + type: tosca.nodes.nfv.VDU.Compute + properties: + configurable_properties: + test: + additional_vnfc_configurable_properties: + aaa: '1' + name: UPSPU + descrption: the virtual machine of UPSPU + attributes: + tosca_name: UPSPU + requirements: + - virtual_storage: + capability: virtual_storage + node: UPSPU_Storage + - local_storage: + node: tosca.nodes.Root + capabilities: + - virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 24G + requested_additional_capabilities: { + } + virtual_cpu: + num_virtual_cpu: 4.0 + PUPDU_VduCpd_Fabric: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: PUPDU_VduCpd_Fabric + requirements: + - virtual_binding: + capability: virtual_binding + node: PUPDU + - virtual_link: + capability: virtual_linkable + node: Fabric + USPID2BossNet: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ethernet + attributes: + tosca_name: USPID2BossNet + requirements: + - virtual_binding: + capability: virtual_binding + node: USPID3 + - virtual_link: + node: tosca.nodes.Root + OMU_VduCpd_Base: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: OMU_VduCpd_Base + requirements: + - virtual_binding: + capability: virtual_binding + node: OMU + - virtual_link: + capability: virtual_linkable + node: Base + USPID3_Storage: + type: tosca.nodes.nfv.VDU.VirtualStorage + properties: + id: USPID3_Storage + size_of_storage: 300G + type_of_storage: volume + attributes: + tosca_name: USPID3_Storage + UPIRU2DataNet2: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: UPIRU2DataNet2 + requirements: + - virtual_binding: + capability: virtual_binding + node: UPIRU + - virtual_link: + node: tosca.nodes.Root + USPID2ManageNet: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: USPID2ManageNet + requirements: + - virtual_binding: + capability: virtual_binding + node: USPID3 + - virtual_link: + node: tosca.nodes.Root + UPIRU2DataNet3: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: UPIRU2DataNet3 + requirements: + - virtual_binding: + capability: virtual_binding + node: UPIRU + - virtual_link: + node: tosca.nodes.Root + PUPDU2DataNet3: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ethernet + attributes: + tosca_name: PUPDU2DataNet3 + requirements: + - virtual_binding: + capability: virtual_binding + node: PUPDU + - virtual_link: + node: tosca.nodes.Root + USRSU2DataNet1: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: USRSU2DataNet1 + requirements: + - virtual_binding: + capability: virtual_binding + node: USRSU + - virtual_link: + node: tosca.nodes.Root + USRSU2DataNet2: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: USRSU2DataNet2 + requirements: + - virtual_binding: + capability: virtual_binding + node: USRSU + - virtual_link: + node: tosca.nodes.Root + UPIRU_Storage: + type: tosca.nodes.nfv.VDU.VirtualStorage + properties: + id: UPIRU_Storage + size_of_storage: 4G + type_of_storage: volume + attributes: + tosca_name: UPIRU_Storage + PUPDU2SignalNet1: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: PUPDU2SignalNet1 + requirements: + - virtual_binding: + capability: virtual_binding + node: PUPDU + - virtual_link: + node: tosca.nodes.Root + UPIRU2DataNet1: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: UPIRU2DataNet1 + requirements: + - virtual_binding: + capability: virtual_binding + node: UPIRU + - virtual_link: + node: tosca.nodes.Root + USPID3_VduCpd_Base: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: USPID3_VduCpd_Base + requirements: + - virtual_binding: + capability: virtual_binding + node: USPID3 + - virtual_link: + capability: virtual_linkable + node: Base + Base: + type: tosca.nodes.nfv.VnfVirtualLinkDesc + properties: + vl_flavours: + flavours: test2 + connectivity_type: + layer_protocol: ipv4 + flow_pattern: null + attributes: + tosca_name: Base + USRSU_Storage: + type: tosca.nodes.nfv.VDU.VirtualStorage + properties: + id: USRSU_Storage + size_of_storage: 200G + type_of_storage: volume + attributes: + tosca_name: USRSU_Storage + UPSPU_VduCpd_Base: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: UPSPU_VduCpd_Base + requirements: + - virtual_binding: + capability: virtual_binding + node: UPSPU + - virtual_link: + capability: virtual_linkable + node: Base + PUPDU: + type: tosca.nodes.nfv.VDU.Compute + properties: + configurable_properties: + test: + additional_vnfc_configurable_properties: + aaa: '1' + name: PUPDU + descrption: the virtual machine of PUPDU + attributes: + tosca_name: PUPDU + requirements: + - virtual_storage: + capability: virtual_storage + node: PUPDU_Storage + - local_storage: + node: tosca.nodes.Root + capabilities: + - virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 24G + requested_additional_capabilities: { + } + virtual_cpu: + num_virtual_cpu: 4.0 + USRSU_VduCpd_Base: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: USRSU_VduCpd_Base + requirements: + - virtual_binding: + capability: virtual_binding + node: USRSU + - virtual_link: + capability: virtual_linkable + node: Base + OMU: + type: tosca.nodes.nfv.VDU.Compute + properties: + configurable_properties: + test: + additional_vnfc_configurable_properties: + aaa: '1' + name: OMU + descrption: the virtual machine of OMU + attributes: + tosca_name: OMU + requirements: + - virtual_storage: + capability: virtual_storage + node: OMU_Storage + - local_storage: + node: tosca.nodes.Root + capabilities: + - virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 16G + requested_additional_capabilities: { + } + virtual_cpu: + num_virtual_cpu: 4.0 + UPIRU_VduCpd_Fabric: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: UPIRU_VduCpd_Fabric + requirements: + - virtual_binding: + capability: virtual_binding + node: UPIRU + - virtual_link: + capability: virtual_linkable + node: Fabric + UPSPU_Storage: + type: tosca.nodes.nfv.VDU.VirtualStorage + properties: + id: UPSPU_Storage + size_of_storage: 4G + type_of_storage: volume + attributes: + tosca_name: UPSPU_Storage + PUPDU2ManageNet: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ethernet + attributes: + tosca_name: PUPDU2ManageNet + requirements: + - virtual_binding: + capability: virtual_binding + node: PUPDU + - virtual_link: + node: tosca.nodes.Root + USRSU_VduCpd_Fabric: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: USRSU_VduCpd_Fabric + requirements: + - virtual_binding: + capability: virtual_binding + node: USRSU + - virtual_link: + capability: virtual_linkable + node: Fabric + UPIRU2SignalNet1: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: UPIRU2SignalNet1 + requirements: + - virtual_binding: + capability: virtual_binding + node: UPIRU + - virtual_link: + node: tosca.nodes.Root + Fabric: + type: tosca.nodes.nfv.VnfVirtualLinkDesc + properties: + vl_flavours: + flavours: test1 + connectivity_type: + layer_protocol: ipv4 + flow_pattern: null + attributes: + tosca_name: Fabric + UPSPU_VduCpd_Fabric: + type: tosca.nodes.nfv.VduCpd + properties: + role: root + layer_protocol: ipv4 + attributes: + tosca_name: UPSPU_VduCpd_Fabric + requirements: + - virtual_binding: + capability: virtual_binding + node: UPSPU + - virtual_link: + capability: virtual_linkable + node: Fabric + substitution_mappings: + node_type: tosca.nodes.nfv.VNF.vPCRF -- cgit 1.2.3-korg