{"action":"created","comment":{"url":"https://api.github.com/repos/freenas/freenas/pulls/comments/352149507","pull_request_review_id":324736995,"id":352149507,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM1MjE0OTUwNw==","diff_hunk":"@@ -1259,39 +1262,53 @@ def rename_domain(self, old, new):\n         Dict(\n             'vm_delete',\n             Bool('zvols', default=False),\n+            Bool('force', default=False),\n         ),\n     )\n-    def do_delete(self, id, data):\n+    async def do_delete(self, id, data):\n         \"\"\"Delete a VM.\"\"\"\n-        self.ensure_libvirt_connection()\n-        status = self.status(id)\n-        if status.get('state') == 'RUNNING':\n-            self.poweroff(id)\n-        elif status.get('state') == 'ERROR':\n-            raise CallError('Unable to retrieve VM status. Failed to destroy VM')\n-\n-        if data['zvols']:\n-            devices = self.middleware.call_sync('vm.device.query', [\n-                ('vm', '=', id), ('dtype', '=', 'DISK')\n-            ])\n+        async with LIBVIRT_LOCK:\n+            vm = await self._get_instance(id)\n+            self.ensure_libvirt_connection()","path":"src/middlewared/middlewared/plugins/vm.py","position":42,"original_position":42,"commit_id":"5fb4da18ce74103374e803f8db6eb17d303153c2","original_commit_id":"5fb4da18ce74103374e803f8db6eb17d303153c2","user":{"login":"sonicaj","id":17968138,"node_id":"MDQ6VXNlcjE3OTY4MTM4","avatar_url":"https://avatars2.githubusercontent.com/u/17968138?v=4","gravatar_id":"","url":"https://api.github.com/users/sonicaj","html_url":"https://github.com/sonicaj","followers_url":"https://api.github.com/users/sonicaj/followers","following_url":"https://api.github.com/users/sonicaj/following{/other_user}","gists_url":"https://api.github.com/users/sonicaj/gists{/gist_id}","starred_url":"https://api.github.com/users/sonicaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonicaj/subscriptions","organizations_url":"https://api.github.com/users/sonicaj/orgs","repos_url":"https://api.github.com/users/sonicaj/repos","events_url":"https://api.github.com/users/sonicaj/events{/privacy}","received_events_url":"https://api.github.com/users/sonicaj/received_events","type":"User","site_admin":false},"body":"Actually no, we are checking connection.isalive - definitely updating this","created_at":"2019-11-29T14:13:46Z","updated_at":"2019-11-29T14:13:46Z","html_url":"https://github.com/freenas/freenas/pull/3852#discussion_r352149507","pull_request_url":"https://api.github.com/repos/freenas/freenas/pulls/3852","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/freenas/freenas/pulls/comments/352149507"},"html":{"href":"https://github.com/freenas/freenas/pull/3852#discussion_r352149507"},"pull_request":{"href":"https://api.github.com/repos/freenas/freenas/pulls/3852"}},"in_reply_to_id":352137634},"pull_request":{"url":"https://api.github.com/repos/freenas/freenas/pulls/3852","id":346347843,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQ2MzQ3ODQz","html_url":"https://github.com/freenas/freenas/pull/3852","diff_url":"https://github.com/freenas/freenas/pull/3852.diff","patch_url":"https://github.com/freenas/freenas/pull/3852.patch","issue_url":"https://api.github.com/repos/freenas/freenas/issues/3852","number":3852,"state":"open","locked":false,"title":"NAS-100780 / 12 / Add events for vms","user":{"login":"sonicaj","id":17968138,"node_id":"MDQ6VXNlcjE3OTY4MTM4","avatar_url":"https://avatars2.githubusercontent.com/u/17968138?v=4","gravatar_id":"","url":"https://api.github.com/users/sonicaj","html_url":"https://github.com/sonicaj","followers_url":"https://api.github.com/users/sonicaj/followers","following_url":"https://api.github.com/users/sonicaj/following{/other_user}","gists_url":"https://api.github.com/users/sonicaj/gists{/gist_id}","starred_url":"https://api.github.com/users/sonicaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonicaj/subscriptions","organizations_url":"https://api.github.com/users/sonicaj/orgs","repos_url":"https://api.github.com/users/sonicaj/repos","events_url":"https://api.github.com/users/sonicaj/events{/privacy}","received_events_url":"https://api.github.com/users/sonicaj/received_events","type":"User","site_admin":false},"body":"This commit adds events for VM's which emit status for different vm's wrt running/shutdown etc","created_at":"2019-11-27T17:12:10Z","updated_at":"2019-11-29T14:13:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"acf014de962a164f3808ca4c8e3d9411ad6f8a84","assignee":{"login":"sonicaj","id":17968138,"node_id":"MDQ6VXNlcjE3OTY4MTM4","avatar_url":"https://avatars2.githubusercontent.com/u/17968138?v=4","gravatar_id":"","url":"https://api.github.com/users/sonicaj","html_url":"https://github.com/sonicaj","followers_url":"https://api.github.com/users/sonicaj/followers","following_url":"https://api.github.com/users/sonicaj/following{/other_user}","gists_url":"https://api.github.com/users/sonicaj/gists{/gist_id}","starred_url":"https://api.github.com/users/sonicaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonicaj/subscriptions","organizations_url":"https://api.github.com/users/sonicaj/orgs","repos_url":"https://api.github.com/users/sonicaj/repos","events_url":"https://api.github.com/users/sonicaj/events{/privacy}","received_events_url":"https://api.github.com/users/sonicaj/received_events","type":"User","site_admin":false},"assignees":[{"login":"sonicaj","id":17968138,"node_id":"MDQ6VXNlcjE3OTY4MTM4","avatar_url":"https://avatars2.githubusercontent.com/u/17968138?v=4","gravatar_id":"","url":"https://api.github.com/users/sonicaj","html_url":"https://github.com/sonicaj","followers_url":"https://api.github.com/users/sonicaj/followers","following_url":"https://api.github.com/users/sonicaj/following{/other_user}","gists_url":"https://api.github.com/users/sonicaj/gists{/gist_id}","starred_url":"https://api.github.com/users/sonicaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonicaj/subscriptions","organizations_url":"https://api.github.com/users/sonicaj/orgs","repos_url":"https://api.github.com/users/sonicaj/repos","events_url":"https://api.github.com/users/sonicaj/events{/privacy}","received_events_url":"https://api.github.com/users/sonicaj/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"themylogin","id":669257,"node_id":"MDQ6VXNlcjY2OTI1Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/669257?v=4","gravatar_id":"","url":"https://api.github.com/users/themylogin","html_url":"https://github.com/themylogin","followers_url":"https://api.github.com/users/themylogin/followers","following_url":"https://api.github.com/users/themylogin/following{/other_user}","gists_url":"https://api.github.com/users/themylogin/gists{/gist_id}","starred_url":"https://api.github.com/users/themylogin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/themylogin/subscriptions","organizations_url":"https://api.github.com/users/themylogin/orgs","repos_url":"https://api.github.com/users/themylogin/repos","events_url":"https://api.github.com/users/themylogin/events{/privacy}","received_events_url":"https://api.github.com/users/themylogin/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/freenas/freenas/pulls/3852/commits","review_comments_url":"https://api.github.com/repos/freenas/freenas/pulls/3852/comments","review_comment_url":"https://api.github.com/repos/freenas/freenas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/freenas/freenas/issues/3852/comments","statuses_url":"https://api.github.com/repos/freenas/freenas/statuses/5fb4da18ce74103374e803f8db6eb17d303153c2","head":{"label":"freenas:NAS-100780","ref":"NAS-100780","sha":"5fb4da18ce74103374e803f8db6eb17d303153c2","user":{"login":"freenas","id":3792476,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTI0NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/3792476?v=4","gravatar_id":"","url":"https://api.github.com/users/freenas","html_url":"https://github.com/freenas","followers_url":"https://api.github.com/users/freenas/followers","following_url":"https://api.github.com/users/freenas/following{/other_user}","gists_url":"https://api.github.com/users/freenas/gists{/gist_id}","starred_url":"https://api.github.com/users/freenas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freenas/subscriptions","organizations_url":"https://api.github.com/users/freenas/orgs","repos_url":"https://api.github.com/users/freenas/repos","events_url":"https://api.github.com/users/freenas/events{/privacy}","received_events_url":"https://api.github.com/users/freenas/received_events","type":"Organization","site_admin":false},"repo":{"id":8627760,"node_id":"MDEwOlJlcG9zaXRvcnk4NjI3NzYw","name":"freenas","full_name":"freenas/freenas","private":false,"owner":{"login":"freenas","id":3792476,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTI0NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/3792476?v=4","gravatar_id":"","url":"https://api.github.com/users/freenas","html_url":"https://github.com/freenas","followers_url":"https://api.github.com/users/freenas/followers","following_url":"https://api.github.com/users/freenas/following{/other_user}","gists_url":"https://api.github.com/users/freenas/gists{/gist_id}","starred_url":"https://api.github.com/users/freenas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freenas/subscriptions","organizations_url":"https://api.github.com/users/freenas/orgs","repos_url":"https://api.github.com/users/freenas/repos","events_url":"https://api.github.com/users/freenas/events{/privacy}","received_events_url":"https://api.github.com/users/freenas/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/freenas/freenas","description":"FreeNAS Git Repository","fork":false,"url":"https://api.github.com/repos/freenas/freenas","forks_url":"https://api.github.com/repos/freenas/freenas/forks","keys_url":"https://api.github.com/repos/freenas/freenas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freenas/freenas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freenas/freenas/teams","hooks_url":"https://api.github.com/repos/freenas/freenas/hooks","issue_events_url":"https://api.github.com/repos/freenas/freenas/issues/events{/number}","events_url":"https://api.github.com/repos/freenas/freenas/events","assignees_url":"https://api.github.com/repos/freenas/freenas/assignees{/user}","branches_url":"https://api.github.com/repos/freenas/freenas/branches{/branch}","tags_url":"https://api.github.com/repos/freenas/freenas/tags","blobs_url":"https://api.github.com/repos/freenas/freenas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freenas/freenas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freenas/freenas/git/refs{/sha}","trees_url":"https://api.github.com/repos/freenas/freenas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freenas/freenas/statuses/{sha}","languages_url":"https://api.github.com/repos/freenas/freenas/languages","stargazers_url":"https://api.github.com/repos/freenas/freenas/stargazers","contributors_url":"https://api.github.com/repos/freenas/freenas/contributors","subscribers_url":"https://api.github.com/repos/freenas/freenas/subscribers","subscription_url":"https://api.github.com/repos/freenas/freenas/subscription","commits_url":"https://api.github.com/repos/freenas/freenas/commits{/sha}","git_commits_url":"https://api.github.com/repos/freenas/freenas/git/commits{/sha}","comments_url":"https://api.github.com/repos/freenas/freenas/comments{/number}","issue_comment_url":"https://api.github.com/repos/freenas/freenas/issues/comments{/number}","contents_url":"https://api.github.com/repos/freenas/freenas/contents/{+path}","compare_url":"https://api.github.com/repos/freenas/freenas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freenas/freenas/merges","archive_url":"https://api.github.com/repos/freenas/freenas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freenas/freenas/downloads","issues_url":"https://api.github.com/repos/freenas/freenas/issues{/number}","pulls_url":"https://api.github.com/repos/freenas/freenas/pulls{/number}","milestones_url":"https://api.github.com/repos/freenas/freenas/milestones{/number}","notifications_url":"https://api.github.com/repos/freenas/freenas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freenas/freenas/labels{/name}","releases_url":"https://api.github.com/repos/freenas/freenas/releases{/id}","deployments_url":"https://api.github.com/repos/freenas/freenas/deployments","created_at":"2013-03-07T13:23:20Z","updated_at":"2019-11-29T14:04:54Z","pushed_at":"2019-11-29T14:08:53Z","git_url":"git://github.com/freenas/freenas.git","ssh_url":"git@github.com:freenas/freenas.git","clone_url":"https://github.com/freenas/freenas.git","svn_url":"https://github.com/freenas/freenas","homepage":"http://www.freenas.org","size":540279,"stargazers_count":1377,"watchers_count":1377,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":329,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":19,"license":null,"forks":329,"open_issues":19,"watchers":1377,"default_branch":"master"}},"base":{"label":"freenas:freenas/12-devel","ref":"freenas/12-devel","sha":"125c1e0ec7547e9ed6e1a4888d8e8989610e3c0a","user":{"login":"freenas","id":3792476,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTI0NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/3792476?v=4","gravatar_id":"","url":"https://api.github.com/users/freenas","html_url":"https://github.com/freenas","followers_url":"https://api.github.com/users/freenas/followers","following_url":"https://api.github.com/users/freenas/following{/other_user}","gists_url":"https://api.github.com/users/freenas/gists{/gist_id}","starred_url":"https://api.github.com/users/freenas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freenas/subscriptions","organizations_url":"https://api.github.com/users/freenas/orgs","repos_url":"https://api.github.com/users/freenas/repos","events_url":"https://api.github.com/users/freenas/events{/privacy}","received_events_url":"https://api.github.com/users/freenas/received_events","type":"Organization","site_admin":false},"repo":{"id":8627760,"node_id":"MDEwOlJlcG9zaXRvcnk4NjI3NzYw","name":"freenas","full_name":"freenas/freenas","private":false,"owner":{"login":"freenas","id":3792476,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTI0NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/3792476?v=4","gravatar_id":"","url":"https://api.github.com/users/freenas","html_url":"https://github.com/freenas","followers_url":"https://api.github.com/users/freenas/followers","following_url":"https://api.github.com/users/freenas/following{/other_user}","gists_url":"https://api.github.com/users/freenas/gists{/gist_id}","starred_url":"https://api.github.com/users/freenas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freenas/subscriptions","organizations_url":"https://api.github.com/users/freenas/orgs","repos_url":"https://api.github.com/users/freenas/repos","events_url":"https://api.github.com/users/freenas/events{/privacy}","received_events_url":"https://api.github.com/users/freenas/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/freenas/freenas","description":"FreeNAS Git Repository","fork":false,"url":"https://api.github.com/repos/freenas/freenas","forks_url":"https://api.github.com/repos/freenas/freenas/forks","keys_url":"https://api.github.com/repos/freenas/freenas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freenas/freenas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freenas/freenas/teams","hooks_url":"https://api.github.com/repos/freenas/freenas/hooks","issue_events_url":"https://api.github.com/repos/freenas/freenas/issues/events{/number}","events_url":"https://api.github.com/repos/freenas/freenas/events","assignees_url":"https://api.github.com/repos/freenas/freenas/assignees{/user}","branches_url":"https://api.github.com/repos/freenas/freenas/branches{/branch}","tags_url":"https://api.github.com/repos/freenas/freenas/tags","blobs_url":"https://api.github.com/repos/freenas/freenas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freenas/freenas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freenas/freenas/git/refs{/sha}","trees_url":"https://api.github.com/repos/freenas/freenas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freenas/freenas/statuses/{sha}","languages_url":"https://api.github.com/repos/freenas/freenas/languages","stargazers_url":"https://api.github.com/repos/freenas/freenas/stargazers","contributors_url":"https://api.github.com/repos/freenas/freenas/contributors","subscribers_url":"https://api.github.com/repos/freenas/freenas/subscribers","subscription_url":"https://api.github.com/repos/freenas/freenas/subscription","commits_url":"https://api.github.com/repos/freenas/freenas/commits{/sha}","git_commits_url":"https://api.github.com/repos/freenas/freenas/git/commits{/sha}","comments_url":"https://api.github.com/repos/freenas/freenas/comments{/number}","issue_comment_url":"https://api.github.com/repos/freenas/freenas/issues/comments{/number}","contents_url":"https://api.github.com/repos/freenas/freenas/contents/{+path}","compare_url":"https://api.github.com/repos/freenas/freenas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freenas/freenas/merges","archive_url":"https://api.github.com/repos/freenas/freenas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freenas/freenas/downloads","issues_url":"https://api.github.com/repos/freenas/freenas/issues{/number}","pulls_url":"https://api.github.com/repos/freenas/freenas/pulls{/number}","milestones_url":"https://api.github.com/repos/freenas/freenas/milestones{/number}","notifications_url":"https://api.github.com/repos/freenas/freenas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freenas/freenas/labels{/name}","releases_url":"https://api.github.com/repos/freenas/freenas/releases{/id}","deployments_url":"https://api.github.com/repos/freenas/freenas/deployments","created_at":"2013-03-07T13:23:20Z","updated_at":"2019-11-29T14:04:54Z","pushed_at":"2019-11-29T14:08:53Z","git_url":"git://github.com/freenas/freenas.git","ssh_url":"git@github.com:freenas/freenas.git","clone_url":"https://github.com/freenas/freenas.git","svn_url":"https://github.com/freenas/freenas","homepage":"http://www.freenas.org","size":540279,"stargazers_count":1377,"watchers_count":1377,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":329,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":19,"license":null,"forks":329,"open_issues":19,"watchers":1377,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/freenas/freenas/pulls/3852"},"html":{"href":"https://github.com/freenas/freenas/pull/3852"},"issue":{"href":"https://api.github.com/repos/freenas/freenas/issues/3852"},"comments":{"href":"https://api.github.com/repos/freenas/freenas/issues/3852/comments"},"review_comments":{"href":"https://api.github.com/repos/freenas/freenas/pulls/3852/comments"},"review_comment":{"href":"https://api.github.com/repos/freenas/freenas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/freenas/freenas/pulls/3852/commits"},"statuses":{"href":"https://api.github.com/repos/freenas/freenas/statuses/5fb4da18ce74103374e803f8db6eb17d303153c2"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"sonicaj"}}