Added support for running SiaB with SD-BNG

- new mininet topology with PPPoE server
- new fabric configuration for Ponsim
- new DT-workflow
- new values file to run SD-BNG on SiaB

Change-Id: Ib9d61111d6399e9240afb60bb6a77f152a6ecd01
diff --git a/configs/seba-ponsim-sdbng.yaml b/configs/seba-ponsim-sdbng.yaml
new file mode 100644
index 0000000..4508fd5
--- /dev/null
+++ b/configs/seba-ponsim-sdbng.yaml
@@ -0,0 +1,90 @@
+---
+# Copyright 2019-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.
+
+# Values file for deploying SEBA with Ponsim and Stratum
+# Use this file to deploy the service versions specified in the Helm charts.
+
+images:
+  # Mininet image
+  mininet:
+    repository: 'opencord/mn-stratum-siab'
+    tag: 'master'
+    pullPolicy: Always
+  onos:
+    repository: 'onosproject/onos'
+    tag: '2.2-latest'
+    pullPolicy: Always
+  rg:
+#    TODO: Modify when this docker image is published
+    repository: 'dmoro92/voltha-tester'
+    tag: 'latest'
+    pullPolicy: Always
+
+# ONOS activate debug
+onos_env:
+  - name: JAVA_DEBUG_PORT
+    value: "0.0.0.0:5005"
+
+# voltha
+etcd-cluster:
+  clusterSize: 1
+
+# Set topics for KPI-exporter, adding the bng.stats
+kpi_exporter:
+# Select DT-Workflow
+workflow: dt-workflow
+
+dt-workflow-driver:
+  image:
+#    TODO: modify when DT workflow synchronizer is published
+    repository: "dmoro92/dt-workflow-driver-synchronizer"
+    tag: "1.0.0-dev"
+  # this is mandatory, it's needed to correctly configure the kafka endpoint
+  kafkaService: cord-kafka
+
+# in mininet chart
+# FIXME: make multicast working
+enableMulticast: false
+topoScript: '/toposcripts/topo_sdbng.py'
+stratumEnabled: true
+
+# in ponsim-pod chart
+bandwidthProfiles: true
+legacyPonsim: false
+
+# fabric
+fabric:
+  enabled: true
+  stratum:
+    # BMv2 drivers will activate also stratum drivers
+    driverAppId: 'org.onosproject.drivers.bmv2'
+    # Enable stratum
+    enabled: true
+    # Use BMv2 pipeconf (already in ONOS)
+    pipeconfAppExternal: false
+    pipeconfAppId: 'org.onosproject.pipelines.fabric'
+bng:
+  external:
+    enabled: false
+  embedded:
+    enabled: true
+    # ONOS app to provide the BNG control plane
+    bngAppId: "org.opencord.bng"
+    bngAppUrl: "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opencord&a=bng-app&v=1.0.0-SNAPSHOT&e=oar"
+    bngAppVersion: "1.0.0.SNAPSHOT"
+
+# ONOS applications
+kafkaAppUrl: "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opencord&a=kafka&v=2.0.1-SNAPSHOT&e=oar"
+kafkaAppVersion: "2.0.1.SNAPSHOT"
diff --git a/mininet/Chart.yaml b/mininet/Chart.yaml
index d3e94e1..c668bcb 100644
--- a/mininet/Chart.yaml
+++ b/mininet/Chart.yaml
@@ -17,4 +17,4 @@
 appVersion: 1.0.0
 description: A Helm chart for Mininet
 name: mininet
