move all the networks to new tosca engine

Change-Id: Id7b42ee34ae8a0c4fbcbaaee291fec8c37d6056a
diff --git a/roles/cord-profile/templates/nbi-net.yaml.j2 b/roles/cord-profile/templates/nbi-net.yaml.j2
index cc7cc88..a568f3b 100644
--- a/roles/cord-profile/templates/nbi-net.yaml.j2
+++ b/roles/cord-profile/templates/nbi-net.yaml.j2
@@ -2,6 +2,11 @@
 
 imports:
    - custom_types/xos.yaml
+   - custom_types/site.yaml
+   - custom_types/slice.yaml
+   - custom_types/flavor.yaml
+   - custom_types/network.yaml
+   - custom_types/networktemplate.yaml
 
 description: network for north bound interface (nbi)
 
@@ -11,36 +16,39 @@
 # site, fully created in deployment.yaml
     {{ site_name }}:
       type: tosca.nodes.Site
+      properties:
+          name: {{ site_name }}
 
 # nbi network
     nbi_template:
       type: tosca.nodes.NetworkTemplate
       properties:
+          name: nbi_template
           visibility: private
           translation: none
           vtn_kind: PRIVATE
 
     nbi_network:
-      type: tosca.nodes.network.Network
+      type: tosca.nodes.Network
       properties:
-          ip_version: 4
-          cidr: 113.0.0.0/24
+          name: nbi_network
+          subnet: 113.0.0.0/24
       requirements:
-          - network_template:
+          - template:
               node: nbi_template
-              relationship: tosca.relationships.UsesNetworkTemplate
+              relationship: tosca.relationships.BelongsToOne
           - owner:
               node: {{ site_name }}_nbi
-              relationship: tosca.relationships.MemberOfSlice
+              relationship: tosca.relationships.BelongsToOne
 
     {{ site_name }}_nbi:
       description: This slice exists solely to own the private network
       type: tosca.nodes.Slice
       properties:
-          network: noauto
+          name: {{ site_name }}_nbi
+          default_isolation: vm
       requirements:
           - site:
               node: {{ site_name }}
-              relationship: tosca.relationships.MemberOfSite
-
+              relationship: tosca.relationships.BelongsToOne
 
diff --git a/roles/cord-profile/templates/s11-net.yaml.j2 b/roles/cord-profile/templates/s11-net.yaml.j2
index ce5ee43..b60182c 100644
--- a/roles/cord-profile/templates/s11-net.yaml.j2
+++ b/roles/cord-profile/templates/s11-net.yaml.j2
@@ -8,7 +8,6 @@
    - custom_types/network.yaml
    - custom_types/networktemplate.yaml
 
-
 description: network for S11 interface
 
 topology_template:
@@ -20,12 +19,6 @@
       properties:
           name: {{ site_name }}
 
-#    mysite_vMME_slice:
-#      type: tosca.nodes.Slice
-#      properties:
-#          must-exist: true
-#          name: mysite_vMME_slice
-
 # s11 network
     s11_template:
       type: tosca.nodes.NetworkTemplate
@@ -47,10 +40,6 @@
           - owner:
               node: {{ site_name }}_s11
               relationship: tosca.relationships.BelongsToOne
- #         - slices:
- #             node: mysite_vMME_slice
- #             relationship: tosca.relationships.BelongsToMany
-
 
     {{ site_name }}_s11:
       description: This slice exists solely to own the private network
diff --git a/roles/cord-profile/templates/s1mme-net.yaml.j2 b/roles/cord-profile/templates/s1mme-net.yaml.j2
index 7026333..f18659c 100644
--- a/roles/cord-profile/templates/s1mme-net.yaml.j2
+++ b/roles/cord-profile/templates/s1mme-net.yaml.j2
@@ -2,6 +2,11 @@
 
 imports:
    - custom_types/xos.yaml
