We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Found an issue where we can't find a host if it has AAAA record set.
I updated infoblox.py to search extattrs by ip aswell
def get_ip_extattrs(self, ip_v4, attributes=None): """ Implements IBA REST API call to retrieve host extensible attributes Returns hash table of attributes with attribute name as a hash key :param ipv4: ipv4 :param attributes: array of extensible attribute names (optional) """ rest_url = 'https://' + self.iba_host + '/wapi/v' + self.iba_wapi_version + '/ipv4address?ip_address=' + ip_v4 + '&_return_fields=extattrs' try: r = requests.get(url=rest_url, auth=(self.iba_user, self.iba_password), verify=self.iba_verify_ssl) r_json = r.json() if r.status_code == 200: if len(r_json) > 0: extattrs = {} if attributes: for attribute in attributes: if attribute in r_json[0]['extattrs']: extattrs[attribute] = r_json[0]['extattrs'][attribute]['value'] else: raise InfobloxNotFoundException("No requested attribute found: " + attribute) else: for attribute in r_json[0]['extattrs'].keys(): extattrs[attribute] = r_json[0]['extattrs'][attribute]['value'] return extattrs else: raise InfobloxNotFoundException("No requested host found: " + fqdn) else: if 'text' in r_json: raise InfobloxNotFoundException(r_json['text']) else: r.raise_for_status() except ValueError: raise Exception(r) except Exception: raise
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
Found an issue where we can't find a host if it has AAAA record set.
I updated infoblox.py to search extattrs by ip aswell
The text was updated successfully, but these errors were encountered: