[CORD-2349] Migrating REM-CORD
Change-Id: Iae573428e3bee89026262055263f24a32dd12183
diff --git a/roles/cord-profile/templates/addressmanager-service.yaml.j2 b/roles/cord-profile/templates/addressmanager-service.yaml.j2
index c23d423..aae46f2 100644
--- a/roles/cord-profile/templates/addressmanager-service.yaml.j2
+++ b/roles/cord-profile/templates/addressmanager-service.yaml.j2
@@ -15,14 +15,15 @@
limitations under the License.
#}
+# Only used by BASE-CORD
tosca_definitions_version: tosca_simple_yaml_1_0
description: TOSCA for bootstrapping Address Manager service
imports:
- - custom_types/xos.yaml
- - custom_types/addressmanager.yaml
+ - custom_types/addressmanagerservice.yaml
+ - custom_types/addresspool.yaml
topology_template:
node_templates:
@@ -30,23 +31,28 @@
addresses_vsg:
type: tosca.nodes.AddressPool
properties:
+ name: addresses_vsg
addresses: 10.7.1.0/24
gateway_ip: 10.7.1.1
gateway_mac: a4:23:05:06:01:01
+ requirements:
+ - service:
+ node: service#addressmanager
+ relationship: tosca.relationships.BelongsToOne
addresses_public:
type: tosca.nodes.AddressPool
properties:
+ name: addresses_public
addresses: 10.8.1.0/24
gateway_ip: 10.8.1.1
gateway_mac: a4:23:05:06:01:01
+ requirements:
+ - service:
+ node: service#addressmanager
+ relationship: tosca.relationships.BelongsToOne
service#addressmanager:
type: tosca.nodes.AddressManagerService
- requirements:
- - addresses_vsg:
- node: addresses_vsg
- relationship: tosca.relationships.ProvidesAddresses
- - addresses_public:
- node: addresses_public
- relationship: tosca.relationships.ProvidesAddresses
+ properties:
+ name: addressmanager
diff --git a/roles/cord-profile/templates/carrierethernet-global-app.yaml.j2 b/roles/cord-profile/templates/carrierethernet-global-app.yaml.j2
index b408f26..d1406fb 100644
--- a/roles/cord-profile/templates/carrierethernet-global-app.yaml.j2
+++ b/roles/cord-profile/templates/carrierethernet-global-app.yaml.j2
@@ -2,24 +2,27 @@
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- - custom_types/xos.yaml
+ - custom_types/onosapp.yaml
+ - custom_types/onosservice.yaml
+ - custom_types/serviceinstanceattribute.yaml
description: carrierethernet-app onboarding, generated by platform-install
topology_template:
node_templates:
+ # ONOS_CORD fully created in onos-global-service.yaml
service#ONOS_CORD:
type: tosca.nodes.ONOSService
properties:
- no-delete: true
- no-create: true
- no-update: true
+ name: ONOS_CORD
+ must-exist: true
CarrierEthernet_ONOS_app:
type: tosca.nodes.ONOSApp
- requirements:
- - onos_tenant:
- node: service#ONOS_CORD
- relationship: tosca.relationships.TenantOfService
properties:
+ name: CarrierEthernet_ONOS_app
install_dependencies: {{ onos_mavenrepo_url }}/repository/org/opencord/ce/ce-api/1.1.0-SNAPSHOT/ce-api-1.1.0-SNAPSHOT.oar, {{ onos_mavenrepo_url }}/repository/org/opencord/ce/ecord-global-app/1.1.0-SNAPSHOT/ecord-global-app-1.1.0-SNAPSHOT.oar
+ requirements:
+ - owner:
+ node: service#ONOS_CORD
+ relationship: tosca.relationships.BelongsToOne
diff --git a/roles/cord-profile/templates/carrierethernet-local-app.yaml.j2 b/roles/cord-profile/templates/carrierethernet-local-app.yaml.j2
index b882fb4..70f24aa 100644
--- a/roles/cord-profile/templates/carrierethernet-local-app.yaml.j2
+++ b/roles/cord-profile/templates/carrierethernet-local-app.yaml.j2
@@ -1,36 +1,48 @@
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- - custom_types/xos.yaml
+ - custom_types/onosapp.yaml
+ - custom_types/onosservice.yaml
+ - custom_types/serviceinstanceattribute.yaml
description: carrierethernet-app onboarding, generated by platform-install
topology_template:
node_templates:
+ # ONOS_CORD, fully created in vtn.yaml
service#ONOS_CORD:
type: tosca.nodes.ONOSService
properties:
- no-delete: true
- no-create: true
- no-update: true
+ name: ONOS_CORD
+ must-exist: true
+ # ONOS_Fabric, fully created in fabric.yaml
service#ONOS_Fabric:
type: tosca.nodes.ONOSService
properties:
- no-delete: true
- no-create: true
- no-update: true
+ name: ONOS_Fabric
+ must-exist: true
CarrierEthernet_ONOS_app:
type: tosca.nodes.ONOSApp
requirements:
- - onos_tenant:
+ - owner:
node: service#ONOS_CORD
- relationship: tosca.relationships.TenantOfService
+ relationship: tosca.relationships.BelongsToOne
properties:
+ name: CarrierEthernet_ONOS_app
install_dependencies: {{ onos_mavenrepo_url }}/repository/org/opencord/ce/ce-api/1.1.0-SNAPSHOT/ce-api-1.1.0-SNAPSHOT.oar, {{ onos_mavenrepo_url }}/repository/org/opencord/ce/bigswitch/1.1.0-SNAPSHOT/bigswitch-1.1.0-SNAPSHOT.oar, {{ onos_mavenrepo_url }}/repository/org/opencord/ce/local-channel/1.1.0-SNAPSHOT/local-channel-1.1.0-SNAPSHOT.oar, {{ onos_mavenrepo_url }}//repository/org/opencord/ce/vee/1.1.0-SNAPSHOT/vee-1.1.0-SNAPSHOT.oar
dependencies: org.onosproject.drivers.microsemi, org.onosproject.cfm
- component_config: >
+
+ CarrierEthernet_ONOS_app_component_config:
+ type: tosca.nodes.ServiceInstanceAttribute
+ requirements:
+ - service_instance:
+ node: CarrierEthernet_ONOS_app
+ relationship: tosca.relationships.BelongsToOne
+ properties:
+ name: component_config
+ value: >
{
"org.onosproject.netconf.ctl.impl.NetconfControllerImpl": {
"netconfConnectTimeout": "120",
@@ -44,12 +56,22 @@
CarrierEthernet_Fabric_ONOS_app:
type: tosca.nodes.ONOSApp
requirements:
- - onos_tenant:
+ - owner:
node: service#ONOS_Fabric
- relationship: tosca.relationships.TenantOfService
+ relationship: tosca.relationships.BelongsToOne
properties:
+ name: CarrierEthernet_Fabric_ONOS_app
install_dependencies: {{ onos_mavenrepo_url }}/repository/org/opencord/ce/ce-api/1.1.0-SNAPSHOT/ce-api-1.1.0-SNAPSHOT.oar, {{ onos_mavenrepo_url }}/repository/org/opencord/ce/bigswitch/1.1.0-SNAPSHOT/bigswitch-1.1.0-SNAPSHOT.oar, {{ onos_mavenrepo_url }}//repository/org/opencord/ce/local-channel/1.1.0-SNAPSHOT/local-channel-1.1.0-SNAPSHOT.oar, {{ onos_mavenrepo_url }}//repository/org/opencord/ce/fabric/1.1.0-SNAPSHOT/fabric-1.1.0-SNAPSHOT.oar
- component_config: >
+
+ CarrierEthernet_Fabric_ONOS_app_component_config:
+ type: tosca.nodes.ServiceInstanceAttribute
+ requirements:
+ - service_instance:
+ node: CarrierEthernet_Fabric_ONOS_app
+ relationship: tosca.relationships.BelongsToOne
+ properties:
+ name: component_config
+ value: >
{
"org.opencord.ce.local.bigswitch.BigSwitchManager": {
"domainId": "{{ carrierethernet_domainid_prefix }}-fabric-onos"
diff --git a/roles/cord-profile/templates/cord-services.yaml.j2 b/roles/cord-profile/templates/cord-services.yaml.j2
index c3138fe..0fb5171 100644
--- a/roles/cord-profile/templates/cord-services.yaml.j2
+++ b/roles/cord-profile/templates/cord-services.yaml.j2
@@ -21,170 +21,249 @@
description: Just enough Tosca to get the vSG slice running on the CORD POD, created by platform-install
imports:
- - custom_types/xos.yaml
- - custom_types/vtr.yaml
- - custom_types/addressmanager.yaml
+ - custom_types/addressmanagerservice.yaml
+ - custom_types/addresspool.yaml
+ - custom_types/image.yaml
+ - custom_types/network.yaml
+ - custom_types/networkslice.yaml
+ - custom_types/networktemplate.yaml
+ - custom_types/nodelabel.yaml
+ - custom_types/onosapp.yaml
+ - custom_types/onosservice.yaml
+ - custom_types/site.yaml
+ - custom_types/service.yaml
+ - custom_types/servicedependency.yaml
+ - custom_types/serviceinstanceattribute.yaml
+ - custom_types/serviceinstancelink.yaml
+ - custom_types/slice.yaml
+ - custom_types/voltservice.yaml
+ - custom_types/vrouterservice.yaml
+ - custom_types/vsgservice.yaml
+ - custom_types/vtrservice.yaml
topology_template:
node_templates:
-# site, image, fully created in deployment.yaml
{{ site_name }}:
type: tosca.nodes.Site
+ properties:
+ name: {{ site_name }}
+ must-exist: true
image#vsg-1.1:
type: tosca.nodes.Image
+ properties:
+ name: vsg-1.1
# 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
+ name: management
+ must-exist: true
{% 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
{% endif %}
service#rcord:
type: tosca.nodes.Service
+ properties:
+ name: rcord
+
+ rcord_volt:
+ type: tosca.nodes.ServiceDependency
+ properties:
+ connect_method: None
requirements:
- - rcord_tenant:
+ - subscriber_service:
+ node: service#rcord
+ relationship: tosca.relationships.BelongsToOne
+ - provider_service:
node: service#volt
- relationship: tosca.relationships.TenantOfService
+ relationship: tosca.relationships.BelongsToOne
# ONOS_CORD, fully created in vtn.yaml
service#ONOS_CORD:
type: tosca.nodes.ONOSService
properties:
- no-delete: true
- no-create: true
- no-update: true
+ name: ONOS_CORD
+ must-exist: true
# ONOS_Fabric, fully created in fabric.yaml
service#ONOS_Fabric:
type: tosca.nodes.ONOSService
properties:
- no-delete: true
- no-create: true
- no-update: true
+ name: ONOS_Fabric
+ must-exist: true
# CORD Services
service#vtr:
type: tosca.nodes.VTRService
properties:
- view_url: /admin/vtr/vtrservice/$id$/
- kind: vTR
- replaces: service_vtr
+ name: vtr
+ kind: rcord
service#volt:
type: tosca.nodes.VOLTService
- requirements:
- - vsg_tenant:
- node: service#vsg
- relationship: tosca.relationships.TenantOfService
properties:
- view_url: /admin/volt/voltservice/$id$/
- kind: vOLT
- replaces: service_volt
- public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
+ name: volt
+ kind: rcord
+ public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/volt_rsa.pub') }}
private_key_fn: /opt/xos/services/volt/keys/volt_rsa
- artifacts:
- pubkey: /opt/cord_profile/key_import/volt_rsa.pub
+
+ volt_vsg:
+ type: tosca.nodes.ServiceDependency
+ properties:
+ connect_method: None
+ requirements:
+ - subscriber_service:
+ node: service#volt
+ relationship: tosca.relationships.BelongsToOne
+ - provider_service:
+ node: service#vsg
+ relationship: tosca.relationships.BelongsToOne
addresses_vsg:
type: tosca.nodes.AddressPool
properties:
+ name: addresses_vsg
addresses: 10.7.1.0/24
gateway_ip: 10.7.1.1
gateway_mac: a4:23:05:06:01:01
+ requirements:
+ - service:
+ node: service#addressmanager
+ relationship: tosca.relationships.BelongsToOne
addresses_public:
type: tosca.nodes.AddressPool
properties:
+ name: addresses_public
addresses: 10.8.1.0/24
gateway_ip: 10.8.1.1
gateway_mac: a4:23:05:06:01:01
+ requirements:
+ - service:
+ node: service#addressmanager
+ relationship: tosca.relationships.BelongsToOne
label_vsg:
type: tosca.nodes.NodeLabel
+ properties:
+ name: label_vsg
service#vsg:
type: tosca.nodes.VSGService
- requirements:
- - addressing_tenant:
- node: service#addressmanager
- relationship: tosca.relationships.TenantOfService
- - vrouter_tenant:
- node: service#vrouter
- relationship: tosca.relationships.TenantOfService
properties:
- view_url: /admin/vsg/vsgservice/$id$/
- backend_network_label: hpc_client
- public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
+ name: vsg
+ # backend_network_label: hpc_client # what is this? can we drop it?
+ public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/vsg_rsa.pub') }}
private_key_fn: /opt/xos/services/vsg/keys/vsg_rsa
-# node_label: label_vsg
- replaces: service_vsg
- artifacts:
- pubkey: /opt/cord_profile/key_import/vsg_rsa.pub
+ # node_label: label_vsg
+
+ vsg_vrouter:
+ type: tosca.nodes.ServiceDependency
+ properties:
+ connect_method: None
+ requirements:
+ - subscriber_service:
+ node: service#vsg
+ relationship: tosca.relationships.BelongsToOne
+ - provider_service:
+ node: service#vrouter
+ relationship: tosca.relationships.BelongsToOne
+
+ vsg_addressmanager:
+ type: tosca.nodes.ServiceDependency
+ properties:
+ connect_method: None
+ requirements:
+ - subscriber_service:
+ node: service#vsg
+ relationship: tosca.relationships.BelongsToOne
+ - provider_service:
+ node: service#addressmanager
+ relationship: tosca.relationships.BelongsToOne
service#addressmanager:
type: tosca.nodes.AddressManagerService
- requirements:
- - addresses_vsg:
- node: addresses_vsg
- relationship: tosca.relationships.ProvidesAddresses
- - addresses_public:
- node: addresses_public
- relationship: tosca.relationships.ProvidesAddresses
+ properties:
+ name: addressmanager
service#vrouter:
type: tosca.nodes.VRouterService
properties:
- view_url: /admin/vrouter/vrouterservice/$id$/
- replaces: service_vrouter
+ name: vrouter
+ rest_hostname: onos-fabric.{{ site_suffix }}
+ rest_port: 8181
+ rest_user: onos
+ rest_pass: rocks
vRouter_ONOS_app:
- type: tosca.nodes.ONOSvRouterApp
+ type: tosca.nodes.ONOSApp
requirements:
- - onos_tenant:
+ - owner:
node: service#ONOS_Fabric
- relationship: tosca.relationships.TenantOfService
- - vrouter_service:
- node: service#vrouter
- relationship: tosca.relationships.UsedByService
+ relationship: tosca.relationships.BelongsToOne
properties:
+ name: vRouter_ONOS_app
dependencies: org.onosproject.fpm
- autogenerate: vrouter-network-cfg
+
+ vRouter_ONOS_app_autogenerate:
+ type: tosca.nodes.ServiceInstanceAttribute
+ requirements:
+ - service_instance:
+ node: vRouter_ONOS_app
+ relationship: tosca.relationships.BelongsToOne
+ properties:
+ name: autogenerate
+ value: vrouter-network-cfg
+
+ vRouter_ONOS_app_ONOS_CORD:
+ type: tosca.nodes.ServiceInstanceLink
+ requirements:
+ - provider_service_instance:
+ node: vRouter_ONOS_app
+ relationship: tosca.relationships.BelongsToOne
+ - subscriber_service:
+ node: service#vrouter
+ relationship: tosca.relationships.BelongsToOne
template#vsg:
type: tosca.nodes.NetworkTemplate
properties:
+ name: vsg
visibility: private
translation: none
vtn_kind: VSG
# Networks required by the CORD setup
{{ site_name }}_vsg-access:
- type: tosca.nodes.network.Network
+ type: tosca.nodes.Network
properties:
- ip_version: 4
+ name: {{ site_name }}_vsg-access
+ # ip_version: 4
requirements:
- - network_template:
+ - template:
node: template#vsg
- relationship: tosca.relationships.UsesNetworkTemplate
+ relationship: tosca.relationships.BelongsToOne
- owner:
node: {{ site_name }}_vsg
- relationship: tosca.relationships.MemberOfSlice
- - connection:
- node: {{ site_name }}_vsg
- relationship: tosca.relationships.ConnectsToSlice
+ relationship: tosca.relationships.BelongsToOne
+
+ networkslice#{{ site_name }}_vsg-access_to_{{ site_name }}_vsg:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: {{ site_name }}_vsg-access
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
+ node: {{ site_name }}_vsg
+ relationship: tosca.relationships.BelongsToOne
# CORD Slices
{{ site_name }}_vsg:
@@ -192,81 +271,97 @@
type: tosca.nodes.Slice
properties:
network: noauto
- requirements:
- - vsg_service:
+ name: {{ site_name }}_vsg
+ requirements:
+ - service:
node: service#vsg
- relationship: tosca.relationships.MemberOfService
+ relationship: tosca.relationships.BelongsToOne
- site:
node: {{ site_name }}
- relationship: tosca.relationships.MemberOfSite
- - management:
- node: management
- relationship: tosca.relationships.ConnectsToNetwork
-{% if use_management_hosts %}
- - management_hosts:
- node: management_hosts
- relationship: tosca.relationships.ConnectsToNetwork
-{% endif %}
- - image:
+ relationship: tosca.relationships.BelongsToOne
+ - default_image:
node: image#vsg-1.1
- relationship: tosca.relationships.DefaultImage
+ relationship: tosca.relationships.BelongsToOne
- in#lanside:
- type: tosca.nodes.InterfaceType
- properties:
- direction: in
+ networkslice#management_to_{{ site_name }}_vsg:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: management
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
+ node: {{ site_name }}_vsg
+ relationship: tosca.relationships.BelongsToOne
- out#lanside:
- type: tosca.nodes.InterfaceType
- properties:
- direction: out
+{% if use_management_hosts %}
+ networkslice#management_hosts_to_{{ site_name }}_vsg:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: management_hosts
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
+ node: {{ site_name }}_vsg
+ relationship: tosca.relationships.BelongsToOne
+{% endif %}
+
+ # TODO: migrate interfaces when we'll start using them
+ # in#lanside:
+ # type: tosca.nodes.InterfaceType
+ # properties:
+ # direction: in
- in#wanside:
- type: tosca.nodes.InterfaceType
- properties:
- direction: in
+ # out#lanside:
+ # type: tosca.nodes.InterfaceType
+ # properties:
+ # direction: out
- out#wanside:
- type: tosca.nodes.InterfaceType
- properties:
- direction: out
+ # in#wanside:
+ # type: tosca.nodes.InterfaceType
+ # properties:
+ # direction: in
- volt_lanside:
- type: tosca.nodes.ServiceInterface
- requirements:
- - service:
- node: service#volt
- relationship: tosca.relationships.MemberOfService
- - interface:
- node: out#lanside
- relationship: tosca.relationships.IsType
+ # out#wanside:
+ # type: tosca.nodes.InterfaceType
+ # properties:
+ # direction: out
- vsg_lanside:
- type: tosca.nodes.ServiceInterface
- requirements:
- - service:
- node: service#vsg
- relationship: tosca.relationships.MemberOfService
- - interface:
- node: in#lanside
- relationship: tosca.relationships.IsType
+ # volt_lanside:
+ # type: tosca.nodes.ServiceInterface
+ # requirements:
+ # - service:
+ # node: service#volt
+ # relationship: tosca.relationships.MemberOfService
+ # - interface:
+ # node: out#lanside
+ # relationship: tosca.relationships.IsType
- vsg_wanside:
- type: tosca.nodes.ServiceInterface
- requirements:
- - service:
- node: service#vsg
- relationship: tosca.relationships.MemberOfService
- - interface:
- node: out#wanside
- relationship: tosca.relationships.IsType
+ # vsg_lanside:
+ # type: tosca.nodes.ServiceInterface
+ # requirements:
+ # - service:
+ # node: service#vsg
+ # relationship: tosca.relationships.MemberOfService
+ # - interface:
+ # node: in#lanside
+ # relationship: tosca.relationships.IsType
- addressmanager_wanside:
- type: tosca.nodes.ServiceInterface
- requirements:
- - service:
- node: service#addressmanager
- relationship: tosca.relationships.MemberOfService
- - interface:
- node: in#wanside
- relationship: tosca.relationships.IsType
\ No newline at end of file
+ # vsg_wanside:
+ # type: tosca.nodes.ServiceInterface
+ # requirements:
+ # - service:
+ # node: service#vsg
+ # relationship: tosca.relationships.MemberOfService
+ # - interface:
+ # node: out#wanside
+ # relationship: tosca.relationships.IsType
+
+ # addressmanager_wanside:
+ # type: tosca.nodes.ServiceInterface
+ # requirements:
+ # - service:
+ # node: service#addressmanager
+ # relationship: tosca.relationships.MemberOfService
+ # - interface:
+ # node: in#wanside
+ # relationship: tosca.relationships.IsType
\ No newline at end of file
diff --git a/roles/cord-profile/templates/deployment.yaml.j2 b/roles/cord-profile/templates/deployment.yaml.j2
index c572e54..e7cb060 100644
--- a/roles/cord-profile/templates/deployment.yaml.j2
+++ b/roles/cord-profile/templates/deployment.yaml.j2
@@ -19,7 +19,8 @@
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- - custom_types/xos.yaml
+ - custom_types/deployment.yaml
+ - custom_types/flavor.yaml
description: deployment config, generated by platform-install
@@ -31,16 +32,21 @@
{% for flavor in deployment_flavors %}
{{ flavor }}:
type: tosca.nodes.Flavor
-
+ properties:
+ name: {{ flavor }}
+ must-exist: true
{% endfor %}
# Deployment
{{ deployment_type }}:
type: tosca.nodes.Deployment
- requirements:
-{% for flavor in deployment_flavors %}
- - {{ flavor }}:
- node: {{ flavor }}
- relationship: tosca.relationships.SupportsFlavor
+ properties:
+ name: {{ deployment_type }}
+# NOTE look that this are outdated and not used anymore
+# requirements:
+# {% for flavor in deployment_flavors %}
+# - {{ flavor }}:
+# node: {{ flavor }}
+# relationship: tosca.relationships.SupportsFlavor
-{% endfor %}
+# {% endfor %}
diff --git a/roles/cord-profile/templates/ecord-services.yaml.j2 b/roles/cord-profile/templates/ecord-services.yaml.j2
index 7a8ec71..cbdc2bf 100644
--- a/roles/cord-profile/templates/ecord-services.yaml.j2
+++ b/roles/cord-profile/templates/ecord-services.yaml.j2
@@ -19,9 +19,22 @@
description: Just enough Tosca to get the vEG slice running on the CORD POD, created by platform-install
imports:
- - custom_types/xos.yaml
- - custom_types/veg.yaml
- - custom_types/addressmanager.yaml
+ - custom_types/addressmanagerservice.yaml
+ - custom_types/addresspool.yaml
+ - custom_types/image.yaml
+ - custom_types/network.yaml
+ - custom_types/networkslice.yaml
+ - custom_types/networktemplate.yaml
+ - custom_types/nodelabel.yaml
+ - custom_types/onosapp.yaml
+ - custom_types/onosservice.yaml
+ - custom_types/servicedependency.yaml
+ - custom_types/serviceinstanceattribute.yaml
+ - custom_types/serviceinstancelink.yaml
+ - custom_types/site.yaml
+ - custom_types/slice.yaml
+ - custom_types/vegservice.yaml
+ - custom_types/vrouterservice.yaml
topology_template:
node_templates:
@@ -29,135 +42,189 @@
# site, image, fully created in deployment.yaml
{{ site_name }}:
type: tosca.nodes.Site
+ properties:
+ name: {{ site_name }}
+ must-exist: true
image#vsg-1.1:
type: tosca.nodes.Image
+ properties:
+ name: vsg-1.1
# 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
+ name: management
+ must-exist: true
{% 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
{% endif %}
# ONOS_CORD, fully created in vtn.yaml
service#ONOS_CORD:
type: tosca.nodes.ONOSService
properties:
- no-delete: true
- no-create: true
- no-update: true
+ name: ONOS_CORD
+ must-exist: true
# ONOS_Fabric, fully created in fabric.yaml
service#ONOS_Fabric:
type: tosca.nodes.ONOSService
properties:
- no-delete: true
- no-create: true
- no-update: true
+ name: ONOS_Fabric
+ must-exist: true
# CORD Services
addresses_veg:
type: tosca.nodes.AddressPool
properties:
+ name: addresses_veg
addresses: 10.7.1.0/24
gateway_ip: 10.7.1.1
gateway_mac: a4:23:05:06:01:01
+ requirements:
+ - service:
+ node: service#addressmanager
+ relationship: tosca.relationships.BelongsToOne
addresses_public:
type: tosca.nodes.AddressPool
properties:
+ name: addresses_public
addresses: 10.8.1.0/24
gateway_ip: 10.8.1.1
gateway_mac: a4:23:05:06:01:01
+ requirements:
+ - service:
+ node: service#addressmanager
+ relationship: tosca.relationships.BelongsToOne
service#addressmanager:
type: tosca.nodes.AddressManagerService
- requirements:
- - addresses_veg:
- node: addresses_veg
- relationship: tosca.relationships.ProvidesAddresses
- - addresses_public:
- node: addresses_public
- relationship: tosca.relationships.ProvidesAddresses
+ properties:
+ name: addressmanager
label_veg:
type: tosca.nodes.NodeLabel
+ properties:
+ name: label_veg
service#veg:
type: tosca.nodes.VEGService
- requirements:
- - vrouter_tenant:
- node: service#vrouter
- relationship: tosca.relationships.TenantOfService
properties:
- view_url: /admin/vEG/vegservice/$id$/
- backend_network_label: hpc_client
- public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
+ name: veg
+ public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/veg_rsa.pub') }}
private_key_fn: /opt/xos/services/veg/keys/veg_rsa
-# node_label: label_veg
- replaces: service_veg
- artifacts:
- pubkey: /opt/cord_profile/key_import/veg_rsa.pub
+ # node_label: label_veg
+
+ veg_vrouter:
+ type: tosca.nodes.ServiceDependency
+ properties:
+ connect_method: None
+ requirements:
+ - subscriber_service:
+ node: service#veg
+ relationship: tosca.relationships.BelongsToOne
+ - provider_service:
+ node: service#vrouter
+ relationship: tosca.relationships.BelongsToOne
+
+ # NOTE are this connected?
+ veg_addressmanager:
+ type: tosca.nodes.ServiceDependency
+ properties:
+ connect_method: None
+ requirements:
+ - subscriber_service:
+ node: service#veg
+ relationship: tosca.relationships.BelongsToOne
+ - provider_service:
+ node: service#addressmanager
+ relationship: tosca.relationships.BelongsToOne
service#vrouter:
type: tosca.nodes.VRouterService
properties:
- view_url: /admin/vrouter/vrouterservice/$id$/
- replaces: service_vrouter
- requirements:
- - addresses_veg:
- node: addresses_veg
- relationship: tosca.relationships.ProvidesAddresses
- - addresses_public:
- node: addresses_public
- relationship: tosca.relationships.ProvidesAddresses
+ name: vrouter
+ rest_hostname: onos-fabric.{{ site_suffix }}
+ rest_port: 8181
+ rest_user: onos
+ rest_pass: rocks
+ # NOTE: shouldn't the addresses be attached to address_manager? I don't think vRouter is used now
+ # requirements:
+ # - addresses_veg:
+ # node: addresses_veg
+ # relationship: tosca.relationships.ProvidesAddresses
+ # - addresses_public:
+ # node: addresses_public
+ # relationship: tosca.relationships.ProvidesAddresses
vRouter_ONOS_app:
- type: tosca.nodes.ONOSvRouterApp
+ type: tosca.nodes.ONOSApp
requirements:
- - onos_tenant:
+ - owner:
node: service#ONOS_Fabric
- relationship: tosca.relationships.TenantOfService
- - vrouter_service:
- node: service#vrouter
- relationship: tosca.relationships.UsedByService
+ relationship: tosca.relationships.BelongsToOne
properties:
+ name: vRouter_ONOS_app
dependencies: org.onosproject.fpm
- autogenerate: vrouter-network-cfg
+
+ vRouter_ONOS_app_autogenerate:
+ type: tosca.nodes.ServiceInstanceAttribute
+ requirements:
+ - service_instance:
+ node: vRouter_ONOS_app
+ relationship: tosca.relationships.BelongsToOne
+ properties:
+ name: autogenerate
+ value: vrouter-network-cfg
+
+ vRouter_ONOS_app_ONOS_CORD:
+ type: tosca.nodes.ServiceInstanceLink
+ requirements:
+ - provider_service_instance:
+ node: vRouter_ONOS_app
+ relationship: tosca.relationships.BelongsToOne
+ - subscriber_service:
+ node: service#vrouter
+ relationship: tosca.relationships.BelongsToOne
template#veg:
type: tosca.nodes.NetworkTemplate
properties:
+ name: veg
visibility: private
translation: none
vtn_kind: VSG
# Networks required by the CORD setup
{{ site_name }}_veg-access:
- type: tosca.nodes.network.Network
+ type: tosca.nodes.Network
properties:
- ip_version: 4
+ name: {{ site_name }}_veg-access
+ # ip_version: 4
requirements:
- - network_template:
+ - template:
node: template#veg
- relationship: tosca.relationships.UsesNetworkTemplate
+ relationship: tosca.relationships.BelongsToOne
- owner:
node: {{ site_name }}_veg
- relationship: tosca.relationships.MemberOfSlice
- - connection:
+ relationship: tosca.relationships.BelongsToOne
+
+ networkslice#{{ site_name }}_veg-access_to_{{ site_name }}_veg:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: {{ site_name }}_veg-access
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
node: {{ site_name }}_veg
- relationship: tosca.relationships.ConnectsToSlice
+ relationship: tosca.relationships.BelongsToOne
# CORD Slices
{{ site_name }}_veg:
@@ -165,72 +232,88 @@
type: tosca.nodes.Slice
properties:
network: noauto
+ name: {{ site_name }}_veg
requirements:
- - veg_service:
+ - service:
node: service#veg
- relationship: tosca.relationships.MemberOfService
+ relationship: tosca.relationships.BelongsToOne
- site:
node: {{ site_name }}
- relationship: tosca.relationships.MemberOfSite
- - management:
- node: management
- relationship: tosca.relationships.ConnectsToNetwork
-{% if use_management_hosts %}
- - management_hosts:
- node: management_hosts
- relationship: tosca.relationships.ConnectsToNetwork
-{% endif %}
- - image:
+ relationship: tosca.relationships.BelongsToOne
+ - default_image:
node: image#vsg-1.1
- relationship: tosca.relationships.DefaultImage
+ relationship: tosca.relationships.BelongsToOne
- in#lanside:
- type: tosca.nodes.InterfaceType
- properties:
- direction: in
+ networkslice#management_to_{{ site_name }}_veg:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: management
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
+ node: {{ site_name }}_veg
+ relationship: tosca.relationships.BelongsToOne
- out#lanside:
- type: tosca.nodes.InterfaceType
- properties:
- direction: out
+{% if use_management_hosts %}
+ networkslice#management_hosts_to_{{ site_name }}_veg:
+ type: tosca.nodes.NetworkSlice
+ requirements:
+ - network:
+ node: management_hosts
+ relationship: tosca.relationships.BelongsToOne
+ - slice:
+ node: {{ site_name }}_veg
+ relationship: tosca.relationships.BelongsToOne
+{% endif %}
- in#wanside:
- type: tosca.nodes.InterfaceType
- properties:
- direction: in
+ # TODO: migrate interfaces when we'll start using
+ # in#lanside:
+ # type: tosca.nodes.InterfaceType
+ # properties:
+ # direction: in
- out#wanside:
- type: tosca.nodes.InterfaceType
- properties:
- direction: out
+ # out#lanside:
+ # type: tosca.nodes.InterfaceType
+ # properties:
+ # direction: out
- veg_lanside:
- type: tosca.nodes.ServiceInterface
- requirements:
- - service:
- node: service#veg
- relationship: tosca.relationships.MemberOfService
- - interface:
- node: in#lanside
- relationship: tosca.relationships.IsType
+ # in#wanside:
+ # type: tosca.nodes.InterfaceType
+ # properties:
+ # direction: in
- veg_wanside:
- type: tosca.nodes.ServiceInterface
- requirements:
- - service:
- node: service#veg
- relationship: tosca.relationships.MemberOfService
- - interface:
- node: out#wanside
- relationship: tosca.relationships.IsType
+ # out#wanside:
+ # type: tosca.nodes.InterfaceType
+ # properties:
+ # direction: out
- addressmanager_wanside:
- type: tosca.nodes.ServiceInterface
- requirements:
- - service:
- node: service#addressmanager
- relationship: tosca.relationships.MemberOfService
- - interface:
- node: in#wanside
- relationship: tosca.relationships.IsType
+ # veg_lanside:
+ # type: tosca.nodes.ServiceInterface
+ # requirements:
+ # - service:
+ # node: service#veg
+ # relationship: tosca.relationships.MemberOfService
+ # - interface:
+ # node: in#lanside
+ # relationship: tosca.relationships.IsType
+
+ # veg_wanside:
+ # type: tosca.nodes.ServiceInterface
+ # requirements:
+ # - service:
+ # node: service#veg
+ # relationship: tosca.relationships.MemberOfService
+ # - interface:
+ # node: out#wanside
+ # relationship: tosca.relationships.IsType
+
+ # addressmanager_wanside:
+ # type: tosca.nodes.ServiceInterface
+ # requirements:
+ # - service:
+ # node: service#addressmanager
+ # relationship: tosca.relationships.MemberOfService
+ # - interface:
+ # node: in#wanside
+ # relationship: tosca.relationships.IsType
diff --git a/roles/cord-profile/templates/fabric-service.yaml.j2 b/roles/cord-profile/templates/fabric-service.yaml.j2
index 5f01466..e28d5ea 100644
--- a/roles/cord-profile/templates/fabric-service.yaml.j2
+++ b/roles/cord-profile/templates/fabric-service.yaml.j2
@@ -19,7 +19,11 @@
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- - custom_types/xos.yaml
+ - custom_types/onosservice.yaml
+ - custom_types/serviceattribute.yaml
+ - custom_types/fabricservice.yaml
+ - custom_types/onosapp.yaml
+ - custom_types/serviceinstancelink.yaml
description: fabric services, generated by platform-install
@@ -28,32 +32,47 @@
service#ONOS_Fabric:
type: tosca.nodes.ONOSService
- requirements:
properties:
- kind: onos
- view_url: /admin/onos/onosservice/$id$/
+ name: ONOS_Fabric
+ kind: platform
no_container: true
rest_hostname: onos-fabric.{{ site_suffix }}
- replaces: service_ONOS_Fabric
- rest_onos/v1/network/configuration/: { get_artifact: [ SELF, fabric_network_cfg_json, LOCAL_FILE ] }
- artifacts:
- fabric_network_cfg_json: {{ fabric_network_cfg_json }}
+
+ serviceattribute#fabric_network_cfg_json:
+ type: tosca.nodes.ServiceAttribute
+ requirements:
+ - service:
+ node: service#ONOS_Fabric
+ relationship: tosca.relationships.BelongsToOne
+ properties:
+ name: fabric_network_cfg_json
+ value: {{ fabric_network_cfg_json }}
service#fabric:
type: tosca.nodes.FabricService
properties:
- view_url: /admin/fabric/fabricservice/$id$/
- replaces: service_fabric
+ name: fabric
+ kind: platform
+
+
Fabric_ONOS_app:
type: tosca.nodes.ONOSApp
requirements:
- - onos_tenant:
+ - owner:
node: service#ONOS_Fabric
- relationship: tosca.relationships.TenantOfService
- - fabric_service:
- node: service#fabric
- relationship: tosca.relationships.UsedByService
+ relationship: tosca.relationships.BelongsToOne
properties:
+ name: Fabric_ONOS_app
dependencies: org.onosproject.drivers, org.onosproject.openflow, org.onosproject.netcfghostprovider, org.onosproject.segmentrouting
+ Fabric_ONOS_app_ONOS_Fabric:
+ type: tosca.nodes.ServiceInstanceLink
+ requirements:
+ - provider_service_instance:
+ node: Fabric_ONOS_app
+ relationship: tosca.relationships.BelongsToOne
+ - subscriber_service:
+ node: service#fabric
+ relationship: tosca.relationships.BelongsToOne
+
diff --git a/roles/cord-profile/templates/initial_data.yaml.j2 b/roles/cord-profile/templates/initial_data.yaml.j2
index 0017cfc..26f0e80 100644
--- a/roles/cord-profile/templates/initial_data.yaml.j2
+++ b/roles/cord-profile/templates/initial_data.yaml.j2
@@ -17,7 +17,7 @@
# Site
- model: core.Site
fields:
- name: "{{ site_humanname }}"
+ name: "{{ site_name }}"
abbreviated_name: "{{ site_name }}"
login_base: "{{ site_name }}"
site_url: "http://{{ site_name }}.opencloud.us/"
@@ -34,7 +34,7 @@
relations:
site:
fields:
- name: "{{ site_humanname }}"
+ name: "{{ site_name }}"
model: core.Site
# All other users
@@ -49,7 +49,7 @@
relations:
site:
fields:
- name: "{{ site_humanname }}"
+ name: "{{ site_name }}"
model: core.Site
{% endfor %}
diff --git a/roles/cord-profile/templates/management-net.yaml.j2 b/roles/cord-profile/templates/management-net.yaml.j2
index 2b3b41d..9c7b03c 100644
--- a/roles/cord-profile/templates/management-net.yaml.j2
+++ b/roles/cord-profile/templates/management-net.yaml.j2
@@ -19,7 +19,10 @@
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- - custom_types/xos.yaml
+ - custom_types/networktemplate.yaml
+ - custom_types/network.yaml
+ - custom_types/slice.yaml
+ - custom_types/site.yaml
description: management network config, generated by platform-install
@@ -29,59 +32,66 @@
# site, fully created in deployment.yaml
{{ site_name }}:
type: tosca.nodes.Site
+ properties:
+ name: {{ site_name }}
# management network
management_template:
type: tosca.nodes.NetworkTemplate
properties:
+ name: management_template
visibility: private
translation: none
vtn_kind: MANAGEMENT_LOCAL
management:
- type: tosca.nodes.network.Network
+ type: tosca.nodes.Network
properties:
- ip_version: 4
- cidr: {{ management_network_cidr }}
+ name: management
+ # ip_version: 4
+ subnet: {{ management_network_cidr }}
+ permit_all_slices: true
requirements:
- - network_template:
+ - template:
node: management_template
- relationship: tosca.relationships.UsesNetworkTemplate
+ relationship: tosca.relationships.BelongsToOne
- owner:
- node: {{ site_name }}_management
- relationship: tosca.relationships.MemberOfSlice
+ node: slice#{{ site_name }}_management
+ relationship: tosca.relationships.BelongsToOne
{% if use_management_hosts %}
management_hosts_template:
type: tosca.nodes.NetworkTemplate
properties:
+ name: management_hosts_template
visibility: private
translation: none
vtn_kind: MANAGEMENT_HOST
management_hosts:
- type: tosca.nodes.network.Network
+ type: tosca.nodes.Network
properties:
- ip_version: 4
- cidr: {{ management_hosts_net_cidr }}
+ # ip_version: 4
+ subnet: {{ management_hosts_net_cidr }}
start_ip: {{ management_hosts_net_range_xos_low }}
end_ip: {{ management_hosts_net_range_xos_high }}
requirements:
- - network_template:
+ - template:
node: management_hosts_template
- relationship: tosca.relationships.UsesNetworkTemplate
+ relationship: tosca.relationships.BelongsToOne
- owner:
- node: {{ site_name }}_management
- relationship: tosca.relationships.MemberOfSlice
+ node: slice#{{ site_name }}_management
+ relationship: tosca.relationships.BelongsToOne
{% endif %}
- {{ site_name }}_management:
+ slice#{{ site_name }}_management:
description: This slice exists solely to own the management network
type: tosca.nodes.Slice
properties:
network: noauto
+ name: {{ site_name }}_management
requirements:
- site:
node: {{ site_name }}
- relationship: tosca.relationships.MemberOfSite
+ relationship: tosca.relationships.BelongsToOne
diff --git a/roles/cord-profile/templates/onos-global-service.yaml.j2 b/roles/cord-profile/templates/onos-global-service.yaml.j2
index 2b7d33f..0ba630c 100644
--- a/roles/cord-profile/templates/onos-global-service.yaml.j2
+++ b/roles/cord-profile/templates/onos-global-service.yaml.j2
@@ -19,7 +19,7 @@
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- - custom_types/xos.yaml
+ - custom_types/onosservice.yaml
description: Configures the global ONOS service
@@ -30,9 +30,8 @@
type: tosca.nodes.ONOSService
requirements:
properties:
- kind: onos
- view_url: /admin/onos/onosservice/$id$/
+ name: ONOS_CORD
+ kind: ecord
no_container: true
rest_hostname: onos-cord.{{ site_suffix }}
rest_port: 8182
- replaces: service_ONOS_CORD
diff --git a/roles/cord-profile/templates/openstack.yaml.j2 b/roles/cord-profile/templates/openstack.yaml.j2
index 5f2f233..0159abe 100644
--- a/roles/cord-profile/templates/openstack.yaml.j2
+++ b/roles/cord-profile/templates/openstack.yaml.j2
@@ -19,7 +19,13 @@
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- - custom_types/xos.yaml
+ - custom_types/controller.yaml
+ - custom_types/controllersite.yaml
+ - custom_types/deployment.yaml
+ - custom_types/flavor.yaml
+ - custom_types/image.yaml
+ - custom_types/site.yaml
+ - custom_types/sitedeployment.yaml
description: openstack extensions to deployment, generated by platform-install
@@ -31,27 +37,34 @@
{{ image.name }}:
type: tosca.nodes.Image
properties:
- path: /opt/xos/images/{{ image.name }}.qcow2
- disk_format: QCOW2
- container_format: BARE
+ name: {{ image.name }}
+ path: /opt/xos/images/{{ image.name }}.qcow2
+ disk_format: QCOW2
+ container_format: BARE
{% endfor %}
{% for flavor in deployment_flavors %}
{{ flavor }}:
type: tosca.nodes.Flavor
+ properties:
+ name: {{ flavor }}
{% endfor %}
# Deployment - adds images/flavors to site defined in deployment.yaml
+# NOTE do we still need this?
{{ deployment_type }}:
type: tosca.nodes.Deployment
- requirements:
-{% for flavor in deployment_flavors %}
- - {{ flavor }}:
- node: {{ flavor }}
- relationship: tosca.relationships.SupportsFlavor
-{% endfor %}
+ properties:
+ name: {{ deployment_type }}
+# NOTE look that this are outdated and not used anymore
+# requirements:
+# {% for flavor in deployment_flavors %}
+# - {{ flavor }}:
+# node: {{ flavor }}
+# relationship: tosca.relationships.SupportsFlavor
+# {% endfor %}
# OpenStack Controller
{{ site_name }}_{{ deployment_type }}_openstack:
@@ -59,14 +72,15 @@
requirements:
- deployment:
node: {{ deployment_type }}
- relationship: tosca.relationships.ControllerDeployment
+ relationship: tosca.relationships.BelongsToOne
properties:
+ name: {{ site_name }}_{{ deployment_type }}_openstack
backend_type: OpenStack
version: Kilo
- auth_url: { get_script_env: [ SELF, adminrc, OS_AUTH_URL, LOCAL_FILE] }
- admin_user: { get_script_env: [ SELF, adminrc, OS_USERNAME, LOCAL_FILE] }
- admin_password: { get_script_env: [ SELF, adminrc, OS_PASSWORD, LOCAL_FILE] }
- admin_tenant: { get_script_env: [ SELF, adminrc, OS_TENANT_NAME, LOCAL_FILE] }
+ auth_url: https://keystone.{{ site_suffix }}:5000/v2.0
+ admin_user: admin
+ admin_password: {{ keystone_admin_password }}
+ admin_tenant: admin
domain: Default
artifacts:
adminrc: /opt/cord_profile/admin-openrc.sh
@@ -75,14 +89,31 @@
{{ site_name }}:
type: tosca.nodes.Site
properties:
- display_name: {{ site_humanname }}
+ name: {{ site_name }}
+ must-exist: true
site_url: http://{{ site_name }}.opencloud.us/
hosts_nodes: true
- requirements:
- - deployment:
- node: {{ deployment_type }}
- relationship: tosca.relationships.MemberOfDeployment
- - controller:
- node: {{ site_name }}_{{ deployment_type }}_openstack
- relationship: tosca.relationships.UsesController
+
+ {{site_name}}_deployment_{{ deployment_type }}:
+ type: tosca.nodes.SiteDeployment
+ requirements:
+ - site:
+ node: {{ site_name }}
+ relationship: tosca.relationships.BelongsToOne
+ - deployment:
+ node: {{ deployment_type }}
+ relationship: tosca.relationships.BelongsToOne
+ - controller:
+ node: {{ site_name }}_{{ deployment_type }}_openstack
+ relationship: tosca.relationships.BelongsToOne
+
+ {{ site_name }}_openstack_controller:
+ type: tosca.nodes.ControllerSite
+ requirements:
+ - site:
+ node: {{ site_name }}
+ relationship: tosca.relationships.BelongsToOne
+ - controller:
+ node: {{ site_name }}_{{ deployment_type }}_openstack
+ relationship: tosca.relationships.BelongsToOne
diff --git a/roles/cord-profile/templates/public-net.yaml.j2 b/roles/cord-profile/templates/public-net.yaml.j2
index 7e43e11..610c58b 100644
--- a/roles/cord-profile/templates/public-net.yaml.j2
+++ b/roles/cord-profile/templates/public-net.yaml.j2
@@ -19,8 +19,15 @@
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- - custom_types/xos.yaml
- - custom_types/addressmanager.yaml
+ - custom_types/addresspool.yaml
+ - custom_types/addressmanagerservice.yaml
+ - custom_types/addressmanagerserviceinstance.yaml
+ - custom_types/network.yaml
+ - custom_types/networktemplate.yaml
+ - custom_types/serviceinstance.yaml
+ - custom_types/serviceinstancelink.yaml
+ - custom_types/site.yaml
+ - custom_types/slice.yaml
description: public network config, generated by platform-install
@@ -30,44 +37,81 @@
# site, fully created in deployment.yaml
{{ site_name }}:
type: tosca.nodes.Site
+ properties:
+ name: {{ site_name }}
+ must-exist: true
+
# Address Manager service, fully created in cord-service.yaml
service#addressmanager:
type: tosca.nodes.AddressManagerService
+ properties:
+ name: addressmanager
+ must-exist: true
# public network
public_template:
type: tosca.nodes.NetworkTemplate
properties:
+ name: public_template
visibility: public
translation: none
vtn_kind: PUBLIC
public:
- type: tosca.nodes.network.Network
+ type: tosca.nodes.Network
properties:
- ip_version: 4
+ name: public
+ permit_all_slices: true
+ subnet: 10.8.1.0/24 # NOTE same as AddressPool#addresses_public
+ # ip_version: 4
requirements:
- - network_template:
+ - template:
node: public_template
- relationship: tosca.relationships.UsesNetworkTemplate
+ relationship: tosca.relationships.BelongsToOne
- owner:
node: {{ site_name }}_public
- relationship: tosca.relationships.MemberOfSlice
- - addressmanager_service_instance:
- node: service#addressmanager
- relationship: tosca.relationships.TenantOfService
+ relationship: tosca.relationships.BelongsToOne
+ # Created in cord-services.yaml.j2
+ addresses_public:
+ type: tosca.nodes.AddressPool
+ properties:
+ name: addresses_public
+ must-exist: true
+
+ AddressManagerServiceInstancePublicNetwork:
+ type: tosca.nodes.AddressManagerServiceInstance
+ requirements:
+ - owner:
+ node: service#addressmanager
+ relationship: tosca.relationships.BelongsToOne
+ - address_pool:
+ node: addresses_public
+ relationship: tosca.relationships.BelongsToOne
+ properties:
+ name: AM_public_net
+
+ public_to_address_manager:
+ type: tosca.nodes.ServiceInstanceLink
+ requirements:
+ - provider_service_instance:
+ node: AddressManagerServiceInstancePublicNetwork
+ relationship: tosca.relationships.BelongsToOne
+ - subscriber_network:
+ node: public
+ relationship: tosca.relationships.BelongsToOne
{{ site_name }}_public:
description: This slice exists solely to own the public network
type: tosca.nodes.Slice
properties:
network: noauto
+ name: {{ site_name }}_public
requirements:
- site:
node: {{ site_name }}
- relationship: tosca.relationships.MemberOfSite
+ relationship: tosca.relationships.BelongsToOne
diff --git a/roles/cord-profile/templates/shared-net.yaml.j2 b/roles/cord-profile/templates/shared-net.yaml.j2
index f54ab9d..186e69f 100644
--- a/roles/cord-profile/templates/shared-net.yaml.j2
+++ b/roles/cord-profile/templates/shared-net.yaml.j2
@@ -1,7 +1,10 @@
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- - custom_types/xos.yaml
+ - custom_types/network.yaml
+ - custom_types/networktemplate.yaml
+ - custom_types/slice.yaml
+ - custom_types/site.yaml
description: shared network config, generated by platform-install
@@ -11,36 +14,41 @@
# site, fully created in deployment.yaml
{{ site_name }}:
type: tosca.nodes.Site
+ properties:
+ name: {{ site_name }}
+ must-exist: true
# shared network
shared_template:
type: tosca.nodes.NetworkTemplate
properties:
+ name: shared_template
visibility: private
translation: none
vtn_kind: PRIVATE
shared_network:
- type: tosca.nodes.network.Network
+ type: tosca.nodes.Network
properties:
- ip_version: 4
- cidr: 100.0.0.0/24
+ name: shared_network
+ subnet: 100.0.0.0/24
requirements:
- - network_template:
+ - template:
node: shared_template
- relationship: tosca.relationships.UsesNetworkTemplate
+ relationship: tosca.relationships.BelongsToOne
- owner:
node: {{ site_name }}_shared
- relationship: tosca.relationships.MemberOfSlice
+ relationship: tosca.relationships.BelongsToOne
{{ site_name }}_shared:
description: This slice exists solely to own the private network
type: tosca.nodes.Slice
properties:
+ name: {{ site_name }}_shared
network: noauto
requirements:
- site:
node: {{ site_name }}
- relationship: tosca.relationships.MemberOfSite
+ relationship: tosca.relationships.BelongsToOne
diff --git a/roles/cord-profile/templates/vee-service.yaml.j2 b/roles/cord-profile/templates/vee-service.yaml.j2
index ad4202c..9fea06d 100644
--- a/roles/cord-profile/templates/vee-service.yaml.j2
+++ b/roles/cord-profile/templates/vee-service.yaml.j2
@@ -19,9 +19,10 @@
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- - custom_types/xos.yaml
- - custom_types/vee.yaml
- - custom_types/veg.yaml
+ - custom_types/veeservice.yaml
+ - custom_types/vegservice.yaml
+ - custom_types/networktemplate.yaml
+ - custom_types/servicedependency.yaml
description: vee services, generated by platform-install
@@ -32,24 +33,30 @@
type: tosca.nodes.VEGService
requirements:
properties:
- no-delete: true
- no-create: true
- no-update: true
- artifacts:
- pubkey: /opt/xos/services/veg/keys/veg_rsa.pub
+ name: veg
+ must-exist: true
service#vee:
type: tosca.nodes.VEEService
- requirements:
- - veg_tenant:
- node: service#veg
- relationship: tosca.relationships.TenantOfService
properties:
- view_url: /admin/vEE/veeservice/$id$/
+ name: vee
+
+ veg_vee:
+ type: tosca.nodes.ServiceDependency
+ properties:
+ connect_method: None
+ requirements:
+ - subscriber_service:
+ node: service#veg
+ relationship: tosca.relationships.BelongsToOne
+ - provider_service:
+ node: service#vee
+ relationship: tosca.relationships.BelongsToOne
template#vee:
type: tosca.nodes.NetworkTemplate
properties:
+ name: vee
visibility: private
translation: none
vtn_kind: vee
diff --git a/roles/cord-profile/templates/vsg-net.yaml.j2 b/roles/cord-profile/templates/vsg-net.yaml.j2
index bb5e546..9bcf397 100644
--- a/roles/cord-profile/templates/vsg-net.yaml.j2
+++ b/roles/cord-profile/templates/vsg-net.yaml.j2
@@ -1,7 +1,10 @@
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- - custom_types/xos.yaml
+ - custom_types/network.yaml
+ - custom_types/networktemplate.yaml
+ - custom_types/slice.yaml
+ - custom_types/site.yaml
description: vsg network config, generated by platform-install
@@ -11,36 +14,41 @@
# site, fully created in deployment.yaml
{{ site_name }}:
type: tosca.nodes.Site
+ properties:
+ name: {{ site_name }}
+ must-exist: true
# vsg network
vsg_template:
type: tosca.nodes.NetworkTemplate
properties:
+ name: vsg_template
visibility: private
translation: none
vtn_kind: VSG
vsg_network:
- type: tosca.nodes.network.Network
+ type: tosca.nodes.Network
properties:
- ip_version: 4
- cidr: 101.0.0.0/24
+ name: vsg_network
+ subnet: 101.0.0.0/24
requirements:
- - network_template:
+ - template:
node: vsg_template
- relationship: tosca.relationships.UsesNetworkTemplate
+ relationship: tosca.relationships.BelongsToOne
- owner:
node: {{ site_name }}_vsg
- relationship: tosca.relationships.MemberOfSlice
+ relationship: tosca.relationships.BelongsToOne
{{ site_name }}_vsg:
description: This slice exists solely to own the private network
type: tosca.nodes.Slice
properties:
+ name: {{ site_name }}_vsg
network: noauto
requirements:
- site:
node: {{ site_name }}
- relationship: tosca.relationships.MemberOfSite
+ relationship: tosca.relationships.BelongsToOne
diff --git a/roles/cord-profile/templates/vtn-service.yaml.j2 b/roles/cord-profile/templates/vtn-service.yaml.j2
index eab7961..6a2dbd6 100644
--- a/roles/cord-profile/templates/vtn-service.yaml.j2
+++ b/roles/cord-profile/templates/vtn-service.yaml.j2
@@ -17,7 +17,11 @@
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- - custom_types/xos.yaml
+ - custom_types/onosapp.yaml
+ - custom_types/onosservice.yaml
+ - custom_types/serviceinstanceattribute.yaml
+ - custom_types/serviceinstancelink.yaml
+ - custom_types/vtnservice.yaml
description: Configures the VTN ONOS service
@@ -26,18 +30,18 @@
service#ONOS_CORD:
type: tosca.nodes.ONOSService
- requirements:
properties:
- kind: onos
- view_url: /admin/onos/onosservice/$id$/
+ name: ONOS_CORD
+ kind: platform
no_container: true
rest_hostname: onos-cord.{{ site_suffix }}
rest_port: 8182
- replaces: service_ONOS_CORD
service#vtn:
type: tosca.nodes.VTNService
properties:
+ name: vtn
+ kind: platform
view_url: /admin/vtn/vtnservice/$id$/
privateGatewayMac: 00:00:00:00:00:01
localManagementIp: {{ management_network_ip }}
@@ -48,21 +52,39 @@
xosEndpoint: xos-chameleon.{{ site_suffix }}:{{ xos_chameleon_port }}
xosUser: {{ xos_admin_user }}
xosPassword: {{ xos_admin_pass }}
- replaces: service_vtn
vtnAPIVersion: 2
controllerPort: onos-cord.{{ site_suffix }}:6654
+ resync: false
VTN_ONOS_app:
- type: tosca.nodes.ONOSVTNApp
+ type: tosca.nodes.ONOSApp
requirements:
- - onos_tenant:
+ - owner:
node: service#ONOS_CORD
- relationship: tosca.relationships.TenantOfService
- - vtn_service:
- node: service#vtn
- relationship: tosca.relationships.UsedByService
+ relationship: tosca.relationships.BelongsToOne
properties:
+ name: VTN_ONOS_app
install_dependencies: {{ onos_mavenrepo_url }}/repository/org/opencord/cord-config/{{ cord_config_app_version }}/cord-config-{{ cord_config_app_version }}.oar, {{ onos_mavenrepo_url }}/repository/org/opencord/vtn/{{ cord_vtn_app_version }}/vtn-{{ cord_vtn_app_version }}.oar
dependencies: org.onosproject.drivers, org.onosproject.drivers.ovsdb, org.onosproject.openflow-base, org.onosproject.ovsdb-base, org.onosproject.dhcp
- autogenerate: vtn-network-cfg
+ # autogenerate: vtn-network-cfg
+
+ VTN_ONOS_app_autogenerate:
+ type: tosca.nodes.ServiceInstanceAttribute
+ requirements:
+ - service_instance:
+ node: VTN_ONOS_app
+ relationship: tosca.relationships.BelongsToOne
+ properties:
+ name: autogenerate
+ value: vtn-network-cfg
+
+ VTN_ONOS_app_VTN_Service:
+ type: tosca.nodes.ServiceInstanceLink
+ requirements:
+ - provider_service_instance:
+ node: VTN_ONOS_app
+ relationship: tosca.relationships.BelongsToOne
+ - subscriber_service:
+ node: service#vtn
+ relationship: tosca.relationships.BelongsToOne
diff --git a/roles/cord-profile/templates/wan-net.yaml.j2 b/roles/cord-profile/templates/wan-net.yaml.j2
index 4b9bb20..0ada8be 100644
--- a/roles/cord-profile/templates/wan-net.yaml.j2
+++ b/roles/cord-profile/templates/wan-net.yaml.j2
@@ -1,7 +1,10 @@
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- - custom_types/xos.yaml
+ - custom_types/network.yaml
+ - custom_types/networktemplate.yaml
+ - custom_types/slice.yaml
+ - custom_types/site.yaml
description: wan network config, generated by platform-install
@@ -11,36 +14,41 @@
# site, fully created in deployment.yaml
{{ site_name }}:
type: tosca.nodes.Site
+ properties:
+ name: {{ site_name }}
+ must-exist: true
# wan network
wan_template:
type: tosca.nodes.NetworkTemplate
properties:
+ name: wan_template
visibility: private
translation: none
vtn_kind: PRIVATE
wan_network:
- type: tosca.nodes.network.Network
+ type: tosca.nodes.Network
properties:
- ip_version: 4
- cidr: 102.0.0.0/24
+ name: wan_network
+ subnet: 102.0.0.0/24
requirements:
- - network_template:
+ - template:
node: wan_template
- relationship: tosca.relationships.UsesNetworkTemplate
+ relationship: tosca.relationships.BelongsToOne
- owner:
node: {{ site_name }}_wan
- relationship: tosca.relationships.MemberOfSlice
+ relationship: tosca.relationships.BelongsToOne
{{ site_name }}_wan:
description: This slice exists solely to own the private network
type: tosca.nodes.Slice
properties:
+ name: {{ site_name }}_wan
network: noauto
requirements:
- site:
node: {{ site_name }}
- relationship: tosca.relationships.MemberOfSite
+ relationship: tosca.relationships.BelongsToOne
diff --git a/roles/cord-profile/templates/xos-gui-extensions.yml.j2 b/roles/cord-profile/templates/xos-gui-extensions.yml.j2
index beb1d06..f10c695 100644
--- a/roles/cord-profile/templates/xos-gui-extensions.yml.j2
+++ b/roles/cord-profile/templates/xos-gui-extensions.yml.j2
@@ -21,7 +21,7 @@
description: Persist xos-sample-gui-extension
imports:
- - custom_types/xos.yaml
+ - custom_types/xosguiextension.yaml
topology_template:
node_templates:
@@ -31,6 +31,7 @@
{{ext.name}}:
type: tosca.nodes.XOSGuiExtension
properties:
+ name: {{ext.name}}
files: /xos/extensions/{{ext.name}}/vendor.js, /xos/extensions/{{ext.name}}/app.js {% if ext.extra_files is defined %}{% for file in ext.extra_files%}, /xos/extensions/{{ext.name}}/{{file}} {% endfor %}{% endif %}
{% endfor %}