We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c3fbace + 9005c2e commit b8a6ed6Copy full SHA for b8a6ed6
kvmagent/kvmagent/plugins/localstorage.py
@@ -32,6 +32,12 @@ def __init__(self):
32
self.error = None
33
34
35
+class InitRsp(AgentResponse):
36
+ def __init__(self):
37
+ super(InitRsp, self).__init__()
38
+ self.localStorageUsedCapacity = None
39
+
40
41
class CopyBitsFromRemoteCmd(AgentCommand):
42
@log.sensitive_fields("dstPassword")
43
def __init__(self):
@@ -696,8 +702,9 @@ def init(self, req):
696
702
f = open(cmd.initFilePath, 'w')
697
703
f.close()
698
704
699
- rsp = AgentResponse()
705
+ rsp = InitRsp()
700
706
rsp.totalCapacity, rsp.availableCapacity = self._get_disk_capacity(cmd.path)
707
+ rsp.localStorageUsedCapacity = linux.get_used_disk_apparent_size(cmd.path, 0, 1)
701
708
return jsonobject.dumps(rsp)
709
710
@kvmagent.replyerror
0 commit comments