pynautobot icon indicating copy to clipboard operation
pynautobot copied to clipboard

Fixed issue where circuit details are not known without fetching them

Open tsm1th opened this issue 6 months ago • 2 comments

This closes #222.

The other termination type includes the identifier name in the original API call, so it's not an issue. For a circuit termination type, the identifier circuit.cid is not in the original API call. That's why an additional fetch is necessary.

Pynautobot usually handles this with the __getattr__ method. However, this does not work in this case because the Circuit object has not been initialized yet. Once initialized via full_details(), the __getattr__ works as expected.

Another solution was to increase the depth param on the API call, but it added performance overhead that wasn't ideal.

tsm1th avatar Jul 26 '24 14:07 tsm1th