def vdp_vlan_change_internal(self, vsw_cb_data, vdp_vlan, fail_reason):
        """Callback Function from VDP when provider VLAN changes.

        This will be called only during error cases when switch
        reloads or when compute reloads.
        """
        LOG.debug("In VDP VLAN change VLAN %s", vdp_vlan)
        if not vsw_cb_data:
            LOG.error("NULL vsw_cb_data Info received")
            return
        net_uuid = vsw_cb_data.get('net_uuid')
        port_uuid = vsw_cb_data.get('port_uuid')
        lvm = self.local_vlan_map.get(net_uuid)
        if not lvm:
            LOG.error("Network %s is not in the local vlan map", net_uuid)
            return
        lldpad_port = self.lldpad_info
        if not lldpad_port:
            LOG.error("There is no LLDPad port available.")
            return
        exist_vdp_vlan = lvm.late_binding_vlan
        lvid = lvm.vlan
        LOG.debug("lvid %(lvid)s exist %(vlan)s",
                  {'lvid': lvid, 'vlan': exist_vdp_vlan})
        lvm.decr_reset_vlan(port_uuid, vdp_vlan)
        lvm.set_fail_reason(port_uuid, fail_reason)
        self.vdp_vlan_cb(port_uuid, lvid, vdp_vlan, fail_reason)
        if vdp_vlan == exist_vdp_vlan:
            LOG.debug("No change in provider VLAN %s", vdp_vlan)
            return
        # Logic is if the VLAN changed to 0, clear the flows only if none of
        # the VM's in the network has a valid VLAN.
        if not ovs_lib.is_valid_vlan_tag(vdp_vlan):
            if ovs_lib.is_valid_vlan_tag(exist_vdp_vlan) and not (
               lvm.any_valid_vlan()):
                # Clear the old flows
                LOG.debug("Clearing flows, no valid vlans")
                self.program_vm_ovs_flows(lvid, exist_vdp_vlan, 0)
                lvm.late_binding_vlan = 0
            lvm.vdp_nego_req = False
        else:
            # If any VM gets a VLAN change, we immediately modify the flow.
            # This is done to not wait for all VM's VLAN getting updated from
            # switch. Logic is if any VM gts a new VLAN, the other VM's of the
            # same network will be updated eventually.
            if vdp_vlan != exist_vdp_vlan and (
               ovs_lib.is_valid_vlan_tag(vdp_vlan)):
                # Add the new flows and remove the old flows
                LOG.warning("Non Zero VDP Vlan change %s %s" %
                            (vdp_vlan, exist_vdp_vlan))
                self.program_vm_ovs_flows(lvid, exist_vdp_vlan, vdp_vlan)
                lvm.late_binding_vlan = vdp_vlan
                lvm.vdp_nego_req = False
            else:
                LOG.error("Invalid or same VLAN Exist %(exist)s "
                          "New %(new)s VLANs",
                          {'exist': exist_vdp_vlan, 'new': vdp_vlan})
Callback Function from VDP when provider VLAN changes.

        This will be called only during error cases when switch
        reloads or when compute reloads.