aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-09-22 23:47:09 +0300
committerMichael Lando <ml636r@att.com>2017-09-23 16:03:16 +0300
commit3ef175b5f6e74a685cfa998153b4d635f9883dfe (patch)
tree00bfc6a8b0e5f327f553ca6ff71f44834ef70e76 /catalog-be/src
parent0819f24218af38d1875defe46d233141648c1705 (diff)
add new global types
add global types needed for volte use case Change-Id: I26f2de45d46628c95fd708b7e61b007c214e2c94 Issue-ID: SDC-192 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-be/src')
-rw-r--r--catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.yml45
-rw-r--r--catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.zipbin1402 -> 1598 bytes
-rw-r--r--catalog-be/src/main/resources/import/tosca/data-types/dataTypes.yml208
-rw-r--r--catalog-be/src/main/resources/import/tosca/data-types/dataTypes.zipbin5519 -> 6242 bytes
-rw-r--r--catalog-be/src/main/resources/import/tosca/heat-types/underlayVpn/underlayVpn.json15
-rw-r--r--catalog-be/src/main/resources/import/tosca/heat-types/underlayVpn/underlayVpn.yml160
-rw-r--r--catalog-be/src/main/resources/import/tosca/heat-types/underlayVpn/underlayVpn.zipbin0 -> 1164 bytes
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/extImageFile/extImageFile.json15
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/extImageFile/extImageFile.yml25
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/extImageFile/extImageFile.zipbin0 -> 377 bytes
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/extLocalStorage/extLocalStorage.json15
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/extLocalStorage/extLocalStorage.yml14
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/extLocalStorage/extLocalStorage.zipbin0 -> 350 bytes
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/extZteCP/extZteCP.json15
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/extZteCP/extZteCP.yml76
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/extZteCP/extZteCP.zipbin0 -> 583 bytes
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/extZteVDU/extZteVDU.json15
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/extZteVDU/extZteVDU.yml66
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/extZteVDU/extZteVDU.zipbin0 -> 658 bytes
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/extZteVL/extZteVL.json15
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/extZteVL/extZteVL.yml69
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/extZteVL/extZteVL.zipbin0 -> 529 bytes
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/vduCompute/vduCompute.json15
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/vduCompute/vduCompute.yml96
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/vduCompute/vduCompute.zipbin0 -> 667 bytes
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.json15
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.yml56
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.zipbin0 -> 562 bytes
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/vduVirtualStorage/vduVirtualStorage.json15
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/vduVirtualStorage/vduVirtualStorage.yml27
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/vduVirtualStorage/vduVirtualStorage.zipbin0 -> 421 bytes
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/vnfVirtualLinkDesc/vnfVirtualLinkDesc.json15
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/vnfVirtualLinkDesc/vnfVirtualLinkDesc.yml26
-rw-r--r--catalog-be/src/main/resources/import/tosca/onap-types/vnfVirtualLinkDesc/vnfVirtualLinkDesc.zipbin0 -> 478 bytes
-rw-r--r--catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py3
-rw-r--r--catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py5
-rw-r--r--catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py101
-rw-r--r--catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionAll.py4
38 files changed, 1124 insertions, 7 deletions
diff --git a/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.yml b/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.yml
index c94909101b..45c2b812cf 100644
--- a/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.yml
+++ b/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.yml
@@ -117,8 +117,6 @@ tosca.capabilities.Scalable:
type: integer
tosca.capabilities.network.Bindable:
derived_from: tosca.capabilities.Node
-
-
tosca.capabilities.Container.Docker:
derived_from: tosca.capabilities.Container
properties:
@@ -204,3 +202,46 @@ org.openecomp.capabilities.metric.SnmpTrap:
description: Object Id of the metric
required: true
status: SUPPORTED
+#ONAP types
+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 \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.zip b/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.zip
index 1742545f14..268287a39d 100644
--- a/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.zip
+++ b/catalog-be/src/main/resources/import/tosca/capability-types/capabilityTypes.zip
Binary files differ
diff --git a/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.yml b/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.yml
index ba7a7a0cfd..43debe6291 100644
--- a/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.yml
+++ b/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.yml
@@ -849,7 +849,7 @@ org.openecomp.datatypes.Root:
properties:
supplemental_data:
type: map
- required: false
+ required: true
entry_schema:
description: >
A placeholder for missing properties that would be included in future ecomp model versions.
@@ -1240,9 +1240,6 @@ org.openecomp.datatypes.flavors.DeploymentFlavor:
license_flavor:
type: org.openecomp.datatypes.flavors.LicenseFlavor
required: false
-
-
-
org.openecomp.datatypes.ImageInfo:
derived_from: tosca.datatypes.Root
properties:
@@ -1257,3 +1254,206 @@ org.openecomp.datatypes.ImageInfo:
type: string
required: false
default: md5
+#onap
+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:
+ #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:
+ # Number
+ 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 # CpuPinningPolicy
+ 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 # not specified
+ 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 \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.zip b/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.zip
index c97ea2caa0..506a58f4b1 100644
--- a/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.zip
+++ b/catalog-be/src/main/resources/import/tosca/data-types/dataTypes.zip
Binary files differ
diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/underlayVpn/underlayVpn.json b/catalog-be/src/main/resources/import/tosca/heat-types/underlayVpn/underlayVpn.json
new file mode 100644
index 0000000000..0104a79c21
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/heat-types/underlayVpn/underlayVpn.json
@@ -0,0 +1,15 @@
+{
+ "payloadName": "extZteVL.yml",
+ "contactId": "jh0003",
+ "name": "ext ZTE VL",
+ "description": "Ext ZTE VL",
+ "resourceIconPath": "network",
+ "resourceType": "VL",
+ "categories": [{
+ "name": "Generic",
+ "subcategories": [{
+ "name": "Network Elements"
+ }]
+ }],
+ "tags": ["ext ZTE VL"]
+} \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/underlayVpn/underlayVpn.yml b/catalog-be/src/main/resources/import/tosca/heat-types/underlayVpn/underlayVpn.yml
new file mode 100644
index 0000000000..639e1e5d91
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/heat-types/underlayVpn/underlayVpn.yml
@@ -0,0 +1,160 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+# *****************************************************************************
+# underlay vpn type definitions
+# *****************************************************************************
+
+metadata:
+ version: 0.1
+ vendor: ONAP
+ template_author: ONAP
+
+# *****************************************************************************
+# node types
+# *****************************************************************************
+
+node_types:
+
+ # *****************************************************************************
+ # Underlayvpn Node Types
+ # *****************************************************************************
+ org.openecomp.resource.vl.underlayvpn:
+ derived_from: tosca.nodes.Root
+ description: undelay vpn type definitions
+ properties:
+ id:
+ type: string
+ required: false
+ template_name:
+ type: string
+ required: false
+ version:
+ type: string
+ required: false
+ vendor:
+ type: string
+ required: false
+ template_author:
+ type: string
+ required: false
+ name:
+ type: string
+ required: false
+ description:
+ type: string
+ required: false
+ serviceType:
+ type: string
+ description: type of VPN service
+ required: false
+ default: 'l3vpn_sptn'
+ topology:
+ type: string
+ description: type of VPN topology
+ constraints:
+ - valid_values: ['full-mesh','point_to_multipoint','point_to_point','singlePoint','hubspoke','hubspoke_via_hubce','hubspoke_disjoint','ADD_DROP_Z']
+ required: false
+ default: 'full-mesh'
+ technology:
+ type: string
+ description: type of VPN technology
+ constraints:
+ - valid_values: ['mpls','rosen multivpn','vxlan overlay l3vpn','eth over sdh','vlan']
+ required: false
+ default: 'mpls'
+ site1_name:
+ type: string
+ description: name of first site
+ required: false
+ site2_name:
+ type: string
+ description: name of second site
+ required: false
+ sna1_name:
+ type: string
+ description: name of site network accesses associated with the site1
+ required: false
+ sna2_name:
+ type: string
+ description: name of site network accesses associated with the site2
+ required: false
+ pe1_id:
+ type: string
+ description: id of provider edge1, it can be name or ip or uuid
+ required: false
+ pe2_id:
+ type: string
+ description: id of provider edge2, it can be name or ip or uuid
+ required: false
+ ac1_id:
+ type: string
+ description: id of attachment circuit1, it can be port name or uuid
+ required: false
+ ac1_svlan:
+ type: integer
+ description: ac1 svlan
+ required: false
+ ac1_ip:
+ type: string
+ description: ip of ac1, only for layer3 vpn, it should contain mask
+ required: false
+ ac1_peer_ip:
+ type: string
+ description: ip of ac1 peer CE tp, only for layer3 vpn, it should contain mask
+ required: false
+ ac1_route:
+ type: string
+ description: route configure of ac1, only for layer3 vpn
+ required: false
+ ac1_protocol:
+ type: string
+ description: routing protocol type of ac1, only for layer3 vpn
+ constraints:
+ - valid_values: ['STATIC','OSPF','ISIS','BGP','other']
+ required: false
+ ac1_protocol_bgp_as:
+ type: string
+ description: autonomous-system number of ac1, , only required for ebgp protocol
+ required: false
+ ac2_id:
+ type: string
+ description: id of attachment circuit2, it can be port name or uuid
+ required: false
+ ac2_svlan:
+ type: integer
+ description: ac2 svlan
+ required: false
+ ac2_ip:
+ type: string
+ description: ip of ac2, only for layer3 vpn, it should contain mask
+ required: false
+ ac2_peer_ip:
+ type: string
+ description: ip of ac2 peer CE tp, only for layer3 vpn, it should contain mask
+ required: false
+ ac2_route:
+ type: string
+ description: route configure of ac2, only for layer3 vpn
+ required: false
+ ac2_protocol:
+ type: string
+ description: routing protocol type of ac2, only for layer3 vpn
+ constraints:
+ - valid_values: ['STATIC','OSPF','ISIS','BGP','other']
+ default: 'STATIC'
+ required: false
+ ac2_protocol_bgp_as:
+ type: string
+ description: autonomous-system number of ac2, , only required for ebgp protocol
+ required: false
+ af_type:
+ type: string
+ description: address family type
+ default: 'ipv4'
+ required: false
+ requirements:
+ - virtualLink:
+ capability: tosca.capabilities.network.Linkable
+ relationship: tosca.relationships.network.LinksTo
+ capabilities:
+ virtual_linkable:
+ type: tosca.capabilities.network.Linkable
diff --git a/catalog-be/src/main/resources/import/tosca/heat-types/underlayVpn/underlayVpn.zip b/catalog-be/src/main/resources/import/tosca/heat-types/underlayVpn/underlayVpn.zip
new file mode 100644
index 0000000000..0a4f88bd32
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/heat-types/underlayVpn/underlayVpn.zip
Binary files differ
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/extImageFile/extImageFile.json b/catalog-be/src/main/resources/import/tosca/onap-types/extImageFile/extImageFile.json
new file mode 100644
index 0000000000..558a45be09
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/extImageFile/extImageFile.json
@@ -0,0 +1,15 @@
+{
+ "payloadName": "extImageFile.yml",
+ "contactId": "jh0003",
+ "name": "Ext Image File",
+ "description": "Ext Image File",
+ "resourceIconPath": "default",
+ "resourceType": "VFC",
+ "categories": [{
+ "name": "Generic",
+ "subcategories": [{
+ "name": "Infrastructure"
+ }]
+ }],
+ "tags": ["Ext Image File"]
+} \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/extImageFile/extImageFile.yml b/catalog-be/src/main/resources/import/tosca/onap-types/extImageFile/extImageFile.yml
new file mode 100644
index 0000000000..0715993b40
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/extImageFile/extImageFile.yml
@@ -0,0 +1,25 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+node_types:
+ tosca.nodes.nfv.ext.ImageFile:
+ derived_from: tosca.nodes.Root
+ properties:
+ file_url:
+ type: string
+ required: false
+ container_type:
+ type: string
+ required: false
+ name:
+ type: string
+ required: false
+ disk_format:
+ type: string
+ required: false
+ version:
+ type: string
+ required: false
+ capabilities:
+ guest_os:
+ type: tosca.capabilities.nfv.ext.GuestOs
+ image_fle:
+ type: tosca.capabilities.nfv.ext.ImageFile
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/extImageFile/extImageFile.zip b/catalog-be/src/main/resources/import/tosca/onap-types/extImageFile/extImageFile.zip
new file mode 100644
index 0000000000..acee384754
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/extImageFile/extImageFile.zip
Binary files differ
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/extLocalStorage/extLocalStorage.json b/catalog-be/src/main/resources/import/tosca/onap-types/extLocalStorage/extLocalStorage.json
new file mode 100644
index 0000000000..bce521b998
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/extLocalStorage/extLocalStorage.json
@@ -0,0 +1,15 @@
+{
+ "payloadName": "extLocalStorage.yml",
+ "contactId": "jh0003",
+ "name": "Ext Local Storage",
+ "description": "Ext Local Storage",
+ "resourceIconPath": "default",
+ "resourceType": "VFC",
+ "categories": [{
+ "name": "Generic",
+ "subcategories": [{
+ "name": "Infrastructure"
+ }]
+ }],
+ "tags": ["Ext Local Storage"]
+} \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/extLocalStorage/extLocalStorage.yml b/catalog-be/src/main/resources/import/tosca/onap-types/extLocalStorage/extLocalStorage.yml
new file mode 100644
index 0000000000..4650332c21
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/extLocalStorage/extLocalStorage.yml
@@ -0,0 +1,14 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+node_types:
+ tosca.nodes.nfv.ext.LocalStorage:
+ derived_from: tosca.nodes.Root
+ properties:
+ size:
+ type: string
+ required: false
+ disk_type:
+ type: string
+ required: false
+ capabilities:
+ local_attachment:
+ type: tosca.capabilities.nfv.ext.LocalAttachment \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/extLocalStorage/extLocalStorage.zip b/catalog-be/src/main/resources/import/tosca/onap-types/extLocalStorage/extLocalStorage.zip
new file mode 100644
index 0000000000..b3bcc91c90
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/extLocalStorage/extLocalStorage.zip
Binary files differ
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/extZteCP/extZteCP.json b/catalog-be/src/main/resources/import/tosca/onap-types/extZteCP/extZteCP.json
new file mode 100644
index 0000000000..6a565dc3b8
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/extZteCP/extZteCP.json
@@ -0,0 +1,15 @@
+{
+ "payloadName": "extZteCP.yml",
+ "contactId": "jh0003",
+ "name": "ext ZTE CP",
+ "description": "Ext ZTE CP",
+ "resourceIconPath": "network",
+ "resourceType": "CP",
+ "categories": [{
+ "name": "Generic",
+ "subcategories": [{
+ "name": "Network Elements"
+ }]
+ }],
+ "tags": ["Ext ZTE CP"]
+} \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/extZteCP/extZteCP.yml b/catalog-be/src/main/resources/import/tosca/onap-types/extZteCP/extZteCP.yml
new file mode 100644
index 0000000000..75a867ca45
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/extZteCP/extZteCP.yml
@@ -0,0 +1,76 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+node_types:
+ tosca.nodes.nfv.ext.zte.CP:
+ derived_from: tosca.nodes.Root
+ properties:
+ guest_os_mtu:
+ type: integer
+ required: false
+ bandwidth:
+ type: integer
+ required: false
+ interface_name:
+ type: string
+ required: false
+ allowed_address_pairs:
+ type: list
+ required: false
+ entry_schema:
+ type: tosca.datatypes.nfv.ext.AddressPairs
+ ip_address:
+ type: string
+ required: false
+ bond:
+ type: string
+ required: false
+ proxiedVNFs:
+ type: list
+ required: false
+ entry_schema:
+ type: string
+ sfc_encapsulation:
+ type: string
+ required: false
+ floating_ip_address:
+ type: tosca.datatypes.nfv.ext.FloatingIP
+ required: false
+ service_ip_address:
+ required: false
+ type: string
+ mac_address:
+ type: string
+ required: false
+ proxiedVNFtype:
+ type: string
+ required: false
+ macbond:
+ type: string
+ required: false
+ vnic_type:
+ type: string
+ required: false
+ direction:
+ type: string
+ required: false
+ order:
+ type: integer
+ required: false
+ requirements:
+ - forwarder:
+ capability: tosca.capabilities.nfv.Forwarder
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - virtualbinding:
+ capability: tosca.capabilities.nfv.VirtualBindable
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - virtualLink:
+ capability: tosca.capabilities.nfv.VirtualBindable
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ forwarder:
+ type: tosca.capabilities.nfv.Forwarder \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/extZteCP/extZteCP.zip b/catalog-be/src/main/resources/import/tosca/onap-types/extZteCP/extZteCP.zip
new file mode 100644
index 0000000000..6626075fe4
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/extZteCP/extZteCP.zip
Binary files differ
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/extZteVDU/extZteVDU.json b/catalog-be/src/main/resources/import/tosca/onap-types/extZteVDU/extZteVDU.json
new file mode 100644
index 0000000000..2ebc518c0c
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/extZteVDU/extZteVDU.json
@@ -0,0 +1,15 @@
+{
+ "payloadName": "extZteVDU.yml",
+ "contactId": "jh0003",
+ "name": "Ext Zte VDU",
+ "description": "Ext Zte VDU",
+ "resourceIconPath": "compute",
+ "resourceType": "VFC",
+ "categories": [{
+ "name": "Generic",
+ "subcategories": [{
+ "name": "Infrastructure"
+ }]
+ }],
+ "tags": ["Ext Zte VDU"]
+} \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/extZteVDU/extZteVDU.yml b/catalog-be/src/main/resources/import/tosca/onap-types/extZteVDU/extZteVDU.yml
new file mode 100644
index 0000000000..5cd45b74e3
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/extZteVDU/extZteVDU.yml
@@ -0,0 +1,66 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+node_types:
+ derived_from: tosca.nodes.Root
+ properties:
+ manual_scale_select_vim:
+ type: boolean
+ required: false
+ vdu_type:
+ type: string
+ required: false
+ watchdog:
+ type: tosca.datatypes.nfv.ext.zte.WatchDog
+ required: false
+ name:
+ type: string
+ required: false
+ local_affinity_antiaffinity_rule:
+ type: tosca.datatypes.nfv.ext.LocalAffinityOrAntiAffinityRule
+ required: false
+ support_scaling:
+ type: boolean
+ required: false
+ storage_policy:
+ type: string
+ required: false
+ key_vdu:
+ type: boolean
+ required: false
+ location_info:
+ type: tosca.datatypes.nfv.ext.LocationInfo
+ required: false
+ inject_data_list:
+ type: list
+ required: false
+ entry_schema:
+ type: tosca.datatypes.nfv.ext.InjectData
+ requirements:
+ - guest_os:
+ capability: tosca.capabilities.nfv.ext.GuestOs
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - local_storage:
+ capability: tosca.capabilities.nfv.ext.LocalAttachment
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - volume_storage:
+ capability: tosca.capabilities.Attachment
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - dependency:
+ capability: tosca.capabilities.Node
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ scalable:
+ type: tosca.capabilities.Scalable
+ monitoring_parameter:
+ type: tosca.capabilities.nfv.Metric
+ nfv_compute:
+ type: tosca.capabilities.nfv.ext.Compute.Container.Architecture
+ virtualbinding:
+ type: tosca.capabilities.nfv.VirtualBindable \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/extZteVDU/extZteVDU.zip b/catalog-be/src/main/resources/import/tosca/onap-types/extZteVDU/extZteVDU.zip
new file mode 100644
index 0000000000..a7ad624422
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/extZteVDU/extZteVDU.zip
Binary files differ
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/extZteVL/extZteVL.json b/catalog-be/src/main/resources/import/tosca/onap-types/extZteVL/extZteVL.json
new file mode 100644
index 0000000000..0104a79c21
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/extZteVL/extZteVL.json
@@ -0,0 +1,15 @@
+{
+ "payloadName": "extZteVL.yml",
+ "contactId": "jh0003",
+ "name": "ext ZTE VL",
+ "description": "Ext ZTE VL",
+ "resourceIconPath": "network",
+ "resourceType": "VL",
+ "categories": [{
+ "name": "Generic",
+ "subcategories": [{
+ "name": "Network Elements"
+ }]
+ }],
+ "tags": ["ext ZTE VL"]
+} \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/extZteVL/extZteVL.yml b/catalog-be/src/main/resources/import/tosca/onap-types/extZteVL/extZteVL.yml
new file mode 100644
index 0000000000..8618019587
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/extZteVL/extZteVL.yml
@@ -0,0 +1,69 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+node_types:
+ tosca.nodes.nfv.ext.zte.VL:
+ derived_from: tosca.nodes.Root
+ properties:
+ segmentation_id:
+ type: string
+ required: false
+ network_name:
+ type: string
+ required: false
+ is_predefined:
+ type: boolean
+ required: false
+ mtu:
+ type: integer
+ required: false
+ dns_nameservers:
+ type: list
+ required: false
+ entry_schema:
+ type: string
+ physical_network:
+ type: string
+ required: false
+ dhcp_enabled:
+ type: boolean
+ required: false
+ network_id:
+ type: string
+ required: false
+ host_routes:
+ type: list
+ required: false
+ entry_schema:
+ type: tosca.datatypes.nfv.ext.HostRouteInfo
+ ip_version:
+ type: integer
+ required: false
+ vendor:
+ type: string
+ required: false
+ name:
+ type: string
+ required: false
+ start_ip:
+ type: string
+ required: false
+ vlan_transparent:
+ type: boolean
+ required: false
+ cidr:
+ type: string
+ required: false
+ gateway_ip:
+ type: string
+ required: false
+ network_type:
+ type: string
+ required: false
+ end_ip:
+ type: string
+ required: false
+ location_info:
+ type: tosca.datatypes.nfv.ext.LocationInfo
+ required: false
+ capabilities:
+ virtual_linkable:
+ type: tosca.capabilities.nfv.VirtualLinkable \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/extZteVL/extZteVL.zip b/catalog-be/src/main/resources/import/tosca/onap-types/extZteVL/extZteVL.zip
new file mode 100644
index 0000000000..5f04404f25
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/extZteVL/extZteVL.zip
Binary files differ
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/vduCompute/vduCompute.json b/catalog-be/src/main/resources/import/tosca/onap-types/vduCompute/vduCompute.json
new file mode 100644
index 0000000000..42f5978ad1
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/vduCompute/vduCompute.json
@@ -0,0 +1,15 @@
+{
+ "payloadName": "vduCompute.yml",
+ "contactId": "jh0003",
+ "name": "VDU Compute",
+ "description": "VDU Compute",
+ "resourceIconPath": "compute",
+ "resourceType": "VFC",
+ "categories": [{
+ "name": "Generic",
+ "subcategories": [{
+ "name": "Infrastructure"
+ }]
+ }],
+ "tags": ["VDU Compute"]
+} \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/vduCompute/vduCompute.yml b/catalog-be/src/main/resources/import/tosca/onap-types/vduCompute/vduCompute.yml
new file mode 100644
index 0000000000..a1c4b486b6
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/vduCompute/vduCompute.yml
@@ -0,0 +1,96 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+node_types:
+ tosca.nodes.nfv.VDU.Compute:
+ derived_from: tosca.nodes.Root
+ properties:
+ configurable_properties:
+ type: map
+ required: true
+ status: SUPPORTED
+ entry_schema:
+ type: tosca.datatypes.nfv.VnfcConfigurableProperties
+ name:
+ type: string
+ required: true
+ status: SUPPORTED
+ nfvi_constraints:
+ type: list
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ descrption:
+ type: string
+ required: true
+ status: SUPPORTED
+ boot_order:
+ type: list
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: string
+ attributes:
+ private_address:
+ type: string
+ status: SUPPORTED
+ public_address:
+ type: string
+ status: SUPPORTED
+ networks:
+ type: string
+ status: SUPPORTED
+ ports:
+ type: string
+ status: SUPPORTED
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - virtual_storage:
+ capability: tosca.capabilities.nfv.VirtualStorage
+ occurrences:
+ - 0
+ - UNBOUNDED
+ capabilities:
+ scalable:
+ type: tosca.capabilities.Scalable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ virtual_compute:
+ type: tosca.capabilities.nfv.VirtualCompute
+ occurrences:
+ - 1
+ - UNBOUNDED
+ endpoint:
+ type: tosca.capabilities.Endpoint.Admin
+ occurrences:
+ - 1
+ - UNBOUNDED
+ os:
+ type: tosca.capabilities.OperatingSystem
+ occurrences:
+ - 1
+ - UNBOUNDED
+ virtual_binding:
+ type: tosca.capabilities.nfv.VirtualBindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ host:
+ type: tosca.capabilities.Container
+ occurrences:
+ - 1
+ - UNBOUNDED
+ binding:
+ type: tosca.capabilities.network.Bindable
+ occurrences:
+ - 1
+ - UNBOUNDED
+ monitoring_parameter:
+ type: tosca.capabilities.nfv.Metric
+ occurrences:
+ - 1
+ - UNBOUNDED \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/vduCompute/vduCompute.zip b/catalog-be/src/main/resources/import/tosca/onap-types/vduCompute/vduCompute.zip
new file mode 100644
index 0000000000..311062658f
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/vduCompute/vduCompute.zip
Binary files differ
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.json b/catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.json
new file mode 100644
index 0000000000..f8d2254472
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.json
@@ -0,0 +1,15 @@
+{
+ "payloadName": "vduCpd.yml",
+ "contactId": "jh0003",
+ "name": "VDU Cpd",
+ "description": "VDU Cpd",
+ "resourceIconPath": "port",
+ "resourceType": "CP",
+ "categories": [{
+ "name": "Generic",
+ "subcategories": [{
+ "name": "Network Elements"
+ }]
+ }],
+ "tags": ["VDU Cpd"]
+} \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.yml b/catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.yml
new file mode 100644
index 0000000000..e1f6d068ce
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.yml
@@ -0,0 +1,56 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+node_types:
+ tosca.nodes.nfv.VduCpd:
+ derived_from: tosca.nodes.Root
+ properties:
+ virtual_network_interface_requirements:
+ type: list
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements
+ role:
+ type: string
+ required: false
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - root
+ - leaf
+ bitrate_requirement:
+ type: integer
+ required: false
+ status: SUPPORTED
+ description:
+ type: string
+ required: false
+ status: SUPPORTED
+ layer_protocol:
+ type: string
+ required: true
+ status: SUPPORTED
+ constraints:
+ - valid_values:
+ - ethernet
+ - mpls
+ - odu2
+ - ipv4
+ - ipv6
+ - pseudo_wire
+ address_data:
+ type: list
+ required: false
+ status: SUPPORTED
+ entry_schema:
+ type: tosca.datatype.nfv.AddressData
+ requirements:
+ - virtual_binding:
+ capability: tosca.capabilities.nfv.VirtualBindable
+ occurrences:
+ - 0
+ - UNBOUNDED
+ - virtual_link:
+ capability: tosca.capabilities.nfv.VirtualBindable
+ occurrences:
+ - 0
+ - UNBOUNDED \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.zip b/catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.zip
new file mode 100644
index 0000000000..6a9d4be124
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/vduCpd/vduCpd.zip
Binary files differ
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/vduVirtualStorage/vduVirtualStorage.json b/catalog-be/src/main/resources/import/tosca/onap-types/vduVirtualStorage/vduVirtualStorage.json
new file mode 100644
index 0000000000..7dab2ece94
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/vduVirtualStorage/vduVirtualStorage.json
@@ -0,0 +1,15 @@
+{
+ "payloadName": "vduVirtualStorage.yml",
+ "contactId": "jh0003",
+ "name": "VDU VirtualStorage",
+ "description": "VDU VirtualStorage",
+ "resourceIconPath": "objectStorage",
+ "resourceType": "VFC",
+ "categories": [{
+ "name": "Generic",
+ "subcategories": [{
+ "name": "Infrastructure"
+ }]
+ }],
+ "tags": ["VDU VirtualStorage"]
+} \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/vduVirtualStorage/vduVirtualStorage.yml b/catalog-be/src/main/resources/import/tosca/onap-types/vduVirtualStorage/vduVirtualStorage.yml
new file mode 100644
index 0000000000..5d22e1e6d4
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/vduVirtualStorage/vduVirtualStorage.yml
@@ -0,0 +1,27 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+node_types:
+ tosca.nodes.nfv.VDU.VirtualStorage:
+ derived_from: tosca.nodes.Root
+ properties:
+ id:
+ type: string
+ required: true
+ status: SUPPORTED
+ size_of_storage:
+ type: string
+ required: true
+ status: SUPPORTED
+ rdma_enabled:
+ type: boolean
+ required: false
+ status: SUPPORTED
+ type_of_storage:
+ type: string
+ required: true
+ status: SUPPORTED
+ capabilities:
+ virtual_storage:
+ type: tosca.capabilities.nfv.VirtualStorage
+ occurrences:
+ - 1
+ - UNBOUNDED
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/vduVirtualStorage/vduVirtualStorage.zip b/catalog-be/src/main/resources/import/tosca/onap-types/vduVirtualStorage/vduVirtualStorage.zip
new file mode 100644
index 0000000000..fb92ab45d9
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/vduVirtualStorage/vduVirtualStorage.zip
Binary files differ
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/vnfVirtualLinkDesc/vnfVirtualLinkDesc.json b/catalog-be/src/main/resources/import/tosca/onap-types/vnfVirtualLinkDesc/vnfVirtualLinkDesc.json
new file mode 100644
index 0000000000..b591df2bbb
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/vnfVirtualLinkDesc/vnfVirtualLinkDesc.json
@@ -0,0 +1,15 @@
+{
+ "payloadName": "vnfVirtualLinkDesc.yml",
+ "contactId": "jh0003",
+ "name": "VnfVirtualLinkDesc",
+ "description": "VnfVirtualLinkDesc",
+ "resourceIconPath": "network",
+ "resourceType": "VL",
+ "categories": [{
+ "name": "Generic",
+ "subcategories": [{
+ "name": "Infrastructure"
+ }]
+ }],
+ "tags": ["VnfVirtualLinkDesc"]
+} \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/vnfVirtualLinkDesc/vnfVirtualLinkDesc.yml b/catalog-be/src/main/resources/import/tosca/onap-types/vnfVirtualLinkDesc/vnfVirtualLinkDesc.yml
new file mode 100644
index 0000000000..ecb5e0bb52
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/vnfVirtualLinkDesc/vnfVirtualLinkDesc.yml
@@ -0,0 +1,26 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+node_types:
+ tosca.nodes.nfv.VnfVirtualLinkDesc:
+ 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_flavours:
+ type: map
+ entry_schema:
+ type: tosca.datatypes.nfv.VlFlavour
+ required: true
+ capabilities:
+ #monitoring_parameters:
+ # modeled as ad hoc (named) capabilities in node template
+ virtual_linkable:
+ type: tosca.capabilities.nfv.VirtualLinkable \ No newline at end of file
diff --git a/catalog-be/src/main/resources/import/tosca/onap-types/vnfVirtualLinkDesc/vnfVirtualLinkDesc.zip b/catalog-be/src/main/resources/import/tosca/onap-types/vnfVirtualLinkDesc/vnfVirtualLinkDesc.zip
new file mode 100644
index 0000000000..3d29909033
--- /dev/null
+++ b/catalog-be/src/main/resources/import/tosca/onap-types/vnfVirtualLinkDesc/vnfVirtualLinkDesc.zip
Binary files differ
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py
index e7eaa8610b..0530502376 100644
--- a/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py
+++ b/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py
@@ -51,7 +51,8 @@ def importHeatTypes(beHost, bePort, adminUser, fileDir, updateversion):
"subInterface",
"contrailV2VLANSubInterface",
"multiFlavorVFC",
- "vnfConfiguration"
+ "vnfConfiguration",
+ "underlayVpn"
]
responseCodes = [200, 201]
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py
index ec9e93e6e4..3d7d9a9bbf 100644
--- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py
+++ b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py
@@ -8,6 +8,7 @@ import time
from importNormativeElements import *
from importNormativeTypes import importNormativeTypes
from importHeatTypes import importHeatTypes
+from importOnapTypes import importOnapTypes
from importNormativeCapabilities import importNormativeCapabilities
from importCategoryTypes import importCategories
from importNormativeInterfaceLifecycleTypes import importNormativeInterfaceLifecycleType
@@ -121,6 +122,10 @@ def main(argv):
fileLocation = baseFileLocation + "heat-types/"
resultsHeat = importHeatTypes(beHost, bePort, adminUser, fileLocation, updateversion)
handleResults(resultsHeat, updateversion)
+
+ fileLocation = baseFileLocation + "onap-types/"
+ resultsHeat = importOnapTypes(beHost, bePort, adminUser, fileLocation, updateversion)
+ handleResults(resultsHeat, updateversion)
fileLocation = baseFileLocation + "group-types/"
importGroupTypes(beHost, bePort, adminUser, False, fileLocation)
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py
new file mode 100644
index 0000000000..44b63a795b
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py
@@ -0,0 +1,101 @@
+import pycurl
+import sys, getopt
+from StringIO import StringIO
+import json
+import copy
+from importCommon import *
+from importNormativeTypes import *
+import importCommon
+
+################################################################################################################################################
+# #
+# Import all users from a given file #
+# #
+# activation : #
+# python importUsers.py [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ] #
+# #
+# shortest activation (be host = localhost, be port = 8080): #
+# python importUsers.py [-f <input file> | --ifile=<input file> ] #
+# #
+################################################################################################################################################
+
+def importOnapTypes(beHost, bePort, adminUser, fileDir, updateversion):
+
+ onapTypes = [ "vduCompute",
+ "vduCpd",
+ "vduVirtualStorage",
+ "vnfVirtualLinkDesc"
+ ]
+
+ responseCodes = [200, 201]
+
+ if(updateversion == 'false'):
+ responseCodes = [200, 201, 409]
+
+ results = []
+ for onapType in onapTypes:
+ result = createNormativeType(beHost, bePort, adminUser, fileDir, onapType, updateversion)
+ results.append(result)
+ if ( result[1] == None or result[1] not in responseCodes) :
+ print "Failed creating heat type " + onapType + ". " + str(result[1])
+ return results
+
+
+def main(argv):
+ print 'Number of arguments:', len(sys.argv), 'arguments.'
+
+ beHost = 'localhost'
+ bePort = '8080'
+ adminUser = 'jh0003'
+ updateversion = 'true'
+
+ try:
+ opts, args = getopt.getopt(argv,"i:p:u:v:h:",["ip=","port=","user=","updateversion="])
+ except getopt.GetoptError:
+ usage()
+ errorAndExit(2, 'Invalid input')
+
+ for opt, arg in opts:
+ #print opt, arg
+ if opt == '-h':
+ usage()
+ sys.exit(3)
+ elif opt in ("-i", "--ip"):
+ beHost = arg
+ elif opt in ("-p", "--port"):
+ bePort = arg
+ elif opt in ("-u", "--user"):
+ adminUser = arg
+ elif opt in ("-v", "--updateversion"):
+ if (arg.lower() == "false" or arg.lower() == "no"):
+ updateversion = 'false'
+
+ print 'be host =',beHost,', be port =', bePort,', user =', adminUser
+
+ if ( beHost == None ):
+ usage()
+ sys.exit(3)
+
+ results = importOnapTypes(beHost, bePort, adminUser, "../../../import/tosca/onap-types/", updateversion)
+
+ print "-----------------------------"
+ for result in results:
+ print "{0:20} | {1:6}".format(result[0], result[1])
+ print "-----------------------------"
+
+ responseCodes = [200, 201]
+
+ if(updateversion == 'false'):
+ responseCodes = [200, 201, 409]
+
+ failedNormatives = filter(lambda x: x[1] == None or x[1] not in responseCodes, results)
+ if (len(failedNormatives) > 0):
+ errorAndExit(1, None)
+ else:
+ errorAndExit(0, None)
+
+
+if __name__ == "__main__":
+ main(sys.argv[1:])
+
+
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionAll.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionAll.py
index 72198ceab6..d45b27e755 100644
--- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionAll.py
+++ b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionAll.py
@@ -85,6 +85,10 @@ def main(argv):
fileLocation = baseFileLocation + "heat-types/"
resultsHeat = importHeatTypes(beHost, bePort, adminUser, fileLocation, updateversion)
handleResults(resultsHeat, updateversion)
+
+ fileLocation = baseFileLocation + "onap-types/"
+ resultsOnap = importOnapTypes(beHost, bePort, adminUser, fileLocation, updateversion)
+ handleResults(resultsOnap, updateversion)
errorAndExit(0, None)