ninech / netbox-client-ruby

A ruby client library for Netbox v2.
MIT License
24 stars 21 forks source link

🐞 Detects virtual machine interfaces #25

Closed cimnine closed 6 years ago

cimnine commented 6 years ago

Previously, when hopping from the IP address to the interface associated with that IP, NetboxClientRuby would always return a DCIM::Interface instance.

# would always return a DCIM::Interface
NetboxClientRuby.ip_addresses.first.interface

This is wrong, because if the IP address is assigned to a virtual machine, then we would expected to receive a Virtualization::Interface instead.

This commit fixes #24.