def test_get_filter(): params = {'filtertype': 'locations', 'filtervalue': 'nausny'} filter_dict = get_filter(params) assert ('value' in filter_dict) assert ('nausny' == filter_dict['value'][0])
def get(self): """ Get Client Metrics Over Time """ args = top_arguments.parse_args(request) search_filter = get_filter(args) results = SEARCH.get_top_results('clients', args.get('limit'), search_filter) return results
def get(self): """ Get top locations with given filters """ args = top_arguments.parse_args(request) search_filter = get_filter(args) results = SEARCH.get_top_results('locations', args.get('limit'), search_filter) return results
def get(self): """ Provide top Servers with provided filters """ args = TOP_ARGUMENTS.parse_args(request) search_filter = get_filter(args) results = SEARCH.get_top_results('servers', args.get('limit'), search_filter) return results
def get(self): """ Search for Servers matching a query. """ args = SEARCH_ARGUMENTS.parse_args(request) search_filter = get_filter(args) asn_query = normalize_key(args.get('q')) results = SEARCH.get_search_results('servers', asn_query, search_filter) return results
def get(self): """ Provide top Servers with provided filters """ args = top_arguments.parse_args(request) search_filter = get_filter(args) results = SEARCH.get_top_results('servers', args.get('limit'), search_filter) return results
def get(self): """ Search clients for a given query """ args = search_arguments.parse_args(request) asn_query = normalize_key(args.get('q')) search_filter = get_filter(args) results = SEARCH.get_search_results('clients', asn_query, search_filter) return results
def get(self): """ Get top locations with given filters """ args = TOP_ARGUMENTS.parse_args(request) search_filter = get_filter(args) results = SEARCH.get_top_results('locations', args.get('limit'), search_filter) return results
def get(self): """ Search for Servers matching a query. """ args = search_arguments.parse_args(request) search_filter = get_filter(args) asn_query = normalize_key(args.get('q')) results = SEARCH.get_search_results('servers', asn_query, search_filter) return results
def test_get_filter(): ''' Test getting a filter out of a type and value ''' params = {'filtertype': 'locations', 'filtervalue': 'nausny'} filter_dict = get_filter(params) assert 'value' in filter_dict assert filter_dict['value'][0] == 'nausny'
def get(self): """ Get all Locations matching a query """ args = search_arguments.parse_args(request) location_query = normalize_key(args.get('q')) search_filter = get_filter(args) results = SEARCH.get_search_results('locations', location_query, search_filter) return results
def get(self): """ Get all Locations matching a query """ args = SEARCH_ARGUMENTS.parse_args(request) location_query = normalize_key(args.get('q')) search_filter = get_filter(args) results = SEARCH.get_search_results('locations', location_query, search_filter) return results