{"action":"created","comment":{"url":"https://api.github.com/repos/xenserver/xen-api/pulls/comments/77323361","id":77323361,"diff_hunk":"@@ -182,17 +236,21 @@ let guidance_from_string = function\n   | \"restartXAPI\" -> `restartXAPI\n   | _ -> raise Bad_update_info\n \n-let extract_update_info ~__context ~self ~verify ~destroy =\n-  let host = Helpers.get_localhost ~__context in\n+let extract_update_info ~__context ~vdi ~verify =\n+  let vdi_uuid = Db.VDI.get_uuid ~__context ~self:vdi in\n   finally\n     (fun () ->\n-      let update_path = attach ~__context ~self ~host in\n+      let url = attach_helper ~__context ~uuid:vdi_uuid ~vdi in\n       let update_path =\n-        if String.startswith \"file://\" update_path then\n-          String.sub_to_end update_path (String.length \"file://\")\n+        if String.startswith \"http://\" url then","path":"ocaml/xapi/xapi_pool_update.ml","position":215,"original_position":215,"commit_id":"49a269afc5c7d9477be83f4b413866bcae664a4c","original_commit_id":"49a269afc5c7d9477be83f4b413866bcae664a4c","user":{"login":"jonludlam","id":210963,"avatar_url":"https://avatars.githubusercontent.com/u/210963?v=3","gravatar_id":"","url":"https://api.github.com/users/jonludlam","html_url":"https://github.com/jonludlam","followers_url":"https://api.github.com/users/jonludlam/followers","following_url":"https://api.github.com/users/jonludlam/following{/other_user}","gists_url":"https://api.github.com/users/jonludlam/gists{/gist_id}","starred_url":"https://api.github.com/users/jonludlam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonludlam/subscriptions","organizations_url":"https://api.github.com/users/jonludlam/orgs","repos_url":"https://api.github.com/users/jonludlam/repos","events_url":"https://api.github.com/users/jonludlam/events{/privacy}","received_events_url":"https://api.github.com/users/jonludlam/received_events","type":"User","site_admin":false},"body":"This makes no sense. The URL has just been constructed above from the uuid you've passed in, but you're extracting it again here?","created_at":"2016-09-02T10:07:08Z","updated_at":"2016-09-02T10:07:08Z","html_url":"https://github.com/xenserver/xen-api/pull/142#discussion_r77323361","pull_request_url":"https://api.github.com/repos/xenserver/xen-api/pulls/142","_links":{"self":{"href":"https://api.github.com/repos/xenserver/xen-api/pulls/comments/77323361"},"html":{"href":"https://github.com/xenserver/xen-api/pull/142#discussion_r77323361"},"pull_request":{"href":"https://api.github.com/repos/xenserver/xen-api/pulls/142"}}},"pull_request":{"url":"https://api.github.com/repos/xenserver/xen-api/pulls/142","id":83774300,"html_url":"https://github.com/xenserver/xen-api/pull/142","diff_url":"https://github.com/xenserver/xen-api/pull/142.diff","patch_url":"https://github.com/xenserver/xen-api/pull/142.patch","issue_url":"https://api.github.com/repos/xenserver/xen-api/issues/142","number":142,"state":"open","locked":false,"title":"CP-18251: Remove host ref in pool_update.detach and pool_update.attach","user":{"login":"phusl","id":6657287,"avatar_url":"https://avatars.githubusercontent.com/u/6657287?v=3","gravatar_id":"","url":"https://api.github.com/users/phusl","html_url":"https://github.com/phusl","followers_url":"https://api.github.com/users/phusl/followers","following_url":"https://api.github.com/users/phusl/following{/other_user}","gists_url":"https://api.github.com/users/phusl/gists{/gist_id}","starred_url":"https://api.github.com/users/phusl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phusl/subscriptions","organizations_url":"https://api.github.com/users/phusl/orgs","repos_url":"https://api.github.com/users/phusl/repos","events_url":"https://api.github.com/users/phusl/events{/privacy}","received_events_url":"https://api.github.com/users/phusl/received_events","type":"User","site_admin":false},"body":"1. Remove host ref in detach/attach\r\n2. Adapt introduce to attach_helper/detach_helper\r\n3. Remove fingerprint pins for pool_update\r\n\r\nSigned-off-by: Cheng Zhang <cheng.zhang@citrix.com>\r\nSigned-off-by: Phus Lu <phus.lu@citrix.com>\r\n","created_at":"2016-09-02T09:51:57Z","updated_at":"2016-09-02T10:07:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4daf128bbea72e4b73c9eb3742d5bd760586e5f7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/xenserver/xen-api/pulls/142/commits","review_comments_url":"https://api.github.com/repos/xenserver/xen-api/pulls/142/comments","review_comment_url":"https://api.github.com/repos/xenserver/xen-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xenserver/xen-api/issues/142/comments","statuses_url":"https://api.github.com/repos/xenserver/xen-api/statuses/49a269afc5c7d9477be83f4b413866bcae664a4c","head":{"label":"phusl:CP-18251","ref":"CP-18251","sha":"49a269afc5c7d9477be83f4b413866bcae664a4c","user":{"login":"phusl","id":6657287,"avatar_url":"https://avatars.githubusercontent.com/u/6657287?v=3","gravatar_id":"","url":"https://api.github.com/users/phusl","html_url":"https://github.com/phusl","followers_url":"https://api.github.com/users/phusl/followers","following_url":"https://api.github.com/users/phusl/following{/other_user}","gists_url":"https://api.github.com/users/phusl/gists{/gist_id}","starred_url":"https://api.github.com/users/phusl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phusl/subscriptions","organizations_url":"https://api.github.com/users/phusl/orgs","repos_url":"https://api.github.com/users/phusl/repos","events_url":"https://api.github.com/users/phusl/events{/privacy}","received_events_url":"https://api.github.com/users/phusl/received_events","type":"User","site_admin":false},"repo":{"id":59633799,"name":"xen-api","full_name":"phusl/xen-api","owner":{"login":"phusl","id":6657287,"avatar_url":"https://avatars.githubusercontent.com/u/6657287?v=3","gravatar_id":"","url":"https://api.github.com/users/phusl","html_url":"https://github.com/phusl","followers_url":"https://api.github.com/users/phusl/followers","following_url":"https://api.github.com/users/phusl/following{/other_user}","gists_url":"https://api.github.com/users/phusl/gists{/gist_id}","starred_url":"https://api.github.com/users/phusl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phusl/subscriptions","organizations_url":"https://api.github.com/users/phusl/orgs","repos_url":"https://api.github.com/users/phusl/repos","events_url":"https://api.github.com/users/phusl/events{/privacy}","received_events_url":"https://api.github.com/users/phusl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phusl/xen-api","description":"The Xapi Project's XenAPI Server","fork":true,"url":"https://api.github.com/repos/phusl/xen-api","forks_url":"https://api.github.com/repos/phusl/xen-api/forks","keys_url":"https://api.github.com/repos/phusl/xen-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phusl/xen-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phusl/xen-api/teams","hooks_url":"https://api.github.com/repos/phusl/xen-api/hooks","issue_events_url":"https://api.github.com/repos/phusl/xen-api/issues/events{/number}","events_url":"https://api.github.com/repos/phusl/xen-api/events","assignees_url":"https://api.github.com/repos/phusl/xen-api/assignees{/user}","branches_url":"https://api.github.com/repos/phusl/xen-api/branches{/branch}","tags_url":"https://api.github.com/repos/phusl/xen-api/tags","blobs_url":"https://api.github.com/repos/phusl/xen-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phusl/xen-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phusl/xen-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/phusl/xen-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phusl/xen-api/statuses/{sha}","languages_url":"https://api.github.com/repos/phusl/xen-api/languages","stargazers_url":"https://api.github.com/repos/phusl/xen-api/stargazers","contributors_url":"https://api.github.com/repos/phusl/xen-api/contributors","subscribers_url":"https://api.github.com/repos/phusl/xen-api/subscribers","subscription_url":"https://api.github.com/repos/phusl/xen-api/subscription","commits_url":"https://api.github.com/repos/phusl/xen-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/phusl/xen-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/phusl/xen-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/phusl/xen-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/phusl/xen-api/contents/{+path}","compare_url":"https://api.github.com/repos/phusl/xen-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phusl/xen-api/merges","archive_url":"https://api.github.com/repos/phusl/xen-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phusl/xen-api/downloads","issues_url":"https://api.github.com/repos/phusl/xen-api/issues{/number}","pulls_url":"https://api.github.com/repos/phusl/xen-api/pulls{/number}","milestones_url":"https://api.github.com/repos/phusl/xen-api/milestones{/number}","notifications_url":"https://api.github.com/repos/phusl/xen-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phusl/xen-api/labels{/name}","releases_url":"https://api.github.com/repos/phusl/xen-api/releases{/id}","deployments_url":"https://api.github.com/repos/phusl/xen-api/deployments","created_at":"2016-05-25T05:36:01Z","updated_at":"2016-05-25T05:36:06Z","pushed_at":"2016-09-02T09:50:25Z","git_url":"git://github.com/phusl/xen-api.git","ssh_url":"git@github.com:phusl/xen-api.git","clone_url":"https://github.com/phusl/xen-api.git","svn_url":"https://github.com/phusl/xen-api","homepage":"http://xenproject.org/developers/teams/xapi.html","size":24722,"stargazers_count":0,"watchers_count":0,"language":"OCaml","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xenserver:trunk-car-2245","ref":"trunk-car-2245","sha":"37951856e252629cd34dfa6d3fdf4339e118c9dd","user":{"login":"xenserver","id":4669806,"avatar_url":"https://avatars.githubusercontent.com/u/4669806?v=3","gravatar_id":"","url":"https://api.github.com/users/xenserver","html_url":"https://github.com/xenserver","followers_url":"https://api.github.com/users/xenserver/followers","following_url":"https://api.github.com/users/xenserver/following{/other_user}","gists_url":"https://api.github.com/users/xenserver/gists{/gist_id}","starred_url":"https://api.github.com/users/xenserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xenserver/subscriptions","organizations_url":"https://api.github.com/users/xenserver/orgs","repos_url":"https://api.github.com/users/xenserver/repos","events_url":"https://api.github.com/users/xenserver/events{/privacy}","received_events_url":"https://api.github.com/users/xenserver/received_events","type":"Organization","site_admin":false},"repo":{"id":31328267,"name":"xen-api","full_name":"xenserver/xen-api","owner":{"login":"xenserver","id":4669806,"avatar_url":"https://avatars.githubusercontent.com/u/4669806?v=3","gravatar_id":"","url":"https://api.github.com/users/xenserver","html_url":"https://github.com/xenserver","followers_url":"https://api.github.com/users/xenserver/followers","following_url":"https://api.github.com/users/xenserver/following{/other_user}","gists_url":"https://api.github.com/users/xenserver/gists{/gist_id}","starred_url":"https://api.github.com/users/xenserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xenserver/subscriptions","organizations_url":"https://api.github.com/users/xenserver/orgs","repos_url":"https://api.github.com/users/xenserver/repos","events_url":"https://api.github.com/users/xenserver/events{/privacy}","received_events_url":"https://api.github.com/users/xenserver/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xenserver/xen-api","description":"The Xapi Project's XenAPI Server","fork":true,"url":"https://api.github.com/repos/xenserver/xen-api","forks_url":"https://api.github.com/repos/xenserver/xen-api/forks","keys_url":"https://api.github.com/repos/xenserver/xen-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xenserver/xen-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xenserver/xen-api/teams","hooks_url":"https://api.github.com/repos/xenserver/xen-api/hooks","issue_events_url":"https://api.github.com/repos/xenserver/xen-api/issues/events{/number}","events_url":"https://api.github.com/repos/xenserver/xen-api/events","assignees_url":"https://api.github.com/repos/xenserver/xen-api/assignees{/user}","branches_url":"https://api.github.com/repos/xenserver/xen-api/branches{/branch}","tags_url":"https://api.github.com/repos/xenserver/xen-api/tags","blobs_url":"https://api.github.com/repos/xenserver/xen-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xenserver/xen-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xenserver/xen-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/xenserver/xen-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xenserver/xen-api/statuses/{sha}","languages_url":"https://api.github.com/repos/xenserver/xen-api/languages","stargazers_url":"https://api.github.com/repos/xenserver/xen-api/stargazers","contributors_url":"https://api.github.com/repos/xenserver/xen-api/contributors","subscribers_url":"https://api.github.com/repos/xenserver/xen-api/subscribers","subscription_url":"https://api.github.com/repos/xenserver/xen-api/subscription","commits_url":"https://api.github.com/repos/xenserver/xen-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/xenserver/xen-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/xenserver/xen-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/xenserver/xen-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/xenserver/xen-api/contents/{+path}","compare_url":"https://api.github.com/repos/xenserver/xen-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xenserver/xen-api/merges","archive_url":"https://api.github.com/repos/xenserver/xen-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xenserver/xen-api/downloads","issues_url":"https://api.github.com/repos/xenserver/xen-api/issues{/number}","pulls_url":"https://api.github.com/repos/xenserver/xen-api/pulls{/number}","milestones_url":"https://api.github.com/repos/xenserver/xen-api/milestones{/number}","notifications_url":"https://api.github.com/repos/xenserver/xen-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xenserver/xen-api/labels{/name}","releases_url":"https://api.github.com/repos/xenserver/xen-api/releases{/id}","deployments_url":"https://api.github.com/repos/xenserver/xen-api/deployments","created_at":"2015-02-25T18:12:10Z","updated_at":"2016-06-16T09:04:37Z","pushed_at":"2016-09-02T09:52:01Z","git_url":"git://github.com/xenserver/xen-api.git","ssh_url":"git@github.com:xenserver/xen-api.git","clone_url":"https://github.com/xenserver/xen-api.git","svn_url":"https://github.com/xenserver/xen-api","homepage":"http://xenproject.org/developers/teams/xapi.html","size":28996,"stargazers_count":3,"watchers_count":3,"language":"OCaml","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":3,"default_branch":"README"}},"_links":{"self":{"href":"https://api.github.com/repos/xenserver/xen-api/pulls/142"},"html":{"href":"https://github.com/xenserver/xen-api/pull/142"},"issue":{"href":"https://api.github.com/repos/xenserver/xen-api/issues/142"},"comments":{"href":"https://api.github.com/repos/xenserver/xen-api/issues/142/comments"},"review_comments":{"href":"https://api.github.com/repos/xenserver/xen-api/pulls/142/comments"},"review_comment":{"href":"https://api.github.com/repos/xenserver/xen-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xenserver/xen-api/pulls/142/commits"},"statuses":{"href":"https://api.github.com/repos/xenserver/xen-api/statuses/49a269afc5c7d9477be83f4b413866bcae664a4c"}}}}
{"actor":{"display_login":"jonludlam"}}