+   - custom_types/site.yaml
+   - custom_types/slice.yaml
+   - custom_types/flavor.yaml
+   - custom_types/network.yaml
+   - custom_types/networktemplate.yaml
 
 description: network for S1MME interface
 
@@ -11,36 +16,39 @@
 # site, fully created in deployment.yaml
     {{ site_name }}:
       type: tosca.nodes.Site
+      properties:
+          name: {{ site_name }}
 
 # s1mme network
     s1mme_template:
       type: tosca.nodes.NetworkTemplate
       properties:
+          name: s1mme_template
           visibility: private
           translation: none
           vtn_kind: PRIVATE
 
     s1mme_network:
-      type: tosca.nodes.network.Network
+      type: tosca.nodes.Network
       properties:
-          ip_version: 4
-          cidr: 116.0.0.0/24
+          name: s1mme_network
+          subnet: 116.0.0.0/24
       requirements:
-          - network_template:
+          - template:
               node: s1mme_template
-              relationship: tosca.relationships.UsesNetworkTemplate
+              relationship: tosca.relationships.BelongsToOne
           - owner:
               node: {{ site_name }}_s1mme
-              relationship: tosca.relationships.MemberOfSlice
+              relationship: tosca.relationships.BelongsToOne
 
     {{ site_name }}_s1mme:
       description: This slice exists solely to own the private network
       type: tosca.nodes.Slice
       properties:
-          network: noauto
+          name: {{ site_name }}_s1mme
+          default_isolation: vm
       requirements:
           - site:
               node: {{ site_name }}
-              relationship: tosca.relationships.MemberOfSite
-
+              relationship: tosca.relationships.BelongsToOne
 
diff --git a/roles/cord-profile/templates/s1u-net.yaml.j2 b/roles/cord-profile/templates/s1u-net.yaml.j2
index dfa5e68..90d2962 100644
--- a/roles/cord-profile/templates/s1u-net.yaml.j2
+++ b/roles/cord-profile/templates/s1u-net.yaml.j2
@@ -2,6 +2,11 @@
 
 imports:
    - custom_types/xos.yaml
+   - custom_types/site.yaml
+   - custom_types/slice.yaml
+   - custom_types/flavor.yaml
+   - custom_types/network.yaml
+   - custom_types/networktemplate.yaml
 
 description: network for S1U interface
 
@@ -11,36 +16,39 @@
 # site, fully created in deployment.yaml
     {{ site_name }}:
       type: tosca.nodes.Site
+      properties:
+          name: {{ site_name }}
 
 # s1u network
     s1u_template:
       type: tosca.nodes.NetworkTemplate
       properties:
+          name: s1u_template
           visibility: private
           translation: none
           vtn_kind: PRIVATE
 
     s1u_network:
-      type: tosca.nodes.network.Network
+      type: tosca.nodes.Network
       properties:
-          ip_version: 4
-          cidr: 111.0.0.0/24
+          name: s1u_network
+          subnet: 111.0.0.0/24
       requirements:
-          - network_template:
+          - template:
               node: s1u_template
-              relationship: tosca.relationships.UsesNetworkTemplate
+              relationship: tosca.relationships.BelongsToOne
           - owner:
               node: {{ site_name }}_s1u
-              relationship: tosca.relationships.MemberOfSlice
+              relationship: tosca.relationships.BelongsToOne
 
     {{ site_name }}_s1u:
       description: This slice exists solely to own the private network
       type: tosca.nodes.Slice
       properties:
-          network: noauto
+          name: {{ site_name }}_s1u
+          default_isolation: vm
       requirements:
           - site:
               node: {{ site_name }}
-              relationship: tosca.relationships.MemberOfSite
-
+              relationship: tosca.relationships.BelongsToOne
 
diff --git a/roles/cord-profile/templates/sbi-net.yaml.j2 b/roles/cord-profile/templates/sbi-net.yaml.j2
index 901f725..cd8605a 100644
--- a/roles/cord-profile/templates/sbi-net.yaml.j2
+++ b/roles/cord-profile/templates/sbi-net.yaml.j2
@@ -2,6 +2,11 @@
 
 imports:
    - custom_types/xos.yaml
