Skip to content

Commit

Permalink
Update disk size from zabbix
Browse files Browse the repository at this point in the history
  • Loading branch information
otherpirate committed Oct 17, 2016
1 parent 87c58c3 commit 5340451
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dbaas/logical/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ def disk_resize(cls, database, new_disk_offering, user):
user=user, task_history=task_history
)

def update_host_disk_used_size(self, host_address, used_size_kb):
def update_host_disk_used_size(self, host_address, used_size_kb, total_size_kb=None):
instance = self.databaseinfra.instances.filter(address=host_address).first()
if not instance:
raise ObjectDoesNotExist()
Expand All @@ -508,6 +508,9 @@ def update_host_disk_used_size(self, host_address, used_size_kb):
if not nfsaas_host:
return None

if total_size_kb:
nfsaas_host.nfsaas_size_kb = total_size_kb

nfsaas_host.nfsaas_used_size_kb = used_size_kb
nfsaas_host.save()
return nfsaas_host
Expand Down

0 comments on commit 5340451

Please sign in to comment.