netdevopsbr / netbox-proxbox

Netbox Plugin for integration between Proxmox and Netbox
Apache License 2.0
341 stars 50 forks source link

Add individual VM update #17

Open emersonfelipesp opened 3 years ago

emersonfelipesp commented 3 years ago

Currently is possible only to run full update of the whole Proxmox, not individually by each VM. The package function is already done and can be accessed through the following function:

netbox_proxbox.proxbox_api.update.virtual_machine()

It just need a way to be called though the GUI (recommended creating an button on Virtual Machine page) using Django, whether it's passing it directly to the database or making an API call.

Some usage examples of the function:

  1. Update VM using Netbox ID:
netbox_proxbox.proxbox_api.update.virtual_machine(id = 3)
  1. Update VM using Proxmox ID:
netbox_proxbox.proxbox_api.update.virtual_machine(proxmox_id = 414)
  1. Update VM using name:
    netbox_proxbox.proxbox_api.update.virtual_machine(name = Netbox)