Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
allrecords
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 06:32 PM
1093     0
#def get_infoblox_networks(conn, max_results=950): # iblox sets the max result per page as 1000 so set it at 950 to be safe. """ Fetch all networks from an Infoblox instance with pagination. """ #urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) record = [] page_id = None #CREDENCIALES PARA ACCEDER AL SERVIDOR credenciales= { 'host': '198.182.130.5', #'host': '198.182.130.5/wapi/v2.11.2', 'username': 'eperez', 'password': 'Welmty01!', 'verify_ssl':'False', 'wapi_version':'2.11' } #CREAR CONEXION CON SERVIDOR DE INFOBLOX conn = connector.Connector(credenciales) while True: params = { '_paging': 1, '_max_results': 1000, '_return_as_object': 1, #'_return_fields':'aws_rte53_record_info,canonical,cloud_info,comment,creation_time,creator,ddns_principal,ddns_protected,disable,dns_canonical,dns_name,extattrs,forbid_reclamation,last_queried,name,reclaimable,shared_record_group,ttl,use_ttl,view,zone' '_return_fields':'comment', } if page_id: params['_page_id'] = page_id print('Aqui') #response=conn.get_object('record:a',params) response = conn.get_object('allrecords') #response=objects.ARecord(conn, params) if not response: break record.extend(response) page_id = response[0].get('_next_page_id', None) if not page_id: break im trying to get allrecords but i recieve a next error InfobloxConnectionError: Infoblox HTTP request failed with: 400 Client Error: Bad Request for url: https://198.182.130.5/wapi/v2.11/allrecords?_proxy_search=GM