Add support for running SiaB with stratum_bmv2 as the fabric switch

- new value file (seba-ponsim-stratum.yaml) to deploy SiaB with Stratum
- new mininet script to use stratum_bmv2 instead of OVS as Fabric switch
- update to ponsim and mininet to use the new Stratum device instead of OVS

Change-Id: I35901b455865cebc0a11de8b155b951e4fa4a9f8
diff --git a/xos-profiles/ponsim-pod/Chart.yaml b/xos-profiles/ponsim-pod/Chart.yaml
index cf675dc..a1ad9c9 100644
--- a/xos-profiles/ponsim-pod/Chart.yaml
+++ b/xos-profiles/ponsim-pod/Chart.yaml
@@ -13,11 +13,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+apiVersion: v1
 name: ponsim-pod
 description: A Helm chart for loading the Ponsim pod's TOSCA files into XOS
 icon: https://guide.opencord.org/logos/xos.svg
 
-version: 1.3.4
+version: 1.4.0
 
 # xosproject/tosca-loader version
 appVersion: 1.3.1
diff --git a/xos-profiles/ponsim-pod/tosca/020-pod-olt.yaml b/xos-profiles/ponsim-pod/tosca/020-pod-olt.yaml
index 9398a65..74262d4 100644
--- a/xos-profiles/ponsim-pod/tosca/020-pod-olt.yaml
+++ b/xos-profiles/ponsim-pod/tosca/020-pod-olt.yaml
@@ -41,7 +41,11 @@
         device_type: ponsim_olt
         host: olt{{ $i }}.voltha.svc
         port: 50060
+{{- if not $.Values.fabric.stratum.enabled }}
         switch_datapath_id: of:0000000000000001
+{{- else }}
+        switch_datapath_id: device:agg1
+{{- end }}
         switch_port: "{{ add 2 $i }}"
         outer_tpid: "0x8100"
 {{- if $.Values.bandwidthProfiles }}
diff --git a/xos-profiles/ponsim-pod/tosca/030-fabric.yaml b/xos-profiles/ponsim-pod/tosca/030-fabric.yaml
index 950551e..3bf6030 100644
--- a/xos-profiles/ponsim-pod/tosca/030-fabric.yaml
+++ b/xos-profiles/ponsim-pod/tosca/030-fabric.yaml
@@ -30,12 +30,19 @@
     switch#leaf_1:
       type: tosca.nodes.Switch
       properties:
-        driver: ofdpa-ovs
+{{- if not $.Values.fabric.stratum.enabled }}
+        driver: "ofdpa-ovs"
+        ofId: of:0000000000000001
+{{- else }}
+        driver: "stratum-bmv2"
+        pipeconf: 'org.onosproject.pipelines.fabric'
+        managementAddress: "grpc://mininet-stratum:50001?device_id=1"
+        ofId: device:agg1
+{{- end }}
         ipv4Loopback: 192.168.0.201
         ipv4NodeSid: 17
         isEdgeRouter: True
         name: leaf_1
-        ofId: of:0000000000000001
         routerMac: 00:00:02:01:06:01
 
     # Setup the OLT switch ports
@@ -85,7 +92,11 @@
           {
             "dhcpl2relay" : {
               "useOltUplinkForServerPktInOut" : false,
+{{- if not $.Values.fabric.stratum.enabled }}
               "dhcpServerConnectPoints" : [ "of:0000000000000001/1" ]
+{{- else }}
+              "dhcpServerConnectPoints" : [ "device:agg1/1" ]
+{{- end }}
             }
           }
       requirements:
diff --git a/xos-profiles/ponsim-pod/values.yaml b/xos-profiles/ponsim-pod/values.yaml
index 14353e9..01a7d70 100644
--- a/xos-profiles/ponsim-pod/values.yaml
+++ b/xos-profiles/ponsim-pod/values.yaml
@@ -55,3 +55,7 @@
   - of:00000da7f2c143c7
   - of:000032be2d4c2abc
   - of:0000ae9b8dcd58c7
+
+fabric:
+  stratum:
+    enabled: false
diff --git a/xos-profiles/seba-services/Chart.yaml b/xos-profiles/seba-services/Chart.yaml
index c4904b5..d894f8d 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.0
+version: 1.4.1
 
 # xosproject/tosca-loader version
 appVersion: 1.3.1
diff --git a/xos-profiles/seba-services/templates/_tosca.tpl b/xos-profiles/seba-services/templates/_tosca.tpl
index 07de05a..cb4a8e8 100644
--- a/xos-profiles/seba-services/templates/_tosca.tpl
+++ b/xos-profiles/seba-services/templates/_tosca.tpl
@@ -150,6 +150,15 @@
             relationship: tosca.relationships.BelongsToOne
 
 {{- if .fabric.stratum.enabled }}
+    onos_app#stratum-driver:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: {{ .fabric.stratum.driverAppId }}
+        app_id: {{ .fabric.stratum.driverAppId }}
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
     onos_app#fabric-pipeconf:
       type: tosca.nodes.ONOSApp
       properties: