summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/resources
diff options
context:
space:
mode:
authorsuzhenyu <zysuh@isoftstone.com>2021-01-07 18:45:49 +0800
committerChristophe Closset <christophe.closset@intl.att.com>2021-03-04 11:11:12 +0000
commitcc1258877c40690c43349351b4e6bdd5aa278553 (patch)
tree23820cbbc748891090fde704f7950ce821378dcb /catalog-be/src/test/resources
parent8dd06f6137371e90664fdc89d491f6cf66f5c308 (diff)
Add test code for Test Topology Auto Design
Issue-ID: SDC-3297 Change-Id: I63013b88ceeed52938fa206de25c3ba5e58d7daa Signed-off-by: suzhenyu <zysuh@isoftstone.com>
Diffstat (limited to 'catalog-be/src/test/resources')
-rw-r--r--catalog-be/src/test/resources/types/artifacts.yml36
-rw-r--r--catalog-be/src/test/resources/types/fileContent.yml131
-rw-r--r--catalog-be/src/test/resources/types/groups.yml40
-rw-r--r--catalog-be/src/test/resources/types/mainTemplateContent.yml332
4 files changed, 539 insertions, 0 deletions
diff --git a/catalog-be/src/test/resources/types/artifacts.yml b/catalog-be/src/test/resources/types/artifacts.yml
new file mode 100644
index 0000000000..b6b7911e4a
--- /dev/null
+++ b/catalog-be/src/test/resources/types/artifacts.yml
@@ -0,0 +1,36 @@
+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).
+ 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
diff --git a/catalog-be/src/test/resources/types/fileContent.yml b/catalog-be/src/test/resources/types/fileContent.yml
new file mode 100644
index 0000000000..d12d3968d6
--- /dev/null
+++ b/catalog-be/src/test/resources/types/fileContent.yml
@@ -0,0 +1,131 @@
+ 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
+ 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 \ No newline at end of file
diff --git a/catalog-be/src/test/resources/types/groups.yml b/catalog-be/src/test/resources/types/groups.yml
new file mode 100644
index 0000000000..d7ec9c259f
--- /dev/null
+++ b/catalog-be/src/test/resources/types/groups.yml
@@ -0,0 +1,40 @@
+zxjTestImportServiceAb 0:
+ type: org.openecomp.resource.vf.Zxjtestimportserviceab
+ metadata:
+ invariantUUID: 41474f7f-3195-443d-a0a2-eb6020a56279
+ UUID: 92e32e49-55f8-46bf-984d-a98c924037ec
+ customizationUUID: 40286158-96d0-408e-9f27-21d43817d37c
+ version: '1.0'
+ name: zxjTestImportServiceAb
+ description: zxjTestImportServiceAbstract
+ type: VF
+ category: Generic
+ subcategory: Abstract
+ resourceVendor: zxjImportService
+ resourceVendorRelease: '1.0'
+ resourceVendorModelNumber: ''
+ properties:
+ skip_post_instantiation_configuration: true
+ nf_naming:
+ ecomp_generated_naming: true
+ multi_stage_design: 'false'
+ controller_actor: SO-REF-DATA
+ availability_zone_max_count: 1
+ requirements:
+ - imagefile.dependency:
+ capability: feature
+ node: ext ZTE VL 0
+ - mme_ipu_vdu.dependency:
+ capability: feature
+ node: ExtCP 0
+ capabilities:
+ mme_ipu_vdu.scalable:
+ properties:
+ max_instances: 1
+ min_instances: 1
+ mme_ipu_vdu.nfv_compute:
+ properties:
+ num_cpus: '2'
+ flavor_extra_specs: {
+ }
+ mem_size: '8192' \ No newline at end of file
diff --git a/catalog-be/src/test/resources/types/mainTemplateContent.yml b/catalog-be/src/test/resources/types/mainTemplateContent.yml
new file mode 100644
index 0000000000..635547f1d8
--- /dev/null
+++ b/catalog-be/src/test/resources/types/mainTemplateContent.yml
@@ -0,0 +1,332 @@
+ tosca_definitions_version: tosca_simple_yaml_1_1
+ metadata:
+ invariantUUID: 6d17f281-683b-4198-a676-0faeecdc9025
+ UUID: bfeab6b4-199b-4a2b-b724-de416c5e9811
+ name: ser09080002
+ description: ser09080002
+ type: Service
+ category: E2E Service
+ serviceType: ''
+ serviceRole: ''
+ instantiationType: A-la-carte
+ serviceEcompNaming: true
+ ecompGeneratedNaming: true
+ namingPolicy: ''
+ environmentContext: General_Revenue-Bearing
+ serviceFunction: ''
+ 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
+ - annotations:
+ file: annotations.yml
+ - service-ser09080002-interface:
+ file: service-Ser09080002-template-interface.yml
+ - resource-ExtCP:
+ file: resource-Extcp-template.yml
+ - resource-zxjTestImportServiceAb:
+ file: resource-Zxjtestimportserviceab-template.yml
+ - resource-zxjTestImportServiceAb-interface:
+ file: resource-Zxjtestimportserviceab-template-interface.yml
+ - resource-zxjTestServiceNotAbatract:
+ file: resource-Zxjtestservicenotabatract-template.yml
+ - resource-zxjTestServiceNotAbatract-interface:
+ file: resource-Zxjtestservicenotabatract-template-interface.yml
+ - resource-ext ZTE VL:
+ file: resource-ExtZteVl-template.yml
+ topology_template:
+ inputs:
+ skip_post_instantiation_configuration:
+ default: true
+ type: boolean
+ required: false
+ controller_actor:
+ default: SO-REF-DATA
+ type: string
+ required: false
+ cds_model_version:
+ type: string
+ required: false
+ cds_model_name:
+ type: string
+ required: false
+ node_templates:
+ ext ZTE VL 0:
+ type: tosca.nodes.nfv.ext.zte.VL
+ metadata:
+ invariantUUID: 27ab7610-1a97-4daa-938a-3b48e7afcfd0
+ UUID: 9ea63e2c-4b8a-414f-93e3-5703ca5cee0d
+ customizationUUID: e45e79b0-07ab-46b4-ac26-1e9f155ce53c
+ version: '1.0'
+ name: ext ZTE VL
+ description: Ext ZTE VL
+ type: VL
+ category: Generic
+ subcategory: Network Elements
+ resourceVendor: ONAP (Tosca)
+ resourceVendorRelease: 1.0.0.wd03
+ resourceVendorModelNumber: ''
+ zxjTestServiceNotAbatract 0:
+ type: org.openecomp.resource.vf.Zxjtestservicenotabatract
+ metadata:
+ invariantUUID: ce39ce8d-6f97-4e89-8555-ae6789cdcf1c
+ UUID: 4ac822be-f1ae-4ace-a4b8-bf6b5d977005
+ customizationUUID: ee34e1e8-68e2-480f-8ba6-f257bbe90d6a
+ version: '1.0'
+ name: zxjTestServiceNotAbatract
+ description: zxjTestServiceNotAbatract
+ type: VF
+ category: Network L4
+ subcategory: Common Network Resources
+ resourceVendor: zxjImportService
+ resourceVendorRelease: '1.0'
+ resourceVendorModelNumber: ''
+ properties:
+ nf_naming:
+ ecomp_generated_naming: true
+ skip_post_instantiation_configuration: true
+ multi_stage_design: 'false'
+ controller_actor: SO-REF-DATA
+ availability_zone_max_count: 1
+ capabilities:
+ mme_ipu_vdu.scalable:
+ properties:
+ max_instances: 1
+ min_instances: 1
+ mme_ipu_vdu.nfv_compute:
+ properties:
+ num_cpus: '2'
+ flavor_extra_specs: {}
+ mem_size: '8192'
+ ExtCP 0:
+ type: org.openecomp.resource.cp.extCP
+ metadata:
+ invariantUUID: 9b772728-93f5-424f-bb07-f4cae2783614
+ UUID: 424ac220-4864-453e-b757-917fe4568ff8
+ customizationUUID: 6e65d8a8-4379-4693-87aa-82f9e34b92fd
+ version: '1.0'
+ name: ExtCP
+ description: The AT&T Connection Point base type all other CP derive from
+ type: CP
+ category: Generic
+ subcategory: Network Elements
+ resourceVendor: ONAP (Tosca)
+ resourceVendorRelease: 1.0.0.wd03
+ resourceVendorModelNumber: ''
+ properties:
+ mac_requirements:
+ mac_count_required:
+ is_required: false
+ exCP_naming:
+ ecomp_generated_naming: true
+ zxjTestImportServiceAb 0:
+ type: org.openecomp.resource.vf.Zxjtestimportserviceab
+ metadata:
+ invariantUUID: 41474f7f-3195-443d-a0a2-eb6020a56279
+ UUID: 92e32e49-55f8-46bf-984d-a98c924037ec
+ customizationUUID: 98c7a6c7-a867-45fb-8597-dd464f98e4aa
+ version: '1.0'
+ name: zxjTestImportServiceAb
+ description: zxjTestImportServiceAbstract
+ type: VF
+ category: Generic
+ subcategory: Abstract
+ resourceVendor: zxjImportService
+ resourceVendorRelease: '1.0'
+ resourceVendorModelNumber: ''
+ properties:
+ nf_naming:
+ ecomp_generated_naming: true
+ skip_post_instantiation_configuration: true
+ multi_stage_design: 'false'
+ controller_actor: SO-REF-DATA
+ availability_zone_max_count: 1
+ requirements:
+ - mme_ipu_vdu.dependency:
+ capability: feature
+ node: ExtCP 0
+ - imagefile.dependency:
+ capability: feature
+ node: ext ZTE VL 0
+ capabilities:
+ mme_ipu_vdu.scalable:
+ properties:
+ max_instances: 1
+ min_instances: 1
+ mme_ipu_vdu.nfv_compute:
+ properties:
+ num_cpus: '2'
+ flavor_extra_specs: {}
+ mem_size: '8192'
+ substitution_mappings:
+ node_type: org.openecomp.service.Ser09080002
+ capabilities:
+ extcp0.feature:
+ - ExtCP 0
+ - feature
+ zxjtestservicenotabatract0.mme_ipu_vdu.monitoring_parameter:
+ - zxjTestServiceNotAbatract 0
+ - mme_ipu_vdu.monitoring_parameter
+ zxjtestimportserviceab0.imagefile.guest_os:
+ - zxjTestImportServiceAb 0
+ - imagefile.guest_os
+ zxjtestimportserviceab0.imagefile.feature:
+ - zxjTestImportServiceAb 0
+ - imagefile.feature
+ zxjtestservicenotabatract0.imagefile.guest_os:
+ - zxjTestServiceNotAbatract 0
+ - imagefile.guest_os
+ zxjtestimportserviceab0.ipu_cpd.feature:
+ - zxjTestImportServiceAb 0
+ - ipu_cpd.feature
+ zxjtestservicenotabatract0.mme_ipu_vdu.virtualbinding:
+ - zxjTestServiceNotAbatract 0
+ - mme_ipu_vdu.virtualbinding
+ zxjtestimportserviceab0.mme_ipu_vdu.feature:
+ - zxjTestImportServiceAb 0
+ - mme_ipu_vdu.feature
+ extztevl0.feature:
+ - ext ZTE VL 0
+ - feature
+ zxjtestimportserviceab0.imagefile.image_fle:
+ - zxjTestImportServiceAb 0
+ - imagefile.image_fle
+ zxjtestimportserviceab0.mme_ipu_vdu.monitoring_parameter:
+ - zxjTestImportServiceAb 0
+ - mme_ipu_vdu.monitoring_parameter
+ zxjtestservicenotabatract0.ipu_cpd.feature:
+ - zxjTestServiceNotAbatract 0
+ - ipu_cpd.feature
+ zxjtestservicenotabatract0.mme_ipu_vdu.nfv_compute:
+ - zxjTestServiceNotAbatract 0
+ - mme_ipu_vdu.nfv_compute
+ zxjtestservicenotabatract0.mme_ipu_vdu.scalable:
+ - zxjTestServiceNotAbatract 0
+ - mme_ipu_vdu.scalable
+ extcp0.internal_connectionPoint:
+ - ExtCP 0
+ - internal_connectionPoint
+ zxjtestimportserviceab0.mme_ipu_vdu.virtualbinding:
+ - zxjTestImportServiceAb 0
+ - mme_ipu_vdu.virtualbinding
+ zxjtestservicenotabatract0.imagefile.image_fle:
+ - zxjTestServiceNotAbatract 0
+ - imagefile.image_fle
+ extztevl0.virtual_linkable:
+ - ext ZTE VL 0
+ - virtual_linkable
+ zxjtestservicenotabatract0.imagefile.feature:
+ - zxjTestServiceNotAbatract 0
+ - imagefile.feature
+ zxjtestimportserviceab0.localstorage.feature:
+ - zxjTestImportServiceAb 0
+ - localstorage.feature
+ zxjtestservicenotabatract0.localstorage.local_attachment:
+ - zxjTestServiceNotAbatract 0
+ - localstorage.local_attachment
+ zxjtestimportserviceab0.mme_ipu_vdu.scalable:
+ - zxjTestImportServiceAb 0
+ - mme_ipu_vdu.scalable
+ zxjtestservicenotabatract0.localstorage.feature:
+ - zxjTestServiceNotAbatract 0
+ - localstorage.feature
+ zxjtestimportserviceab0.mme_ipu_vdu.nfv_compute:
+ - zxjTestImportServiceAb 0
+ - mme_ipu_vdu.nfv_compute
+ zxjtestimportserviceab0.localstorage.local_attachment:
+ - zxjTestImportServiceAb 0
+ - localstorage.local_attachment
+ zxjtestservicenotabatract0.mme_ipu_vdu.feature:
+ - zxjTestServiceNotAbatract 0
+ - mme_ipu_vdu.feature
+ zxjtestimportserviceab0.ipu_cpd.forwarder:
+ - zxjTestImportServiceAb 0
+ - ipu_cpd.forwarder
+ zxjtestservicenotabatract0.ipu_cpd.forwarder:
+ - zxjTestServiceNotAbatract 0
+ - ipu_cpd.forwarder
+ requirements:
+ zxjtestservicenotabatract0.imagefile.dependency:
+ - zxjTestServiceNotAbatract 0
+ - imagefile.dependency
+ zxjtestservicenotabatract0.mme_ipu_vdu.local_storage:
+ - zxjTestServiceNotAbatract 0
+ - mme_ipu_vdu.local_storage
+ zxjtestservicenotabatract0.ipu_cpd.dependency:
+ - zxjTestServiceNotAbatract 0
+ - ipu_cpd.dependency
+ zxjtestservicenotabatract0.mme_ipu_vdu.volume_storage:
+ - zxjTestServiceNotAbatract 0
+ - mme_ipu_vdu.volume_storage
+ zxjtestservicenotabatract0.ipu_cpd.virtualbinding:
+ - zxjTestServiceNotAbatract 0
+ - ipu_cpd.virtualbinding
+ zxjtestservicenotabatract0.mme_ipu_vdu.dependency:
+ - zxjTestServiceNotAbatract 0
+ - mme_ipu_vdu.dependency
+ zxjtestservicenotabatract0.localstorage.dependency:
+ - zxjTestServiceNotAbatract 0
+ - localstorage.dependency
+ zxjtestimportserviceab0.imagefile.dependency:
+ - zxjTestImportServiceAb 0
+ - imagefile.dependency
+ zxjtestimportserviceab0.mme_ipu_vdu.volume_storage:
+ - zxjTestImportServiceAb 0
+ - mme_ipu_vdu.volume_storage
+ zxjtestimportserviceab0.ipu_cpd.virtualbinding:
+ - zxjTestImportServiceAb 0
+ - ipu_cpd.virtualbinding
+ extcp0.virtualLink:
+ - ExtCP 0
+ - virtualLink
+ extcp0.virtualBinding:
+ - ExtCP 0
+ - virtualBinding
+ zxjtestimportserviceab0.mme_ipu_vdu.guest_os:
+ - zxjTestImportServiceAb 0
+ - mme_ipu_vdu.guest_os
+ extcp0.dependency:
+ - ExtCP 0
+ - dependency
+ zxjtestimportserviceab0.localstorage.dependency:
+ - zxjTestImportServiceAb 0
+ - localstorage.dependency
+ zxjtestservicenotabatract0.ipu_cpd.virtualLink:
+ - zxjTestServiceNotAbatract 0
+ - ipu_cpd.virtualLink
+ extztevl0.dependency:
+ - ext ZTE VL 0
+ - dependency
+ zxjtestimportserviceab0.ipu_cpd.dependency:
+ - zxjTestImportServiceAb 0
+ - ipu_cpd.dependency
+ zxjtestimportserviceab0.mme_ipu_vdu.dependency:
+ - zxjTestImportServiceAb 0
+ - mme_ipu_vdu.dependency
+ zxjtestimportserviceab0.mme_ipu_vdu.local_storage:
+ - zxjTestImportServiceAb 0
+ - mme_ipu_vdu.local_storage
+ zxjtestimportserviceab0.ipu_cpd.virtualLink:
+ - zxjTestImportServiceAb 0
+ - ipu_cpd.virtualLink
+ extcp0.external_virtualLink:
+ - ExtCP 0
+ - external_virtualLink
+ zxjtestservicenotabatract0.mme_ipu_vdu.guest_os:
+ - zxjTestServiceNotAbatract 0
+ - mme_ipu_vdu.guest_os
+ zxjtestimportserviceab0.ipu_cpd.forwarder:
+ - zxjTestImportServiceAb 0
+ - ipu_cpd.forwarder
+ zxjtestservicenotabatract0.ipu_cpd.forwarder:
+ - zxjTestServiceNotAbatract 0
+ - ipu_cpd.forwarder\n \ No newline at end of file