VOL-1579: Handle tech-profile download for all flows instead of just eapol.
          Some operator work flows may not use eapol at all. So, trigger
          tech-profile download for all flows to be generic. The ONU adapter
          shall not tigger the tech-profile download to the ONU, if it is
          already done once.

Change-Id: I70889856729347ec141d7ca59144f713986f4c07
diff --git a/voltha/adapters/openolt/openolt_flow_mgr.py b/voltha/adapters/openolt/openolt_flow_mgr.py
index 0b002ba..68ad36f 100644
--- a/voltha/adapters/openolt/openolt_flow_mgr.py
+++ b/voltha/adapters/openolt/openolt_flow_mgr.py
@@ -500,10 +500,13 @@
 
             elif classifier[IP_PROTO] == 2:
                 self.log.warn('igmp flow add ignored, not implemented yet')
+                return
             else:
                 self.log.warn("Invalid-Classifier-to-handle",
                               classifier=classifier,
                               action=action)
+                return
+
         elif ETH_TYPE in classifier:
             if classifier[ETH_TYPE] == EAP_ETH_TYPE:
                 self.log.debug('eapol flow add')
@@ -525,19 +528,6 @@
                                                        kwargs,
                                                        us_gem_port_attr_list)
 
-                (ofp_port_name, ofp_port_no) = \
-                    self.data_model.get_ofp_port_name(intf_id, onu_id, uni_id)
-                if ofp_port_name is None:
-                    self.log.error("port-name-not-found")
-                    return
-
-                tp_id = self.resource_mgr.get_tech_profile_id_for_onu(intf_id, onu_id, uni_id)
-                tp_path = self.get_tp_path(intf_id, ofp_port_name, tp_id)
-
-                self.log.debug('Load-tech-profile-request-to-brcm-handler',
-                               tp_path=tp_path)
-                self.data_model.onu_download_tech_profile(
-                    intf_id, onu_id, uni_id, tp_path)
         elif PUSH_VLAN in action:
             if VLAN_PCP in classifier:
                 gemport_id = self._get_gem_port_for_pcp(
@@ -549,6 +539,7 @@
                 self._install_flow_on_all_gemports(self.add_upstream_data_flow,
                                                    kwargs, us_gem_port_attr_list
                                                    )
+
         elif POP_VLAN in action:
             if VLAN_PCP in classifier:
                 gemport_id = self._get_gem_port_for_pcp(
@@ -590,6 +581,26 @@
             self.log.debug('Invalid-flow-type-to-handle',
                            classifier=classifier,
                            action=action, flow=flow)
+            return
+
+        # Download tech-profile to ONU
+        self.download_tech_profile(intf_id, onu_id, uni_id)
+
+    def download_tech_profile(self, intf_id, onu_id, uni_id):
+
+        (ofp_port_name, ofp_port_no) = \
+            self.data_model.get_ofp_port_name(intf_id, onu_id, uni_id)
+        if ofp_port_name is None:
+            self.log.error("port-name-not-found")
+            return
+
+        tp_id = self.resource_mgr.get_tech_profile_id_for_onu(intf_id, onu_id, uni_id)
+        tp_path = self.get_tp_path(intf_id, ofp_port_name, tp_id)
+
+        self.log.debug('Load-tech-profile-request-to-brcm-handler',
+                       tp_path=tp_path)
+        self.data_model.onu_download_tech_profile(
+            intf_id, onu_id, uni_id, tp_path)
 
     def get_scheduler(self, tech_profile_instance, direction, meter_id):
         if direction == Direction.UPSTREAM: