Fix for PVEv6
This commit is contained in:
parent
0b5ccbb102
commit
2b8936a833
|
|
@ -5,8 +5,8 @@ from VM import VM
|
|||
from Storage import Storage
|
||||
|
||||
USERNAME = "zabbix@pve"
|
||||
PASSWORD = "zabbix"
|
||||
HOST = "172.16.3.11:8006"
|
||||
PASSWORD = "KbCurGdt82NTgBye"
|
||||
HOST = "localhost:8006"
|
||||
|
||||
conn = PVEApi(HOST, USERNAME, PASSWORD)
|
||||
nodelist = conn.get_node_list()
|
||||
|
|
|
|||
|
|
@ -135,7 +135,10 @@ class PVEApi(object):
|
|||
active = storage[u'active']
|
||||
enabled = storage[u'enabled']
|
||||
avail = storage[u'avail']
|
||||
used_fraction = storage[u'used_fraction']
|
||||
try:
|
||||
used_fraction = storage[u'used_fraction']
|
||||
except KeyError:
|
||||
used_fraction = "Error getting value"
|
||||
stor = Storage(node, name, total, used, active, enabled, avail, used_fraction)
|
||||
storagelist.append(stor)
|
||||
return storagelist
|
||||
|
|
|
|||
Loading…
Reference in New Issue