-version: 1.1.0
+version: 1.1.1
diff --git a/mininet/toposcripts/topo_sdbng.py b/mininet/toposcripts/topo_sdbng.py
new file mode 100644
index 0000000..0fb1683
--- /dev/null
+++ b/mininet/toposcripts/topo_sdbng.py
@@ -0,0 +1,77 @@
+#!/usr/bin/python
+
+# Copyright 2019-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.
+
+from mininet.cli import CLI
+from mininet.log import setLogLevel, info, error
+from mininet.net import Mininet
+from mininet.link import Intf
+from mininet.nodelib import LinuxBridge
+from stratum import StratumBmv2Switch
+from mininet.util import quietRun
+
+CPU_PORT = 255
+
+if __name__ == '__main__':
+    setLogLevel( 'info' )
+
+    net = Mininet( topo=None )
+
+    info( '*** Adding switches\n' )
+    agg1 = net.addSwitch( name='agg1', cls=StratumBmv2Switch, cpuport=CPU_PORT)
+    # FIXME: enable multicast
+    # s2 = net.addSwitch( 's2', cls=LinuxBridge )
+
+    info( '*** Creating hosts\n' )
+    h1 = net.addHost( 'h1' ) # PPPoE Server
+    h2 = net.addHost( 'h2', ip='10.10.10.1/24' ) # Upstream
+    # FIXME: enable multicast
+    # h3 = net.addHost( 'h3')
+
+    # Topology: pon1 - eth1 - agg1 - h2 - s2 - h3
+    #                          |
+    #                          h1
+    net.addLink( h1, agg1 )
+    net.addLink( h2, agg1 )
+    # FIXME: enable multicast
+    # net.addLink( h2, s2 )
+    # net.addLink( h3, s2 )
+
+{{- range $i, $junk := until (.Values.numOlts|int) -}}
+{{- $intf := printf "eth%d" (add $i 1) }}
+
+    info( '*** Adding hardware interface {{ $intf }} to switch agg1\n')
+    _intf = Intf( '{{ $intf }}', node=agg1 )
+
+    info( '*** Turning off checksum offloading for {{ $intf }}\n' )
+    print quietRun( 'ethtool -K {{ $intf }} tx off rx off' )
+{{- end }}
+
+
+# FIXME: enable multicast
+# {{- if .Values.enableMulticast }}
+#     info( '*** Start multicast routing on h1 and source on h2\n')
+#     h2.cmd( 'service pimd start' )
+#     h3.cmd( 'mcjoin -s -i h2-eth0 -t 2 >& /tmp/mcjoin.log &')
+# {{- end }}
+
+    net.start()
+    info( '*** Starting PPPoE Server')
+    h1.cmd( 'echo 10.255.255.100-250 > /iptoassign')
+    h1.cmd( 'pppoe-server -I h1-eth0 -L 10.255.255.1 -p /iptoassign -O /pppoe-options')
+    info( '*** Setting route back to access network')
+    h2.cmd( 'ip route add 10.255.255.0/24 via 10.10.10.254')
+    CLI( net )
+    net.stop()
diff --git a/workflows/dt-workflow/Chart.yaml b/workflows/dt-workflow/Chart.yaml
new file mode 100644
index 0000000..3077758
--- /dev/null
+++ b/workflows/dt-workflow/Chart.yaml
@@ -0,0 +1,23 @@
+---
+# Copyright 2019-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.
+
+apiVersion: v1
+name: dt-workflow
+description: A Helm chart for XOS's "dt-workflow"
+icon: https://guide.opencord.org/logos/cord.svg
+version: 1.0.0
+
+# xosproject/tosca-loader version
+appVersion: 1.3.1
diff --git a/workflows/dt-workflow/requirements.yaml b/workflows/dt-workflow/requirements.yaml
new file mode 100644
index 0000000..d2fbde0
--- /dev/null
+++ b/workflows/dt-workflow/requirements.yaml
@@ -0,0 +1,19 @@
+---
+# Copyright 2019-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.
+
+dependencies:
+- name: dt-workflow-driver
+  version: 1.0.0
+  repository: file://../../xos-services/dt-workflow-driver
diff --git a/workflows/dt-workflow/templates/_helpers.tpl b/workflows/dt-workflow/templates/_helpers.tpl
new file mode 100644
index 0000000..a21229e
--- /dev/null
+++ b/workflows/dt-workflow/templates/_helpers.tpl
@@ -0,0 +1,47 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Copyright 2019-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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "dt-workflow.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "dt-workflow.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "dt-workflow.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/workflows/dt-workflow/templates/_tosca.tpl b/workflows/dt-workflow/templates/_tosca.tpl
new file mode 100644
index 0000000..9209f11
--- /dev/null
+++ b/workflows/dt-workflow/templates/_tosca.tpl
@@ -0,0 +1,98 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Copyright 2019-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.
+*/}}
+
+{{- define "dt-workflow.serviceGraphTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+imports:
+  - custom_types/dtworkflowdriverservice.yaml
+  - custom_types/voltservice.yaml
+  - custom_types/servicedependency.yaml
+  - custom_types/servicegraphconstraint.yaml
+description: dt-workflow-driver service graph
+topology_template:
+  node_templates:
+
+# These services must be defined before loading the graph
+
+    service#volt:
+      type: tosca.nodes.VOLTService
+      properties:
+        name: volt
+        must-exist: true
+
+    service#dt-workflow-driver:
+      type: tosca.nodes.DtWorkflowDriverService
+      properties:
+        name: dt-workflow-driver
+        must-exist: true
+
+    service_dependency#workflow_volt:
+      type: tosca.nodes.ServiceDependency
+      properties:
+        connect_method: none
+      requirements:
+        - subscriber_service:
+            node: service#dt-workflow-driver
+            relationship: tosca.relationships.BelongsToOne
+        - provider_service:
+            node: service#volt
+            relationship: tosca.relationships.BelongsToOne
+
+    constraints:
+      type: tosca.nodes.ServiceGraphConstraint
+      properties:
+        constraints: '[[null, "rcord", null], [null, "volt", null], ["onos", "vrouter", "dt-workflow-driver"], ["fabric", null, null]]'
+{{- end -}}
+
+{{- define "dt-workflow.onosTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+imports:
+   - custom_types/onosapp.yaml
+   - custom_types/onosservice.yaml
+   - custom_types/serviceinstanceattribute.yaml
+
+description: Configures workflow-specific ONOS apps
+
+topology_template:
+  node_templates:
+
+    service#onos:
+      type: tosca.nodes.ONOSService
+      properties:
+          name: onos
+          must-exist: true
+
+    onos_app#olt:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: olt
+        must-exist: true
+
+    olt-config-attr:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true
+        value: >
+          {
+            "enableDhcpOnProvisioning" : false
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#olt
+            relationship: tosca.relationships.BelongsToOne
+{{- end -}}
diff --git a/workflows/dt-workflow/templates/tosca-configmap.yaml b/workflows/dt-workflow/templates/tosca-configmap.yaml
new file mode 100644
index 0000000..c359b91
--- /dev/null
+++ b/workflows/dt-workflow/templates/tosca-configmap.yaml
@@ -0,0 +1,27 @@
+---
+
+# Copyright 2019-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.
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: dt-workflow-tosca
+data:
+  010-fixtures.yaml: |
+{{ include "dt-workflow-driver.serviceTosca"  (index .Values "dt-workflow-driver") | indent 4 }}
+  100-onos-apps.yaml: |
+{{ include "dt-workflow.onosTosca" . | indent 4 }}
+  300-service-graph.yaml: |
+{{ include "dt-workflow.serviceGraphTosca" . | indent 4 }}
diff --git a/workflows/dt-workflow/templates/tosca-job.yaml b/workflows/dt-workflow/templates/tosca-job.yaml
new file mode 100644
index 0000000..09a4bfd
--- /dev/null
+++ b/workflows/dt-workflow/templates/tosca-job.yaml
@@ -0,0 +1,55 @@
+---
+
+# Copyright 2019-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.
+
+apiVersion: batch/v1
+kind: Job
+metadata:
+  name: {{ template "dt-workflow.fullname" . }}-tosca-loader
+  labels:
+    app: {{ template "dt-workflow.name" . }}
+    chart: {{ template "dt-workflow.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  backoffLimit: 12
+  template:
+    metadata:
+      labels:
+        app: {{ template "dt-workflow.name" . }}
+        release: {{ .Release.Name }}
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/tosca-configmap.yaml") . | sha256sum }}
+    spec:
+      restartPolicy: OnFailure
+      containers:
+        - name: {{ .Chart.Name }}-tosca-loader
+          image: {{ .Values.global.registry }}{{ .Values.images.tosca_loader.repository }}:{{ tpl .Values.images.tosca_loader.tag . }}
+          imagePullPolicy: {{ .Values.images.tosca_loader.pullPolicy }}
+          env:
+            - name: XOS_USER
+              value: {{ .Values.xosAdminUser }}
+            - name: XOS_PASSWD
+              valueFrom:
+                secretKeyRef:
+                  name: xos-admin-passwd-secret
+                  key: password
+          volumeMounts:
+            - name: dt-workflow-tosca
+              mountPath: /opt/tosca
+      volumes:
+        - name: dt-workflow-tosca
+          configMap:
+            name: dt-workflow-tosca
diff --git a/workflows/dt-workflow/values.yaml b/workflows/dt-workflow/values.yaml
new file mode 100644
index 0000000..a3de677
--- /dev/null
+++ b/workflows/dt-workflow/values.yaml
@@ -0,0 +1,37 @@
+---
+# Copyright 2019-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.
+
+# Default values for the dt-workflow profile.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+
+nameOverride: ""
+fullnameOverride: ""
+
+images:
+  tosca_loader:
+    repository: 'xosproject/tosca-loader'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+global:
+  registry: ""
+
+dt-workflow-driver:
+  kafkaService: "cord-platform-kafka"
+
+xosAdminUser: "admin@opencord.org"
+xosAdminPassword: "letmein"
diff --git a/xos-profiles/ponsim-pod/Chart.yaml b/xos-profiles/ponsim-pod/Chart.yaml
index a1ad9c9..0e92b7f 100644
--- a/xos-profiles/ponsim-pod/Chart.yaml
+++ b/xos-profiles/ponsim-pod/Chart.yaml
@@ -18,7 +18,7 @@
 description: A Helm chart for loading the Ponsim pod's TOSCA files into XOS
 icon: https://guide.opencord.org/logos/xos.svg
 
-version: 1.4.0
+version: 1.4.1
 
 # xosproject/tosca-loader version
 appVersion: 1.3.1
diff --git a/xos-profiles/ponsim-pod/tosca/030-fabric.yaml b/xos-profiles/ponsim-pod/tosca/030-fabric.yaml
index 3bf6030..ed37849 100644
--- a/xos-profiles/ponsim-pod/tosca/030-fabric.yaml
+++ b/xos-profiles/ponsim-pod/tosca/030-fabric.yaml
@@ -13,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+{{- if $.Values.bng.external.enabled }}
 tosca_definitions_version: tosca_simple_yaml_1_0
 imports:
   - custom_types/switch.yaml
@@ -103,3 +104,212 @@
         - service_instance:
             node: onos_app#dhcpl2relay
             relationship: tosca.relationships.BelongsToOne
+{{- end }}
+
+{{- if $.Values.bng.embedded.enabled }}
+tosca_definitions_version: tosca_simple_yaml_1_0
+imports:
+  - custom_types/switch.yaml
+  - custom_types/onosapp.yaml
+  - custom_types/switchport.yaml
+  - custom_types/portinterface.yaml
+  - custom_types/vrouterserviceinstance.yaml
+  - custom_types/vrouterstaticroute.yaml
+  - custom_types/fabricipaddress.yaml
+  - custom_types/serviceinstanceattribute.yaml
+
+description: Configures the Ponsim SEBA POD fabric
+
+topology_template:
+  node_templates:
+    # Fabric configuration
+    switch#agg_sw:
+      type: tosca.nodes.Switch
+      properties:
+        driver: "stratum-bmv2"
+        pipeconf: 'org.onosproject.pipelines.fabric-bng'
+        managementAddress: "grpc://mininet-stratum:50001?device_id=1"
+        ipv4Loopback: 192.168.0.201
+        ipv4NodeSid: 17
+        isEdgeRouter: True
+        ofId: device:agg1
+        name: AGG SWITCH
+        routerMac: 00:00:02:01:06:01
+
+# Setup the OLT switch ports
+{{- range $i, $junk := until (.Values.numOlts|int) }}
+
+    port#olt{{ $i }}_port:
+      type: tosca.nodes.SwitchPort
+      properties:
+        portId: {{ add 3 $i }}
+        host_learning: false
+      requirements:
+        - switch:
+            node: switch#agg_sw
+            relationship: tosca.relationships.BelongsToOne
+
+    interface#access_interface_{{ $i }}:
+      type: tosca.nodes.PortInterface
+      properties:
+        name: access
+      requirements:
+        - port:
+            node: port#olt{{ $i }}_port
+            relationship: tosca.relationships.BelongsToOne
+
+    ip#access_ip_{{ $i }}:
+      type: tosca.nodes.FabricIpAddress
+      properties:
+        ip: "10.255.255.{{ $i }}/24"
+        description: access_ip_{{ $i }}
+      requirements:
+        - interface:
+            node: interface#access_interface_{{ $i }}
+            relationship: tosca.relationships.BelongsToOne
+{{- end }}
+
+    # Port connected to the PPPoE Server
+    port#pppoe_server_port:
+      type: tosca.nodes.SwitchPort
+      properties:
+        portId: 1
+      requirements:
+        - switch:
+            node: switch#agg_sw
+            relationship: tosca.relationships.BelongsToOne
+
+    interface#ppoe_server_interface_1:
+      type: tosca.nodes.PortInterface
+      properties:
+        vlanUntagged: 100
+        name: pppoe_server
+      requirements:
+        - port:
+            node: port#pppoe_server_port
+            relationship: tosca.relationships.BelongsToOne
+
+    # Port connected to the Upstream router
+    port#upstream_port:
+      type: tosca.nodes.SwitchPort
+      properties:
+        portId: 2
+      requirements:
+        - switch:
+            node: switch#agg_sw
+            relationship: tosca.relationships.BelongsToOne
+
+    interface#upstream_interface_1:
+      type: tosca.nodes.PortInterface
+      properties:
+        vlanUntagged: 200
+        name: upstream
+      requirements:
+        - port:
+            node: port#upstream_port
+            relationship: tosca.relationships.BelongsToOne
+
+    ip#upstream_ip_1:
+      type: tosca.nodes.FabricIpAddress
+      properties:
+        ip: "10.10.10.254/24"
+        description: upstream_ip_1
+      requirements:
+        - interface:
+            node: interface#upstream_interface_1
+            relationship: tosca.relationships.BelongsToOne
+
+    # Upstream host configuration
+    upstream-host-config:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/network/configuration
+        value: >
+          {
+            "hosts": {
+              "00:66:77:88:99:AA/None": {
+                "basic": {
+                  "name": "Upstream",
+                  "ips": [
+                    "10.10.10.1"
+                  ],
+                  "locations": [
+                    "device:agg1/2"
+                  ]
+                }
+              }
+            }
+          }
+      requirements:
+        - service_instance:
+            node: ip#upstream_ip_1
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#segmentrouting:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: org.onosproject.segmentrouting
+        must-exist: true
+
+    segmentrouting-config-attr:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/configuration/org.onosproject.segmentrouting.SegmentRoutingManager?preset=true
+        value: >
+          {
+              "routeSimplification": "false",
+              "routeDoubleTaggedHosts": "true",
+              "respondToUnknownHosts": "true",
+              "defaultInternalVlan": "4094",
+              "pwTransportVlan": "4090",
+              "activeProbing": "true",
+              "singleHomedDown": "false",
+              "symmetricProbing": "false"
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#segmentrouting
+            relationship: tosca.relationships.BelongsToOne
+
+    # VRouter and default route.
+    vrouter#my_vrouter:
+      type: tosca.nodes.VRouterServiceInstance
+      properties:
+        name: my_vrouter
+
+    route#default_route:
+      type: tosca.nodes.VRouterStaticRoute
+      properties:
+        prefix: "0.0.0.0/0"
+        next_hop: "10.10.10.1"
+      requirements:
+        - vrouter:
+            node: vrouter#my_vrouter
+            relationship: tosca.relationships.BelongsToOne
+
+    # BNG App and its configuration for the PPPoE server relay.
+    onos_app#bng:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: org.opencord.bng
+        must-exist: true
+
+    bng-config-attr:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/network/configuration/apps/org.opencord.bng
+        value: >
+          {
+            "pppoerelay": {
+              "oltConnectPoint": "device:agg1/3",
+              "pppoeServerConnectPoint": "device:agg1/1"
+            },
+            "bng": {
+              "bnguDeviceId": "device:agg1"
+            }
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#bng
+            relationship: tosca.relationships.BelongsToOne
+{{- end }}
diff --git a/xos-profiles/ponsim-pod/tosca/dt-workflow/010-dt-workflow.yaml b/xos-profiles/ponsim-pod/tosca/dt-workflow/010-dt-workflow.yaml
new file mode 100644
index 0000000..06ec574
--- /dev/null
+++ b/xos-profiles/ponsim-pod/tosca/dt-workflow/010-dt-workflow.yaml
@@ -0,0 +1,54 @@
+---
+# Copyright 2019-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.
+
+# curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @oss-service.yaml http://10.90.0.101:30007/run
+
+tosca_definitions_version: tosca_simple_yaml_1_0
+imports:
+  - custom_types/servicedependency.yaml
+  - custom_types/voltservice.yaml
+  - custom_types/dtworkflowdriverwhitelistentry.yaml
+  - custom_types/dtworkflowdriverservice.yaml
+description: Create an instance of the OSS Service and connect it to the vOLT Service
+
+topology_template:
+  node_templates:
+
+    service#dt:
+      type: tosca.nodes.DtWorkflowDriverService
+      properties:
+        name: dt-workflow-driver
+        must-exist: true
+
+{{- $onucount := (.Values.numOnus|int) }}
+{{- range $i, $junk := until (.Values.numOlts|int) }}
+{{- range $j, $junk1 := until ($onucount) }}
+    whitelist{{ $i }}-{{ $j }}:
+      type: tosca.nodes.DtWorkflowDriverWhiteListEntry
+      properties:
+{{- if $.Values.legacyPonsim }}
+        serial_number: PSMO12345678
+        device_id: of:0000aabbccddeeff
+{{- else }}
+        serial_number: PSMO{{ printf "%04d%04d" $i $j }}
+        device_id: {{ index $.Values.oltDpids $i }}
+{{- end }}
+        pon_port_id: 1
+      requirements:
+        - owner:
+            node: service#dt
+            relationship: tosca.relationships.BelongsToOne
+{{- end }}
+{{- end }}
diff --git a/xos-profiles/ponsim-pod/values.yaml b/xos-profiles/ponsim-pod/values.yaml
index 01a7d70..6a992b0 100644
--- a/xos-profiles/ponsim-pod/values.yaml
+++ b/xos-profiles/ponsim-pod/values.yaml
@@ -59,3 +59,8 @@
 fabric:
   stratum:
     enabled: false
+bng:
+  external:
+    enabled: true
+  embedded:
+    enabled: false
diff --git a/xos-profiles/seba-services/Chart.yaml b/xos-profiles/seba-services/Chart.yaml
index d894f8d..5f30e70 100644
--- a/xos-profiles/seba-services/Chart.yaml
+++ b/xos-profiles/seba-services/Chart.yaml
@@ -17,7 +17,7 @@
 name: seba-services
 description: A Helm chart for XOS's "SEBA" profile
 icon: https://guide.opencord.org/logos/cord.svg
-version: 1.4.1
+version: 1.4.2
 
 # xosproject/tosca-loader version
 appVersion: 1.3.1
diff --git a/xos-services/dt-workflow-driver/.helmignore b/xos-services/dt-workflow-driver/.helmignore
new file mode 100644
index 0000000..f0c1319
--- /dev/null
+++ b/xos-services/dt-workflow-driver/.helmignore
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
diff --git a/xos-services/dt-workflow-driver/Chart.yaml b/xos-services/dt-workflow-driver/Chart.yaml
new file mode 100644
index 0000000..aeb073b
--- /dev/null
+++ b/xos-services/dt-workflow-driver/Chart.yaml
@@ -0,0 +1,21 @@
+---
+# Copyright 2019-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.
+
+name: dt-workflow-driver
+description: A Helm chart for XOS's "dt-workflow-driver" service
+icon: https://guide.opencord.org/logos/cord.svg
+
+version: 1.0.0
+appVersion: 1.2.3
diff --git a/xos-services/dt-workflow-driver/templates/_helpers.tpl b/xos-services/dt-workflow-driver/templates/_helpers.tpl
new file mode 100644
index 0000000..7036b55
--- /dev/null
+++ b/xos-services/dt-workflow-driver/templates/_helpers.tpl
@@ -0,0 +1,80 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Copyright 2019-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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "dt-workflow-driver.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "dt-workflow-driver.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "dt-workflow-driver.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "dt-workflow-driver.serviceConfig" -}}
+name: dt-workflow-driver
+accessor:
+  username: {{ .Values.xosAdminUser | quote }}
+  password: {{ .Values.xosAdminPassword | quote }}
+  endpoint: {{ .Values.xosCoreService | quote }}
+event_bus:
+  endpoint: {{ .Values.kafkaService | quote }}
+  kind: kafka
+logging:
+  version: 1
+  handlers:
+    console:
+      class: logging.StreamHandler
+    file:
+      class: logging.handlers.RotatingFileHandler
+      filename: /var/log/xos.log
+      maxBytes: 10485760
+      backupCount: 5
+    kafka:
+      class: kafkaloghandler.KafkaLogHandler
+      bootstrap_servers:
+        - "{{ .Values.kafkaService }}:9092"
+      topic: xos.log.dt-workflow-driver
+  loggers:
+    '':
+      handlers:
+        - console
+        - file
+        - kafka
+      level: DEBUG
+{{- end -}}
diff --git a/xos-services/dt-workflow-driver/templates/_tosca.tpl b/xos-services/dt-workflow-driver/templates/_tosca.tpl
new file mode 100644
index 0000000..a0c3278
--- /dev/null
+++ b/xos-services/dt-workflow-driver/templates/_tosca.tpl
@@ -0,0 +1,30 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Copyright 2019-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.
+*/}}
+{{- define "dt-workflow-driver.serviceTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+description: Set up dt-workflow-driver service
+imports:
+  - custom_types/dtworkflowdriverservice.yaml
+
+topology_template:
+  node_templates:
+    service#dt-workflow-driver:
+      type: tosca.nodes.DtWorkflowDriverService
+      properties:
+        name: dt-workflow-driver
+        kind: oss
+{{- end -}}
diff --git a/xos-services/dt-workflow-driver/templates/configmap.yaml b/xos-services/dt-workflow-driver/templates/configmap.yaml
new file mode 100644
index 0000000..1cd0897
--- /dev/null
+++ b/xos-services/dt-workflow-driver/templates/configmap.yaml
@@ -0,0 +1,22 @@
+---
+# Copyright 2019-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.
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: dt-workflow-driver
+data:
+  serviceConfig: |
+{{ include "dt-workflow-driver.serviceConfig" . | indent 4 }}
diff --git a/xos-services/dt-workflow-driver/templates/deployment.yaml b/xos-services/dt-workflow-driver/templates/deployment.yaml
new file mode 100644
index 0000000..aa91d37
--- /dev/null
+++ b/xos-services/dt-workflow-driver/templates/deployment.yaml
@@ -0,0 +1,77 @@
+---
+
+# Copyright 2019-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.
+
+apiVersion: apps/v1beta2
+kind: Deployment
+metadata:
+  name: {{ template "dt-workflow-driver.fullname" . }}
+  labels:
+    app: {{ template "dt-workflow-driver.name" . }}
+    chart: {{ template "dt-workflow-driver.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ template "dt-workflow-driver.name" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "dt-workflow-driver.name" . }}
+        release: {{ .Release.Name }}
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+    spec:
+      containers:
+        - name: {{ .Chart.Name }}
+          image: {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+          volumeMounts:
+            - name: dt-workflow-driver-config
+              mountPath: /opt/xos/synchronizers/dt-workflow-driver/mounted_config.yaml
+              subPath: mounted_config.yaml
+            - name: certchain-volume
+              mountPath: /usr/local/share/ca-certificates/local_certs.crt
+              subPath: config/ca_cert_chain.pem
+      volumes:
+        - name: dt-workflow-driver-config
+          configMap:
+            name: dt-workflow-driver
+            items:
+              - key: serviceConfig
+                path: mounted_config.yaml
+        - name: certchain-volume
+          configMap:
+            name: ca-certificates
+            items:
+              - key: chain
+                path: config/ca_cert_chain.pem
+    {{- with .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.affinity }}
+      affinity:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.tolerations }}
+      tolerations:
+{{ toYaml . | indent 8 }}
+    {{- end }}
diff --git a/xos-services/dt-workflow-driver/values.yaml b/xos-services/dt-workflow-driver/values.yaml
new file mode 100644
index 0000000..b941fdc
--- /dev/null
+++ b/xos-services/dt-workflow-driver/values.yaml
@@ -0,0 +1,45 @@
+---
+# Copyright 2019-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.
+
+# Default values for vOLT
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+nameOverride: ""
+fullnameOverride: ""
+
+image:
+  repository: 'xosproject/dt-workflow-driver-synchronizer'
+  tag: '{{ .Chart.AppVersion }}'
+  pullPolicy: 'Always'
+
+global:
+  registry: ''
+
+xosAdminUser: "admin@opencord.org"
+xosAdminPassword: "letmein"
+xosCoreService: "xos-core:50051"
+
+kafkaService: "cord-kafka"
+
+resources: {}
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}