You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to fetch VirtualMachine.Primary_IP.address #36
I'm building an RoR app that fetch my Netbox instance to show our virtual machines.
I'm happy to find your lib, it work as well but I got issues to fetch a variable.
Maybe it's my low level in Ruby the cause, but I don't find any answer.
# I fetch VMs in my Controller
vms = NetboxClientRuby.virtualization.virtual_machines.filter(cluster_id: cluster_id)
# I use the @vms var in my ERB html files
<% @vms.each do |vm| %>
<tr>
# This Work well
<td><%= vm.name %></td>
<td><%= vm.vcpus %></td>
<td><%= vm.memory %>Mo</td>
<td><%= vm.disk %>Go</td>
# This doesn't work
<td> <%= vm.primary_ip.name %></td>
</tr>
<% end %>
I have tried vm.primary_ip['address'], vm.primary_ip('address') and few other way, but I'm unable to get my VM Primary IP Address.
I got error like this :
undefined method name' for #NetboxClientRuby::IPAM::IpAddress:0x00007ffff51d63c8`
Activity
thde commentedon Feb 12, 2021
vm.primary_ip.address?thde commentedon Jul 22, 2022
Closing this issue for now. Feel free to open it again if the issue persists.