{"action":"created","issue":{"url":"https://api.github.com/repos/QubesOS/qubes-issues/issues/1961","repository_url":"https://api.github.com/repos/QubesOS/qubes-issues","labels_url":"https://api.github.com/repos/QubesOS/qubes-issues/issues/1961/labels{/name}","comments_url":"https://api.github.com/repos/QubesOS/qubes-issues/issues/1961/comments","events_url":"https://api.github.com/repos/QubesOS/qubes-issues/issues/1961/events","html_url":"https://github.com/QubesOS/qubes-issues/issues/1961","id":153247555,"number":1961,"title":"Fix qubes.storage.get_disk_usage(self.volumes[...]) in QubesVM","user":{"login":"woju","id":1550337,"avatar_url":"https://avatars.githubusercontent.com/u/1550337?v=3","gravatar_id":"","url":"https://api.github.com/users/woju","html_url":"https://github.com/woju","followers_url":"https://api.github.com/users/woju/followers","following_url":"https://api.github.com/users/woju/following{/other_user}","gists_url":"https://api.github.com/users/woju/gists{/gist_id}","starred_url":"https://api.github.com/users/woju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woju/subscriptions","organizations_url":"https://api.github.com/users/woju/orgs","repos_url":"https://api.github.com/users/woju/repos","events_url":"https://api.github.com/users/woju/events{/privacy}","received_events_url":"https://api.github.com/users/woju/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/QubesOS/qubes-issues/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/QubesOS/qubes-issues/labels/C:%20core","name":"C: core","color":"cccccc"},{"url":"https://api.github.com/repos/QubesOS/qubes-issues/labels/task","name":"task","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"kalkin","id":145191,"avatar_url":"https://avatars.githubusercontent.com/u/145191?v=3","gravatar_id":"","url":"https://api.github.com/users/kalkin","html_url":"https://github.com/kalkin","followers_url":"https://api.github.com/users/kalkin/followers","following_url":"https://api.github.com/users/kalkin/following{/other_user}","gists_url":"https://api.github.com/users/kalkin/gists{/gist_id}","starred_url":"https://api.github.com/users/kalkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalkin/subscriptions","organizations_url":"https://api.github.com/users/kalkin/orgs","repos_url":"https://api.github.com/users/kalkin/repos","events_url":"https://api.github.com/users/kalkin/events{/privacy}","received_events_url":"https://api.github.com/users/kalkin/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/QubesOS/qubes-issues/milestones/17","html_url":"https://github.com/QubesOS/qubes-issues/milestones/Release%204.0","labels_url":"https://api.github.com/repos/QubesOS/qubes-issues/milestones/17/labels","id":1083579,"number":17,"title":"Release 4.0","description":"* core-admin rewrite AKA core3","creator":{"login":"marmarek","id":726704,"avatar_url":"https://avatars.githubusercontent.com/u/726704?v=3","gravatar_id":"","url":"https://api.github.com/users/marmarek","html_url":"https://github.com/marmarek","followers_url":"https://api.github.com/users/marmarek/followers","following_url":"https://api.github.com/users/marmarek/following{/other_user}","gists_url":"https://api.github.com/users/marmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/marmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmarek/subscriptions","organizations_url":"https://api.github.com/users/marmarek/orgs","repos_url":"https://api.github.com/users/marmarek/repos","events_url":"https://api.github.com/users/marmarek/events{/privacy}","received_events_url":"https://api.github.com/users/marmarek/received_events","type":"User","site_admin":false},"open_issues":111,"closed_issues":17,"state":"open","created_at":"2015-04-25T20:32:26Z","updated_at":"2016-05-05T14:46:41Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-05-05T14:46:41Z","updated_at":"2016-05-05T15:16:16Z","closed_at":null,"body":"There are three issues:\r\n1. `get_disk_usage` is in `qubes.storage.file`\r\n  1.1. @marmarek is not sure if this is right place, because it may be used in other places. I (@woju) am however quite sure that yes, this is the right place, but it should be documented.\r\n2. There is no `self.volumes` anymore\r\n3. Maybe those functions should be removed, because they are already marked as deprecated.\r\n\r\n```\r\nvm/qubesvm.py-    def get_root_img_sz(self):\r\nvm/qubesvm.py-        '''Get the size of the :py:attr:`volumes['root']`.\r\nvm/qubesvm.py-\r\nvm/qubesvm.py-        This is a temporary wrapper for backwards compatibility. You should\r\nvm/qubesvm.py-        call directly :py:attr:`volumes[name].size`\r\nvm/qubesvm.py-        :returns: domain's virtual disk size [FIXME unit]\r\nvm/qubesvm.py-        :rtype: FIXME\r\nvm/qubesvm.py-\r\nvm/qubesvm.py-        .. seealso:: :py:meth:`get_disk_utilization_root_img`\r\nvm/qubesvm.py-        '''\r\nvm/qubesvm.py-\r\nvm/qubesvm.py-        warnings.warn(\r\nvm/qubesvm.py-            \"get_disk_root_img_sz is deprecated, use volumes['root'].size\",\r\nvm/qubesvm.py-            DeprecationWarning)\r\nvm/qubesvm.py:        return qubes.storage.get_disk_usage(self.volumes['root'].size)\r\nvm/qubesvm.py-\r\n```"},"comment":{"url":"https://api.github.com/repos/QubesOS/qubes-issues/issues/comments/217182355","html_url":"https://github.com/QubesOS/qubes-issues/issues/1961#issuecomment-217182355","issue_url":"https://api.github.com/repos/QubesOS/qubes-issues/issues/1961","id":217182355,"user":{"login":"marmarek","id":726704,"avatar_url":"https://avatars.githubusercontent.com/u/726704?v=3","gravatar_id":"","url":"https://api.github.com/users/marmarek","html_url":"https://github.com/marmarek","followers_url":"https://api.github.com/users/marmarek/followers","following_url":"https://api.github.com/users/marmarek/following{/other_user}","gists_url":"https://api.github.com/users/marmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/marmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmarek/subscriptions","organizations_url":"https://api.github.com/users/marmarek/orgs","repos_url":"https://api.github.com/users/marmarek/repos","events_url":"https://api.github.com/users/marmarek/events{/privacy}","received_events_url":"https://api.github.com/users/marmarek/received_events","type":"User","site_admin":false},"created_at":"2016-05-05T15:16:16Z","updated_at":"2016-05-05T15:16:16Z","body":"> - [ ] Maybe remove the all the `QubesVM` utilization and size methods?\r\n\r\nI'd leave them there. Or simply one method - `get_disk_usage` - overall disk usage of this VM. This method should summarize all the VM own volumes (but not for example root volume for AppVM). Detailed information can be get from `vm.storage`. \r\n\r\nAs for \"own\" definition - I'd use volume type here - exclude read-only and snapshot volumes ."}}