Skip to content
Snippets Groups Projects
Commit dae39fd5 authored by Fernando K's avatar Fernando K
Browse files

Fix maxdisk being in megabytes from Netbox 4.1.0

parent 7ebc1adc
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,7 @@ def tag_from_proxmox(tag_name, color=NETBOX_DEFAULT_TAG_COLOR):
def vm_from_proxmox(cluster_name, proxmox_node_name, proxmox_vm, tags=[]):
maxdisk = proxmox_vm.get('maxdisk')
if maxdisk is not None:
maxdisk = int(maxdisk) / 2 ** 30 # B -> GB
maxdisk = int(maxdisk) / 2 ** 20 # B -> MB
memory = int(proxmox_vm['maxmem']) / 2**20 # B -> MB
return VirtualMachine(
vmid=proxmox_vm['vmid'],
......
......@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
setup(
name='netbox-proxmox-sync',
version='2.0.6',
version='2.1.0',
description='Import Proxmox cluster info into NetBox.',
install_requires=['pynetbox', 'proxmoxer'],
include_package_data=True,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment