diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor')
8 files changed, 612 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/in/pnfDescriptor_withCustomType.yaml b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/in/pnfDescriptor_withCustomType.yaml new file mode 100644 index 0000000000..8fc43390dc --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/in/pnfDescriptor_withCustomType.yaml @@ -0,0 +1,95 @@ +tosca_definitions_version: tosca_simple_yaml_1_1 + +description: the service template of a PNFD + +imports: + - etsi_nfv_sol001_pnfd_2_5_1_types.yaml + +node_types: + myCustomizedNodeType_A: + derived_from: tosca.nodes.nfv.PnfExtCp + myCustomizedNodeType_B: + derived_from: myCustomizedNodeType_A + myCustomizedNodeType_C: + derived_from: AnotherCustomizedNodeType + myCustomizedNodeType_D: + derived_from: myCustomizedNodeType_C + myCustomizedNodeType_E: + derived_from: myCustomizedNodeType_D + properties: + descriptor_id: + type: string + constraints: [ valid_values: [ b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 ] ] + default: b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 + function_description: + type: string + default: an example PNF + provider: + type: string + constraints: [ valid_values: [ MyCompany] ] + default: MyCompany + version: + type: string + constraints: [ valid_values: [ '1.0' ] ] + default: '1.0' + descriptor_invariant_id: + type: string + constraints: [ valid_values: [ 1111-2222-ccaa-bbdd ] ] + default: 1111-2222-ccaa-bbdd + name: + type: string + constraints: [ valid_values: [ExamplePnf] ] + default: ExamplePnf + requirements: + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + +topology_template: + inputs: + anyOtherInput: + type: string + description: this is input1 + default: defaultValue + protocols: + type: list + description: IP protocols + entry_schema: + type: string + default: [ ipv4, ipv6 ] + + substitution_mappings: + node_type: myCustomizedNodeType_B + requirements: + virtual_link: [ pnfExtCp_1, external_virtual_link ] + + node_templates: + pnf_mainPart: + type: myCustomizedNodeType_B + properties: + descriptor_id: b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 + function_description: an example PNF + provider: Mycompany + version: 1.0 + descriptor_invariant_id: 1111-2222-ccaa-bbdd + name: ExamplePnf + + pnfExtCp_1: + type: tosca.nodes.nfv.PnfExtCp + properties: + protocol: [ associated_layer_protocol: ipv4 ] + trunk_mode: false + layer_protocols: [ ipv4 ] + role: leaf + description: External connection point to access this pnf + requirements: + - dependency: pnf_mainPart + + pnfExtCp_2: + type: tosca.nodes.nfv.PnfExtCp + properties: + trunk_mode: false + layer_protocols: { get_input: protocols } + role: leaf + description: External connection point to access Acme myPnf + requirements: + - dependency: myPnf
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/in/pnfDescriptor_withCustomTypeDerivedFromMultiple.yaml b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/in/pnfDescriptor_withCustomTypeDerivedFromMultiple.yaml new file mode 100644 index 0000000000..b3f4ce0f53 --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/in/pnfDescriptor_withCustomTypeDerivedFromMultiple.yaml @@ -0,0 +1,95 @@ +tosca_definitions_version: tosca_simple_yaml_1_1 + +description: the service template of a PNFD + +imports: + - etsi_nfv_sol001_pnfd_2_5_1_types.yaml + +node_types: + myCustomizedNodeType_C: + derived_from: myCustomizedNodeType_B + myCustomizedNodeType_A: + derived_from: tosca.nodes.nfv.PnfExtCp + myCustomizedNodeType_D: + derived_from: myCustomizedNodeType_C + myCustomizedNodeType_E: + derived_from: myCustomizedNodeType_XXXXXX + myCustomizedNodeType_B: + derived_from: myCustomizedNodeType_A + properties: + descriptor_id: + type: string + constraints: [ valid_values: [ b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 ] ] + default: b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 + function_description: + type: string + default: an example PNF + provider: + type: string + constraints: [ valid_values: [ MyCompany] ] + default: MyCompany + version: + type: string + constraints: [ valid_values: [ '1.0' ] ] + default: '1.0' + descriptor_invariant_id: + type: string + constraints: [ valid_values: [ 1111-2222-ccaa-bbdd ] ] + default: 1111-2222-ccaa-bbdd + name: + type: string + constraints: [ valid_values: [ExamplePnf] ] + default: ExamplePnf + requirements: + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + +topology_template: + inputs: + anyOtherInput: + type: string + description: this is input1 + default: defaultValue + protocols: + type: list + description: IP protocols + entry_schema: + type: string + default: [ ipv4, ipv6 ] + + substitution_mappings: + node_type: myCustomizedNodeType_C + requirements: + virtual_link: [ pnfExtCp_1, external_virtual_link ] + + node_templates: + pnf_mainPart: + type: myCustomizedNodeType_C + properties: + descriptor_id: b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 + function_description: an example PNF + provider: Mycompany + version: 1.0 + descriptor_invariant_id: 1111-2222-ccaa-bbdd + name: ExamplePnf + + pnfExtCp_1: + type: tosca.nodes.nfv.PnfExtCp + properties: + protocol: [ associated_layer_protocol: ipv4 ] + trunk_mode: false + layer_protocols: [ ipv4 ] + role: leaf + description: External connection point to access this pnf + requirements: + - dependency: pnf_mainPart + + pnfExtCp_2: + type: tosca.nodes.nfv.PnfExtCp + properties: + trunk_mode: false + layer_protocols: { get_input: protocols } + role: leaf + description: External connection point to access Acme myPnf + requirements: + - dependency: myPnf
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/in/pnfDescriptor_with_Invalid_CustomType.yaml b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/in/pnfDescriptor_with_Invalid_CustomType.yaml new file mode 100644 index 0000000000..d27fbfd70a --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/in/pnfDescriptor_with_Invalid_CustomType.yaml @@ -0,0 +1,95 @@ +tosca_definitions_version: tosca_simple_yaml_1_1 + +description: the service template of a PNFD + +imports: + - etsi_nfv_sol001_pnfd_2_5_1_types.yaml + +node_types: + myCustomizedNodeType_A: + derived_from: tosca.nodes.nfv.INVALID + myCustomizedNodeType_B: + derived_from: myCustomizedNodeType_A + myCustomizedNodeType_C: + derived_from: myCustomizedNodeType_B + myCustomizedNodeType_D: + derived_from: myCustomizedNodeType_C + myCustomizedNodeType_E: + derived_from: myCustomizedNodeType_D + properties: + descriptor_id: + type: string + constraints: [ valid_values: [ b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 ] ] + default: b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 + function_description: + type: string + default: an example PNF + provider: + type: string + constraints: [ valid_values: [ MyCompany] ] + default: MyCompany + version: + type: string + constraints: [ valid_values: [ '1.0' ] ] + default: '1.0' + descriptor_invariant_id: + type: string + constraints: [ valid_values: [ 1111-2222-ccaa-bbdd ] ] + default: 1111-2222-ccaa-bbdd + name: + type: string + constraints: [ valid_values: [ExamplePnf] ] + default: ExamplePnf + requirements: + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + +topology_template: + inputs: + anyOtherInput: + type: string + description: this is input1 + default: defaultValue + protocols: + type: list + description: IP protocols + entry_schema: + type: string + default: [ ipv4, ipv6 ] + + substitution_mappings: + node_type: 00_Another_NodeTypeMyCompany.examplePnf.1_0 + requirements: + virtual_link: [ pnfExtCp_1, external_virtual_link ] + + node_templates: + pnf_mainPart: + type: wrong_nodeType_Not_Derived_from_any_valid_Node + properties: + descriptor_id: b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 + function_description: an example PNF + provider: Mycompany + version: 1.0 + descriptor_invariant_id: 1111-2222-ccaa-bbdd + name: ExamplePnf + + pnfExtCp_1: + type: tosca.nodes.nfv.PnfExtCp + properties: + protocol: [ associated_layer_protocol: ipv4 ] + trunk_mode: false + layer_protocols: [ ipv4 ] + role: leaf + description: External connection point to access this pnf + requirements: + - dependency: pnf_mainPart + + pnfExtCp_2: + type: tosca.nodes.nfv.PnfExtCp + properties: + trunk_mode: false + layer_protocols: { get_input: protocols } + role: leaf + description: External connection point to access Acme myPnf + requirements: + - dependency: myPnf
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/in/pnfDescriptor_with_Multiple_CustomType.yaml b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/in/pnfDescriptor_with_Multiple_CustomType.yaml new file mode 100644 index 0000000000..7a886c4917 --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/in/pnfDescriptor_with_Multiple_CustomType.yaml @@ -0,0 +1,105 @@ +tosca_definitions_version: tosca_simple_yaml_1_1 + +description: the service template of a PNFD + +imports: + - etsi_nfv_sol001_pnfd_2_5_1_types.yaml + +node_types: + myCustomizedNodeType_B: + derived_from: myCustomizedNodeType_A + myCustomizedNodeType_A: + derived_from: tosca.nodes.nfv.PnfExtCp + myCustomizedNodeType_C: + derived_from: myCustomizedNodeType_D + myCustomizedNodeType_D: + derived_from: tosca.nodes.nfv.PnfExtCp + myCustomizedNodeType_E: + derived_from: myCustomizedNodeType_D + properties: + descriptor_id: + type: string + constraints: [ valid_values: [ b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 ] ] + default: b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 + function_description: + type: string + default: an example PNF + provider: + type: string + constraints: [ valid_values: [ MyCompany] ] + default: MyCompany + version: + type: string + constraints: [ valid_values: [ '1.0' ] ] + default: '1.0' + descriptor_invariant_id: + type: string + constraints: [ valid_values: [ 1111-2222-ccaa-bbdd ] ] + default: 1111-2222-ccaa-bbdd + name: + type: string + constraints: [ valid_values: [ExamplePnf] ] + default: ExamplePnf + requirements: + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + +topology_template: + inputs: + anyOtherInput: + type: string + description: this is input1 + default: defaultValue + protocols: + type: list + description: IP protocols + entry_schema: + type: string + default: [ ipv4, ipv6 ] + + substitution_mappings: + node_type: myCustomizedNodeType_B + requirements: + virtual_link: [ pnfExtCp_1, external_virtual_link ] + + node_templates: + pnf_mainPart: + type: myCustomizedNodeType_B + properties: + descriptor_id: b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 + function_description: an example PNF + provider: Mycompany + version: 1.0 + descriptor_invariant_id: 1111-2222-ccaa-bbdd + name: ExamplePnf + + pnfExtCp_1: + type: tosca.nodes.nfv.PnfExtCp + properties: + protocol: [ associated_layer_protocol: ipv4 ] + trunk_mode: false + layer_protocols: [ ipv4 ] + role: leaf + description: External connection point to access this pnf + requirements: + - dependency: pnf_mainPart + + pnfExtCp_2: + type: tosca.nodes.nfv.PnfExtCp + properties: + trunk_mode: false + layer_protocols: { get_input: protocols } + role: leaf + description: External connection point to access Acme myPnf + requirements: + - dependency: myPnf + + pnfExtCp_3: + type: myCustomizedNodeType_C + properties: + trunk_mode: false + layer_protocols: { get_input: protocols } + role: leaf + description: External connection point to access Acme myPnf + requirements: + - dependency: myPnf
\ No newline at end of file diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/out/topologyTemplate_withCustomType.yaml b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/out/topologyTemplate_withCustomType.yaml new file mode 100644 index 0000000000..0013ae08dc --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/out/topologyTemplate_withCustomType.yaml @@ -0,0 +1,31 @@ +node_types: + org.openecomp.resource.abstract.myCustomizedNodeType_B: + derived_from: org.openecomp.resource.cp.v2.extCP + org.openecomp.resource.abstract.myCustomizedNodeType_A: + derived_from: org.openecomp.resource.cp.v2.extCP +topology_template: + inputs: + protocols: + type: list + description: IP protocols + default: + - assingment_method: dhcp + ip_version: 4 + - assingment_method: dhcp + ip_version: 6 + entry_schema: + type: org.openecomp.datatypes.network.IpRequirements + node_templates: + pnf_mainPart: + type: org.openecomp.resource.cp.v2.extCP + pnfExtCp_2: + type: org.openecomp.resource.cp.v2.extCP + properties: + ip_requirements: + get_input: protocols + pnfExtCp_1: + type: org.openecomp.resource.cp.v2.extCP + properties: + ip_requirements: + - assingment_method: dhcp + ip_version: 4 diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/out/topologyTemplate_withCustomTypeDerivedFromMultiple.yaml b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/out/topologyTemplate_withCustomTypeDerivedFromMultiple.yaml new file mode 100644 index 0000000000..6092097c31 --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/out/topologyTemplate_withCustomTypeDerivedFromMultiple.yaml @@ -0,0 +1,84 @@ +node_types: + org.openecomp.resource.abstract.myCustomizedNodeType_B: + derived_from: org.openecomp.resource.cp.v2.extCP + properties: + descriptor_id: + type: string + required: true + default: b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 + status: supported + constraints: + - valid_values: + - b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 + function_description: + type: string + required: true + default: an example PNF + status: supported + provider: + type: string + required: true + default: MyCompany + status: supported + constraints: + - valid_values: + - MyCompany + version: + type: string + required: true + default: '1.0' + status: supported + constraints: + - valid_values: + - '1.0' + descriptor_invariant_id: + type: string + required: true + default: 1111-2222-ccaa-bbdd + status: supported + constraints: + - valid_values: + - 1111-2222-ccaa-bbdd + name: + type: string + required: true + default: ExamplePnf + status: supported + constraints: + - valid_values: + - ExamplePnf + requirements: + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + org.openecomp.resource.abstract.myCustomizedNodeType_C: + derived_from: org.openecomp.resource.cp.v2.extCP + org.openecomp.resource.abstract.myCustomizedNodeType_A: + derived_from: org.openecomp.resource.cp.v2.extCP + org.openecomp.resource.abstract.myCustomizedNodeType_D: + derived_from: org.openecomp.resource.cp.v2.extCP +topology_template: + inputs: + protocols: + type: list + description: IP protocols + default: + - assingment_method: dhcp + ip_version: 4 + - assingment_method: dhcp + ip_version: 6 + entry_schema: + type: org.openecomp.datatypes.network.IpRequirements + node_templates: + pnf_mainPart: + type: org.openecomp.resource.cp.v2.extCP + pnfExtCp_2: + type: org.openecomp.resource.cp.v2.extCP + properties: + ip_requirements: + get_input: protocols + pnfExtCp_1: + type: org.openecomp.resource.cp.v2.extCP + properties: + ip_requirements: + - assingment_method: dhcp + ip_version: 4 diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/out/topologyTemplate_with_Invalid_CustomType.yaml b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/out/topologyTemplate_with_Invalid_CustomType.yaml new file mode 100644 index 0000000000..3292a94a58 --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/out/topologyTemplate_with_Invalid_CustomType.yaml @@ -0,0 +1,19 @@ +topology_template: + inputs: + protocols: + type: list + description: IP protocols + entry_schema: + type: org.openecomp.datatypes.network.IpRequirements + default: [{assingment_method: dhcp, ip_version: 4}, {assingment_method: dhcp, ip_version: 6}] + node_templates: + pnfExtCp_2: + type: org.openecomp.resource.cp.v2.extCP + properties: + ip_requirements: { get_input: protocols } + pnfExtCp_1: + type: org.openecomp.resource.cp.v2.extCP + properties: + ip_requirements: + - assingment_method: dhcp + ip_version: 4 diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/out/topologyTemplate_with_Multiple_CustomType.yaml b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/out/topologyTemplate_with_Multiple_CustomType.yaml new file mode 100644 index 0000000000..3fd846bbef --- /dev/null +++ b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/test/resources/pnfDescriptor/out/topologyTemplate_with_Multiple_CustomType.yaml @@ -0,0 +1,88 @@ +node_types: + org.openecomp.resource.abstract.myCustomizedNodeType_B: + derived_from: org.openecomp.resource.cp.v2.extCP + org.openecomp.resource.abstract.myCustomizedNodeType_C: + derived_from: org.openecomp.resource.cp.v2.extCP + org.openecomp.resource.abstract.myCustomizedNodeType_A: + derived_from: org.openecomp.resource.cp.v2.extCP + org.openecomp.resource.abstract.myCustomizedNodeType_D: + derived_from: org.openecomp.resource.cp.v2.extCP + org.openecomp.resource.abstract.myCustomizedNodeType_E: + derived_from: org.openecomp.resource.cp.v2.extCP + properties: + descriptor_id: + type: string + required: true + default: b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 + status: supported + constraints: + - valid_values: + - b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 + function_description: + type: string + required: true + default: an example PNF + status: supported + provider: + type: string + required: true + default: MyCompany + status: supported + constraints: + - valid_values: + - MyCompany + version: + type: string + required: true + default: '1.0' + status: supported + constraints: + - valid_values: + - '1.0' + descriptor_invariant_id: + type: string + required: true + default: 1111-2222-ccaa-bbdd + status: supported + constraints: + - valid_values: + - 1111-2222-ccaa-bbdd + name: + type: string + required: true + default: ExamplePnf + status: supported + constraints: + - valid_values: + - ExamplePnf + requirements: + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable +topology_template: + inputs: + protocols: + type: list + description: IP protocols + default: + - assingment_method: dhcp + ip_version: 4 + - assingment_method: dhcp + ip_version: 6 + entry_schema: + type: org.openecomp.datatypes.network.IpRequirements + node_templates: + pnf_mainPart: + type: org.openecomp.resource.cp.v2.extCP + pnfExtCp_3: + type: org.openecomp.resource.cp.v2.extCP + pnfExtCp_2: + type: org.openecomp.resource.cp.v2.extCP + properties: + ip_requirements: + get_input: protocols + pnfExtCp_1: + type: org.openecomp.resource.cp.v2.extCP + properties: + ip_requirements: + - assingment_method: dhcp + ip_version: 4 |