'"Fail-over the consistent mirror group.
Note:
VNX supports fail over all the mirrors in a group as a whole,
no need to handle each mirror one by one.'

def failover_replication(self, context, group, volumes, secondary_backend_id):

    volume_update_list = []
    group_update = {'replication_status': group.replication_status}
    if (secondary_backend_id != 'default'):
        mirror_view = self.build_mirror_view(self.config, True)
        rep_status = fields.ReplicationStatus.FAILED_OVER
    else:
        mirror_view = self.build_mirror_view(self.config, False)
        rep_status = fields.ReplicationStatus.ENABLED
    secondary_client = mirror_view.secondary_client
    group_name = utils.construct_group_name(group)
    try:
        mirror_view.promote_mirror_group(group_name)
    except storops_ex.VNXMirrorException as ex:
        LOG.error('Failed    to    failover    group    %(group_id)s    to    %(target)s:    %(error)s.', {'group_id': group.id, 'target': secondary_backend_id, 'error': ex})
        rep_status = fields.ReplicationStatus.FAILOVER_ERROR
    for volume in volumes:
        volume_update = {'id': volume.id, 'provider_location': utils.update_remote_provider_location(volume, secondary_client), 'replication_status': rep_status}
        volume_update_list.append(volume_update)
    group_update['replication_status'] = rep_status
    return (group_update, volume_update_list)
