mirror of
https://github.com/ansible/awx.git
synced 2026-02-13 17:24:45 -03:30
Pull in functionality from lookup plugin get_id into tower_api itself
This commit is contained in:
committed by
John Westcott IV
parent
f4454a6c93
commit
30ff112c87
@@ -274,10 +274,7 @@ class TowerModule(AnsibleModule):
|
||||
def get_all_endpoint(self, endpoint, *args, **kwargs):
|
||||
response = self.get_endpoint(endpoint, *args, **kwargs)
|
||||
if 'next' not in response['json']:
|
||||
if not 'none_is_not_fatal' in kwargs or not kwargs['none_is_not_fatal']:
|
||||
raise RuntimeError('Expected list from API at {0}, got: {1}'.format(endpoint, response))
|
||||
else:
|
||||
return response
|
||||
raise RuntimeError('Expected list from API at {0}, got: {1}'.format(endpoint, response))
|
||||
next_page = response['json']['next']
|
||||
|
||||
if response['json']['count'] > 10000:
|
||||
|
||||
Reference in New Issue
Block a user