[COMAC-132,COMAC-187] Add ATT workflow in COMAC and fix service chain

Change-Id: I34c09f633091e389c783c980908941be76c6d7b2
diff --git a/xos-profiles/comac/Chart.yaml b/xos-profiles/comac/Chart.yaml
index c645020..64c978d 100644
--- a/xos-profiles/comac/Chart.yaml
+++ b/xos-profiles/comac/Chart.yaml
@@ -17,7 +17,7 @@
 name: comac
 description: A Helm chart for the "COMAC" profile
 icon: https://guide.opencord.org/logos/cord.svg
-version: 0.0.2
+version: 0.0.3
 
 # xosproject/tosca-loader version
-appVersion: 1.3.0
+appVersion: 1.3.1
diff --git a/xos-profiles/comac/requirements.yaml b/xos-profiles/comac/requirements.yaml
index fe49052..3303b2e 100644
--- a/xos-profiles/comac/requirements.yaml
+++ b/xos-profiles/comac/requirements.yaml
@@ -41,7 +41,11 @@
   version: 1.0.4
   repository: file://../../sadis-server
   condition: resdentialService.enabled
+- name: att-workflow-driver
+  version: 1.1.2
+  repository: file://../../xos-services/att-workflow-driver
+  condition: resdentialService.enabled
 - name: vrouter
   version: 2.1.0
   repository: file://../../xos-services/vrouter
-  condition: vrouter.enabled
\ No newline at end of file
+  condition: vrouter.enabled
diff --git a/xos-profiles/comac/templates/_tosca.tpl b/xos-profiles/comac/templates/_tosca.tpl
index 9169540..42c0efb 100644
--- a/xos-profiles/comac/templates/_tosca.tpl
+++ b/xos-profiles/comac/templates/_tosca.tpl
@@ -57,6 +57,21 @@
             node: service#onos
             relationship: tosca.relationships.BelongsToOne
 
+    # FOR ATT-Workflow --
+    onos_app#aaa:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: aaa
+        app_id: org.opencord.aaa
+        url: {{ .aaaAppUrl }}
+        version: {{ .aaaAppVersion }}
+        dependencies: org.opencord.sadis
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+    # --
+
     onos_app#olt:
       type: tosca.nodes.ONOSApp
       properties:
@@ -153,6 +168,39 @@
         - service_instance:
             node: onos_app#sadis
             relationship: tosca.relationships.BelongsToOne
+
+    # FOR ATT-Workflow --
+    aaa-config-attr:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/network/configuration/apps/org.opencord.aaa
+        value: >
+          {
+            "AAA" : {
+              "radiusConnectionType" : "socket",
+              "radiusHost" : "freeradius.voltha.svc.cluster.local",
+              "radiusServerPort" : "1812",
+              "radiusSecret" : "SECRET"
+            }
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#aaa
+            relationship: tosca.relationships.BelongsToOne
+
+    olt-config-attr:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true
+        value: >
+          {
+            "enableDhcpOnProvisioning" : true
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#olt
+            relationship: tosca.relationships.BelongsToOne
+    # --
 {{- end }}
 
     onos_app#segmentrouting:
@@ -262,6 +310,7 @@
   - custom_types/rcordservice.yaml
   - custom_types/voltservice.yaml
   - custom_types/fabriccrossconnectservice.yaml
+  - custom_types/attworkflowdriverservice.yaml
 {{- end }}
   - custom_types/servicegraphconstraint.yaml
   - custom_types/servicedependency.yaml
@@ -312,6 +361,14 @@
       properties:
         name: fabric-crossconnect
         must-exist: true
+
+    # FOR ATT-Workflow --
+    service#att-workflow-driver:
+      type: tosca.nodes.AttWorkflowDriverService
+      properties:
+        name: att-workflow-driver
+        must-exist: true
+    # --
 {{- end }}
 
     service#omec-cp:
@@ -406,6 +463,20 @@
         - provider_service:
             node: service#onos
             relationship: tosca.relationships.BelongsToOne
+
+    # FOR ATT-Workflow --
+    service_dependency#workflow_volt:
+      type: tosca.nodes.ServiceDependency
+      properties:
+        connect_method: none
+      requirements:
+        - subscriber_service:
+            node: service#att-workflow-driver
+            relationship: tosca.relationships.BelongsToOne
+        - provider_service:
+            node: service#volt
+            relationship: tosca.relationships.BelongsToOne
+    # --
 {{- end }}
 
     service_dependency#mcord_epc_cp:
@@ -467,4 +538,9 @@
         - provider_service:
             node: service#cdn-local
             relationship: tosca.relationships.BelongsToOne
-{{- end -}}
\ No newline at end of file
+
+    constraints:
+      type: tosca.nodes.ServiceGraphConstraint
+      properties:
+        constraints: '[["mcord", null, null, "rcord"], [null, null, "att-workflow-driver", "volt"], ["omec-cp", "omec-up", "onos", "fabric-crossconnect"], [null, "cdn-local", "fabric", null], [null, "cdn-remote", "vrouter", null]]'
+{{- end -}}
diff --git a/xos-profiles/comac/values.yaml b/xos-profiles/comac/values.yaml
index 4d682f8..6c6f44c 100644
--- a/xos-profiles/comac/values.yaml
+++ b/xos-profiles/comac/values.yaml
@@ -54,6 +54,12 @@
 onosRestService: "onos-ui.default.svc.cluster.local"
 kafkaService: "cord-kafka.default.svc.cluster.local:9092"
 
+aaaAppUrl: "https://oss.sonatype.org/content/groups/public/org/opencord/aaa-app/1.9.0/aaa-app-1.9.0.oar"
+aaaAppVersion: "1.9.0"
+
+att-workflow-driver:
+  kafkaService: "cord-platform-kafka"
+
 resdentialService:
   enabled: false