'Check if flexvol is a SnapMirror source.'

def is_flexvol_mirrored(self, flexvol_name, vserver_name):

    api_args = {'query': {'snapmirror-info': {'source-vserver': vserver_name, 'source-volume': flexvol_name, 'mirror-state': 'snapmirrored', 'relationship-type': 'data_protection'}}, 'desired-attributes': {'snapmirror-info': None}}
    try:
        result = self.send_iter_request('snapmirror-get-iter', api_args)
    except netapp_api.NaApiError:
        LOG.exception('Failed    to    get    SnapMirror    info    for    volume    %s.', flexvol_name)
        return False
    if (not self._has_records(result)):
        return False
    return True
