{"action":"created","comment":{"url":"https://api.github.com/repos/Katello/katello/pulls/comments/29350464","id":29350464,"diff_hunk":"@@ -63,6 +65,16 @@ def finalize\n           system.uuid = input[:uuid]\n           system.save!\n         end\n+\n+        def connect_to_smart_proxy(system)\n+          smart_proxy = SmartProxy.where(:name => system.name).first","path":"app/lib/actions/katello/system/create.rb","position":15,"original_position":15,"commit_id":"e97d62b032f7daf67b941b30993d5829b81c0d36","original_commit_id":"e97d62b032f7daf67b941b30993d5829b81c0d36","user":{"login":"jlsherrill","id":395077,"avatar_url":"https://avatars.githubusercontent.com/u/395077?v=3","gravatar_id":"","url":"https://api.github.com/users/jlsherrill","html_url":"https://github.com/jlsherrill","followers_url":"https://api.github.com/users/jlsherrill/followers","following_url":"https://api.github.com/users/jlsherrill/following{/other_user}","gists_url":"https://api.github.com/users/jlsherrill/gists{/gist_id}","starred_url":"https://api.github.com/users/jlsherrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlsherrill/subscriptions","organizations_url":"https://api.github.com/users/jlsherrill/orgs","repos_url":"https://api.github.com/users/jlsherrill/repos","events_url":"https://api.github.com/users/jlsherrill/events{/privacy}","received_events_url":"https://api.github.com/users/jlsherrill/received_events","type":"User","site_admin":false},"body":"oh wait, nevermind\r\n","created_at":"2015-04-29T15:58:21Z","updated_at":"2015-04-29T15:58:21Z","html_url":"https://github.com/Katello/katello/pull/5195#discussion_r29350464","pull_request_url":"https://api.github.com/repos/Katello/katello/pulls/5195","_links":{"self":{"href":"https://api.github.com/repos/Katello/katello/pulls/comments/29350464"},"html":{"href":"https://github.com/Katello/katello/pull/5195#discussion_r29350464"},"pull_request":{"href":"https://api.github.com/repos/Katello/katello/pulls/5195"}}},"pull_request":{"url":"https://api.github.com/repos/Katello/katello/pulls/5195","id":33993112,"html_url":"https://github.com/Katello/katello/pull/5195","diff_url":"https://github.com/Katello/katello/pull/5195.diff","patch_url":"https://github.com/Katello/katello/pull/5195.patch","issue_url":"https://api.github.com/repos/Katello/katello/issues/5195","number":5195,"state":"open","locked":false,"title":"Fixes #10257: Connect capsule and its content host at the DB level.","user":{"login":"ehelms","id":293363,"avatar_url":"https://avatars.githubusercontent.com/u/293363?v=3","gravatar_id":"","url":"https://api.github.com/users/ehelms","html_url":"https://github.com/ehelms","followers_url":"https://api.github.com/users/ehelms/followers","following_url":"https://api.github.com/users/ehelms/following{/other_user}","gists_url":"https://api.github.com/users/ehelms/gists{/gist_id}","starred_url":"https://api.github.com/users/ehelms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehelms/subscriptions","organizations_url":"https://api.github.com/users/ehelms/orgs","repos_url":"https://api.github.com/users/ehelms/repos","events_url":"https://api.github.com/users/ehelms/events{/privacy}","received_events_url":"https://api.github.com/users/ehelms/received_events","type":"User","site_admin":false},"body":"Currently there is no direct connection between a capsule and the\r\ncontent host that represents it other than look ups by hostname during\r\ncertain operations. If the Capsule has been re-registered, then there\r\nare situations where multiple content host records with the same hostname\r\ncan exist. This in turn can lead to a number of issues including the inability\r\nto create repositories and sync content properly. This change adds a\r\nsystem_id attribute to the smart proxy model. When a content host is created\r\na check is performed for any smart proxies with that hostname and the\r\ntwo are associated (or re-associated if the smart proxy already had a\r\ncontent host attached). This will also link an existing content host\r\nto a smart proxy when the proxy is created.","created_at":"2015-04-23T20:26:30Z","updated_at":"2015-04-29T15:58:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce6ef6137cdfad87e29f6dd30eb07986ea28da0d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Katello/katello/pulls/5195/commits","review_comments_url":"https://api.github.com/repos/Katello/katello/pulls/5195/comments","review_comment_url":"https://api.github.com/repos/Katello/katello/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Katello/katello/issues/5195/comments","statuses_url":"https://api.github.com/repos/Katello/katello/statuses/e97d62b032f7daf67b941b30993d5829b81c0d36","head":{"label":"ehelms:fixes-10257","ref":"fixes-10257","sha":"e97d62b032f7daf67b941b30993d5829b81c0d36","user":{"login":"ehelms","id":293363,"avatar_url":"https://avatars.githubusercontent.com/u/293363?v=3","gravatar_id":"","url":"https://api.github.com/users/ehelms","html_url":"https://github.com/ehelms","followers_url":"https://api.github.com/users/ehelms/followers","following_url":"https://api.github.com/users/ehelms/following{/other_user}","gists_url":"https://api.github.com/users/ehelms/gists{/gist_id}","starred_url":"https://api.github.com/users/ehelms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehelms/subscriptions","organizations_url":"https://api.github.com/users/ehelms/orgs","repos_url":"https://api.github.com/users/ehelms/repos","events_url":"https://api.github.com/users/ehelms/events{/privacy}","received_events_url":"https://api.github.com/users/ehelms/received_events","type":"User","site_admin":false},"repo":{"id":4041354,"name":"katello","full_name":"ehelms/katello","owner":{"login":"ehelms","id":293363,"avatar_url":"https://avatars.githubusercontent.com/u/293363?v=3","gravatar_id":"","url":"https://api.github.com/users/ehelms","html_url":"https://github.com/ehelms","followers_url":"https://api.github.com/users/ehelms/followers","following_url":"https://api.github.com/users/ehelms/following{/other_user}","gists_url":"https://api.github.com/users/ehelms/gists{/gist_id}","starred_url":"https://api.github.com/users/ehelms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehelms/subscriptions","organizations_url":"https://api.github.com/users/ehelms/orgs","repos_url":"https://api.github.com/users/ehelms/repos","events_url":"https://api.github.com/users/ehelms/events{/privacy}","received_events_url":"https://api.github.com/users/ehelms/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ehelms/katello","description":"Katello integrates open source systems management tools into a single solution for controlling the lifecycle of your machines.","fork":true,"url":"https://api.github.com/repos/ehelms/katello","forks_url":"https://api.github.com/repos/ehelms/katello/forks","keys_url":"https://api.github.com/repos/ehelms/katello/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ehelms/katello/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ehelms/katello/teams","hooks_url":"https://api.github.com/repos/ehelms/katello/hooks","issue_events_url":"https://api.github.com/repos/ehelms/katello/issues/events{/number}","events_url":"https://api.github.com/repos/ehelms/katello/events","assignees_url":"https://api.github.com/repos/ehelms/katello/assignees{/user}","branches_url":"https://api.github.com/repos/ehelms/katello/branches{/branch}","tags_url":"https://api.github.com/repos/ehelms/katello/tags","blobs_url":"https://api.github.com/repos/ehelms/katello/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ehelms/katello/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ehelms/katello/git/refs{/sha}","trees_url":"https://api.github.com/repos/ehelms/katello/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ehelms/katello/statuses/{sha}","languages_url":"https://api.github.com/repos/ehelms/katello/languages","stargazers_url":"https://api.github.com/repos/ehelms/katello/stargazers","contributors_url":"https://api.github.com/repos/ehelms/katello/contributors","subscribers_url":"https://api.github.com/repos/ehelms/katello/subscribers","subscription_url":"https://api.github.com/repos/ehelms/katello/subscription","commits_url":"https://api.github.com/repos/ehelms/katello/commits{/sha}","git_commits_url":"https://api.github.com/repos/ehelms/katello/git/commits{/sha}","comments_url":"https://api.github.com/repos/ehelms/katello/comments{/number}","issue_comment_url":"https://api.github.com/repos/ehelms/katello/issues/comments{/number}","contents_url":"https://api.github.com/repos/ehelms/katello/contents/{+path}","compare_url":"https://api.github.com/repos/ehelms/katello/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ehelms/katello/merges","archive_url":"https://api.github.com/repos/ehelms/katello/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ehelms/katello/downloads","issues_url":"https://api.github.com/repos/ehelms/katello/issues{/number}","pulls_url":"https://api.github.com/repos/ehelms/katello/pulls{/number}","milestones_url":"https://api.github.com/repos/ehelms/katello/milestones{/number}","notifications_url":"https://api.github.com/repos/ehelms/katello/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ehelms/katello/labels{/name}","releases_url":"https://api.github.com/repos/ehelms/katello/releases{/id}","created_at":"2012-04-16T14:03:35Z","updated_at":"2014-07-29T00:45:44Z","pushed_at":"2015-04-29T14:50:36Z","git_url":"git://github.com/ehelms/katello.git","ssh_url":"git@github.com:ehelms/katello.git","clone_url":"https://github.com/ehelms/katello.git","svn_url":"https://github.com/ehelms/katello","homepage":"katello.org","size":77797,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"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":"master"}},"base":{"label":"Katello:master","ref":"master","sha":"f61d651cdefe91fce219900613259ab84e374877","user":{"login":"Katello","id":1316386,"avatar_url":"https://avatars.githubusercontent.com/u/1316386?v=3","gravatar_id":"","url":"https://api.github.com/users/Katello","html_url":"https://github.com/Katello","followers_url":"https://api.github.com/users/Katello/followers","following_url":"https://api.github.com/users/Katello/following{/other_user}","gists_url":"https://api.github.com/users/Katello/gists{/gist_id}","starred_url":"https://api.github.com/users/Katello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Katello/subscriptions","organizations_url":"https://api.github.com/users/Katello/orgs","repos_url":"https://api.github.com/users/Katello/repos","events_url":"https://api.github.com/users/Katello/events{/privacy}","received_events_url":"https://api.github.com/users/Katello/received_events","type":"Organization","site_admin":false},"repo":{"id":4007018,"name":"katello","full_name":"Katello/katello","owner":{"login":"Katello","id":1316386,"avatar_url":"https://avatars.githubusercontent.com/u/1316386?v=3","gravatar_id":"","url":"https://api.github.com/users/Katello","html_url":"https://github.com/Katello","followers_url":"https://api.github.com/users/Katello/followers","following_url":"https://api.github.com/users/Katello/following{/other_user}","gists_url":"https://api.github.com/users/Katello/gists{/gist_id}","starred_url":"https://api.github.com/users/Katello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Katello/subscriptions","organizations_url":"https://api.github.com/users/Katello/orgs","repos_url":"https://api.github.com/users/Katello/repos","events_url":"https://api.github.com/users/Katello/events{/privacy}","received_events_url":"https://api.github.com/users/Katello/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Katello/katello","description":"Katello integrates open source systems management tools into a single solution for controlling the lifecycle of your machines.","fork":false,"url":"https://api.github.com/repos/Katello/katello","forks_url":"https://api.github.com/repos/Katello/katello/forks","keys_url":"https://api.github.com/repos/Katello/katello/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Katello/katello/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Katello/katello/teams","hooks_url":"https://api.github.com/repos/Katello/katello/hooks","issue_events_url":"https://api.github.com/repos/Katello/katello/issues/events{/number}","events_url":"https://api.github.com/repos/Katello/katello/events","assignees_url":"https://api.github.com/repos/Katello/katello/assignees{/user}","branches_url":"https://api.github.com/repos/Katello/katello/branches{/branch}","tags_url":"https://api.github.com/repos/Katello/katello/tags","blobs_url":"https://api.github.com/repos/Katello/katello/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Katello/katello/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Katello/katello/git/refs{/sha}","trees_url":"https://api.github.com/repos/Katello/katello/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Katello/katello/statuses/{sha}","languages_url":"https://api.github.com/repos/Katello/katello/languages","stargazers_url":"https://api.github.com/repos/Katello/katello/stargazers","contributors_url":"https://api.github.com/repos/Katello/katello/contributors","subscribers_url":"https://api.github.com/repos/Katello/katello/subscribers","subscription_url":"https://api.github.com/repos/Katello/katello/subscription","commits_url":"https://api.github.com/repos/Katello/katello/commits{/sha}","git_commits_url":"https://api.github.com/repos/Katello/katello/git/commits{/sha}","comments_url":"https://api.github.com/repos/Katello/katello/comments{/number}","issue_comment_url":"https://api.github.com/repos/Katello/katello/issues/comments{/number}","contents_url":"https://api.github.com/repos/Katello/katello/contents/{+path}","compare_url":"https://api.github.com/repos/Katello/katello/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Katello/katello/merges","archive_url":"https://api.github.com/repos/Katello/katello/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Katello/katello/downloads","issues_url":"https://api.github.com/repos/Katello/katello/issues{/number}","pulls_url":"https://api.github.com/repos/Katello/katello/pulls{/number}","milestones_url":"https://api.github.com/repos/Katello/katello/milestones{/number}","notifications_url":"https://api.github.com/repos/Katello/katello/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Katello/katello/labels{/name}","releases_url":"https://api.github.com/repos/Katello/katello/releases{/id}","created_at":"2012-04-12T16:59:08Z","updated_at":"2015-04-29T12:49:32Z","pushed_at":"2015-04-29T15:21:21Z","git_url":"git://github.com/Katello/katello.git","ssh_url":"git@github.com:Katello/katello.git","clone_url":"https://github.com/Katello/katello.git","svn_url":"https://github.com/Katello/katello","homepage":"katello.org","size":233849,"stargazers_count":155,"watchers_count":155,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":98,"forks":107,"open_issues":98,"watchers":155,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Katello/katello/pulls/5195"},"html":{"href":"https://github.com/Katello/katello/pull/5195"},"issue":{"href":"https://api.github.com/repos/Katello/katello/issues/5195"},"comments":{"href":"https://api.github.com/repos/Katello/katello/issues/5195/comments"},"review_comments":{"href":"https://api.github.com/repos/Katello/katello/pulls/5195/comments"},"review_comment":{"href":"https://api.github.com/repos/Katello/katello/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Katello/katello/pulls/5195/commits"},"statuses":{"href":"https://api.github.com/repos/Katello/katello/statuses/e97d62b032f7daf67b941b30993d5829b81c0d36"}}}}