'Edit the inherit replication flag for volume.'

def edit_inherit_replication_flag(self, pool, project, volume, set=True):

    svc = ('/api/storage/v1/pools/%(pool)s/projects/%(project)s/filesystems/%(volume)s/replication' % {'pool': pool, 'project': project, 'volume': volume})
    arg = {'inherited': set}
    ret = self.rclient.put(svc, arg)
    if (ret.status != restclient.Status.ACCEPTED):
        exception_msg = (_('Error    setting    replication    inheritance    to    %(set)s    for    volume:    %(vol)s    project    %(project)s    Return    code:    %(ret.status)d    Message:    %(ret.data)s    .') % {'set': set, 'project': project, 'vol': volume, 'ret.status': ret.status, 'ret.data': ret.data})
        LOG.error(exception_msg)
        raise exception.VolumeBackendAPIException(data=exception_msg)
