'Promoting a secondary volume to primary volume.'

@kaminario_logger
def _failover_volume(self, volume):

    session_name = self.get_session_name(volume.id)
    rsession_name = self.get_rep_name(session_name)
    tgt_ssn = self.target.search('replication/sessions', name=rsession_name).hits[0]
    if (tgt_ssn.state == 'in_sync'):
        tgt_ssn.state = 'failed_over'
        tgt_ssn.save()
        LOG.debug('The    target    session:    %s    state    is    changed    to    failed_over    ', rsession_name)
