{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/comments/56514511","id":56514511,"diff_hunk":"@@ -295,6 +333,14 @@ def ca_cert\n \n     private\n \n+    def os_name_mapping(host)\n+      host.operatingsystem.name =~ /redhat|centos/i ? 'rhel': host.operatingsystem.name\n+    end\n+\n+    def arch_name_mapping(host)\n+      host.architecture.name == 'x86_64' ? 'x64' : host.architecture.name if host.architecture","path":"app/models/compute_resources/foreman/model/ovirt.rb","position":65,"original_position":79,"commit_id":"c27d08899acdae84d989ab62dccc279b170cc215","original_commit_id":"76d3a0c8d2468b766e0b8984da6f9bdf30f86ba5","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":"@iNecas @ares I think architecture has to be present *always* in order to create a host connected to a ComputeResource - https://github.com/theforeman/foreman/blob/develop/app/models/host/managed.rb#L191 - how do you get to this point in the code w/o architecture being set?","created_at":"2016-03-17T14:40:59Z","updated_at":"2016-03-17T14:40:59Z","html_url":"https://github.com/theforeman/foreman/pull/3308#discussion_r56514511","pull_request_url":"https://api.github.com/repos/theforeman/foreman/pulls/3308","_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments/56514511"},"html":{"href":"https://github.com/theforeman/foreman/pull/3308#discussion_r56514511"},"pull_request":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/3308"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/3308","id":62546265,"html_url":"https://github.com/theforeman/foreman/pull/3308","diff_url":"https://github.com/theforeman/foreman/pull/3308.diff","patch_url":"https://github.com/theforeman/foreman/pull/3308.patch","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/3308","number":3308,"state":"open","locked":false,"title":"Fixes #6959 - set operating system for RHEV/ovirt VMs","user":{"login":"iNecas","id":190443,"avatar_url":"https://avatars.githubusercontent.com/u/190443?v=3","gravatar_id":"","url":"https://api.github.com/users/iNecas","html_url":"https://github.com/iNecas","followers_url":"https://api.github.com/users/iNecas/followers","following_url":"https://api.github.com/users/iNecas/following{/other_user}","gists_url":"https://api.github.com/users/iNecas/gists{/gist_id}","starred_url":"https://api.github.com/users/iNecas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iNecas/subscriptions","organizations_url":"https://api.github.com/users/iNecas/orgs","repos_url":"https://api.github.com/users/iNecas/repos","events_url":"https://api.github.com/users/iNecas/events{/privacy}","received_events_url":"https://api.github.com/users/iNecas/received_events","type":"User","site_admin":false},"body":"Backward compatible, but works best with https://github.com/abenari/rbovirt/pull/104","created_at":"2016-03-11T13:59:27Z","updated_at":"2016-03-17T14:40:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"298f19db10f6dab27d7b5555380d7a3689103ac5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/foreman/pulls/3308/commits","review_comments_url":"https://api.github.com/repos/theforeman/foreman/pulls/3308/comments","review_comment_url":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/3308/comments","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/c27d08899acdae84d989ab62dccc279b170cc215","head":{"label":"iNecas:ovirt-oses","ref":"ovirt-oses","sha":"c27d08899acdae84d989ab62dccc279b170cc215","user":{"login":"iNecas","id":190443,"avatar_url":"https://avatars.githubusercontent.com/u/190443?v=3","gravatar_id":"","url":"https://api.github.com/users/iNecas","html_url":"https://github.com/iNecas","followers_url":"https://api.github.com/users/iNecas/followers","following_url":"https://api.github.com/users/iNecas/following{/other_user}","gists_url":"https://api.github.com/users/iNecas/gists{/gist_id}","starred_url":"https://api.github.com/users/iNecas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iNecas/subscriptions","organizations_url":"https://api.github.com/users/iNecas/orgs","repos_url":"https://api.github.com/users/iNecas/repos","events_url":"https://api.github.com/users/iNecas/events{/privacy}","received_events_url":"https://api.github.com/users/iNecas/received_events","type":"User","site_admin":false},"repo":{"id":4594563,"name":"foreman","full_name":"iNecas/foreman","owner":{"login":"iNecas","id":190443,"avatar_url":"https://avatars.githubusercontent.com/u/190443?v=3","gravatar_id":"","url":"https://api.github.com/users/iNecas","html_url":"https://github.com/iNecas","followers_url":"https://api.github.com/users/iNecas/followers","following_url":"https://api.github.com/users/iNecas/following{/other_user}","gists_url":"https://api.github.com/users/iNecas/gists{/gist_id}","starred_url":"https://api.github.com/users/iNecas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iNecas/subscriptions","organizations_url":"https://api.github.com/users/iNecas/orgs","repos_url":"https://api.github.com/users/iNecas/repos","events_url":"https://api.github.com/users/iNecas/events{/privacy}","received_events_url":"https://api.github.com/users/iNecas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iNecas/foreman","description":"an application that automates the lifecycle of servers ","fork":true,"url":"https://api.github.com/repos/iNecas/foreman","forks_url":"https://api.github.com/repos/iNecas/foreman/forks","keys_url":"https://api.github.com/repos/iNecas/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iNecas/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iNecas/foreman/teams","hooks_url":"https://api.github.com/repos/iNecas/foreman/hooks","issue_events_url":"https://api.github.com/repos/iNecas/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/iNecas/foreman/events","assignees_url":"https://api.github.com/repos/iNecas/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/iNecas/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/iNecas/foreman/tags","blobs_url":"https://api.github.com/repos/iNecas/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iNecas/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iNecas/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/iNecas/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iNecas/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/iNecas/foreman/languages","stargazers_url":"https://api.github.com/repos/iNecas/foreman/stargazers","contributors_url":"https://api.github.com/repos/iNecas/foreman/contributors","subscribers_url":"https://api.github.com/repos/iNecas/foreman/subscribers","subscription_url":"https://api.github.com/repos/iNecas/foreman/subscription","commits_url":"https://api.github.com/repos/iNecas/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/iNecas/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/iNecas/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/iNecas/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/iNecas/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/iNecas/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iNecas/foreman/merges","archive_url":"https://api.github.com/repos/iNecas/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iNecas/foreman/downloads","issues_url":"https://api.github.com/repos/iNecas/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/iNecas/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/iNecas/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/iNecas/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iNecas/foreman/labels{/name}","releases_url":"https://api.github.com/repos/iNecas/foreman/releases{/id}","deployments_url":"https://api.github.com/repos/iNecas/foreman/deployments","created_at":"2012-06-08T07:01:43Z","updated_at":"2015-03-02T14:30:04Z","pushed_at":"2016-03-17T12:54:09Z","git_url":"git://github.com/iNecas/foreman.git","ssh_url":"git@github.com:iNecas/foreman.git","clone_url":"https://github.com/iNecas/foreman.git","svn_url":"https://github.com/iNecas/foreman","homepage":"http://theforeman.org","size":35047,"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":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"develop"}},"base":{"label":"theforeman:develop","ref":"develop","sha":"82a0ba465e8de728c10f2d1e5678c9df2499186f","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-03-17T03:37:03Z","pushed_at":"2016-03-17T14:29:41Z","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":63267,"stargazers_count":961,"watchers_count":961,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":495,"mirror_url":null,"open_issues_count":92,"forks":495,"open_issues":92,"watchers":961,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/3308"},"html":{"href":"https://github.com/theforeman/foreman/pull/3308"},"issue":{"href":"https://api.github.com/repos/theforeman/foreman/issues/3308"},"comments":{"href":"https://api.github.com/repos/theforeman/foreman/issues/3308/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/3308/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/3308/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/foreman/statuses/c27d08899acdae84d989ab62dccc279b170cc215"}}}}