'Add volume to replicated protection group.'

def _enable_replication(self, array, volume):

    try:
        array.set_pgroup(self._replication_pg_name, addvollist=[self._get_vol_name(volume)])
    except purestorage.PureHTTPError as err:
        with excutils.save_and_reraise_exception() as ctxt:
            if ((err.code == 400) and (ERR_MSG_ALREADY_BELONGS in err.text)):
                ctxt.reraise = False
                LOG.warning('Adding    Volume    to    Protection    Group    failed    with    message:    %s', err.text)
