Update M-CORD TOSCA recipes (too many conflicts in cherry-picks)
Change-Id: I37fb3af9b2297c9e05bb87b394d5cba5bb98229d
diff --git a/profile_manifests/mcord.yml b/profile_manifests/mcord.yml
index ae3a896..fdf1613 100644
--- a/profile_manifests/mcord.yml
+++ b/profile_manifests/mcord.yml
@@ -36,20 +36,20 @@
- wan-net.yaml
- vsg-net.yaml
- flat-net.yaml
+ - xos-gui-extensions.yml
+
+xos_new_tosca_config_templates:
+ - mcord-subscriber.yml
+ - s11-net.yaml
- s1u-net.yaml
- s1mme-net.yaml
- nbi-net.yaml
- sbi-net.yaml
- sgi-net.yaml
-# - mcord-services.yml
- - xos-gui-extensions.yml
- - internet-emulator-service.yaml
-
-xos_new_tosca_config_templates:
- - mcord-subscriber.yml
- - s11-net.yaml
- mcord-services.yml
-
+ - internet-emulator-service.yaml
+ - sdn-controller-service.yaml
+ - vspgwc-service.yaml
xos_other_templates:
- fabric-network-cfg.json
@@ -72,12 +72,21 @@
keypair: onos_rsa
- name: fabric
path: orchestration/xos_services/fabric
- - name: exampleservice
- path: orchestration/xos_services/exampleservice
- keypair: exampleservice_rsa
- name: vmme
path: orchestration/xos_services/vmme
keypair: mcord_rsa
+ - name: internetemulator
+ path: orchestration/xos_services/internetemulator
+ keypair: mcord_rsa
+ - name: sdncontroller
+ path: orchestration/xos_services/sdn-controller
+ keypair: mcord_rsa
+ - name: vspgwc
+ path: orchestration/xos_services/vspgwc
+ keypair: mcord_rsa
+ - name: exampleservice
+ path: orchestration/xos_services/exampleservice
+ keypair: exampleservice_rsa
profile_library: "mcord"
diff --git a/roles/cord-profile/templates/internet-emulator-service.yaml.j2 b/roles/cord-profile/templates/internet-emulator-service.yaml.j2
index ac7768f..8b56bf6 100644
--- a/roles/cord-profile/templates/internet-emulator-service.yaml.j2
+++ b/roles/cord-profile/templates/internet-emulator-service.yaml.j2
@@ -22,7 +22,14 @@
imports:
- custom_types/xos.yaml
- - custom_types/internetemulator.yaml
+ - custom_types/slice.yaml
+ - custom_types/site.yaml
+ - custom_types/image.yaml
+ - custom_types/flavor.yaml
+ - custom_types/network.yaml
+ - custom_types/networkslice.yaml
+ - custom_types/internetemulatorservice.yaml
+ - custom_types/internetemulatorserviceinstance.yaml
topology_template:
node_templates:
@@ -30,87 +37,104 @@
# site, image, fully created in deployment.yaml
{{ site_name }}:
type: tosca.nodes.Site
+ properties:
+ must-exist: true
+ name: {{ site_name }}
m1.small:
type: tosca.nodes.Flavor
- m1.large:
- type: tosca.nodes.Flavor
- m1.medium:
- type: tosca.nodes.Flavor
- m1.xlarge:
- type: tosca.nodes.Flavor
+ properties:
+ name: m1.small
+ must-exist: true
trusty-server-multi-nic:
type: tosca.nodes.Image
+ properties:
+ name: trusty-server-multi-nic
+ must-exist: true
# management networks, fully created in management-net.yaml
management:
- type: tosca.nodes.network.Network.XOS
+ type: tosca.nodes.Network
properties:
- no-create: true
- no-delete: true
- no-update: true
+ must-exist: true
+ name: management
{% if use_management_hosts %}
management_hosts:
- type: tosca.nodes.network.Network.XOS
+ type: tosca.nodes.Network
properties:
- no-create: true
- no-delete: true
- no-update: true
+ must-exist: true
+ name: management_hosts
{% endif %}
# sgi_network is for connectivity between VMs, fully created in sgi-net.yaml
sgi_network:
- type: tosca.nodes.network.Network.XOS
+ type: tosca.nodes.Network
properties:
- no-create: true
- no-delete: true
- no-update: true
+ must-exist: true
+ name: sgi_network
# CORD Services
service#internetemulator:
type: tosca.nodes.InternetEmulatorService
properties:
- public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
+ name: internetemulator
+ public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/mcord_rsa.pub') }}
private_key_fn: /opt/xos/services/internetemulator/keys/mcord_rsa
artifacts:
pubkey: /opt/cord_profile/key_import/mcord_rsa.pub
# CORD Slices
- mysite_internetemulator:
+ {{ site_name }}_internetemulator:
description: Internet Emulator Slice
type: tosca.nodes.Slice
properties:
+ name: {{ site_name }}_internetemulator
+ default_isolation: vm
network: noauto
requirements:
- site:
node: mysite
- relationship: tosca.relationships.MemberOfSite
- - internetemulator_service:
+ relationship: tosca.relationships.BelongsToOne
+ - service:
node: service#internetemulator
- relationship: tosca.relationships.MemberOfService
+ relationship: tosca.relationships.BelongsToOne
- default_image:
node: trusty-server-multi-nic
- relationship: tosca.relationships.DefaultImage
+ relationship: tosca.relationships.BelongsToOne
- default_flavor:
node: m1.small
- relationship: tosca.relationships.DefaultFlavor
- - connection_to_management:
- node: management
- relationship: tosca.relationships.ConnectsToNetwork
- - connection_to_sgi_network:
- node: sgi_network
- relationship: tosca.relationships.ConnectsToNetwork
+ relationship: tosca.relationships.BelongsToOne
# CORD Service Instances
- serviceinstance#internetemulator:
+ serviceinstance#internetemulator_instance:
type: tosca.nodes.InternetEmulatorServiceInstance
+ properties:
+ name: internetemulator_instance
requirements:
- - tenant:
+ - owner:
node: service#internetemulator
- relationship: tosca.relationships.TenantOfService
- - dependency:
+ relationship: tosca.relationships.BelongsToOne
+
+# CORD NetworkSlices
+ internetemulator_slice_management_network:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: management
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
node: {{ site_name }}_internetemulator
- relationship: tosca.relationships.DependsOn
+ relationship: tosca.relationships.BelongsToOne
+
+ internetemulator_slice_sgi_network:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: sgi_network
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
+ node: {{ site_name }}_internetemulator
+ relationship: tosca.relationships.BelongsToOne
\ No newline at end of file
diff --git a/roles/cord-profile/templates/mcord-services.yml.j2 b/roles/cord-profile/templates/mcord-services.yml.j2
index 2935f82..a5730d0 100644
--- a/roles/cord-profile/templates/mcord-services.yml.j2
+++ b/roles/cord-profile/templates/mcord-services.yml.j2
@@ -82,7 +82,7 @@
type: tosca.nodes.Network
properties:
must-exist: true
- name: management
+ name: management_hosts
{% endif %}
# s1u_network is for connectivity between VMs, fully created in s1u-net.yaml
@@ -115,6 +115,12 @@
properties:
must-exist: true
name: sgi_network
+# s1mme_network is for connectivity between VMs, fully created in s1mme-net.yaml
+ s1mme_network:
+ type: tosca.nodes.Network
+ properties:
+ must-exist: true
+ name: s1mme_network
@@ -142,6 +148,7 @@
private_key_fn: /opt/xos/services/vmme/keys/mcord_rsa
artifacts:
pubkey: /opt/cord_profile/key_import/mcord_rsa.pub
+
intel_mme:
type: tosca.nodes.VMMEVendor
properties:
@@ -173,6 +180,7 @@
properties:
name: {{ site_name }}_vmme
default_isolation: vm
+ network: noauto
requirements:
- site:
node: mysite
@@ -186,20 +194,33 @@
- default_flavor:
node: m1.small
relationship: tosca.relationships.BelongsToOne
- #- connection_to_management:
- # node: management
- # relationship: tosca.relationships.BelongsToMany
- #- connection_to_s11_network:
- # node: s11_network
- # relationship: tosca.relationships.ConnectsToNetwork
-# will enable this part after sapan fix the obj issue
-# mme_slice_s11_network:
-# type: tosca.nodes.NetworkSlice
-# requirements:
-# - network:
-# node: s11_network
-# relationship: tosca.relationships.BelongsToOne
-# - slice:
-# node: {{ site_name }}_vmme
-# relationship: tosca.relationships.BelongsToOne
+ mme_slice_management_network:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: management
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
+ node: {{ site_name }}_vmme
+ relationship: tosca.relationships.BelongsToOne
+
+ mme_slice_s11_network:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: s11_network
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
+ node: {{ site_name }}_vmme
+ relationship: tosca.relationships.BelongsToOne
+
+ mme_slice_s1mme_network:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: s1mme_network
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
+ node: {{ site_name }}_vmme
+ relationship: tosca.relationships.BelongsToOne
diff --git a/roles/cord-profile/templates/nbi-net.yaml.j2 b/roles/cord-profile/templates/nbi-net.yaml.j2
index cc7cc88..edc649a 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,41 @@
# 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
+ permit_all_slices: true
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:
+ name: {{ site_name }}_nbi
+ default_isolation: vm
network: noauto
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..f44b0fd 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
@@ -40,6 +33,7 @@
properties:
name: s11_network
subnet: 112.0.0.0/24
+ permit_all_slices: true
requirements:
- template:
node: s11_template
@@ -47,10 +41,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
@@ -58,6 +48,7 @@
properties:
name: {{ site_name }}_s11
default_isolation: vm
+ network: noauto
requirements:
- site:
node: {{ site_name }}
diff --git a/roles/cord-profile/templates/s1mme-net.yaml.j2 b/roles/cord-profile/templates/s1mme-net.yaml.j2
index 7026333..b0300ee 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,41 @@
# 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
+ permit_all_slices: true
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:
+ name: {{ site_name }}_s1mme
+ default_isolation: vm
network: noauto
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..e2bb51c 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,41 @@
# 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
+ permit_all_slices: true
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:
+ name: {{ site_name }}_s1u
+ default_isolation: vm
network: noauto
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..fe56d4c 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,41 @@
# 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
+ permit_all_slices: true
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:
+ name: {{ site_name }}_sbi
+ default_isolation: vm
network: noauto
requirements:
- site:
node: {{ site_name }}
- relationship: tosca.relationships.MemberOfSite
-
+ relationship: tosca.relationships.BelongsToOne
diff --git a/roles/cord-profile/templates/sdn-controller-service.yaml.j2 b/roles/cord-profile/templates/sdn-controller-service.yaml.j2
new file mode 100644
index 0000000..e0f4b36
--- /dev/null
+++ b/roles/cord-profile/templates/sdn-controller-service.yaml.j2
@@ -0,0 +1,173 @@
+{#
+Copyright 2017-present Open Networking Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+
+
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: created by platform-install, need to add M-CORD services later
+
+imports:
+ - custom_types/xos.yaml
+ - custom_types/slice.yaml
+ - custom_types/site.yaml
+ - custom_types/image.yaml
+ - custom_types/flavor.yaml
+ - custom_types/network.yaml
+ - custom_types/networkslice.yaml
+ - custom_types/sdncontrollerservice.yaml
+ - custom_types/sdncontrollervendor.yaml
+ - custom_types/sdncontrollerserviceinstance.yaml
+
+topology_template:
+ node_templates:
+
+# site, image, fully created in deployment.yaml
+ {{ site_name }}:
+ type: tosca.nodes.Site
+ properties:
+ must-exist: true
+ name: {{ site_name }}
+
+ m1.small:
+ type: tosca.nodes.Flavor
+ properties:
+ name: m1.small
+ must-exist: true
+
+ trusty-server-multi-nic:
+ type: tosca.nodes.Image
+ properties:
+ name: trusty-server-multi-nic
+ must-exist: true
+
+# management networks, fully created in management-net.yaml
+ management:
+ type: tosca.nodes.Network
+ properties:
+ must-exist: true
+ name: management
+
+{% if use_management_hosts %}
+ management_hosts:
+ type: tosca.nodes.Network
+ properties:
+ must-exist: true
+ name: management_hosts
+{% endif %}
+
+# sbi_network is for connectivity between VMs, fully created in sbi-net.yaml
+ sbi_network:
+ type: tosca.nodes.Network
+ properties:
+ must-exist: true
+ name: sbi_network
+
+# nbi_network is for connectivity between VMs, fully created in nbi-net.yaml
+ nbi_network:
+ type: tosca.nodes.Network
+ properties:
+ must-exist: true
+ name: nbi_network
+
+
+# CORD Services
+ service#sdncontroller:
+ type: tosca.nodes.SDNControllerService
+ properties:
+ name: sdncontroller
+ public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/mcord_rsa.pub') }}
+ private_key_fn: /opt/xos/services/sdncontroller/keys/mcord_rsa
+ artifacts:
+ pubkey: /opt/cord_profile/key_import/mcord_rsa.pub
+
+# CORD Slices
+ {{ site_name }}_sdncontroller:
+ description: SDN controller slice
+ type: tosca.nodes.Slice
+ properties:
+ name: {{ site_name }}_sdncontroller
+ default_isolation: vm
+ network: noauto
+ requirements:
+ - site:
+ node: mysite
+ relationship: tosca.relationships.BelongsToOne
+ - service:
+ node: service#sdncontroller
+ relationship: tosca.relationships.BelongsToOne
+ - default_image:
+ node: trusty-server-multi-nic
+ relationship: tosca.relationships.BelongsToOne
+ - default_flavor:
+ node: m1.small
+ relationship: tosca.relationships.BelongsToOne
+
+# CORD Service Instances
+
+ intel_sdncontroller:
+ type: tosca.nodes.SDNControllerVendor
+ properties:
+ name: intel_sdncontroller
+ requirements:
+ - image:
+ node: trusty-server-multi-nic
+ relationship: tosca.relationships.BelongsToOne
+ - flavor:
+ node: m1.small
+ relationship: tosca.relationships.BelongsToOne
+
+ serviceinstance#sdncontroller_instance:
+ type: tosca.nodes.SDNControllerServiceInstance
+ properties:
+ name: sdncontroller_instance1
+ requirements:
+ - sdncontroller_vendor:
+ node: intel_sdncontroller
+ relationship: tosca.relationships.BelongsToOne
+ - owner:
+ node: service#sdncontroller
+ relationship: tosca.relationships.BelongsToOne
+
+# CORD NetworkSlices
+ sdncontroller_slice_management_network:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: management
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
+ node: {{ site_name }}_sdncontroller
+ relationship: tosca.relationships.BelongsToOne
+
+ sdncontroller_slice_sbi_network:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: sbi_network
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
+ node: {{ site_name }}_sdncontroller
+ relationship: tosca.relationships.BelongsToOne
+
+ sdncontroller_slice_nbi_network:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: nbi_network
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
+ node: {{ site_name }}_sdncontroller
+ 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..db2779e 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,41 @@
# 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
+ permit_all_slices: true
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:
+ name: {{ site_name }}_sgi
+ default_isolation: vm
network: noauto
requirements:
- site:
node: {{ site_name }}
- relationship: tosca.relationships.MemberOfSite
-
+ relationship: tosca.relationships.BelongsToOne
diff --git a/roles/cord-profile/templates/vspgwc-service.yaml.j2 b/roles/cord-profile/templates/vspgwc-service.yaml.j2
new file mode 100644
index 0000000..2b9da61
--- /dev/null
+++ b/roles/cord-profile/templates/vspgwc-service.yaml.j2
@@ -0,0 +1,173 @@
+{#
+Copyright 2017-present Open Networking Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+#}
+
+
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: created by platform-install, need to add M-CORD services later
+
+imports:
+ - custom_types/xos.yaml
+ - custom_types/slice.yaml
+ - custom_types/site.yaml
+ - custom_types/image.yaml
+ - custom_types/flavor.yaml
+ - custom_types/network.yaml
+ - custom_types/networkslice.yaml
+ - custom_types/vspgwcservice.yaml
+ - custom_types/vspgwcvendor.yaml
+ - custom_types/vspgwctenant.yaml
+
+topology_template:
+ node_templates:
+
+# site, image, fully created in deployment.yaml
+ {{ site_name }}:
+ type: tosca.nodes.Site
+ properties:
+ must-exist: true
+ name: {{ site_name }}
+
+ m1.small:
+ type: tosca.nodes.Flavor
+ properties:
+ name: m1.small
+ must-exist: true
+
+ trusty-server-multi-nic:
+ type: tosca.nodes.Image
+ properties:
+ name: trusty-server-multi-nic
+ must-exist: true
+
+# management networks, fully created in management-net.yaml
+ management:
+ type: tosca.nodes.Network
+ properties:
+ must-exist: true
+ name: management
+
+{% if use_management_hosts %}
+ management_hosts:
+ type: tosca.nodes.Network
+ properties:
+ must-exist: true
+ name: management_hosts
+{% endif %}
+
+# s11_network is for connectivity between VMs, fully created in s11-net.yaml
+ s11_network:
+ type: tosca.nodes.Network
+ properties:
+ must-exist: true
+ name: s11_network
+
+# nbi_network is for connectivity between VMs, fully created in nbi-net.yaml
+ nbi_network:
+ type: tosca.nodes.Network
+ properties:
+ must-exist: true
+ name: nbi_network
+
+
+# CORD Services
+ service#vspgwc:
+ type: tosca.nodes.VSPGWCService
+ properties:
+ name: vspgwc
+ public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/mcord_rsa.pub') }}
+ private_key_fn: /opt/xos/services/vspgwc/keys/mcord_rsa
+ artifacts:
+ pubkey: /opt/cord_profile/key_import/mcord_rsa.pub
+
+# CORD Slices
+ {{ site_name }}_vspgwc:
+ description: SDN controller slice
+ type: tosca.nodes.Slice
+ properties:
+ name: {{ site_name }}_vspgwc
+ default_isolation: vm
+ network: noauto
+ requirements:
+ - site:
+ node: mysite
+ relationship: tosca.relationships.BelongsToOne
+ - service:
+ node: service#vspgwc
+ relationship: tosca.relationships.BelongsToOne
+ - default_image:
+ node: trusty-server-multi-nic
+ relationship: tosca.relationships.BelongsToOne
+ - default_flavor:
+ node: m1.small
+ relationship: tosca.relationships.BelongsToOne
+
+# CORD Service Instances
+
+ intel_vspgwc:
+ type: tosca.nodes.VSPGWCVendor
+ properties:
+ name: intel_vspgwc
+ requirements:
+ - image:
+ node: trusty-server-multi-nic
+ relationship: tosca.relationships.BelongsToOne
+ - flavor:
+ node: m1.small
+ relationship: tosca.relationships.BelongsToOne
+
+ serviceinstance#vspgwc_instance:
+ type: tosca.nodes.VSPGWCTenant
+ properties:
+ name: vspgwc_instance1
+ requirements:
+ - vspgwc_vendor:
+ node: intel_vspgwc
+ relationship: tosca.relationships.BelongsToOne
+ - owner:
+ node: service#vspgwc
+ relationship: tosca.relationships.BelongsToOne
+
+# CORD NetworkSlices
+ vspgwc_slice_management_network:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: management
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
+ node: {{ site_name }}_vspgwc
+ relationship: tosca.relationships.BelongsToOne
+
+ vspgwc_slice_s11_network:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: s11_network
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
+ node: {{ site_name }}_vspgwc
+ relationship: tosca.relationships.BelongsToOne
+
+ vspgwc_slice_nbi_network:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: nbi_network
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
+ node: {{ site_name }}_vspgwc
+ relationship: tosca.relationships.BelongsToOne
\ No newline at end of file