Remove the cyclic dependencies in vRNC definition
[parser.git] / tosca2heat / tosca-parser / toscaparser / extensions / nfv / tests / data / vRNC / Definitions / vRNC.yaml
index 2617b4d..a134e3c 100644 (file)
@@ -35,28 +35,28 @@ dsl_definitions:
   compute_props_os_DEF: &compute_props_os_DEF
     architecture: x86_64
     type: Linux
-    distribution: Ubuntu
-    version: 14.10
+    distribution: Cirros
+    version: 0.3.2
 
   compute_props_host_MM: &compute_props_host_MM
-    disk_size: 20 GB
+    disk_size: 1 GB
     num_cpus: 2
-    mem_size: 1024 MB
+    mem_size: 64 MB
 
   compute_props_host_CM: &compute_props_host_CM
     disk_size: 0 GB
     num_cpus: 2
-    mem_size: 1024 MB
+    mem_size: 64 MB
 
   compute_props_host_DM: &compute_props_host_DM
     disk_size: 0 GB
     num_cpus: 2
-    mem_size: 1024 MB
+    mem_size: 64 MB
 
   compute_props_host_LB: &compute_props_host_LB
     disk_size: 0 GB
     num_cpus: 2
-    mem_size: 1024 MB
+    mem_size: 64 MB
 
 # topology template definition of the cloud application or service
 topology_template:
@@ -67,15 +67,25 @@ topology_template:
   inputs:
     mm_storage_size:
       type: integer
-      default: 20 GB
+      default: 1
       description: mm additional block storage size
       constraints:
         - in_range: [ 1, 200 ]
+    id:
+      type: string
+      description: ID of this VNF
+      default: UMTS
+    vendor:
+      type: string
+      description: name of the vendor who generate this VNF
+      default: ZTE
+    version:
+      type: version
+      description: version of the software for this VNF
+      default: 1.0
 
   substitution_mappings:
     node_type: rnc.nodes.VNF
-    properties:
-      vnfmtype: UMTS
     requirements:
       virtualLink_VNFM: [ MM_Port_CTRL, virtualLink ]
       virtualLink_EMS: [ MM_Port_EMS, virtualLink ]
@@ -84,6 +94,19 @@ topology_template:
   # definition of the node templates of the topology
   node_templates:
     MM_Active:
+      type: tosca.nodes.SoftwareComponent
+      properties:
+        component_version: 1.0
+      requirements:
+        - host: MM_Active_Host
+      interfaces:
+        Standard:
+          create:
+            implementation: mm_install.sh
+          configure:
+            implementation: mm_active_configure.sh
+
+    MM_Active_Host:
       type: rnc.nodes.compute.MM
       properties:
         activestatus: 1
@@ -97,18 +120,24 @@ topology_template:
         - local_storage:
             node: MM_BlockStorage
             relationship: Storage_attachesto
-        - high_availability: MM_Passive
       artifacts:
         #the VM image of MM
         vm_image: mm.image
+
+    MM_Passive:
+      type: tosca.nodes.SoftwareComponent
+      properties:
+        component_version: 1.0
+      requirements:
+        - host: MM_Passive_Host
       interfaces:
         Standard:
           create:
             implementation: mm_install.sh
           configure:
-            implementation: mm_active_configure.sh
+            implementation: mm_passvie_configure.sh
 
-    MM_Passive:
+    MM_Passive_Host:
       type: rnc.nodes.compute.MM
       properties:
         activestatus: 0
@@ -126,14 +155,21 @@ topology_template:
       artifacts:
         #the VM image of MM
         vm_image: mm.image
+
+    CM_Active:
+      type: tosca.nodes.SoftwareComponent
+      properties:
+        component_version: 1.0
+      requirements:
+        - host: CM_Active_Host
       interfaces:
         Standard:
           create:
-            implementation: mm_install.sh
+            implementation: cm_install.sh
           configure:
-            implementation: mm_passvie_configure.sh
+            implementation: cm_active_configure.sh
 
-    CM_Active:
+    CM_Active_Host:
       type: rnc.nodes.compute.CM
       properties:
         activestatus: 1
@@ -145,21 +181,26 @@ topology_template:
         scalable:
           properties:
             min_instances: 1
-            max_instances: 126
+            max_instances: 12
             default_instances: 1
