def test_create_lookup_query(self): query = create_lookup_query() self.assertIsInstance(query, Query) query = create_lookup_query(get_data=True) self.assertIsInstance(query, Query) query = create_lookup_query(get_event_types=True) self.assertIsInstance(query, Query) query = create_lookup_query(get_data=True, get_event_types=True) self.assertIsInstance(query, Query)
def pull_lookup_service(service_url, print_services=True): """ Pulls all registered services from perfSONAR lookup service. """ if service_url is None: raise CommandError("Please provide a valid gLS/hLS service " "URL: e.g. --url http://example.com:9999/service") # Send pull all data to the lookup service #try: client = create_service_client(service_url) query = create_lookup_query() result = query_psservice(client, query) save_lookup_service_result(result, print_services)