File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
kvmagent/kvmagent/plugins Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,12 @@ def __init__(self):
3232 self .error = None
3333
3434
35+ class InitRsp (AgentResponse ):
36+ def __init__ (self ):
37+ super (InitRsp , self ).__init__ ()
38+ self .localStorageUsedCapacity = None
39+
40+
3541class CopyBitsFromRemoteCmd (AgentCommand ):
3642 @log .sensitive_fields ("dstPassword" )
3743 def __init__ (self ):
@@ -696,8 +702,9 @@ def init(self, req):
696702 f = open (cmd .initFilePath , 'w' )
697703 f .close ()
698704
699- rsp = AgentResponse ()
705+ rsp = InitRsp ()
700706 rsp .totalCapacity , rsp .availableCapacity = self ._get_disk_capacity (cmd .path )
707+ rsp .localStorageUsedCapacity = linux .get_used_disk_apparent_size (cmd .path , 0 , 1 )
701708 return jsonobject .dumps (rsp )
702709
703710 @kvmagent .replyerror
You can’t perform that action at this time.
0 commit comments