-      requirements:
-        - high_availability: CM_Passive
       artifacts:
         #the VM image of CM
         vm_image: cm.image
+
+    CM_Passive:
+      type: tosca.nodes.SoftwareComponent
+      properties:
+        component_version: 1.0
+      requirements:
+        - host: CM_Passive_Host
       interfaces:
         Standard:
           create:
             implementation: cm_install.sh
           configure:
-            implementation: cm_active_configure.sh
+            implementation: cm_passvie_configure.sh
 
-    CM_Passive:
+    CM_Passive_Host:
       type: rnc.nodes.compute.CM
       properties:
         activestatus: 0
@@ -171,21 +212,28 @@ topology_template:
         scalable:
           properties:
             min_instances: 1
-            max_instances: 126
+            max_instances: 12
             default_instances: 1
       requirements:
         - high_availability: CM_Active
       artifacts:
         #the VM image of CM
         vm_image: mm.image
+
+    DM:
+      type: tosca.nodes.SoftwareComponent
+      properties:
+        component_version: 1.0
+      requirements:
+        - host: DM_Host
       interfaces:
         Standard:
           create:
-            implementation: cm_install.sh
+            implementation: dm_install.sh
           configure:
-            implementation: cm_passvie_configure.sh
+            implementation: dm_configure.sh
 
-    DM:
+    DM_Host:
       type: rnc.nodes.compute.DM
       capabilities:
         os:
@@ -195,18 +243,25 @@ topology_template:
         scalable:
           properties:
             min_instances: 1
-            max_instances: 120
+            max_instances: 12
             default_instances: 1
       artifacts:
         vm_image: dm.image
+
+    LB:
+      type: tosca.nodes.SoftwareComponent
+      properties:
+        component_version: 1.0
+      requirements:
+        - host: LB_Host
       interfaces:
         Standard:
           create:
-            implementation: dm_install.sh
+            implementation: lb_install.sh
           configure:
-            implementation: dm_configure.sh
+            implementation: lb_configure.sh
 
-    LB:
+    LB_Host:
       type: rnc.nodes.compute.LB
       capabilities:
         os:
@@ -216,17 +271,11 @@ topology_template:
         scalable:
           properties:
             min_instances: 1
-            max_instances: 20
+            max_instances: 2
             default_instances: 1
       artifacts:
         #the VM image of LB
         vm_image: lb.image
-      interfaces:
-        Standard:
-          create:
-            implementation: lb_install.sh
-          configure:
-            implementation: lb_configure.sh
 
     MM_BlockStorage:
       type: rnc.nodes.BlockStorage
@@ -285,58 +334,112 @@ topology_template:
         segmentation_id: 101
         dhcp_enabled: false
 
-    MM_Port_EMS:
+    MM_Active_Port_EMS:
       type: rnc.nodes.CP.MM
       properties:
         order: 0
         is_default: true
       requirements:
-        - virtualBinding: MM_Active
+        - virtualBinding: MM_Active_Host
         - virtualLink: EMS_Net
 
-    MM_Port_EMS:
+    MM_Active_Port_EXTERMEDIA:
+      type: rnc.nodes.CP.MM
+      properties:
+        order: 1
+        is_default: true
+      requirements:
+        - virtualBinding: MM_Active_Host
+        - virtualLink: EMS_Net
+
+    MM_Active_Port_CTRL:
+      type: rnc.nodes.CP.MM
+      properties:
+        order: 2
+        is_default: false
+      requirements:
+        - virtualBinding: MM_Active_Host
+        - virtualLink: CTRL_Net
+
+    MM_Active_Port_INTERMEDIA:
+      type: rnc.nodes.CP.MM
+      properties:
+        order: 3
+        is_default: false
+      requirements:
+        - virtualBinding: MM_Active_Host
+        - virtualLink: EXTERMEDIA_Net
+
+    MM_Passive_Port_EMS:
       type: rnc.nodes.CP.MM
       properties:
         order: 0
         is_default: true
       requirements:
-        - virtualBinding: MM_Active
+        - virtualBinding: MM_Passive_Host
         - virtualLink: EMS_Net
 
-    MM_Port_CTRL:
+    MM_Passive_Port_EXTERMEDIA:
       type: rnc.nodes.CP.MM
       properties:
         order: 1
