[CORD-2322] Adding constraints on M-CORD Graph
Change-Id: I953798b918364be2d6560027a6432a515ef903be
(cherry picked from commit 551bb994e163cafcf40c2534d711be2e23a2f51a)
diff --git a/profile_manifests/mcord-ng40.yml b/profile_manifests/mcord-ng40.yml
index 7b8f593..8636e78 100644
--- a/profile_manifests/mcord-ng40.yml
+++ b/profile_manifests/mcord-ng40.yml
@@ -47,6 +47,7 @@
- sgi-net.yaml
- flat-net.yaml
- mcord-ng40-services.yml
+ - service-graph-constraints.yaml
xos_other_templates:
- fabric-network-cfg.json
@@ -82,6 +83,9 @@
path: orchestration/xos_services/epc-service
keypair: mcord_rsa
+# service graph gui constraints
+xos_gui_service_graph_constranints: '["mcord", "venb", ["vspgwc", "vspgwu"]]'
+
profile_library: "mcord"
# VTN network configuration
@@ -267,4 +271,4 @@
- name: "image-spgwu"
url: "http://www.vicci.org/cord/ngic-dp1-cmpress.qcow2.20171121"
- checksum: "sha256:2d431dc24b8de5d531ddf9a82c20f692d9ac8c9d4dd0295c535acc06c6635bc5"
\ No newline at end of file
+ checksum: "sha256:2d431dc24b8de5d531ddf9a82c20f692d9ac8c9d4dd0295c535acc06c6635bc5"
diff --git a/profile_manifests/mcord-spirent.yml b/profile_manifests/mcord-spirent.yml
index bc403e1..d676aae 100644
--- a/profile_manifests/mcord-spirent.yml
+++ b/profile_manifests/mcord-spirent.yml
@@ -47,6 +47,7 @@
- sgi-net.yaml
- flat-net.yaml
- mcord-spirent-services.yml
+ - service-graph-constraints.yaml
xos_other_templates:
- fabric-network-cfg.json
@@ -79,6 +80,9 @@
path: orchestration/xos_services/vspgwu
keypair: mcord_rsa
+# service graph gui constraints
+xos_gui_service_graph_constranints: '[]'
+
profile_library: "mcord"
# VTN network configuration
diff --git a/profile_manifests/mcord.yml b/profile_manifests/mcord.yml
index e545294..49bba88 100644
--- a/profile_manifests/mcord.yml
+++ b/profile_manifests/mcord.yml
@@ -51,6 +51,7 @@
- sdn-controller-service.yaml
- vspgwc-service.yaml
- vspgwu-service.yaml
+ - service-graph-constraints.yaml
# - vepc-service.yaml
# - mcord-service-graph.yml
@@ -100,6 +101,9 @@
path: orchestration/xos_services/epc-service
keypair: mcord_rsa
+# service graph gui constraints
+xos_gui_service_graph_constranints: '[]'
+
profile_library: "mcord"
# VTN network configuration
diff --git a/roles/cord-profile/templates/mcord-ng40-services.yml.j2 b/roles/cord-profile/templates/mcord-ng40-services.yml.j2
index eb4f163..4cd0fc2 100644
--- a/roles/cord-profile/templates/mcord-ng40-services.yml.j2
+++ b/roles/cord-profile/templates/mcord-ng40-services.yml.j2
@@ -35,6 +35,8 @@
- custom_types/vspgwuservice.yaml
- custom_types/vspgwuvendor.yaml
- custom_types/vepcservice.yaml
+ - custom_types/servicedependency.yaml
+ - custom_types/mcordsubscriberservice.yaml
topology_template:
node_templates:
@@ -282,3 +284,60 @@
private_key_fn: /opt/xos/services/venb/keys/mcord_rsa
artifacts:
pubkey: /opt/cord_profile/key_import/mcord_rsa.pub
+
+
+# ServiceDependencies
+ venb_vspgwc:
+ type: tosca.nodes.ServiceDependency
+ properties:
+ connect_method: None
+ requirements:
+ - subscriber_service:
+ node: service#venb
+ relationship: tosca.relationships.BelongsToOne
+ - provider_service:
+ node: service#vspgwc
+ relationship: tosca.relationships.BelongsToOne
+
+ venb_vspgwu:
+ type: tosca.nodes.ServiceDependency
+ properties:
+ connect_method: None
+ requirements:
+ - subscriber_service:
+ node: service#venb
+ relationship: tosca.relationships.BelongsToOne
+ - provider_service:
+ node: service#vspgwu
+ relationship: tosca.relationships.BelongsToOne
+
+ vspgwc_vspgwu:
+ type: tosca.nodes.ServiceDependency
+ properties:
+ connect_method: None
+ requirements:
+ - subscriber_service:
+ node: service#vspgwc
+ relationship: tosca.relationships.BelongsToOne
+ - provider_service:
+ node: service#vspgwu
+ relationship: tosca.relationships.BelongsToOne
+
+# M-CORD Subscriber
+ service#mcord:
+ type: tosca.nodes.MCordSubscriberService
+ properties:
+ name: mcord
+
+ # ServiceDependency M-CORD to vENB
+ mcord_venb:
+ type: tosca.nodes.ServiceDependency
+ properties:
+ connect_method: None
+ requirements:
+ - subscriber_service:
+ node: service#venb
+ relationship: tosca.relationships.BelongsToOne
+ - provider_service:
+ node: service#mcord
+ relationship: tosca.relationships.BelongsToOne