'Checks the availability of a cluster API.
Returns True if the specified cluster API exists and may be called by
the current user.  This method assumes Data ONTAP 8.2 or higher.'

def _check_cluster_api(self, object_name, operation_name, api):

    api_args = {'query': {'capability-info': {'object-name': object_name, 'operation-list': {'operation-info': {'name': operation_name}}}}, 'desired-attributes': {'capability-info': {'operation-list': {'operation-info': {'api-name': None}}}}}
    result = self.send_request('system-user-capability-get-iter', api_args, False)
    if (not self._has_records(result)):
        return False
    capability_info_list = (result.get_child_by_name('attributes-list') or netapp_api.NaElement('none'))
    for capability_info in capability_info_list.get_children():
        operation_list = (capability_info.get_child_by_name('operation-list') or netapp_api.NaElement('none'))
        for operation_info in operation_list.get_children():
            api_name = (operation_info.get_child_content('api-name') or '')
            api_names = api_name.split(',')
            if (api in api_names):
                return True
    return False
