@@ -376,7 +376,7 @@ def gen_api_query(self, command, details_level="standard", container_keys=None,
376376 :param payload: a JSON object (or a string representing a JSON object) with the command arguments
377377 :yields: an APIResponse object as detailed above
378378 """
379- limit = 50 # each time get no more than 50 objects
379+
380380 finished = False # will become true after getting all the data
381381 all_objects = {} # accumulate all the objects from all the API calls
382382
@@ -395,8 +395,11 @@ def gen_api_query(self, command, details_level="standard", container_keys=None,
395395 for key in container_keys :
396396 all_objects [key ] = []
397397 iterations = 0 # number of times we've made an API call
398+ limit = 50 # page size to get for each api call
398399 if payload is None :
399400 payload = {}
401+ else :
402+ limit = int (payload .get ("limit" , limit ))
400403
401404 payload .update ({"limit" : limit , "offset" : iterations * limit , "details-level" : details_level })
402405 api_res = self .api_call (command , payload )
@@ -543,6 +546,10 @@ def check_fingerprint(self):
543546 local_fingerprint = self .read_fingerprint_from_file (self .server )
544547 server_fingerprint = self .get_server_fingerprint ()
545548
549+ #Check if fingerprint is passed and matches
550+ if self .fingerprint == server_fingerprint :
551+ return True
552+
546553 # If the fingerprint is not stored in the local file
547554 if local_fingerprint == "" or \
548555 local_fingerprint .replace (':' , '' ).upper () != server_fingerprint .replace (':' , '' ).upper ():
0 commit comments