+        is_default: true
+      requirements:
+        - virtualBinding: MM_Passive_Host
+        - virtualLink: EMS_Net
+
+    MM_Passive_Port_CTRL:
+      type: rnc.nodes.CP.MM
+      properties:
+        order: 2
         is_default: false
       requirements:
-        - virtualBinding: MM_Active
+        - virtualBinding: MM_Passive_Host
         - virtualLink: CTRL_Net
 
-    MM_Port_EXTERMEDIA:
+    MM_Passive_Port_INTERMEDIA:
       type: rnc.nodes.CP.MM
       properties:
-        order: 2
+        order: 3
         is_default: false
       requirements:
-        - virtualBinding: MM_Active
+        - virtualBinding: MM_Passive_Host
         - virtualLink: EXTERMEDIA_Net
 
-    CM_Port_CTRL:
+    CM_Active_Port_CTRL:
+      type: rnc.nodes.CP.CM
+      properties:
+        order: 0
+        is_default: true
+      requirements:
+        - virtualBinding: CM_Active_Host
+        - virtualLink: CTRL_Net
+
+    CM_Active_Port_INTERMEDIA:
+      type: rnc.nodes.CP.CM
+      properties:
+        order: 1
+        is_default: false
+      requirements:
+        - virtualBinding: CM_Active_Host
+        - virtualLink: INTERMEDIA_Net
+
+    CM_Passive_Port_CTRL:
       type: rnc.nodes.CP.CM
       properties:
         order: 0
         is_default: true
       requirements:
-        - virtualBinding: CM_Active
+        - virtualBinding: CM_Passive_Host
         - virtualLink: CTRL_Net
 
-    CM_Port_INTERMEDIA:
+    CM_Passive_Port_INTERMEDIA:
       type: rnc.nodes.CP.CM
       properties:
         order: 1
         is_default: false
       requirements:
-        - virtualBinding: CM_Active
+        - virtualBinding: CM_Passive_Host
         - virtualLink: INTERMEDIA_Net
 
     DM_Port_CTRL:
@@ -345,7 +448,7 @@ topology_template:
         order: 0
         is_default: true
       requirements:
-        - virtualBinding: DM
+        - virtualBinding: DM_Host
         - virtualLink: CTRL_Net
 
     DM_Port_INTERMEDIA:
@@ -354,7 +457,7 @@ topology_template:
         order: 1
         is_default: false
       requirements:
-        - virtualBinding: DM
+        - virtualBinding: DM_Host
         - virtualLink: INTERMEDIA_Net
 
     LB_Port_CTRL:
@@ -363,7 +466,7 @@ topology_template:
         order: 0
         is_default: true
       requirements:
-        - virtualBinding: LB
+        - virtualBinding: LB_Host
         - virtualLink: CTRL_Net
 
     LB_Port_INTERMEDIA:
@@ -372,7 +475,7 @@ topology_template:
         order: 1
         is_default: false
       requirements:
-        - virtualBinding: LB
+        - virtualBinding: LB_Host
         - virtualLink: INTERMEDIA_Net
 
     LB_Port_EXTERMEDIA:
@@ -381,7 +484,7 @@ topology_template:
         order: 2
         is_default: false
       requirements:
-        - virtualBinding: LB
+        - virtualBinding: LB_Host
         - virtualLink: EXTERMEDIA_Net
 
   # definition of the relationship templates of the topology
@@ -395,19 +498,19 @@ topology_template:
   outputs:
     private_ip_of_MM:
       description: The private IP address of the MM.
-      value: { get_attribute: [ MM_Active, private_address ] }
+      value: { get_attribute: [ MM_Active_Host, private_address ] }
 
     private_ip_of_CM:
       description: The private IP address of the CM.
-      value: { get_attribute: [ CM_Active, private_address ] }
+      value: { get_attribute: [ CM_Active_Host, private_address ] }
 
     private_ip_of_DM:
       description: The private IP address of the DM.
-      value: { get_attribute: [ DM, private_address ] }
+      value: { get_attribute: [ DM_Host, private_address ] }
 
     private_ip_of_LB:
       description: The private IP address of the LB.
-      value: { get_attribute: [ LB, private_address ] }
+      value: { get_attribute: [ LB_Host, private_address ] }
 
   # definition of logical groups of node templates within the topology
   # To be continue about this section