SEBA-597 Enable 'make latest' to build a functioning SiaB

Change-Id: I2d34a4476f49c9fe905783cf6a393fe00f7d208f
diff --git a/configs/seba-ponsim.yaml b/configs/seba-ponsim.yaml
index 3567d6b..69bd0e0 100644
--- a/configs/seba-ponsim.yaml
+++ b/configs/seba-ponsim.yaml
@@ -36,3 +36,6 @@
 
 # in mininet chart
 vlanMatchDepth: 1
+
+# in ponsim-pod chart
+bandwidthProfiles: False
diff --git a/examples/add-trap-flow.json b/examples/add-trap-flow.json
new file mode 100644
index 0000000..14ebaa9
--- /dev/null
+++ b/examples/add-trap-flow.json
@@ -0,0 +1,30 @@
+ {
+   "flows": [
+     {
+       "priority": 40000,
+       "timeout": 0,
+       "isPermanent": true,
+       "deviceId": "of:0000aabbccddeeff",
+       "treatment": {
+         "instructions": [
+           {
+             "type": "OUTPUT",
+             "port": "CONTROLLER"
+           }
+         ]
+       },
+       "selector": {
+         "criteria": [
+           {
+             "type": "ETH_TYPE",
+             "ethType": "0x888e"
+           },
+           {
+             "type": "IN_PORT",
+             "port": "128"
+           }
+         ]
+       }
+     }
+   ]
+ }
\ No newline at end of file
diff --git a/examples/add-trap-flow.sh b/examples/add-trap-flow.sh
new file mode 100755
index 0000000..e120404
--- /dev/null
+++ b/examples/add-trap-flow.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+# Copyright 2018-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.
+
+# add-trap-flow.sh
+# Adds the EAPOL trap flow needed by Ponsim.  In VOLTHA master, Ponsim has the wrong EAPOL trap flow loaded by the adapter.
+
+http -a karaf:karaf POST http://127.0.0.1:30120/onos/v1/flows < $( dirname "$0" )/add-trap-flow.json
diff --git a/xos-profiles/ponsim-pod/Chart.yaml b/xos-profiles/ponsim-pod/Chart.yaml
index 9e47a34..23c06b5 100644
--- a/xos-profiles/ponsim-pod/Chart.yaml
+++ b/xos-profiles/ponsim-pod/Chart.yaml
@@ -17,7 +17,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.1.0
+version: 1.2.0
 
 # xosproject/tosca-loader version
 appVersion: 1.1.5
diff --git a/xos-profiles/ponsim-pod/templates/tosca-configmap.yaml b/xos-profiles/ponsim-pod/templates/tosca-configmap.yaml
index 265c40a..9829f03 100644
--- a/xos-profiles/ponsim-pod/templates/tosca-configmap.yaml
+++ b/xos-profiles/ponsim-pod/templates/tosca-configmap.yaml
@@ -20,5 +20,5 @@
   name: ponsim-pod-tosca
 data:
 {{- $workflowpath := printf "tosca/%s/*" .Values.workflow }}
-{{ (.Files.Glob $workflowpath).AsConfig | indent 2 }}
-{{ (.Files.Glob "tosca/*").AsConfig | indent 2 }}
\ No newline at end of file
+{{ tpl (.Files.Glob $workflowpath).AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "tosca/*").AsConfig . | indent 2 }}
diff --git a/xos-profiles/ponsim-pod/tosca/040-subscriber.yaml b/xos-profiles/ponsim-pod/tosca/040-subscriber.yaml
index 9dbc80b..c806d2c 100644
--- a/xos-profiles/ponsim-pod/tosca/040-subscriber.yaml
+++ b/xos-profiles/ponsim-pod/tosca/040-subscriber.yaml
@@ -16,12 +16,28 @@
 tosca_definitions_version: tosca_simple_yaml_1_0
 imports:
   - custom_types/rcordsubscriber.yaml
+{{- if .Values.bandwidthProfiles }}
+  - custom_types/bandwidthprofile.yaml
+{{- end }}
 
 description: Pre-provsion a subscriber
 
 topology_template:
   node_templates:
 
+{{- if .Values.bandwidthProfiles }}
+    # Bronze bandwidthprofile for subscriber
+    bronze_bp:
+      type: tosca.nodes.BandwidthProfile
+      properties:
+         air: 99999
+         cbs: 99999
+         cir: 99999
+         ebs: 99999
+         eir: 99999
+         name: Bronze
+{{- end }}
+
     # Pre-provision the subscriber the subscriber
     my_house:
       type: tosca.nodes.RCORDSubscriber
@@ -30,4 +46,13 @@
         status: pre-provisioned
         c_tag: 111
         s_tag: 222
-        onu_device: PSMO12345678
\ No newline at end of file
+        onu_device: PSMO12345678
+{{- if .Values.bandwidthProfiles }}
+      requirements:
+        - upstream_bps:
+            node: bronze_bp
+            relationship: tosca.relationships.BelongsToOne
+        - downstream_bps:
+            node: bronze_bp
+            relationship: tosca.relationships.BelongsToOne
+{{- end }}
\ No newline at end of file
diff --git a/xos-profiles/ponsim-pod/values.yaml b/xos-profiles/ponsim-pod/values.yaml
index d594ce5..5cd5f22 100644
--- a/xos-profiles/ponsim-pod/values.yaml
+++ b/xos-profiles/ponsim-pod/values.yaml
@@ -35,3 +35,5 @@
 
 # Supported workflows: att-workflow (AT&T) or tt-workflow (Turk Telekom)
 workflow: att-workflow
+
+bandwidthProfiles: True