Skip to content

Commit

Permalink
Changed to able to get/update 'aliases' parameter of HOST record for …
Browse files Browse the repository at this point in the history
…DNS (#213)

LGTM
  • Loading branch information
userlocalhost authored and saiprasannasastry committed Feb 21, 2019
1 parent b64bea8 commit 5424d11
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ Contributors
* Robert Grant <[email protected]>
* Yakau Bubnou <[email protected]>
* Jonas Krüger Svensson <[email protected]>
* Hiroyasu OHYAMA <[email protected]>

More are always welcome!
9 changes: 5 additions & 4 deletions infoblox_client/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,13 +555,13 @@ class HostRecordV4(HostRecord):
"""HostRecord for IPv4"""
_fields = ['ipv4addrs', 'view', 'extattrs', 'name', 'zone',
'configure_for_dns', 'network_view', 'mac', 'ttl',
'comment']
'comment', 'aliases']
_search_for_update_fields = ['view', 'ipv4addr', 'name',
'zone', 'network_view', 'mac']
_all_searchable_fields = _search_for_update_fields
_updateable_search_fields = ['name']
_shadow_fields = ['_ref', 'ipv4addr']
_return_fields = ['ipv4addrs', 'extattrs']
_return_fields = ['ipv4addrs', 'extattrs', 'aliases']
_remap = {'ip': 'ipv4addrs',
'ips': 'ipv4addrs'}
_ip_version = 4
Expand Down Expand Up @@ -590,13 +590,14 @@ def _build_ipv4(ips_v4):
class HostRecordV6(HostRecord):
"""HostRecord for IPv6"""
_fields = ['ipv6addrs', 'view', 'extattrs', 'name', 'zone',
'configure_for_dns', 'network_view', 'ttl', 'comment']
'configure_for_dns', 'network_view', 'ttl', 'comment',
'aliases']
_search_for_update_fields = ['ipv6addr', 'view', 'name',
'zone', 'network_view']
_all_searchable_fields = _search_for_update_fields
_updateable_search_fields = ['name']
_shadow_fields = ['_ref', 'ipv6addr']
_return_fields = ['ipv6addrs', 'extattrs']
_return_fields = ['ipv6addrs', 'extattrs', 'aliases']
_remap = {'ip': 'ipv6addrs',
'ips': 'ipv6addrs'}

Expand Down
2 changes: 1 addition & 1 deletion tests/test_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def test_create_host_record_with_ttl(self):
{'mac': 'fa:16:3e:29:87:70',
'ipv4addr': '22.0.0.2'}],
'view': 'some-dns-view'},
['ipv4addrs', 'extattrs'])
['ipv4addrs', 'extattrs', 'aliases'])

def test_create_host_record_with_ip(self):
mock_record = DEFAULT_HOST_RECORD
Expand Down

0 comments on commit 5424d11

Please sign in to comment.