{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/82199928","pull_request_review_id":3123279,"id":82199928,"diff_hunk":"@@ -169,10 +169,28 @@ def self.reset_to_defaults\n       reset_domain(DATASTORE_DIRECTORY, domain_name, Tenant.root_tenant)\n     end\n \n+    reset_domains_from_provider_gems\n+\n     restore_attrs_for_domains(saved_attrs)\n     reset_default_namespace\n   end\n \n+  def self.reset_domains_from_provider_gems\n+    provider_gems = Vmdb::Plugins.instance.vmdb_plugins\n+    provider_gems.each do |provider_gem|\n+      domain_bucket = provider_gem.root.join(\"db\", \"fixtures\", \"ae_datastore\")\n+      Dir.glob(domain_bucket.join(\"*\")).each do |domain_location|\n+        next unless File.directory?(domain_location)","path":"lib/miq_automation_engine/models/miq_ae_datastore.rb","position":15,"original_position":15,"commit_id":"9af98a05f2302ba2f527fc3e8691419fb51ae1ca","original_commit_id":"9af98a05f2302ba2f527fc3e8691419fb51ae1ca","user":{"login":"mkanoor","id":6452699,"avatar_url":"https://avatars.githubusercontent.com/u/6452699?v=3","gravatar_id":"","url":"https://api.github.com/users/mkanoor","html_url":"https://github.com/mkanoor","followers_url":"https://api.github.com/users/mkanoor/followers","following_url":"https://api.github.com/users/mkanoor/following{/other_user}","gists_url":"https://api.github.com/users/mkanoor/gists{/gist_id}","starred_url":"https://api.github.com/users/mkanoor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkanoor/subscriptions","organizations_url":"https://api.github.com/users/mkanoor/orgs","repos_url":"https://api.github.com/users/mkanoor/repos","events_url":"https://api.github.com/users/mkanoor/events{/privacy}","received_events_url":"https://api.github.com/users/mkanoor/received_events","type":"User","site_admin":false},"body":"@bdunne \r\nShould this include the provider name from the provider gem?\r\nThis would reset all domains from the ae_datastore directory","created_at":"2016-10-06T14:23:15Z","updated_at":"2016-10-06T14:23:15Z","html_url":"https://github.com/ManageIQ/manageiq/pull/11083#discussion_r82199928","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/11083","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/82199928"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/11083#discussion_r82199928"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/11083"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/11083","id":84373383,"html_url":"https://github.com/ManageIQ/manageiq/pull/11083","diff_url":"https://github.com/ManageIQ/manageiq/pull/11083.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/11083.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/11083","number":11083,"state":"open","locked":false,"title":"Pluggable automate domains","user":{"login":"bdunne","id":651659,"avatar_url":"https://avatars.githubusercontent.com/u/651659?v=3","gravatar_id":"","url":"https://api.github.com/users/bdunne","html_url":"https://github.com/bdunne","followers_url":"https://api.github.com/users/bdunne/followers","following_url":"https://api.github.com/users/bdunne/following{/other_user}","gists_url":"https://api.github.com/users/bdunne/gists{/gist_id}","starred_url":"https://api.github.com/users/bdunne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdunne/subscriptions","organizations_url":"https://api.github.com/users/bdunne/orgs","repos_url":"https://api.github.com/users/bdunne/repos","events_url":"https://api.github.com/users/bdunne/events{/privacy}","received_events_url":"https://api.github.com/users/bdunne/received_events","type":"User","site_admin":false},"body":"Allow provider plugins to carry their own automate domains.  When resetting domains, those should be included in the reset.\r\n\r\nIn the engine.rb, provider plugins just need to define:\r\n```ruby\r\ndef manageiq_provider_plugin?\r\n  true\r\nend\r\n```","created_at":"2016-09-07T21:04:29Z","updated_at":"2016-10-06T14:23:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"988edb8c71094e3c68505852060d2b088e42ac40","assignee":{"login":"Fryguy","id":52120,"avatar_url":"https://avatars.githubusercontent.com/u/52120?v=3","gravatar_id":"","url":"https://api.github.com/users/Fryguy","html_url":"https://github.com/Fryguy","followers_url":"https://api.github.com/users/Fryguy/followers","following_url":"https://api.github.com/users/Fryguy/following{/other_user}","gists_url":"https://api.github.com/users/Fryguy/gists{/gist_id}","starred_url":"https://api.github.com/users/Fryguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fryguy/subscriptions","organizations_url":"https://api.github.com/users/Fryguy/orgs","repos_url":"https://api.github.com/users/Fryguy/repos","events_url":"https://api.github.com/users/Fryguy/events{/privacy}","received_events_url":"https://api.github.com/users/Fryguy/received_events","type":"User","site_admin":false},"assignees":[{"login":"Fryguy","id":52120,"avatar_url":"https://avatars.githubusercontent.com/u/52120?v=3","gravatar_id":"","url":"https://api.github.com/users/Fryguy","html_url":"https://github.com/Fryguy","followers_url":"https://api.github.com/users/Fryguy/followers","following_url":"https://api.github.com/users/Fryguy/following{/other_user}","gists_url":"https://api.github.com/users/Fryguy/gists{/gist_id}","starred_url":"https://api.github.com/users/Fryguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fryguy/subscriptions","organizations_url":"https://api.github.com/users/Fryguy/orgs","repos_url":"https://api.github.com/users/Fryguy/repos","events_url":"https://api.github.com/users/Fryguy/events{/privacy}","received_events_url":"https://api.github.com/users/Fryguy/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/11083/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/11083/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/11083/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/9af98a05f2302ba2f527fc3e8691419fb51ae1ca","head":{"label":"bdunne:pluggable_automate","ref":"pluggable_automate","sha":"9af98a05f2302ba2f527fc3e8691419fb51ae1ca","user":{"login":"bdunne","id":651659,"avatar_url":"https://avatars.githubusercontent.com/u/651659?v=3","gravatar_id":"","url":"https://api.github.com/users/bdunne","html_url":"https://github.com/bdunne","followers_url":"https://api.github.com/users/bdunne/followers","following_url":"https://api.github.com/users/bdunne/following{/other_user}","gists_url":"https://api.github.com/users/bdunne/gists{/gist_id}","starred_url":"https://api.github.com/users/bdunne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdunne/subscriptions","organizations_url":"https://api.github.com/users/bdunne/orgs","repos_url":"https://api.github.com/users/bdunne/repos","events_url":"https://api.github.com/users/bdunne/events{/privacy}","received_events_url":"https://api.github.com/users/bdunne/received_events","type":"User","site_admin":false},"repo":{"id":20791794,"name":"manageiq","full_name":"bdunne/manageiq","owner":{"login":"bdunne","id":651659,"avatar_url":"https://avatars.githubusercontent.com/u/651659?v=3","gravatar_id":"","url":"https://api.github.com/users/bdunne","html_url":"https://github.com/bdunne","followers_url":"https://api.github.com/users/bdunne/followers","following_url":"https://api.github.com/users/bdunne/following{/other_user}","gists_url":"https://api.github.com/users/bdunne/gists{/gist_id}","starred_url":"https://api.github.com/users/bdunne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdunne/subscriptions","organizations_url":"https://api.github.com/users/bdunne/orgs","repos_url":"https://api.github.com/users/bdunne/repos","events_url":"https://api.github.com/users/bdunne/events{/privacy}","received_events_url":"https://api.github.com/users/bdunne/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bdunne/manageiq","description":"ManageIQ Cloud Management Platform","fork":true,"url":"https://api.github.com/repos/bdunne/manageiq","forks_url":"https://api.github.com/repos/bdunne/manageiq/forks","keys_url":"https://api.github.com/repos/bdunne/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bdunne/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bdunne/manageiq/teams","hooks_url":"https://api.github.com/repos/bdunne/manageiq/hooks","issue_events_url":"https://api.github.com/repos/bdunne/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/bdunne/manageiq/events","assignees_url":"https://api.github.com/repos/bdunne/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/bdunne/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/bdunne/manageiq/tags","blobs_url":"https://api.github.com/repos/bdunne/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bdunne/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bdunne/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/bdunne/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bdunne/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/bdunne/manageiq/languages","stargazers_url":"https://api.github.com/repos/bdunne/manageiq/stargazers","contributors_url":"https://api.github.com/repos/bdunne/manageiq/contributors","subscribers_url":"https://api.github.com/repos/bdunne/manageiq/subscribers","subscription_url":"https://api.github.com/repos/bdunne/manageiq/subscription","commits_url":"https://api.github.com/repos/bdunne/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/bdunne/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/bdunne/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/bdunne/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/bdunne/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/bdunne/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bdunne/manageiq/merges","archive_url":"https://api.github.com/repos/bdunne/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bdunne/manageiq/downloads","issues_url":"https://api.github.com/repos/bdunne/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/bdunne/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/bdunne/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/bdunne/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bdunne/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/bdunne/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/bdunne/manageiq/deployments","created_at":"2014-06-13T04:12:55Z","updated_at":"2015-02-25T15:20:17Z","pushed_at":"2016-10-05T16:09:14Z","git_url":"git://github.com/bdunne/manageiq.git","ssh_url":"git@github.com:bdunne/manageiq.git","clone_url":"https://github.com/bdunne/manageiq.git","svn_url":"https://github.com/bdunne/manageiq","homepage":null,"size":154027,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"ManageIQ:master","ref":"master","sha":"508d902164d9a45af5e74af779a999ffca1b0e3b","user":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":20789757,"name":"manageiq","full_name":"ManageIQ/manageiq","owner":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManageIQ/manageiq","description":"ManageIQ Open-Source Management Platform","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq","forks_url":"https://api.github.com/repos/ManageIQ/manageiq/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/manageiq/deployments","created_at":"2014-06-13T02:31:26Z","updated_at":"2016-10-05T13:39:00Z","pushed_at":"2016-10-06T14:21:21Z","git_url":"git://github.com/ManageIQ/manageiq.git","ssh_url":"git@github.com:ManageIQ/manageiq.git","clone_url":"https://github.com/ManageIQ/manageiq.git","svn_url":"https://github.com/ManageIQ/manageiq","homepage":"manageiq.org","size":208639,"stargazers_count":333,"watchers_count":333,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":359,"mirror_url":null,"open_issues_count":829,"forks":359,"open_issues":829,"watchers":333,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/11083"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/11083"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/11083"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/11083/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/11083/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/11083/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq/statuses/9af98a05f2302ba2f527fc3e8691419fb51ae1ca"}}}}
{"actor":{"display_login":"mkanoor"}}