'Update the zones based on the updated zones info.
This method will return the updated zones
:param zones: Existing zones map
:param updated_zones_info: Zones map to update
:param operation: ZONE_ADD or ZONE_REMOVE
:returns: updated zones'

def _update_zones(self, zones, updated_zones_info, operation):

    try:
        for zone_name in updated_zones_info:
            members = updated_zones_info[zone_name]
            current_members = zones.get(zone_name).split(';')
            if (operation == zone_constant.ZONE_ADD):
                new_members = set(members).difference(set(current_members))
                if new_members:
                    zones.update({zone_name: ((';'.join(new_members) + ';') + zones.get(zone_name))})
            else:
                new_members = set(current_members).difference(set(members))
                if new_members:
                    zones.pop(zone_name)
                    zones.update({zone_name: ';'.join(new_members)})
    except Exception as e:
        msg = (_('Error    while    updating    the    zones    in    the    zone    string.    Error    %(description)s.') % {'description': six.text_type(e)})
        LOG.error(msg)
        raise exception.BrocadeZoningHttpException(reason=msg)
    return zones
