-
Notifications
You must be signed in to change notification settings - Fork 27
Closed as not planned
Description
Hello,
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`
Any idea ?
Thanks by advance
Metadata
Metadata
Assignees
Labels
No labels