{"action":"created","comment":{"url":"https://api.github.com/repos/vatesfr/xo-server/pulls/comments/47509296","id":47509296,"diff_hunk":"@@ -1325,6 +1325,20 @@ export default class Xapi extends XapiBase {\n     await this.call('VDI.destroy', vdi.$ref)\n   }\n \n+  async _resizeVdi (vdi, size) {\n+    try {\n+      await this.call('VDI.resize_online', vdi.$ref, size)\n+\n+      throw new Error('the call above should have thrown an error')\n+    }\n+    catch (error) {\n+      if (error.code != 'SR_OPERATION_NOT_SUPPORTED')\n+        throw error","path":"src/xapi.js","position":12,"original_position":12,"commit_id":"b801062a055ca682cd9d3a443104bca657d872aa","original_commit_id":"b801062a055ca682cd9d3a443104bca657d872aa","user":{"login":"julien-f","id":298721,"avatar_url":"https://avatars.githubusercontent.com/u/298721?v=3","gravatar_id":"","url":"https://api.github.com/users/julien-f","html_url":"https://github.com/julien-f","followers_url":"https://api.github.com/users/julien-f/followers","following_url":"https://api.github.com/users/julien-f/following{/other_user}","gists_url":"https://api.github.com/users/julien-f/gists{/gist_id}","starred_url":"https://api.github.com/users/julien-f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julien-f/subscriptions","organizations_url":"https://api.github.com/users/julien-f/orgs","repos_url":"https://api.github.com/users/julien-f/repos","events_url":"https://api.github.com/users/julien-f/events{/privacy}","received_events_url":"https://api.github.com/users/julien-f/received_events","type":"User","site_admin":false},"body":"Always use braces around `if` body.","created_at":"2015-12-14T15:22:02Z","updated_at":"2015-12-14T15:22:02Z","html_url":"https://github.com/vatesfr/xo-server/pull/169#discussion_r47509296","pull_request_url":"https://api.github.com/repos/vatesfr/xo-server/pulls/169","_links":{"self":{"href":"https://api.github.com/repos/vatesfr/xo-server/pulls/comments/47509296"},"html":{"href":"https://github.com/vatesfr/xo-server/pull/169#discussion_r47509296"},"pull_request":{"href":"https://api.github.com/repos/vatesfr/xo-server/pulls/169"}}},"pull_request":{"url":"https://api.github.com/repos/vatesfr/xo-server/pulls/169","id":53577121,"html_url":"https://github.com/vatesfr/xo-server/pull/169","diff_url":"https://github.com/vatesfr/xo-server/pull/169.diff","patch_url":"https://github.com/vatesfr/xo-server/pull/169.patch","issue_url":"https://api.github.com/repos/vatesfr/xo-server/issues/169","number":169,"state":"open","locked":false,"title":"Clean VDI resize support","user":{"login":"olivierlambert","id":1241401,"avatar_url":"https://avatars.githubusercontent.com/u/1241401?v=3","gravatar_id":"","url":"https://api.github.com/users/olivierlambert","html_url":"https://github.com/olivierlambert","followers_url":"https://api.github.com/users/olivierlambert/followers","following_url":"https://api.github.com/users/olivierlambert/following{/other_user}","gists_url":"https://api.github.com/users/olivierlambert/gists{/gist_id}","starred_url":"https://api.github.com/users/olivierlambert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivierlambert/subscriptions","organizations_url":"https://api.github.com/users/olivierlambert/orgs","repos_url":"https://api.github.com/users/olivierlambert/repos","events_url":"https://api.github.com/users/olivierlambert/events{/privacy}","received_events_url":"https://api.github.com/users/olivierlambert/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-14T15:15:36Z","updated_at":"2015-12-14T15:22:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4364114538416106767b0b2dd5fac29ae156be8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vatesfr/xo-server/pulls/169/commits","review_comments_url":"https://api.github.com/repos/vatesfr/xo-server/pulls/169/comments","review_comment_url":"https://api.github.com/repos/vatesfr/xo-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vatesfr/xo-server/issues/169/comments","statuses_url":"https://api.github.com/repos/vatesfr/xo-server/statuses/b801062a055ca682cd9d3a443104bca657d872aa","head":{"label":"vatesfr:olivierlambert-vdiresize","ref":"olivierlambert-vdiresize","sha":"b801062a055ca682cd9d3a443104bca657d872aa","user":{"login":"vatesfr","id":2064170,"avatar_url":"https://avatars.githubusercontent.com/u/2064170?v=3","gravatar_id":"","url":"https://api.github.com/users/vatesfr","html_url":"https://github.com/vatesfr","followers_url":"https://api.github.com/users/vatesfr/followers","following_url":"https://api.github.com/users/vatesfr/following{/other_user}","gists_url":"https://api.github.com/users/vatesfr/gists{/gist_id}","starred_url":"https://api.github.com/users/vatesfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vatesfr/subscriptions","organizations_url":"https://api.github.com/users/vatesfr/orgs","repos_url":"https://api.github.com/users/vatesfr/repos","events_url":"https://api.github.com/users/vatesfr/events{/privacy}","received_events_url":"https://api.github.com/users/vatesfr/received_events","type":"Organization","site_admin":false},"repo":{"id":7262203,"name":"xo-server","full_name":"vatesfr/xo-server","owner":{"login":"vatesfr","id":2064170,"avatar_url":"https://avatars.githubusercontent.com/u/2064170?v=3","gravatar_id":"","url":"https://api.github.com/users/vatesfr","html_url":"https://github.com/vatesfr","followers_url":"https://api.github.com/users/vatesfr/followers","following_url":"https://api.github.com/users/vatesfr/following{/other_user}","gists_url":"https://api.github.com/users/vatesfr/gists{/gist_id}","starred_url":"https://api.github.com/users/vatesfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vatesfr/subscriptions","organizations_url":"https://api.github.com/users/vatesfr/orgs","repos_url":"https://api.github.com/users/vatesfr/repos","events_url":"https://api.github.com/users/vatesfr/events{/privacy}","received_events_url":"https://api.github.com/users/vatesfr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vatesfr/xo-server","description":"Server part of Xen Orchestra.","fork":false,"url":"https://api.github.com/repos/vatesfr/xo-server","forks_url":"https://api.github.com/repos/vatesfr/xo-server/forks","keys_url":"https://api.github.com/repos/vatesfr/xo-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vatesfr/xo-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vatesfr/xo-server/teams","hooks_url":"https://api.github.com/repos/vatesfr/xo-server/hooks","issue_events_url":"https://api.github.com/repos/vatesfr/xo-server/issues/events{/number}","events_url":"https://api.github.com/repos/vatesfr/xo-server/events","assignees_url":"https://api.github.com/repos/vatesfr/xo-server/assignees{/user}","branches_url":"https://api.github.com/repos/vatesfr/xo-server/branches{/branch}","tags_url":"https://api.github.com/repos/vatesfr/xo-server/tags","blobs_url":"https://api.github.com/repos/vatesfr/xo-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vatesfr/xo-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vatesfr/xo-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/vatesfr/xo-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vatesfr/xo-server/statuses/{sha}","languages_url":"https://api.github.com/repos/vatesfr/xo-server/languages","stargazers_url":"https://api.github.com/repos/vatesfr/xo-server/stargazers","contributors_url":"https://api.github.com/repos/vatesfr/xo-server/contributors","subscribers_url":"https://api.github.com/repos/vatesfr/xo-server/subscribers","subscription_url":"https://api.github.com/repos/vatesfr/xo-server/subscription","commits_url":"https://api.github.com/repos/vatesfr/xo-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/vatesfr/xo-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/vatesfr/xo-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/vatesfr/xo-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/vatesfr/xo-server/contents/{+path}","compare_url":"https://api.github.com/repos/vatesfr/xo-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vatesfr/xo-server/merges","archive_url":"https://api.github.com/repos/vatesfr/xo-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vatesfr/xo-server/downloads","issues_url":"https://api.github.com/repos/vatesfr/xo-server/issues{/number}","pulls_url":"https://api.github.com/repos/vatesfr/xo-server/pulls{/number}","milestones_url":"https://api.github.com/repos/vatesfr/xo-server/milestones{/number}","notifications_url":"https://api.github.com/repos/vatesfr/xo-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vatesfr/xo-server/labels{/name}","releases_url":"https://api.github.com/repos/vatesfr/xo-server/releases{/id}","created_at":"2012-12-20T18:23:37Z","updated_at":"2015-11-19T11:51:18Z","pushed_at":"2015-12-14T15:17:14Z","git_url":"git://github.com/vatesfr/xo-server.git","ssh_url":"git@github.com:vatesfr/xo-server.git","clone_url":"https://github.com/vatesfr/xo-server.git","svn_url":"https://github.com/vatesfr/xo-server","homepage":"","size":1944,"stargazers_count":45,"watchers_count":45,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":23,"forks":19,"open_issues":23,"watchers":45,"default_branch":"next-release"}},"base":{"label":"vatesfr:next-release","ref":"next-release","sha":"b080a57406fd3736560759071ccf88898bf486ed","user":{"login":"vatesfr","id":2064170,"avatar_url":"https://avatars.githubusercontent.com/u/2064170?v=3","gravatar_id":"","url":"https://api.github.com/users/vatesfr","html_url":"https://github.com/vatesfr","followers_url":"https://api.github.com/users/vatesfr/followers","following_url":"https://api.github.com/users/vatesfr/following{/other_user}","gists_url":"https://api.github.com/users/vatesfr/gists{/gist_id}","starred_url":"https://api.github.com/users/vatesfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vatesfr/subscriptions","organizations_url":"https://api.github.com/users/vatesfr/orgs","repos_url":"https://api.github.com/users/vatesfr/repos","events_url":"https://api.github.com/users/vatesfr/events{/privacy}","received_events_url":"https://api.github.com/users/vatesfr/received_events","type":"Organization","site_admin":false},"repo":{"id":7262203,"name":"xo-server","full_name":"vatesfr/xo-server","owner":{"login":"vatesfr","id":2064170,"avatar_url":"https://avatars.githubusercontent.com/u/2064170?v=3","gravatar_id":"","url":"https://api.github.com/users/vatesfr","html_url":"https://github.com/vatesfr","followers_url":"https://api.github.com/users/vatesfr/followers","following_url":"https://api.github.com/users/vatesfr/following{/other_user}","gists_url":"https://api.github.com/users/vatesfr/gists{/gist_id}","starred_url":"https://api.github.com/users/vatesfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vatesfr/subscriptions","organizations_url":"https://api.github.com/users/vatesfr/orgs","repos_url":"https://api.github.com/users/vatesfr/repos","events_url":"https://api.github.com/users/vatesfr/events{/privacy}","received_events_url":"https://api.github.com/users/vatesfr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vatesfr/xo-server","description":"Server part of Xen Orchestra.","fork":false,"url":"https://api.github.com/repos/vatesfr/xo-server","forks_url":"https://api.github.com/repos/vatesfr/xo-server/forks","keys_url":"https://api.github.com/repos/vatesfr/xo-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vatesfr/xo-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vatesfr/xo-server/teams","hooks_url":"https://api.github.com/repos/vatesfr/xo-server/hooks","issue_events_url":"https://api.github.com/repos/vatesfr/xo-server/issues/events{/number}","events_url":"https://api.github.com/repos/vatesfr/xo-server/events","assignees_url":"https://api.github.com/repos/vatesfr/xo-server/assignees{/user}","branches_url":"https://api.github.com/repos/vatesfr/xo-server/branches{/branch}","tags_url":"https://api.github.com/repos/vatesfr/xo-server/tags","blobs_url":"https://api.github.com/repos/vatesfr/xo-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vatesfr/xo-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vatesfr/xo-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/vatesfr/xo-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vatesfr/xo-server/statuses/{sha}","languages_url":"https://api.github.com/repos/vatesfr/xo-server/languages","stargazers_url":"https://api.github.com/repos/vatesfr/xo-server/stargazers","contributors_url":"https://api.github.com/repos/vatesfr/xo-server/contributors","subscribers_url":"https://api.github.com/repos/vatesfr/xo-server/subscribers","subscription_url":"https://api.github.com/repos/vatesfr/xo-server/subscription","commits_url":"https://api.github.com/repos/vatesfr/xo-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/vatesfr/xo-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/vatesfr/xo-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/vatesfr/xo-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/vatesfr/xo-server/contents/{+path}","compare_url":"https://api.github.com/repos/vatesfr/xo-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vatesfr/xo-server/merges","archive_url":"https://api.github.com/repos/vatesfr/xo-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vatesfr/xo-server/downloads","issues_url":"https://api.github.com/repos/vatesfr/xo-server/issues{/number}","pulls_url":"https://api.github.com/repos/vatesfr/xo-server/pulls{/number}","milestones_url":"https://api.github.com/repos/vatesfr/xo-server/milestones{/number}","notifications_url":"https://api.github.com/repos/vatesfr/xo-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vatesfr/xo-server/labels{/name}","releases_url":"https://api.github.com/repos/vatesfr/xo-server/releases{/id}","created_at":"2012-12-20T18:23:37Z","updated_at":"2015-11-19T11:51:18Z","pushed_at":"2015-12-14T15:17:14Z","git_url":"git://github.com/vatesfr/xo-server.git","ssh_url":"git@github.com:vatesfr/xo-server.git","clone_url":"https://github.com/vatesfr/xo-server.git","svn_url":"https://github.com/vatesfr/xo-server","homepage":"","size":1944,"stargazers_count":45,"watchers_count":45,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":23,"forks":19,"open_issues":23,"watchers":45,"default_branch":"next-release"}},"_links":{"self":{"href":"https://api.github.com/repos/vatesfr/xo-server/pulls/169"},"html":{"href":"https://github.com/vatesfr/xo-server/pull/169"},"issue":{"href":"https://api.github.com/repos/vatesfr/xo-server/issues/169"},"comments":{"href":"https://api.github.com/repos/vatesfr/xo-server/issues/169/comments"},"review_comments":{"href":"https://api.github.com/repos/vatesfr/xo-server/pulls/169/comments"},"review_comment":{"href":"https://api.github.com/repos/vatesfr/xo-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vatesfr/xo-server/pulls/169/commits"},"statuses":{"href":"https://api.github.com/repos/vatesfr/xo-server/statuses/b801062a055ca682cd9d3a443104bca657d872aa"}}}}