{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/comments/73283430","id":73283430,"diff_hunk":"@@ -51,37 +50,47 @@ def generate_pxe_template\n \n     # work around for ensuring that people can use @host as well, as tftp templates were usually confusing.\n     @host = self.host\n+\n     if build?\n-      template = host.provisioning_template({:kind => host.operatingsystem.template_kind})\n-      failure_missing_template unless template\n-      template_name = template.name\n+      begin\n+        template = host.provisioning_template({:kind => kind})\n+        return nil unless template\n+        unattended_render template\n+      rescue => e\n+        failure _(\"Unable to render %{kind} template '%{name}': %{e}\") % { :kind => kind, :name => template.try(:name), :e => e }, e\n+      end\n     else\n-      if host.operatingsystem.template_kind == \"PXEGrub\"\n-        template_name = \"PXEGrub default local boot\"\n-      else\n-        template_name = \"PXELinux default local boot\"\n+      begin\n+        template_name = \"#{kind} default local boot\"\n+        template = ProvisioningTemplate.find_by_name(template_name)\n+        raise(_(\"template was not found\")) unless template","path":"app/models/concerns/orchestration/tftp.rb","position":50,"original_position":50,"commit_id":"fd74188ecd32d8f87876e296b7c999850107873c","original_commit_id":"fd74188ecd32d8f87876e296b7c999850107873c","user":{"login":"dLobatog","id":598891,"avatar_url":"https://avatars.githubusercontent.com/u/598891?v=3","gravatar_id":"","url":"https://api.github.com/users/dLobatog","html_url":"https://github.com/dLobatog","followers_url":"https://api.github.com/users/dLobatog/followers","following_url":"https://api.github.com/users/dLobatog/following{/other_user}","gists_url":"https://api.github.com/users/dLobatog/gists{/gist_id}","starred_url":"https://api.github.com/users/dLobatog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dLobatog/subscriptions","organizations_url":"https://api.github.com/users/dLobatog/orgs","repos_url":"https://api.github.com/users/dLobatog/repos","events_url":"https://api.github.com/users/dLobatog/events{/privacy}","received_events_url":"https://api.github.com/users/dLobatog/received_events","type":"User","site_admin":false},"body":"`Foreman::Exception.new(` etc...","created_at":"2016-08-03T05:42:27Z","updated_at":"2016-08-03T05:42:27Z","html_url":"https://github.com/theforeman/foreman/pull/3679#discussion_r73283430","pull_request_url":"https://api.github.com/repos/theforeman/foreman/pulls/3679","_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments/73283430"},"html":{"href":"https://github.com/theforeman/foreman/pull/3679#discussion_r73283430"},"pull_request":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/3679"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/3679","id":79042254,"html_url":"https://github.com/theforeman/foreman/pull/3679","diff_url":"https://github.com/theforeman/foreman/pull/3679.diff","patch_url":"https://github.com/theforeman/foreman/pull/3679.patch","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/3679","number":3679,"state":"open","locked":false,"title":"Fixes #12634 - PXE UEFI support","user":{"login":"lzap","id":49752,"avatar_url":"https://avatars.githubusercontent.com/u/49752?v=3","gravatar_id":"","url":"https://api.github.com/users/lzap","html_url":"https://github.com/lzap","followers_url":"https://api.github.com/users/lzap/followers","following_url":"https://api.github.com/users/lzap/following{/other_user}","gists_url":"https://api.github.com/users/lzap/gists{/gist_id}","starred_url":"https://api.github.com/users/lzap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzap/subscriptions","organizations_url":"https://api.github.com/users/lzap/orgs","repos_url":"https://api.github.com/users/lzap/repos","events_url":"https://api.github.com/users/lzap/events{/privacy}","received_events_url":"https://api.github.com/users/lzap/received_events","type":"User","site_admin":false},"body":"Implementation of\r\n\r\nhttps://github.com/theforeman/rfcs/blob/master/text/0001-PXE-Booting-UEFI.md\r\n\r\nIn short, new host/hostgroup flag PXE loader is added to specify TFTP\r\nDHCP filename and Foreman now orchestrates *all* PXE-capable templates\r\ndeployment (e.g. PXELinux, Grub1, Grub2 if associated to an OS).\r\n\r\nTest this patch against develop smart proxy as it requires https://github.com/theforeman/smart-proxy/pull/443 (merged).\r\n\r\nThere are few test-related TODOs and the patch is missing:\r\n\r\n- [x] New host with hostgroup does not work (see comment below)\r\n- [ ] UI integration test\r\n- [ ] API\r\n\r\nI will update the list as we start with review.","created_at":"2016-07-27T15:11:12Z","updated_at":"2016-08-03T05:42:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"313df3a4538cf8a52980c2e2b54cad9d352c1c1b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/foreman/pulls/3679/commits","review_comments_url":"https://api.github.com/repos/theforeman/foreman/pulls/3679/comments","review_comment_url":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/3679/comments","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/fd74188ecd32d8f87876e296b7c999850107873c","head":{"label":"lzap:uefi-12634","ref":"uefi-12634","sha":"fd74188ecd32d8f87876e296b7c999850107873c","user":{"login":"lzap","id":49752,"avatar_url":"https://avatars.githubusercontent.com/u/49752?v=3","gravatar_id":"","url":"https://api.github.com/users/lzap","html_url":"https://github.com/lzap","followers_url":"https://api.github.com/users/lzap/followers","following_url":"https://api.github.com/users/lzap/following{/other_user}","gists_url":"https://api.github.com/users/lzap/gists{/gist_id}","starred_url":"https://api.github.com/users/lzap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzap/subscriptions","organizations_url":"https://api.github.com/users/lzap/orgs","repos_url":"https://api.github.com/users/lzap/repos","events_url":"https://api.github.com/users/lzap/events{/privacy}","received_events_url":"https://api.github.com/users/lzap/received_events","type":"User","site_admin":false},"repo":{"id":1410439,"name":"foreman","full_name":"lzap/foreman","owner":{"login":"lzap","id":49752,"avatar_url":"https://avatars.githubusercontent.com/u/49752?v=3","gravatar_id":"","url":"https://api.github.com/users/lzap","html_url":"https://github.com/lzap","followers_url":"https://api.github.com/users/lzap/followers","following_url":"https://api.github.com/users/lzap/following{/other_user}","gists_url":"https://api.github.com/users/lzap/gists{/gist_id}","starred_url":"https://api.github.com/users/lzap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzap/subscriptions","organizations_url":"https://api.github.com/users/lzap/orgs","repos_url":"https://api.github.com/users/lzap/repos","events_url":"https://api.github.com/users/lzap/events{/privacy}","received_events_url":"https://api.github.com/users/lzap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lzap/foreman","description":"an application that automates the lifecycle of servers ","fork":true,"url":"https://api.github.com/repos/lzap/foreman","forks_url":"https://api.github.com/repos/lzap/foreman/forks","keys_url":"https://api.github.com/repos/lzap/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lzap/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lzap/foreman/teams","hooks_url":"https://api.github.com/repos/lzap/foreman/hooks","issue_events_url":"https://api.github.com/repos/lzap/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/lzap/foreman/events","assignees_url":"https://api.github.com/repos/lzap/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/lzap/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/lzap/foreman/tags","blobs_url":"https://api.github.com/repos/lzap/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lzap/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lzap/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/lzap/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lzap/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/lzap/foreman/languages","stargazers_url":"https://api.github.com/repos/lzap/foreman/stargazers","contributors_url":"https://api.github.com/repos/lzap/foreman/contributors","subscribers_url":"https://api.github.com/repos/lzap/foreman/subscribers","subscription_url":"https://api.github.com/repos/lzap/foreman/subscription","commits_url":"https://api.github.com/repos/lzap/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/lzap/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/lzap/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/lzap/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/lzap/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/lzap/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lzap/foreman/merges","archive_url":"https://api.github.com/repos/lzap/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lzap/foreman/downloads","issues_url":"https://api.github.com/repos/lzap/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/lzap/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/lzap/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/lzap/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lzap/foreman/labels{/name}","releases_url":"https://api.github.com/repos/lzap/foreman/releases{/id}","deployments_url":"https://api.github.com/repos/lzap/foreman/deployments","created_at":"2011-02-25T10:13:00Z","updated_at":"2014-06-19T15:16:06Z","pushed_at":"2016-08-01T15:43:42Z","git_url":"git://github.com/lzap/foreman.git","ssh_url":"git@github.com:lzap/foreman.git","clone_url":"https://github.com/lzap/foreman.git","svn_url":"https://github.com/lzap/foreman","homepage":"http://theforeman.org","size":34130,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"develop"}},"base":{"label":"theforeman:develop","ref":"develop","sha":"77e32aa613d19b5d525022a250beae95528a6398","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":258750,"name":"foreman","full_name":"theforeman/foreman","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/foreman","description":"an application that automates the lifecycle of servers ","fork":false,"url":"https://api.github.com/repos/theforeman/foreman","forks_url":"https://api.github.com/repos/theforeman/foreman/forks","keys_url":"https://api.github.com/repos/theforeman/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/foreman/teams","hooks_url":"https://api.github.com/repos/theforeman/foreman/hooks","issue_events_url":"https://api.github.com/repos/theforeman/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/foreman/events","assignees_url":"https://api.github.com/repos/theforeman/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/foreman/tags","blobs_url":"https://api.github.com/repos/theforeman/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/foreman/languages","stargazers_url":"https://api.github.com/repos/theforeman/foreman/stargazers","contributors_url":"https://api.github.com/repos/theforeman/foreman/contributors","subscribers_url":"https://api.github.com/repos/theforeman/foreman/subscribers","subscription_url":"https://api.github.com/repos/theforeman/foreman/subscription","commits_url":"https://api.github.com/repos/theforeman/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/theforeman/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/foreman/merges","archive_url":"https://api.github.com/repos/theforeman/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/foreman/downloads","issues_url":"https://api.github.com/repos/theforeman/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/foreman/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/foreman/releases{/id}","deployments_url":"https://api.github.com/repos/theforeman/foreman/deployments","created_at":"2009-07-23T15:07:00Z","updated_at":"2016-08-02T23:51:30Z","pushed_at":"2016-08-02T14:47:16Z","git_url":"git://github.com/theforeman/foreman.git","ssh_url":"git@github.com:theforeman/foreman.git","clone_url":"https://github.com/theforeman/foreman.git","svn_url":"https://github.com/theforeman/foreman","homepage":"http://theforeman.org","size":68792,"stargazers_count":1062,"watchers_count":1062,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":536,"mirror_url":null,"open_issues_count":78,"forks":536,"open_issues":78,"watchers":1062,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/3679"},"html":{"href":"https://github.com/theforeman/foreman/pull/3679"},"issue":{"href":"https://api.github.com/repos/theforeman/foreman/issues/3679"},"comments":{"href":"https://api.github.com/repos/theforeman/foreman/issues/3679/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/3679/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/3679/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/foreman/statuses/fd74188ecd32d8f87876e296b7c999850107873c"}}}}
{"actor":{"display_login":"dLobatog"}}