infobloxopen / infoblox-client

Infoblox NIOS Python WAPI Client
Apache License 2.0
142 stars 104 forks source link

_custom_field_processing bug in NetworkV4 fails to properly serialize members #294

Closed ddiguru closed 2 years ago

ddiguru commented 2 years ago

High-level API call to NetworkV4 fails to serialize members properly. This has been confirmed on the infoblox-client 0.5.0, as well as, master. This was tested and confirmed on NIOS v8.5.3 and v8.5.4.

Steps to reproduce:

  1. create a DHCP-enabled network 192.168.1.0/24 and associate two (2) Grid DHCP Member servers (NOT Microsoft Servers)

  2. perform the following call in the Infoblox client: res = objects.Network.search(conn, return_fields=['members'], network='192.168.1.0/24')

The following is returned:

NetworkV4: members="[Msdhcpserver: ipv4addr="192.168.1.5", name="dhcp01.example.com", 
Msdhcpserver: ipv4addr="192.168.1.6", name="dhcp02.example.com"]", 
_ref="network/ZG5zLm5ldHdvcmskMTAuMC4zMi4wLzI0LzA:192.168.1.0/24/default"

There are a few issues with this:

This issue is also seen with the NetworkTemplate.

This issue is only related to the high-level calls to objects.py and NOT when using the connector low-level calls.

ddiguru commented 2 years ago

created PR #295