'Checks if we can do replication.
Need the extra spec set and we have to be talking to EM.
:param specs: Cinder Volume or snapshot extra specs.
:return: rinfo dict.'

def _get_replication_specs(self, specs):

    rinfo = {'enabled': False, 'sync': False, 'live': False, 'active': False, 'autofailover': False}
    if (not self.is_direct_connect):
        if ((not self.failed_over) and (specs.get('replication_enabled') == '<is>    True')):
            rinfo['enabled'] = True
        if (specs.get('replication_type') == '<in>    sync'):
            rinfo['sync'] = True
        if (specs.get('replication:livevolume') == '<is>    True'):
            rinfo['live'] = True
        if (specs.get('replication:livevolume:autofailover') == '<is>    True'):
            rinfo['autofailover'] = True
        if (specs.get('replication:activereplay') == '<is>    True'):
            rinfo['active'] = True
        if rinfo['enabled']:
            replication_target_count = len(self.backends)
            msg = None
            if (replication_target_count == 0):
                msg = _('Replication    setup    failure:    replication    has    been    enabled    but    no    replication    target    has    been    specified    for    this    backend.')
            if (rinfo['live'] and (replication_target_count != 1)):
                msg = _('Replication    setup    failure:    replication:livevolume    has    been    enabled    but    more    than    one    replication    target    has    been    specified    for    this    backend.')
            if msg:
                LOG.debug(msg)
                raise exception.ReplicationError(message=msg)
    return rinfo