+   - custom_types/site.yaml
+   - custom_types/slice.yaml
+   - custom_types/flavor.yaml
+   - custom_types/network.yaml
+   - custom_types/networktemplate.yaml
 
 description: network for south bound interface (sbi)
 
@@ -11,36 +16,39 @@
 # site, fully created in deployment.yaml
     {{ site_name }}:
       type: tosca.nodes.Site
+      properties:
+          name: {{ site_name }}
 
 # sbi network
     sbi_template:
       type: tosca.nodes.NetworkTemplate
       properties:
+          name: sbi_template
           visibility: private
           translation: none
           vtn_kind: PRIVATE
 
     sbi_network:
-      type: tosca.nodes.network.Network
+      type: tosca.nodes.Network
       properties:
-          ip_version: 4
-          cidr: 114.0.0.0/24
+          name: sbi_network
+          subnet: 114.0.0.0/24
       requirements:
-          - network_template:
+          - template:
               node: sbi_template
-              relationship: tosca.relationships.UsesNetworkTemplate
+              relationship: tosca.relationships.BelongsToOne
           - owner:
               node: {{ site_name }}_sbi
-              relationship: tosca.relationships.MemberOfSlice
+              relationship: tosca.relationships.BelongsToOne
 
     {{ site_name }}_sbi:
       description: This slice exists solely to own the private network
       type: tosca.nodes.Slice
       properties:
-          network: noauto
+          name: {{ site_name }}_sbi
+          default_isolation: vm
       requirements:
           - site:
               node: {{ site_name }}
-              relationship: tosca.relationships.MemberOfSite
-
+              relationship: tosca.relationships.BelongsToOne
 
diff --git a/roles/cord-profile/templates/sgi-net.yaml.j2 b/roles/cord-profile/templates/sgi-net.yaml.j2
index 784133f..c38a561 100644
--- a/roles/cord-profile/templates/sgi-net.yaml.j2
+++ b/roles/cord-profile/templates/sgi-net.yaml.j2
@@ -2,6 +2,11 @@
 
 imports:
    - custom_types/xos.yaml
+   - custom_types/site.yaml
+   - custom_types/slice.yaml
+   - custom_types/flavor.yaml
+   - custom_types/network.yaml
+   - custom_types/networktemplate.yaml
 
 description: network for SGI interface
 
@@ -11,36 +16,39 @@
 # site, fully created in deployment.yaml
     {{ site_name }}:
       type: tosca.nodes.Site
+      properties:
+          name: {{ site_name }}
 
 # sgi network
     sgi_template:
       type: tosca.nodes.NetworkTemplate
       properties:
+          name: sgi_template
           visibility: private
           translation: none
           vtn_kind: PRIVATE
 
     sgi_network:
-      type: tosca.nodes.network.Network
+      type: tosca.nodes.Network
       properties:
-          ip_version: 4
-          cidr: 115.0.0.0/24
+          name: sgi_network
+          subnet: 115.0.0.0/24
       requirements:
-          - network_template:
+          - template:
               node: sgi_template
-              relationship: tosca.relationships.UsesNetworkTemplate
+              relationship: tosca.relationships.BelongsToOne
           - owner:
               node: {{ site_name }}_sgi
-              relationship: tosca.relationships.MemberOfSlice
+              relationship: tosca.relationships.BelongsToOne
 
     {{ site_name }}_sgi:
       description: This slice exists solely to own the private network
       type: tosca.nodes.Slice
       properties:
-          network: noauto
+          name: {{ site_name }}_sgi
+          default_isolation: vm
       requirements:
           - site:
               node: {{ site_name }}
-              relationship: tosca.relationships.MemberOfSite
-
+              relationship: tosca.relationships.BelongsToOne