'Update the zone configuration.
This method will update the zone configuration passed by user.
:param zones: zone names mapped to members. Zone members
are colon separated but case-insensitive
.. code-block:: python
{   zonename1:[zonememeber1, zonemember2,...],
zonename2:[zonemember1, zonemember2,...]...}
e.g:
\'openstack50060b0000c26604201900051ee8e329\':
[\'50:06:0b:00:00:c2:66:04\',
\'20:19:00:05:1e:e8:e3:29\']
:param activate: True/False
:param operation: zone add or zone remove
:param active_zone_set: active zone set dict retrieved from
get_active_zone_set method'

def update_zones(self, zones, activate, operation, active_zone_set=None):

    LOG.debug('Update    Zones    -    Zones    passed:    %s', zones)
    cfg_name = None
    iterator_count = 0
    zone_with_sep = ''
    if (not active_zone_set):
        active_zone_set = self.get_active_zone_set()
        LOG.debug('Active    zone    set:    %s', active_zone_set)
    zone_list = active_zone_set[zone_constant.CFG_ZONES]
    LOG.debug('Active    zone    list:    %s', zone_list)
    for zone in zones.keys():
        zone_members_with_sep = ';'.join((str(member) for member in zones[zone]))
        cmd = ('%(operation)s    "%(zone)s",    "%(zone_members_with_sep)s"' % {'operation': operation, 'zone': zone, 'zone_members_with_sep': zone_members_with_sep})
        LOG.debug('Updating    zone,    cmd    to    run    %s', cmd)
        self.apply_zone_change(cmd.split())
        if (iterator_count > 0):
            zone_with_sep += ';'
        iterator_count += 1
        zone_with_sep += zone
    if (not zone_with_sep):
        return
    try:
        cfg_name = active_zone_set[zone_constant.ACTIVE_ZONE_CONFIG]
        if activate:
            self.activate_zoneset(cfg_name)
        else:
            self._cfg_save()
    except Exception as e:
        self._cfg_trans_abort()
        msg = (_('Activating    zone    set    failed:    (Zone    set=%(cfg_name)s    error=%(err)s).') % {'cfg_name': cfg_name, 'err': six.text_type(e)})
        LOG.error(msg)
        raise exception.BrocadeZoningCliException(reason=msg)
