{"action":"created","comment":{"url":"https://api.github.com/repos/pulp/pulp/pulls/comments/41021333","id":41021333,"diff_hunk":"@@ -271,6 +272,33 @@ def queue_delete(repo_id):\n     return async_result\n \n \n+def get_importer_by_id(object_id):\n+    \"\"\"\n+    Get a plugin and call configuration using the document ID\n+    of the repository-importer association document.\n+\n+    :param object_id: The document ID .\n+    :type object_id: str\n+    :return: A tuple of:\n+        (pulp.plugins.importer.Importer, pulp.plugins.config.PluginCallConfiguration)\n+    :rtype: tuple\n+    :raise pulp.plugins.loader.exceptions.PluginNotFound: not found.\n+    :raise\n+    \"\"\"\n+    collection = RepoImporter.get_collection()\n+    try:\n+        object_id = ObjectId(object_id)\n+    except InvalidId:\n+        raise plugin_exceptions.PluginNotFound()","path":"server/pulp/server/controllers/repository.py","position":29,"original_position":29,"commit_id":"2079e3c98a24c64d1f91fbda8e6923518462edf9","original_commit_id":"2079e3c98a24c64d1f91fbda8e6923518462edf9","user":{"login":"jeremycline","id":1977525,"avatar_url":"https://avatars.githubusercontent.com/u/1977525?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremycline","html_url":"https://github.com/jeremycline","followers_url":"https://api.github.com/users/jeremycline/followers","following_url":"https://api.github.com/users/jeremycline/following{/other_user}","gists_url":"https://api.github.com/users/jeremycline/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremycline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremycline/subscriptions","organizations_url":"https://api.github.com/users/jeremycline/orgs","repos_url":"https://api.github.com/users/jeremycline/repos","events_url":"https://api.github.com/users/jeremycline/events{/privacy}","received_events_url":"https://api.github.com/users/jeremycline/received_events","type":"User","site_admin":false},"body":"I'm on the fence about this. On the one hand it might be better to let the InvalidId exception be raised because that lets the user know they aren't providing the correct input, but on the other hand the PluginNotFound exception isn't *wrong* and will still make the user go check their input. ","created_at":"2015-10-02T13:35:52Z","updated_at":"2015-10-02T13:35:52Z","html_url":"https://github.com/pulp/pulp/pull/2090#discussion_r41021333","pull_request_url":"https://api.github.com/repos/pulp/pulp/pulls/2090","_links":{"self":{"href":"https://api.github.com/repos/pulp/pulp/pulls/comments/41021333"},"html":{"href":"https://github.com/pulp/pulp/pull/2090#discussion_r41021333"},"pull_request":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2090"}}},"pull_request":{"url":"https://api.github.com/repos/pulp/pulp/pulls/2090","id":46464177,"html_url":"https://github.com/pulp/pulp/pull/2090","diff_url":"https://github.com/pulp/pulp/pull/2090.diff","patch_url":"https://github.com/pulp/pulp/pull/2090.patch","issue_url":"https://api.github.com/repos/pulp/pulp/issues/2090","number":2090,"state":"open","locked":false,"title":"Add content download task.","user":{"login":"jortel","id":1126767,"avatar_url":"https://avatars.githubusercontent.com/u/1126767?v=3","gravatar_id":"","url":"https://api.github.com/users/jortel","html_url":"https://github.com/jortel","followers_url":"https://api.github.com/users/jortel/followers","following_url":"https://api.github.com/users/jortel/following{/other_user}","gists_url":"https://api.github.com/users/jortel/gists{/gist_id}","starred_url":"https://api.github.com/users/jortel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jortel/subscriptions","organizations_url":"https://api.github.com/users/jortel/orgs","repos_url":"https://api.github.com/users/jortel/repos","events_url":"https://api.github.com/users/jortel/events{/privacy}","received_events_url":"https://api.github.com/users/jortel/received_events","type":"User","site_admin":false},"body":"https://pulp.plan.io/issues/1181\r\n\r\nStill needs unit tests but wanted to get some pre-review.","created_at":"2015-09-30T22:16:14Z","updated_at":"2015-10-02T13:35:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"013a148a668029db663b5dfd6b8346aed5017c8d","assignee":{"login":"jeremycline","id":1977525,"avatar_url":"https://avatars.githubusercontent.com/u/1977525?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremycline","html_url":"https://github.com/jeremycline","followers_url":"https://api.github.com/users/jeremycline/followers","following_url":"https://api.github.com/users/jeremycline/following{/other_user}","gists_url":"https://api.github.com/users/jeremycline/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremycline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremycline/subscriptions","organizations_url":"https://api.github.com/users/jeremycline/orgs","repos_url":"https://api.github.com/users/jeremycline/repos","events_url":"https://api.github.com/users/jeremycline/events{/privacy}","received_events_url":"https://api.github.com/users/jeremycline/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/pulp/pulp/pulls/2090/commits","review_comments_url":"https://api.github.com/repos/pulp/pulp/pulls/2090/comments","review_comment_url":"https://api.github.com/repos/pulp/pulp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pulp/pulp/issues/2090/comments","statuses_url":"https://api.github.com/repos/pulp/pulp/statuses/2079e3c98a24c64d1f91fbda8e6923518462edf9","head":{"label":"jortel:issue-1181","ref":"issue-1181","sha":"2079e3c98a24c64d1f91fbda8e6923518462edf9","user":{"login":"jortel","id":1126767,"avatar_url":"https://avatars.githubusercontent.com/u/1126767?v=3","gravatar_id":"","url":"https://api.github.com/users/jortel","html_url":"https://github.com/jortel","followers_url":"https://api.github.com/users/jortel/followers","following_url":"https://api.github.com/users/jortel/following{/other_user}","gists_url":"https://api.github.com/users/jortel/gists{/gist_id}","starred_url":"https://api.github.com/users/jortel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jortel/subscriptions","organizations_url":"https://api.github.com/users/jortel/orgs","repos_url":"https://api.github.com/users/jortel/repos","events_url":"https://api.github.com/users/jortel/events{/privacy}","received_events_url":"https://api.github.com/users/jortel/received_events","type":"User","site_admin":false},"repo":{"id":26142168,"name":"pulp","full_name":"jortel/pulp","owner":{"login":"jortel","id":1126767,"avatar_url":"https://avatars.githubusercontent.com/u/1126767?v=3","gravatar_id":"","url":"https://api.github.com/users/jortel","html_url":"https://github.com/jortel","followers_url":"https://api.github.com/users/jortel/followers","following_url":"https://api.github.com/users/jortel/following{/other_user}","gists_url":"https://api.github.com/users/jortel/gists{/gist_id}","starred_url":"https://api.github.com/users/jortel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jortel/subscriptions","organizations_url":"https://api.github.com/users/jortel/orgs","repos_url":"https://api.github.com/users/jortel/repos","events_url":"https://api.github.com/users/jortel/events{/privacy}","received_events_url":"https://api.github.com/users/jortel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jortel/pulp","description":"Repository for Pulp platform code, including the server and base admin and consumer clients","fork":true,"url":"https://api.github.com/repos/jortel/pulp","forks_url":"https://api.github.com/repos/jortel/pulp/forks","keys_url":"https://api.github.com/repos/jortel/pulp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jortel/pulp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jortel/pulp/teams","hooks_url":"https://api.github.com/repos/jortel/pulp/hooks","issue_events_url":"https://api.github.com/repos/jortel/pulp/issues/events{/number}","events_url":"https://api.github.com/repos/jortel/pulp/events","assignees_url":"https://api.github.com/repos/jortel/pulp/assignees{/user}","branches_url":"https://api.github.com/repos/jortel/pulp/branches{/branch}","tags_url":"https://api.github.com/repos/jortel/pulp/tags","blobs_url":"https://api.github.com/repos/jortel/pulp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jortel/pulp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jortel/pulp/git/refs{/sha}","trees_url":"https://api.github.com/repos/jortel/pulp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jortel/pulp/statuses/{sha}","languages_url":"https://api.github.com/repos/jortel/pulp/languages","stargazers_url":"https://api.github.com/repos/jortel/pulp/stargazers","contributors_url":"https://api.github.com/repos/jortel/pulp/contributors","subscribers_url":"https://api.github.com/repos/jortel/pulp/subscribers","subscription_url":"https://api.github.com/repos/jortel/pulp/subscription","commits_url":"https://api.github.com/repos/jortel/pulp/commits{/sha}","git_commits_url":"https://api.github.com/repos/jortel/pulp/git/commits{/sha}","comments_url":"https://api.github.com/repos/jortel/pulp/comments{/number}","issue_comment_url":"https://api.github.com/repos/jortel/pulp/issues/comments{/number}","contents_url":"https://api.github.com/repos/jortel/pulp/contents/{+path}","compare_url":"https://api.github.com/repos/jortel/pulp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jortel/pulp/merges","archive_url":"https://api.github.com/repos/jortel/pulp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jortel/pulp/downloads","issues_url":"https://api.github.com/repos/jortel/pulp/issues{/number}","pulls_url":"https://api.github.com/repos/jortel/pulp/pulls{/number}","milestones_url":"https://api.github.com/repos/jortel/pulp/milestones{/number}","notifications_url":"https://api.github.com/repos/jortel/pulp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jortel/pulp/labels{/name}","releases_url":"https://api.github.com/repos/jortel/pulp/releases{/id}","created_at":"2014-11-03T22:37:29Z","updated_at":"2015-04-20T18:13:21Z","pushed_at":"2015-09-30T22:13:07Z","git_url":"git://github.com/jortel/pulp.git","ssh_url":"git@github.com:jortel/pulp.git","clone_url":"https://github.com/jortel/pulp.git","svn_url":"https://github.com/jortel/pulp","homepage":"","size":86563,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":0,"default_branch":"master"}},"base":{"label":"pulp:lazy-content","ref":"lazy-content","sha":"2d82e1a566c38ca099a325bab26cac8799e3c92f","user":{"login":"pulp","id":2103606,"avatar_url":"https://avatars.githubusercontent.com/u/2103606?v=3","gravatar_id":"","url":"https://api.github.com/users/pulp","html_url":"https://github.com/pulp","followers_url":"https://api.github.com/users/pulp/followers","following_url":"https://api.github.com/users/pulp/following{/other_user}","gists_url":"https://api.github.com/users/pulp/gists{/gist_id}","starred_url":"https://api.github.com/users/pulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulp/subscriptions","organizations_url":"https://api.github.com/users/pulp/orgs","repos_url":"https://api.github.com/users/pulp/repos","events_url":"https://api.github.com/users/pulp/events{/privacy}","received_events_url":"https://api.github.com/users/pulp/received_events","type":"Organization","site_admin":false},"repo":{"id":5314652,"name":"pulp","full_name":"pulp/pulp","owner":{"login":"pulp","id":2103606,"avatar_url":"https://avatars.githubusercontent.com/u/2103606?v=3","gravatar_id":"","url":"https://api.github.com/users/pulp","html_url":"https://github.com/pulp","followers_url":"https://api.github.com/users/pulp/followers","following_url":"https://api.github.com/users/pulp/following{/other_user}","gists_url":"https://api.github.com/users/pulp/gists{/gist_id}","starred_url":"https://api.github.com/users/pulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulp/subscriptions","organizations_url":"https://api.github.com/users/pulp/orgs","repos_url":"https://api.github.com/users/pulp/repos","events_url":"https://api.github.com/users/pulp/events{/privacy}","received_events_url":"https://api.github.com/users/pulp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pulp/pulp","description":"Repository for Pulp platform code, including the server and base admin and consumer clients","fork":false,"url":"https://api.github.com/repos/pulp/pulp","forks_url":"https://api.github.com/repos/pulp/pulp/forks","keys_url":"https://api.github.com/repos/pulp/pulp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pulp/pulp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pulp/pulp/teams","hooks_url":"https://api.github.com/repos/pulp/pulp/hooks","issue_events_url":"https://api.github.com/repos/pulp/pulp/issues/events{/number}","events_url":"https://api.github.com/repos/pulp/pulp/events","assignees_url":"https://api.github.com/repos/pulp/pulp/assignees{/user}","branches_url":"https://api.github.com/repos/pulp/pulp/branches{/branch}","tags_url":"https://api.github.com/repos/pulp/pulp/tags","blobs_url":"https://api.github.com/repos/pulp/pulp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pulp/pulp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pulp/pulp/git/refs{/sha}","trees_url":"https://api.github.com/repos/pulp/pulp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pulp/pulp/statuses/{sha}","languages_url":"https://api.github.com/repos/pulp/pulp/languages","stargazers_url":"https://api.github.com/repos/pulp/pulp/stargazers","contributors_url":"https://api.github.com/repos/pulp/pulp/contributors","subscribers_url":"https://api.github.com/repos/pulp/pulp/subscribers","subscription_url":"https://api.github.com/repos/pulp/pulp/subscription","commits_url":"https://api.github.com/repos/pulp/pulp/commits{/sha}","git_commits_url":"https://api.github.com/repos/pulp/pulp/git/commits{/sha}","comments_url":"https://api.github.com/repos/pulp/pulp/comments{/number}","issue_comment_url":"https://api.github.com/repos/pulp/pulp/issues/comments{/number}","contents_url":"https://api.github.com/repos/pulp/pulp/contents/{+path}","compare_url":"https://api.github.com/repos/pulp/pulp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pulp/pulp/merges","archive_url":"https://api.github.com/repos/pulp/pulp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pulp/pulp/downloads","issues_url":"https://api.github.com/repos/pulp/pulp/issues{/number}","pulls_url":"https://api.github.com/repos/pulp/pulp/pulls{/number}","milestones_url":"https://api.github.com/repos/pulp/pulp/milestones{/number}","notifications_url":"https://api.github.com/repos/pulp/pulp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pulp/pulp/labels{/name}","releases_url":"https://api.github.com/repos/pulp/pulp/releases{/id}","created_at":"2012-08-06T13:49:20Z","updated_at":"2015-10-02T09:51:52Z","pushed_at":"2015-10-02T13:02:12Z","git_url":"git://github.com/pulp/pulp.git","ssh_url":"git@github.com:pulp/pulp.git","clone_url":"https://github.com/pulp/pulp.git","svn_url":"https://github.com/pulp/pulp","homepage":"","size":209674,"stargazers_count":219,"watchers_count":219,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":91,"mirror_url":null,"open_issues_count":16,"forks":91,"open_issues":16,"watchers":219,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2090"},"html":{"href":"https://github.com/pulp/pulp/pull/2090"},"issue":{"href":"https://api.github.com/repos/pulp/pulp/issues/2090"},"comments":{"href":"https://api.github.com/repos/pulp/pulp/issues/2090/comments"},"review_comments":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2090/comments"},"review_comment":{"href":"https://api.github.com/repos/pulp/pulp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2090/commits"},"statuses":{"href":"https://api.github.com/repos/pulp/pulp/statuses/2079e3c98a24c64d1f91fbda8e6923518462edf9"}}}}