datacenter / acitoolkit

A basic toolkit for accessing the Cisco APIC
Other
347 stars 266 forks source link

Handling the Removal of the 'ip' Key in the 'fvCEp' Object for ACI 5.1 #382

Open osanchez42 opened 1 year ago

osanchez42 commented 1 year ago

there is currently an issue open on github here Show endpoints sample does retrieve key error in acitoolkit.py · Issue #376 · datacenter/acitoolkit

There was a PR that was not merged and closed closed that talks about changes made to Cisco ACI that caused this issue Handling the Removal of the 'ip' Key in the 'fvCEp' Object for ACI 5.1 by timway · Pull Request #374 · datacenter/acitoolkit

tldr: IP key has been removed from the endpoints payload.

Addresses the Dec 15, 2020 remark in Cisco Application Policy Infrastructure Controller Release Notes, Release 5.1(1)

In ACI 5.1 the fvCEp object no longer contains a key for IP

"Because a fvCEp object can contain multiple fvIp objects it may be ideal to be more selective on which IP is grabbed or a way to handle an endpoint having multiple IPs"

This PR aims to address this issue by checking for ip address on endpoint, and if not there, keep ip field blank. For those looking for ips associated to endpoints and their children, there is a attr on endpoint labled secondary_ip which is a list of ips